tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Elkjær <mar...@elkjaer-it.dk>
Subject Re: Problem using Hibernate as my persistence provider
Date Fri, 20 Nov 2009 10:17:40 GMT
Hi David,

Thx. for your help. I moved the following Hibernate specfics jars to lib
folder under openejb:
----------------------------------------------------
xml-apis-1.0.b2.jar
slf4j-jdk14-1.4.2.jar
slf4j-api-1.4.2.jar
javassist-3.4.GA.jar
hibernate-entitymanager-3.4.0.GA.jar
hibernate-core-3.3.0.SP1.jar
hibernate-commons-annotations-3.1.0.GA.jar
hibernate-annotations-3.4.0.GA.jar
dom4j-1.6.1.jar
antlr-2.7.6.jar
----------------------------------------------------

I also had to delete the slf4j already under openejb/lib.

My sample project now works perfectly - Thanks David.


Next step is to use OpenEJB in my real project, which gives me some trouble
as my servlet is not bound to the context :
javax.naming.NameNotFoundException: Name
dk.elkjaerit.mtd.server.rpc.TestServlet is not bound in this Context

The openejb.log seems ok: All my EJB are there, and the last 2 lines is:

2009-11-20 10:54:44,609 - INFO  - Created
Ejb(deployment-id=PersonHibernateDAO, ejb-name=PersonHibernateDAO,
container=My Stateless Container)
2009-11-20 10:54:44,609 - INFO  - Deployed Application(path=U:\mtd\war)

So I assume it's ok - or ???
When I look in the localhost log the following is found:
--------------------------------------------------------------------------------------------
INFO: Marking servlet TestServlet as unavailable
20-11-2009 10:59:41 org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet /mtd threw load() exception
javax.naming.NameNotFoundException: Name
dk.elkjaerit.mtd.server.rpc.TestServlet is not bound in this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:770)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at
org.apache.catalina.util.DefaultAnnotationProcessor.lookupFieldResource(DefaultAnnotationProcessor.java:265)
<SNIP>
-------------------------------------------

The servlet is using a very very simple stateless bean taken from my
testproject (where it works!). When I comment out the bean and annotation
@EJB the servlet is perfectly bound !!
So whats wrong ??
I've looked at all my logfiles with no success...
It is definetely a problem in my project setup (as every things works
perfect in my test project), but I don't know where, so a little help would
be nice :-)

Best Regards
Martin





2009/11/19 David Blevins <david.blevins@visi.com>

>
> On Nov 19, 2009, at 6:19 AM, Martin Elkjær wrote:
>
>  I'm trying to use Hibernate as my persistence provider. All my unittests
>> are
>> working fine, but when I try to deploy to my Tomcat/OpenEJB server i get
>> the
>> following exception in openejb.log:
>> java.lang.NoClassDefFoundError:
>> org/hibernate/transaction/TransactionManagerLookup
>>
>> This class is in hibernate-core.jar which is deployed in my WEB-INF/lib
>> folder, so I'm a bit confused......
>>
>
> If you move the hibernate jars to the tomcat/lib directory it should work
> fine.
>
> -David
>
>


-- 
Venlig hilsen

Martin Elkjær
----------------------------------------------------
Mail: martin@elkjaer-it.dk
Tlf: +45 30275928
http://www.mintraeningsdagbog.dk

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message