-->
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: oc4j + hibernate 3.2 problem
PostPosted: Wed Sep 26, 2007 12:18 pm 
Newbie

Joined: Wed Sep 26, 2007 12:11 pm
Posts: 1
Hi all,

I am working on a j2ee application with Oracle 9i Database as a backend, Struts as a MVC framework and Hibernate 3.2 for persistence layer.

I have developed my application in jdeveloper 10.1.3.3 and when i deploy it on the embedded oc4j it all works fine. However when I deploy a War file with my application to a standalone oc4j server I get the following error:

500 Internal Server Error
Servlet error: An exception occurred. The current application deployment descriptors do not allow for including it in this response. Please consult the application log for details.

in the logs i get the following:

07/09/26 15:33:29.796 10.1.3.3.0 Started
07/09/26 15:33:37.390 GLM: Error preloading servlet
javax.servlet.ServletException: Error instantiating servlet 'HibernateServlet'. Servlet class org.monsoon.glm.servlets.HibernateServlet not found in web-application GLM
at com.evermind.server.http.HttpApplication.servletClassNotFound(HttpApplication.java:4880)
at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4846)
at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4748)
at com.evermind.server.http.HttpApplication.initPreloadServlets(HttpApplication.java:4936)
at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:1145)
at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:741)
at com.evermind.server.ApplicationStateRunning.getHttpApplication(ApplicationStateRunning.java:414)
at com.evermind.server.Application.getHttpApplication(Application.java:570)
at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(HttpSite.java:1987)
at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.<init>(HttpSite.java:1906)
at com.evermind.server.http.HttpSite.addHttpApplication(HttpSite.java:1603)
at oracle.oc4j.admin.internal.WebApplicationBinder.bindWebApp(WebApplicationBinder.java:238)
at oracle.oc4j.admin.internal.WebApplicationBinder.bindWebApp(WebApplicationBinder.java:99)
at oracle.oc4j.admin.internal.ApplicationDeployer.bindWebApp(ApplicationDeployer.java:547)
at oracle.oc4j.admin.internal.ApplicationDeployer.doDeploy(ApplicationDeployer.java:202)
at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:93)
at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeployerRunnable.doRun(OC4JDeployerRunnable.java:52)
at oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRunnable.run(DeployerRunnable.java:81)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
07/09/26 15:33:37.390 GLM: 10.1.3.3.0 Started
07/09/26 15:34:23.531 GLM: Servlet error
java.lang.RuntimeException: org.hibernate.HibernateException: Could not find datasource
at org.monsoon.glm.dao.util.ConnectionFactory.<init>(ConnectionFactory.java:24)
at org.monsoon.glm.dao.util.ConnectionFactory.getInstance(ConnectionFactory.java:30)
at org.monsoon.glm.dao.UserDao.getUser(UserDao.java:42)
at org.monsoon.glm.controller.LoginAction.execute(LoginAction.java:75)
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.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.hibernate.HibernateException: Could not find datasource
at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:56)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:56)
at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:414)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
at org.monsoon.glm.dao.util.ConnectionFactory.<init>(ConnectionFactory.java:18)
... 22 more
Caused by: javax.naming.NameNotFoundException: java:comp/env/jdbc/DBConnMilofDS not found in GLM
at com.oracle.naming.J2EEContext.getSubContext(J2EEContext.java:225)
at com.oracle.naming.J2EEContext.lookup(J2EEContext.java:172)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.ApplicationContext.lookupInJavaContext(ApplicationContext.java:308)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.ApplicationContext.unprivileged_lookup(ApplicationContext.java:232)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.ApplicationContext.lookup(ApplicationContext.java:197)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52)
... 29 more

I have tried disabling toplink, but it still doesnt work.

I am pretty new to oc4j and at this point I dont know how to set it up to recognize my hibernate and db connection.

Thank you in advance :),
Sizzla


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.