使用JPQL连接时在Jaspersoft Studio中出错

时间:2017-01-24 08:43:43

标签: jpa jasper-reports jaspersoft-studio

我正在尝试使用Jaspersoft Studio建立jpql连接。

我在下面的例外中说明lockMode()类中没有名称为NamedQuery的方法。但这种方法存在。

net.sf.jasperreports.data.ejbql.EjbqlDataAdapterService.contributeParameters(EjbqlDataAdapterService.java:70)
        ... 30 more
    Caused by: java.lang.NoSuchMethodError: javax.persistence.NamedQuery.lockMode()Ljavax/persistence/LockModeType;
        at org.hibernate.cfg.annotations.QueryHintDefinition.determineLockOptions(QueryHintDefinition.java:138)
        at org.hibernate.cfg.annotations.QueryBinder.bindQuery(QueryBinder.java:72)
        at org.hibernate.cfg.annotations.QueryBinder.bindQueries(QueryBinder.java:219)
        at org.hibernate.cfg.AnnotationBinder.bindQueries(AnnotationBinder.java:374)
        at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:618)
        at org.hibernate.cfg.Configuration$MetadataSourceQueue.processAnnotatedClassesQueue(Configuration.java:3790)
        at org.hibernate.cfg.Configuration$MetadataSourceQueue.processMetadata(Configuration.java:3744)
        at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1410)
        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1844)
        at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:850)
        at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:843)
        at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:399)
        at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:842)
        at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:73)
        at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:54)
        at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
        at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60)
        ... 35 more

这是JSS的项目依赖:

enter image description here

0 个答案:

没有答案