Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Hibernate SunOne configuration NoClassDefFoundError

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I am getting problem while configuring Hibernate with SunOne7 as well as Oracle9iAS. It works fine when I put all hibernate required jar files in SunOne JVM classpath, sunone is not picking hibernate jars from mywebapp\web-inf\lib directory. I dont want to put paths in classpath of application server. Below is the exception that I always get when I dont place entries in classpath:


Sun ONE Application Server - HTTP Status 500 Error
The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.

Type: Exception Report

Message: Internal Server Error

Exception

javax.servlet.ServletException: com/mchange/v2/c3p0/PoolConfig
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:478)
at _jasper._testHibernate_jsp._jspService(_testHibernate_jsp.java:90)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:552)
at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:368)
at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:309)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:158)
at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)



Root Cause
java.lang.NoClassDefFoundError: com/mchange/v2/c3p0/PoolConfig
at net.sf.hibernate.connection.C3P0ConnectionProvider.configure(C3P0ConnectionProvider.java:75)
at net.sf.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:83)
at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:76)
at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1160)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:794)
at ae.gov.dm.bpcs.dao.hibernate.Config.(Config.java:33)
at ae.gov.dm.bpcs.dao.hibernate.Config.(Config.java:25)
at ae.gov.dm.bpcs.dao.hibernate.ThreadSession.(ThreadSession.java:32)
at ae.gov.dm.bpcs.dao.hibernate.ThreadSession.(ThreadSession.java:23)
at ae.gov.dm.bpcs.dao.hibernate.EmployeeDAOHibernateImp.getEducation(EmployeeDAOHibernateImp.java:59)
at _jasper._testHibernate_jsp._jspService(_testHibernate_jsp.java:68)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:552)
at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:368)
at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:309)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:158)
at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)


*****************************************************
SOME TIMES I GET:::
*****************************************************

INFO: CORE3282: stdout: <========Configuring========>
WARNING: CORE3283: stderr: log4j:WARN No appenders could be found for logger (ne
t.sf.hibernate.cfg.Environment).
WARNING: CORE3283: stderr: log4j:WARN Please initialize the log4j system properl
y.
INFO: CORE3282: stdout: jdbc racle:thin:@10.0.21.203:1521:BPCS1
INFO: CORE3282: stdout: <========Building Session Factory========>
SEVERE: StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw excep
tion
javax.servlet.ServletException: com/mchange/v2/c3p0/PoolConfig
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageCon
textImpl.java:478)
at _jasper._testHibernate_jsp._jspService(_testHibernate_jsp.java:90)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServl
et.java:552)
at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:368
)
at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.StandardWrapperValve.invokeServletService(St
andardWrapperValve.java:720)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:309)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:505)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:212)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:203)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:505)
at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProce
ssor.java:158)
at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)
----- Root Cause -----
java.lang.NoClassDefFoundError: com/mchange/v2/c3p0/PoolConfig
at net.sf.hibernate.connection.C3P0ConnectionProvider.configure(C3P0Conn
ectionProvider.java:75)
at net.sf.hibernate.connection.ConnectionProviderFactory.newConnectionPr
ovider(ConnectionProviderFactory.java:83)
at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.ja
va:76)
at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1
160)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.
java:794)
at ae.gov.dm.bpcs.dao.hibernate.Config.<init>(Config.java:33)
at ae.gov.dm.bpcs.dao.hibernate.Config.<clinit>(Config.java:25)
at ae.gov.dm.bpcs.dao.hibernate.ThreadSession.<init>(ThreadSession.java:
32)
at ae.gov.dm.bpcs.dao.hibernate.ThreadSession.<clinit>(ThreadSession.jav
a:23)
at ae.gov.dm.bpcs.dao.hibernate.EmployeeDAOHibernateImp.getEducation(Emp
loyeeDAOHibernateImp.java:59)
at _jasper._testHibernate_jsp._jspService(_testHibernate_jsp.java:68)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServl
et.java:552)
at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:368
)
at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.StandardWrapperValve.invokeServletService(St
andardWrapperValve.java:720)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:309)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:505)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:212)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:203)
at org.apache.cat
SEVERE: alina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProce
ssor.java:158)
at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)


I found problem with connection pooler C3P0.JAR . When I extracted this jar file and placed all class files in SunOne <webApp>/web-inf/classes folder hibernate is working fine without any JVM classpath settings.

Any idea about this problem? what is the basic problem?

Thanks in advance
[ February 16, 2005: Message edited by: adnanssd badarsd ]
 
Doe, a deer, a female deer. Ray, a pockeful of sun. Me, a name, I call my tiny ad ...
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic