-->
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: FastClassEmitter & NoClassDefFoundError ??
PostPosted: Fri Apr 29, 2005 12:10 pm 
Newbie

Joined: Fri Apr 29, 2005 11:50 am
Posts: 1
Hi, I get the following error.

Hibernate version:
2.1.4
Mapping documents:

Code between sessionFactory.openSession() and session.close():

package test.hibclasses;

import net.sf.hibernate.*;
import net.sf.hibernate.cfg.Configuration;
import org.apache.log4j.Logger;
import javax.naming.*;

public class HibernateConnection {

static Logger log = Logger.getLogger(HibernateConnection.class.getName());

private static Configuration configuration;
private static SessionFactory sessionFactory;

static {
try {
configuration = new Configuration();
sessionFactory = configuration.configure().buildSessionFactory();
} catch (Throwable ex) {
log.error(ex);
throw new ExceptionInInitializerError(ex);
}
}
}

Name and version of the database you are using:
Oracle 10g and Sun Java System Application Server EE 8.1

Debug level Hibernate log excerpt:
Full stack trace of any exception that occurs:

[#|2005-04-29T18:16:46.073+0300|INFO|sun-appserver-ee8.1|javax.enterprise.system.core|_ThreadID=10;|Application server startup complete.|#]

[#|2005-04-29T18:17:03.274+0300|INFO|sun-appserver-ee8.1|javax.enterprise.system.stream.out|_ThreadID=12;|18:17:03,264 INFO Environment:462 - Hibernate 2.1.4
|#]

[#|2005-04-29T18:17:03.297+0300|INFO|sun-appserver-ee8.1|javax.enterprise.system.stream.out|_ThreadID=12;|18:17:03,294 INFO Environment:491 - hibernate.properties not found
|#]

[#|2005-04-29T18:17:03.300+0300|INFO|sun-appserver-ee8.1|javax.enterprise.system.stream.out|_ThreadID=12;|18:17:03,298 WARN Environment:513 - could not copy system properties. System properties will be ignored.
|#]

[#|2005-04-29T18:17:03.305+0300|INFO|sun-appserver-ee8.1|javax.enterprise.system.stream.out|_ThreadID=12;|18:17:03,303 INFO Environment:522 - using CGLIB reflection optimizer
|#]

[#|2005-04-29T18:17:03.314+0300|INFO|sun-appserver-ee8.1|javax.enterprise.system.stream.out|_ThreadID=12;|18:17:03,312 INFO Configuration:872 - configuring from resource: /hibernate.cfg.xml
|#]

[#|2005-04-29T18:17:03.319+0300|INFO|sun-appserver-ee8.1|javax.enterprise.system.stream.out|_ThreadID=12;|18:17:03,314 INFO Configuration:844 - Configuration resource: /hibernate.cfg.xml
|#]

[#|2005-04-29T18:17:03.468+0300|INFO|sun-appserver-ee8.1|javax.enterprise.system.stream.out|_ThreadID=12;|18:17:03,466 INFO Configuration:328 - Mapping resource: test/pojos/Ars.hbm.xml
|#]

[#|2005-04-29T18:17:03.674+0300|INFO|sun-appserver-ee8.1|javax.enterprise.system.stream.out|_ThreadID=12;|18:17:03,672 INFO Binder:229 - Mapping class: test.pojos.Ars -> ARS
|#]

[#|2005-04-29T18:17:03.876+0300|INFO|sun-appserver-ee8.1|javax.enterprise.system.stream.out|_ThreadID=12;|18:17:03,874 INFO Configuration:328 - Mapping resource: test/pojos/ArsTe.hbm.xml
|#]

[#|2005-04-29T18:17:03.906+0300|INFO|sun-appserver-ee8.1|javax.enterprise.system.stream.out|_ThreadID=12;|18:17:03,903 INFO Binder:229 - Mapping class: test.pojos.ArsTe -> ARS_TE
|#]

[#|2005-04-29T18:17:03.952+0300|INFO|sun-appserver-ee8.1|javax.enterprise.system.stream.out|_ThreadID=12;|18:17:03,950 INFO Configuration:328 - Mapping resource: test/pojos/Bas.hbm.xml
|#]

[#|2005-04-29T18:17:03.988+0300|INFO|sun-appserver-ee8.1|javax.enterprise.system.stream.out|_ThreadID=12;|18:17:03,986 INFO Binder:229 - Mapping class: test.pojos.Bas -> BAS
|#]

[#|2005-04-29T18:17:04.166+0300|INFO|sun-appserver-ee8.1|javax.enterprise.system.stream.out|_ThreadID=12;|18:17:04,165 INFO Configuration:328 - Mapping resource: test/pojos/Is.hbm.xml
|#]

[#|2005-04-29T18:17:04.182+0300|INFO|sun-appserver-ee8.1|javax.enterprise.system.stream.out|_ThreadID=12;|18:17:04,181 INFO Binder:229 - Mapping class: test.pojos.Is -> IS
|#]

[#|2005-04-29T18:17:04.341+0300|INFO|sun-appserver-ee8.1|javax.enterprise.system.stream.out|_ThreadID=12;|18:17:04,339 INFO ReflectHelper:176 - reflection optimizer disabled for: test.pojos.Is, ExceptionInInitializerError: null
|#]

[#|2005-04-29T18:17:04.398+0300|INFO|sun-appserver-ee8.1|javax.enterprise.system.stream.out|_ThreadID=12;|18:17:04,384 ERROR HibernateConnection:20 - java.lang.NoClassDefFoundError
at net.sf.cglib.reflect.FastClassEmitter.<init>(FastClassEmitter.java:66)
at net.sf.cglib.reflect.FastClass$Generator.generateClass(FastClass.java:75)
at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:215)
at net.sf.cglib.reflect.FastClass$Generator.create(FastClass.java:67)
at net.sf.cglib.reflect.FastClass.create(FastClass.java:49)
at net.sf.cglib.reflect.FastClass.create(FastClass.java:42)
at net.sf.hibernate.type.ComponentType.<init>(ComponentType.java:113)
at net.sf.hibernate.cfg.Binder.bindComponent(Binder.java:899)
at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:281)
at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1243)
at net.sf.hibernate.cfg.Configuration.add(Configuration.java:249)
at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:285)
at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:333)
at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:990)
at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:946)
at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:874)
at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:860)
at test.hibclasses.HibernateConnection.<clinit>(HibernateConnection.java:18)
at test.hibclasses.GH.webAuth(GH.java:1997)
at test.ejb.TestBean.webAuth(TestBean.java:308)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sun.enterprise.security.SecurityUtil$2.run(SecurityUtil.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:950)
at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:158)
at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:128)
at $Proxy17.webAuth(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:167)
at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(Unknown Source)
at test.ejb._Test_DynamicStub.webAuth(_Test_DynamicStub.java)
at org.apache.jsp.IULoginVf_jsp._jspService(IULoginVf_jsp.java:203)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:251)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
at com.sun.enterprise.web.connector.httpservice.HttpServiceProcessor.process(HttpServiceProcessor.java:221)
at com.sun.enterprise.web.HttpServiceWebContainer.service(HttpServiceWebContainer.java:2072)
|#]

[#|2005-04-29T18:17:04.400+0300|INFO|sun-appserver-ee8.1|javax.enterprise.system.container.ejb|_ThreadID=12;|EJB5018: An exception was thrown during an ejb invocation on [TSSYYBean]|#]

[#|2005-04-29T18:17:04.401+0300|INFO|sun-appserver-ee8.1|javax.enterprise.system.container.ejb|_ThreadID=12;|
javax.ejb.EJBException
at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:2807)
at com.sun.ejb.containers.BaseContainer.checkExceptionNoTx(BaseContainer.java:2647)
at com.sun.ejb.containers.BaseContainer.checkExceptionBeanMgTx(BaseContainer.java:2585)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:2485)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:819)
at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:137)
at $Proxy17.webAuth(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:167)
at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(Unknown Source)
at test.ejb._Test_DynamicStub.webAuth(_Test_DynamicStub.java)
at org.apache.jsp.Login_jsp._jspService(Login_jsp.java:203)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:251)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
at com.sun.enterprise.web.connector.httpservice.HttpServiceProcessor.process(HttpServiceProcessor.java:221)
at com.sun.enterprise.web.HttpServiceWebContainer.service(HttpServiceWebContainer.java:2072)
Caused by: java.lang.ExceptionInInitializerError
at test.hibclasses.HibernateConnection.<clinit>(HibernateConnection.java:21)
at test.hibclasses.GH.webAuth(GH.java:1997)
at test.ejb.TestBean.webAuth(TestBean.java:308)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sun.enterprise.security.SecurityUtil$2.run(SecurityUtil.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:950)
at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:158)
at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:128)
... 39 more
Caused by: java.lang.NoClassDefFoundError
at net.sf.cglib.reflect.FastClassEmitter.<init>(FastClassEmitter.java:66)
at net.sf.cglib.reflect.FastClass$Generator.generateClass(FastClass.java:75)
at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:215)
at net.sf.cglib.reflect.FastClass$Generator.create(FastClass.java:67)
at net.sf.cglib.reflect.FastClass.create(FastClass.java:49)
at net.sf.cglib.reflect.FastClass.create(FastClass.java:42)
at net.sf.hibernate.type.ComponentType.<init>(ComponentType.java:113)
at net.sf.hibernate.cfg.Binder.bindComponent(Binder.java:899)
at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:281)
at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1243)
at net.sf.hibernate.cfg.Configuration.add(Configuration.java:249)
at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:285)
at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:333)
at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:990)
at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:946)
at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:874)
at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:860)
at test.hibclasses.HibernateConnection.<clinit>(HibernateConnection.java:34)
... 50 more
|#]

[#|2005-04-29T18:17:04.413+0300|SEVERE|sun-appserver-ee8.1|javax.enterprise.system.container.web|_ThreadID=12;|StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.RemoteException
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.wrapException(Util.java:657)
at javax.rmi.CORBA.Util.wrapException(Util.java:277)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:177)
at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(Unknown Source)
at test.ejb._Test_DynamicStub.webAuth(_Test_DynamicStub.java)
at org.apache.jsp.Login_jsp._jspService(Login_jsp.java:203)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:251)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
at com.sun.enterprise.web.connector.httpservice.HttpServiceProcessor.process(HttpServiceProcessor.java:221)
at com.sun.enterprise.web.HttpServiceWebContainer.service(HttpServiceWebContainer.java:2072)
Caused by: java.rmi.RemoteException
|#]


Any idea?
Thanks.


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.