-->
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.  [ 7 posts ] 
Author Message
 Post subject: Security related NoSuchMethodError issue in OC4J?
PostPosted: Fri May 27, 2005 6:12 am 
Regular
Regular

Joined: Wed Oct 15, 2003 4:40 pm
Posts: 67
Hello, I'm using the latest Hibernate on Oracle OC4J 10.1.3 and get the exception below. The FAQ mentioned that this could have something to do with loading related permissions (the libs should be on the classpath). Anyone have a theory as to what the required permissions are and where to add them?

Code:
java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
   at net.sf.cglib.core.ClassEmitter.begin_class(ClassEmitter.java:77)
   at net.sf.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:173)
   at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
   at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:215)
   at net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145)
   at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:117)
   at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108)
   at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104)
   at org.hibernate.impl.SessionFactoryImpl.<clinit>(SessionFactoryImpl.java:321)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1005)
   at actions.InitAction.execute(InitAction.java:20)
   at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
   at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
   at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
   at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
   at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) - Developer Preview 3].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:61)
   at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
   at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) - Developer Preview 3].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:672)
   at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) - Developer Preview 3].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:378)
   at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) - Developer Preview 3].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:869)
   at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) - Developer Preview 3].server.http.HttpRequestHandler.run(HttpRequestHandler.java:288)
   at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) - Developer Preview 3].server.http.HttpRequestHandler.run(HttpRequestHandler.java:120)
   at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) - Developer Preview 3].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:299)
   at java.lang.Thread.run(Thread.java:534)


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 27, 2005 8:08 am 
Regular
Regular

Joined: Wed Oct 15, 2003 4:40 pm
Posts: 67
asm.jar is there, but still it can't be seen. Is the

net.sf.cglib.core.ClassEmitter.begin_class(ClassEmitter.java:77)

doing something which the current policy doesn't allow?


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 28, 2005 5:23 am 
Regular
Regular

Joined: Wed Oct 15, 2003 4:40 pm
Posts: 67
As a side note, got it up and running as a standalone test from eclipse in 10 minutes so theres nothing wrong with hibernate or the 3rd party libs themselves...


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 30, 2005 1:21 pm 
Regular
Regular

Joined: Wed Oct 15, 2003 4:40 pm
Posts: 67
... and it works on a standard Tomcat 5. Any takers on the OC4J issue? I would be happy with a RTFM answer if only directed to some section in a document.

Thankful for any assistance,
Nik


Top
 Profile  
 
 Post subject: methodnotfound
PostPosted: Thu Jun 09, 2005 3:28 pm 
Newbie

Joined: Fri Jun 03, 2005 2:15 pm
Posts: 14
Nik:

I am running a unit test with ant and I got the same problem you have as the following:

[junit] java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(II
Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V

Would you like please give me some idea how to solve it?

Thanks.

Wade


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 09, 2005 5:00 pm 
Expert
Expert

Joined: Wed Apr 06, 2005 5:03 pm
Posts: 273
Location: Salt Lake City, Utah, USA
Make sure your classpath is cleaned up. Follow the readme on the required jars exactly, and don't have any older versions of the same jars on the classpath. I don't remember the details, but I had a problem with this when I had multiple versions of one of the jars. It seems like one of the jars used by early versions of H3 included some of the asm classes.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 15, 2005 5:03 am 
Newbie

Joined: Thu Sep 15, 2005 5:00 am
Posts: 1
Hi, I had similar problem and followed nathanmoon suggestion and checked classpath. I had there old asm.jar and cglib.jar versions. Removed them and this issue is fixed. Thank`s nathanmoon!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 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.