-->
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.  [ 8 posts ] 
Author Message
 Post subject: CGLIB strange error under JDK5.0 and SJSAS 8.1
PostPosted: Wed Mar 02, 2005 7:16 am 
Newbie

Joined: Mon Jan 17, 2005 11:34 am
Posts: 11
Location: Bratislava, Slovakia
Hello,

cglib (hibernate) throws strange exception with each hibernate session factory lookup in my enviroment, but my application works fine. Can someone help with that?

My enviroment is:
JDK 5.0
Sun Java System Application Server 8.1

Hibernate version: 2.1.8

Mapping documents: N/A

Code between sessionFactory.openSession() and session.close(): N/A

Full stack trace of any exception that occurs:
java.lang.Error: Using the FastClass empty constructor--please report to the cglib-devel mailing list
at net.sf.cglib.reflect.FastClass.<init>(FastClass.java:31)
at sun.reflect.GeneratedSerializationConstructorAccessor167.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at com.sun.corba.ee.impl.copyobject.newreflect.ClassCopierOrdinaryImpl.createCopy(Unknown Source)
at com.sun.corba.ee.impl.copyobject.newreflect.ClassCopierBase.copy(Unknown Source)
at com.sun.corba.ee.impl.copyobject.newreflect.ClassCopierOrdinaryImpl$22.copy(Unknown Source)
at com.sun.corba.ee.impl.copyobject.newreflect.ClassCopierOrdinaryImpl$ClassFieldCopierUnsafeImpl.copy(Unknown Source)
at com.sun.corba.ee.impl.copyobject.newreflect.ClassCopierOrdinaryImpl$ClassFieldCopierUnsafeImpl.copy(Unknown Source)
at com.sun.corba.ee.impl.copyobject.newreflect.ClassCopierOrdinaryImpl.doCopy(Unknown Source)
at com.sun.corba.ee.impl.copyobject.newreflect.ClassCopierBase.copy(Unknown Source)
at com.sun.corba.ee.impl.copyobject.newreflect.ClassCopierOrdinaryImpl$22.copy(Unknown Source)
at com.sun.corba.ee.impl.copyobject.newreflect.ClassCopierOrdinaryImpl$ClassFieldCopierUnsafeImpl.copy(Unknown Source)
at com.sun.corba.ee.impl.copyobject.newreflect.ClassCopierOrdinaryImpl.doCopy(Unknown Source)
at com.sun.corba.ee.impl.copyobject.newreflect.ClassCopierBase.copy(Unknown Source)
at com.sun.corba.ee.impl.copyobject.newreflect.ClassCopierFactoryArrayImpl$1.doCopy(Unknown Source)
at com.sun.corba.ee.impl.copyobject.newreflect.ClassCopierBase.copy(Unknown Source)
at com.sun.corba.ee.impl.copyobject.newreflect.ClassCopierOrdinaryImpl$22.copy(Unknown Source)
at com.sun.corba.ee.impl.copyobject.newreflect.ClassCopierOrdinaryImpl$ClassFieldCopierUnsafeImpl.copy(Unknown Source)
at com.sun.corba.ee.impl.copyobject.newreflect.ClassCopierOrdinaryImpl.doCopy(Unknown Source)
at com.sun.corba.ee.impl.copyobject.newreflect.ClassCopierBase.copy(Unknown Source)
at com.sun.corba.ee.impl.copyobject.newreflect.ClassCopierOrdinaryImpl$22.copy(Unknown Source)
at com.sun.corba.ee.impl.copyobject.newreflect.ClassCopierOrdinaryImpl$ClassFieldCopierUnsafeImpl.copy(Unknown Source)
at com.sun.corba.ee.impl.copyobject.newreflect.ClassCopierOrdinaryImpl.doCopy(Unknown Source)
at com.sun.corba.ee.impl.copyobject.newreflect.ClassCopierBase.copy(Unknown Source)
at com.sun.corba.ee.impl.copyobject.newreflect.ReflectObjectCopierImpl.copy(Unknown Source)
at com.sun.corba.ee.impl.copyobject.FallbackObjectCopierImpl.copy(FallbackObjectCopierImpl.java:31)
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.copyObject(Util.java:718)
at javax.rmi.CORBA.Util.copyObject(Util.java:315)
at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.copyResult(DynamicMethodMarshallerImpl.java:414)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:169)
at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(Unknown Source)
at com.sun.enterprise.naming._SerialContextProvider_DynamicStub.lookup(_SerialContextProvider_DynamicStub.java)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:290)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at sk.bgs.hbm.td.HibernateHelper.getSessionFactory(HibernateHelper.java:34)
at sk.bgs.hbm.td.HibernateHelper.getSession(HibernateHelper.java:51)
at sk.bgs.hbm.td.MessageDAO.save(MessageDAO.java:22)
at sk.bgs.hbm.td.MessageBean.scenare1Method(MessageBean.java:50)
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:582)
at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:147)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:128)
at $Proxy46.scenare1Method(Unknown Source)
at sk.bgs.hbm.td.FacadeBean.doScenare1(FacadeBean.java:63)
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:582)
at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:147)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:128)
at $Proxy48.doScenare1(Unknown Source)
at org.apache.jsp.scenare1_jsp._jspService(scenare1_jsp.java:72)
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:582)
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:517)
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.StandardEngineValve.invoke(StandardEngineValve.java:132)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:184)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:653)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:534)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doTask(ProcessorTask.java:403)
at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:55)


Name and version of the database you are using: Oracle 9i Database R9.2.0.6


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 02, 2005 8:07 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
It looks like you are trieng to serialize cglib stuff using "Unsafe" API, this stuff to serializes classes without constructor.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 14, 2005 7:54 am 
Newbie

Joined: Mon Jan 17, 2005 11:34 am
Posts: 11
Location: Bratislava, Slovakia
Baliukas,

sorry, I don't understand your answer. Could you provide more details?

I do NOT try serialize anything straight in my source code. I use Hibernate feature to store hiberante sassion factory into directory of my application server only. J2EE server is Sun Java System Application Server 8.1 running on JDK 5.0.

This problem is somewhere between Hibernate - CGLIB - SJSAS. I even don't know which layer throws mentioned exception.

best regards,
Radovan Sninsky


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 14, 2005 8:12 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
Ignore this error message, this message will be removed in the next release.
This stuff is related to internal optimizations in JVM ( it is something like "native reflection optimizer", so you can dissable cglib optimizer on this JVM to save memory )


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 14, 2005 9:12 am 
Newbie

Joined: Mon Jan 17, 2005 11:34 am
Posts: 11
Location: Bratislava, Slovakia
baliukas wrote:
Ignore this error message, this message will be removed in the next release.
This stuff is related to internal optimizations in JVM ( it is something like "native reflection optimizer", so you can dissable cglib optimizer on this JVM to save memory )


How can I do that? I try
Code:
<property name="cglib.use_reflection_optimizer">false</property>
, but everything works in same manner, appserver throws same exception.

Rado


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 14, 2005 10:14 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
Try to integrate cglib from CVS, I am not sure, but probably it will work with hibernate 2.1. It must not print this noise (it is not error, it is just a paranoid message).
Probably there is some setting to dissable factory serialization on SJSAS too.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 26, 2005 2:52 am 
Newbie

Joined: Mon Jan 17, 2005 11:34 am
Posts: 11
Location: Bratislava, Slovakia
Recently, I tried new maintenance release 3.0.1 of hibernate3 with new version of CGLIB 2.1.
Unfortunately, I have faced same "paranoid message" as last time with hibernate2 r2.1.8 and CGLIB 2.0.2.

Probably, this problem was not fixed in 2.1 release. Is there newer version of CGLIB not integrated with hibernate3, for now?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 04, 2005 3:05 pm 
Newbie

Joined: Tue May 17, 2005 8:39 am
Posts: 14
sninsky wrote:

Probably, this problem was not fixed in 2.1 release.


Yes, right.

http://article.gmane.org/gmane.comp.jav ... .devel/847

Have you managed to have JNDI bound SessionFactory in SUN AS ?

I have some problems:

http://forum.hibernate.org/viewtopic.ph ... highlight=


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 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:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.