-->
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.  [ 9 posts ] 
Author Message
 Post subject: Backend not found
PostPosted: Tue Sep 02, 2003 7:34 am 
Newbie

Joined: Mon Sep 01, 2003 2:49 pm
Posts: 8
Hello,
i tried to make my example like in the "Hibernate Tomcat Quickstart Tutorial".
But i am using the webshere express server and db2. And i tried it with my own Connection and with the included hibernate connection heandling.

By calling cfg.buildSessionFactory() the server prints:

*********************************************************************************
[02.09.03 13:02:14:907 CEST] 3f876cf1 WebGroup I SRVE0180I: [ERM] [/ERM] [Servlet.LOG]: NavControllerHibernate2: init
[02.09.03 13:02:15:172 CEST] 3f876cf1 Environment I net.sf.hibernate.cfg.Environment Hibernate 2.0.3
[02.09.03 13:02:15:172 CEST] 3f876cf1 Environment I net.sf.hibernate.cfg.Environment hibernate.properties not found
[02.09.03 13:02:15:188 CEST] 3f876cf1 Environment I net.sf.hibernate.cfg.Environment using CGLIB reflection optimizer
[02.09.03 13:02:15:188 CEST] 3f876cf1 Environment I net.sf.hibernate.cfg.Environment JVM proxy support: true
[02.09.03 13:02:15:235 CEST] 3f876cf1 Configuration I net.sf.hibernate.cfg.Configuration Mapping resource: com/clavisNET/erm/model/dataobjects/Navigation.hbm.xml
[02.09.03 13:02:16:438 CEST] 3f876cf1 Binder I net.sf.hibernate.cfg.Binder Mapping class: com.clavisNET.erm.model.dataobjects.Navigation -> navigation
[02.09.03 13:02:16:938 CEST] 3f876cf1 Configuration I net.sf.hibernate.cfg.Configuration processing one-to-many association mappings
[02.09.03 13:02:16:938 CEST] 3f876cf1 Configuration I net.sf.hibernate.cfg.Configuration processing foreign key constraints
[02.09.03 13:02:22:922 CEST] 3f876cf1 WebGroup E SRVE0026E: [Servlet-Fehler]-[]: java.lang.ExceptionInInitializerError: java.lang.IllegalStateException: No backend found
at net.sf.cglib.CodeGenerator.<init>(CodeGenerator.java:127)
at net.sf.cglib.KeyFactoryGenerator.<init>(KeyFactoryGenerator.java:93)
at net.sf.cglib.KeyFactory.create(KeyFactory.java:114)
at net.sf.hibernate.impl.SessionFactoryImpl.<clinit>(SessionFactoryImpl.java:297)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:627)
at com.clavisNET.erm.general.NavControllerHibernate2.configure(NavControllerHibernate2.java:72)
at com.clavisNET.erm.general.NavControllerHibernate2.doPost(NavControllerHibernate2.java:90)
at com.clavisNET.erm.general.NavControllerHibernate2.doGet(NavControllerHibernate2.java:170)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:948)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:530)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:176)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:201)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:610)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:431)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)

*********************************************************************************
What does the backend mean? Is something wrong with the communication to the database?

And by the second and further calling the server prints:

*********************************************************************************
[02.09.03 13:03:03:140 CEST] 3f876cf1 Configuration I net.sf.hibernate.cfg.Configuration Mapping resource: com/clavisNET/erm/model/dataobjects/Navigation.hbm.xml
[02.09.03 13:03:03:250 CEST] 3f876cf1 Binder I net.sf.hibernate.cfg.Binder Mapping class: com.clavisNET.erm.model.dataobjects.Navigation -> navigation
[02.09.03 13:03:03:250 CEST] 3f876cf1 Configuration I net.sf.hibernate.cfg.Configuration processing one-to-many association mappings
[02.09.03 13:03:03:250 CEST] 3f876cf1 Configuration I net.sf.hibernate.cfg.Configuration processing foreign key constraints
[02.09.03 13:03:04:000 CEST] 3f876cf1 WebGroup E SRVE0026E: [Servlet-Fehler]-[net/sf/hibernate/impl/SessionFactoryImpl]: java.lang.NoClassDefFoundError: net/sf/hibernate/impl/SessionFactoryImpl
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:627)
at com.clavisNET.erm.general.NavControllerHibernate2.configure(NavControllerHibernate2.java:72)
at com.clavisNET.erm.general.NavControllerHibernate2.doPost(NavControllerHibernate2.java:90)
at com.clavisNET.erm.general.NavControllerHibernate2.doGet(NavControllerHibernate2.java:170)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:948)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:530)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:176)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:201)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:114)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:610)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:435)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)

*********************************************************************************

although the hibernate2.jar, witch contains the SessionFactoryImpl, is in the Libriary of the project.

Thanks for every help...


Top
 Profile  
 
 Post subject: Problem always excist
PostPosted: Thu Sep 04, 2003 5:26 pm 
Newbie

Joined: Mon Sep 01, 2003 2:49 pm
Posts: 8
Hello, the same problem exist even now...

I can connect with connection pooling to the database. Also evrething shoult be allright with the Database settings. Probably the settings for the session factory aren't ok.

But i think id should be everything well...

<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration
PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">

<hibernate-configuration>

<session-factory name="java:comp/env/hibernate/SessionFactory">

<property name="connection.datasource">java:comp/env/jdbc/ermDS</property>
<property name="show_sql">false</property>
<property name="dialect">net.sf.hibernate.dialect.PostgreSQLDialect</property>

<!-- Mapping files -->
<mapping resource="com/clavisNET/erm/general/model/dataobjects/Navigation.hbm.xml"/>

</session-factory>

</hibernate-configuration>


Witch authentification do i have to choose?
Component-managed - or Container-managed authentication alias.

Thanks for some hints...


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 04, 2003 6:42 pm 
Senior
Senior

Joined: Sun Aug 31, 2003 3:14 pm
Posts: 151
Location: Earth (at the moment)
You need cglib (I think it is cglib-asm.jar) for using the replection optimizer.
Plus either ObjectWeb's asm (I think just asm.jar) or Apache's bcel (not sure what it is called, probably bcel.jar?)

If you want to use the reflection optimizer you need those extra third party jars.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 04, 2003 6:46 pm 
Senior
Senior

Joined: Sun Aug 31, 2003 3:14 pm
Posts: 151
Location: Earth (at the moment)
P.S. I have cglib-asm.jar, asm.jar, asm-tree.jar, and asm-util.jar
I'm not sure if the asm-xxxx.jar files are needed?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 04, 2003 6:49 pm 
Senior
Senior

Joined: Sun Aug 31, 2003 3:14 pm
Posts: 151
Location: Earth (at the moment)
P.P.S.

Quote:
What does the backend mean? Is something wrong with the communication to the database?


No, it's just a misleading error message. It should tell you it can't find the jar file but instead it gives that non-descript and completely unhelpful message.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 07, 2003 2:11 am 
Beginner
Beginner

Joined: Fri Aug 29, 2003 3:39 pm
Posts: 33
Location: San Francisco, CA
If you have cglib-asm.jar it already includes the ASM classes (use "jar -tvf cglib-asm.jar" to make sure). Including asm.jar again may actually be the cause of your problem.

The next version of CGLIB will be ASM-only and these problems will go away.

Chris


Top
 Profile  
 
 Post subject: No backend found
PostPosted: Fri Sep 19, 2003 7:49 am 
Newbie

Joined: Fri Sep 19, 2003 7:41 am
Posts: 4
I have the same problem. I am developing a stand-alone application that uses Hibernate for persisting objects. When calling buildSessionFactory, I get the error message: "No backend found".

I copied the "cglib-1.0.jar" (note the file name) from the source forge.
I checked the contents of it with command:
jar tvf cglib-1.0.jar

, and there were indeed files:
net/sf/cglib/ASMBackend.class
and
net/sf/cglib/BCELBackend.class

, but I am still getting the same error message: "No backend found".

What should I do?


Top
 Profile  
 
 Post subject: Just the classes was not enough
PostPosted: Fri Sep 19, 2003 9:00 am 
Newbie

Joined: Fri Sep 19, 2003 7:41 am
Posts: 4
I copied the extra jar files also, and voila -now it works...


Top
 Profile  
 
 Post subject: Two different sets of JARs
PostPosted: Mon Sep 22, 2003 12:52 pm 
Senior
Senior

Joined: Sun Aug 31, 2003 3:14 pm
Posts: 151
Location: Earth (at the moment)
Quote:
I copied the "cglib-1.0.jar" (note the file name) from the source forge


If you use this version of the cglib jar you will also need the additional asm jars because not all of the classes you need are in the cglib-1.0.jar.

Quote:
I copied the extra jar files also, and voila -now it works...


If you use the cglib-asm.jar that ships with Hibernate which also contains the asm classes needed you will have all of the files that Hibernate needs in one jar and you can throw away the extra stuff in the cglib and the asm jars that you don't need.


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

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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.