-->
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.  [ 5 posts ] 
Author Message
 Post subject: HibernateSessionWrapper initialization problem.
PostPosted: Mon Dec 20, 2010 7:51 am 
Newbie

Joined: Mon Dec 20, 2010 7:40 am
Posts: 3
hi,

I am trying to deploy my application on jboss with jdk 1.6, as soon as i try to get the first data

return (User) retrieveObj(
"from User u1 where Userid = :p1 and u1.userStatus = 'A'",
"p1", Userid);


I get the error of:

java.lang.NoClassDefFoundError: Could not initialize class com.eaton.electrical.cpa.util.HibernateSessionWrapper

Can someone tell me as to what could be the issue ?


Top
 Profile  
 
 Post subject: Re: HibernateSessionWrapper initialization problem.
PostPosted: Mon Dec 20, 2010 8:12 am 
Regular
Regular

Joined: Fri Nov 12, 2010 4:13 am
Posts: 81
Location: India
Set the Classpath and JAVA_HOME correctly.. Classpath should point to bin and JAVA_HOME should point to the correct location where you have installed jdk.This will resolve the problem.

Maybe this will help you.

Chirag

_________________
Thanks & Regards,
Chirag


Top
 Profile  
 
 Post subject: Re: HibernateSessionWrapper initialization problem.
PostPosted: Tue Dec 21, 2010 1:11 am 
Newbie

Joined: Mon Dec 20, 2010 7:40 am
Posts: 3
I have set them correctly, but still get the following error:


Code:
10:38:03,072 ERROR [ContainerBase] Servlet.service() for servlet action threw exception
java.lang.SecurityException: Prohibited package name: java.lang
   at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
   at java.lang.ClassLoader.defineClass(ClassLoader.java:401)
   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:597)
   at org.logicalcobwebs.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:373)
   at org.logicalcobwebs.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:193)
   at org.logicalcobwebs.cglib.reflect.FastClass$Generator.create(FastClass.java:92)
   at org.logicalcobwebs.cglib.proxy.MethodProxy.helper(MethodProxy.java:118)
   at org.logicalcobwebs.cglib.proxy.MethodProxy.create(MethodProxy.java:89)
   at oracle.jdbc.OracleConnection$$EnhancerByCGLIB$$2f306dfc.<clinit>(<generated>)
   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:597)
   at org.logicalcobwebs.cglib.proxy.EnhancerEmitter.setThreadCallbacks(EnhancerEmitter.java:194)
   at org.logicalcobwebs.cglib.proxy.Enhancer.createUsingReflection(Enhancer.java:372)
   at org.logicalcobwebs.cglib.proxy.Enhancer.firstInstance(Enhancer.java:352)
   at org.logicalcobwebs.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:193)
   at org.logicalcobwebs.cglib.proxy.Enhancer.createHelper(Enhancer.java:331)
   at org.logicalcobwebs.cglib.proxy.Enhancer.create(Enhancer.java:247)
   at org.logicalcobwebs.proxool.ProxyFactory.getProxy(ProxyFactory.java:78)
   at org.logicalcobwebs.proxool.ProxyFactory.getWrappedConnection(ProxyFactory.java:48)
   at org.logicalcobwebs.proxool.ConnectionPool.getConnection(ConnectionPool.java:265)
   at org.logicalcobwebs.proxool.ProxoolDriver.connect(ProxoolDriver.java:89)
   at java.sql.DriverManager.getConnection(DriverManager.java:582)
   at java.sql.DriverManager.getConnection(DriverManager.java:207)
   at org.hibernate.connection.ProxoolConnectionProvider.getConnection(ProxoolConnectionProvider.java:53)
   at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:72)
   at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1463)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1004)
   at com.eaton.electrical.cpa.util.HibernateSessionWrapper.<clinit>(HibernateSessionWrapper.java:35)
   at com.eaton.electrical.cpa.dao.BaseDAO.<init>(BaseDAO.java:20)
   at com.eaton.electrical.cpa.dao.UserDAO.<init>(UserDAO.java:17)
   at com.eaton.electrical.cpa.engine.UserEngine.getUser(UserEngine.java:19)
   at com.eaton.electrical.cpa.util.CPASession.checkPortalProfile(CPASession.java:67)
   at com.eaton.electrical.cpa.util.CPASession.initializeSession(CPASession.java:219)
   at com.eaton.electrical.cpa.util.CPASession.getCPASession(CPASession.java:208)
   at com.eaton.electrical.cpa.SessionFilter.doFilter(SessionFilter.java:34)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
   at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
   at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
   at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
   at java.lang.Thread.run(Thread.java:619)
10:38:03,463 ERROR [ContainerBase] Servlet.service() for servlet jsp threw exception
java.lang.NoClassDefFoundError: Could not initialize class com.eaton.electrical.cpa.util.HibernateSessionWrapper
   at com.eaton.electrical.cpa.dao.BaseDAO.<init>(BaseDAO.java:20)
   at com.eaton.electrical.cpa.dao.UserDAO.<init>(UserDAO.java:17)
   at com.eaton.electrical.cpa.engine.UserEngine.getUser(UserEngine.java:19)
   at com.eaton.electrical.cpa.util.CPASession.checkPortalProfile(CPASession.java:67)
   at com.eaton.electrical.cpa.util.CPASession.initializeSession(CPASession.java:219)
   at com.eaton.electrical.cpa.util.CPASession.getCPASession(CPASession.java:208)
   at org.apache.jsp.common.navigations.header.headerBasic_jsp._jspService(headerBasic_jsp.java:66)
   at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
   at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:687)
   at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:590)
   at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:505)
   at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
   at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:614)
   at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:101)
   at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:137)
   at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:758)


Top
 Profile  
 
 Post subject: Re: HibernateSessionWrapper initialization problem.
PostPosted: Tue Dec 21, 2010 2:30 am 
Regular
Regular

Joined: Fri Nov 12, 2010 4:13 am
Posts: 81
Location: India
http://docs.redhat.com/docs/en-US/JBoss_Enterprise_Web_Platform/5/html/Release_Notes_5.0_SEC01/Known_Issues_with_this_release.html


Check this site and it will help you.Check JBPAPP-2791 this number error.

You need to change your cglib.jar file..Download it from below link

http://repository.jboss.com/maven2-brew/cglib/cglib/2.2/cglib-2.2.jar

_________________
Thanks & Regards,
Chirag


Top
 Profile  
 
 Post subject: Re: HibernateSessionWrapper initialization problem.
PostPosted: Fri Jan 07, 2011 4:51 am 
Newbie

Joined: Mon Dec 20, 2010 7:40 am
Posts: 3
Thanks Chirag, sorry for the late reply.. but even after replacing the cjlib jar file with cglib-2.2.jar the problem persists.

Any other ideas ?


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