-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate 3.5 + JPA 2.0 + OpenEJB
PostPosted: Fri Nov 13, 2009 12:33 pm 
Newbie

Joined: Thu Jul 09, 2009 9:35 am
Posts: 6
Hi,

I'm currently trying to use openEJB to unit test my ejbs using Hibernate over JPA 2.

As I ask openEJB to use the HibernateEntityManagerFactory, the config loads and then I get the following error:

My question : Since javax.persistence.criteria.CriteriaBuilder is not part of the JPA API 2.0 Specification,
is this some problem related to the last release of Hibernate?


Code:
ERROR - Application could not be deployed:  classpath.ear
org.apache.openejb.OpenEJBException: Creating application failed: classpath.ear: javax/persistence/criteria/CriteriaBuilder
   at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:666)
   at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:449)
   at org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:367)
   at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:279)
   at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:137)
   at org.apache.openejb.OpenEJB.init(OpenEJB.java:286)
   at org.apache.openejb.OpenEJB.init(OpenEJB.java:265)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
   at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:71)
   at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:53)
   at org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:42)
   at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
   at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
   at javax.naming.InitialContext.init(Unknown Source)
   at javax.naming.InitialContext.<init>(Unknown Source)
   at com.desj.visa.app.cge.tests.CGEServiceTest.setUp(CGEServiceTest.java:34)
   at junit.framework.TestCase.runBare(TestCase.java:125)
   at junit.framework.TestResult$1.protect(TestResult.java:106)
   at junit.framework.TestResult.runProtected(TestResult.java:124)
   at junit.framework.TestResult.run(TestResult.java:109)
   at junit.framework.TestCase.run(TestCase.java:118)
   at junit.framework.TestSuite.runTest(TestSuite.java:208)
   at junit.framework.TestSuite.run(TestSuite.java:203)
   at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
   at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.lang.NoClassDefFoundError: javax/persistence/criteria/CriteriaBuilder
   at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:733)
   at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:158)
   at org.apache.openejb.assembler.classic.PersistenceBuilder.createEntityManagerFactory(PersistenceBuilder.java:184)
   at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:489)
   ... 32 more
Caused by: java.lang.ClassNotFoundException: javax.persistence.criteria.CriteriaBuilder
   at java.net.URLClassLoader$1.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClassInternal(Unknown Source)
   ... 36 more

javax.persistence.criteria.CriteriaBuilder


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.