All,
I am new to hibernate so bear with me. I have a struts application running in websphere portal. This app works fine using url/driver connection/etc both locally (RAD) and on the portal server. When i switched from url/driver etc to using a datasource it again worked fine locally but when I deploy to my portal server it cant find the datasource. Any thoughts?
Michael
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:2.1.8
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
2005.06.24 11:58:46.136 E net.sf.hibernate.connection.DatasourceConnectionProvider fatal
Could not find datasource: jdbc/empskills_prod - StackTrace follows...
2005.06.24 11:58:46.136 E net.sf.hibernate.connection.DatasourceConnectionProvider fatal
java.lang.ClassCastException: com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource
at net.sf.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:44)
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:1172)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:803)
at com.nciportal.hibernate.plugin.HibernatePlugin.init(HibernatePlugin.java:37)
at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1158)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:486)
at com.ibm.wps.portlets.struts.WpsActionServlet.init(WpsActionServlet.java:203)
at com.ibm.wps.portlets.struts.WpsStrutsPortlet.init(WpsStrutsPortlet.java:475)
at org.apache.jetspeed.portlet.Portlet.dispatch(Portlet.java(Compiled Code))
at org.apache.jetspeed.portlet.Portlet.doGet(Portlet.java:510)
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.ibm.wps.pe.pc.legacy.cache.CacheablePortlet.service(CacheablePortlet.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at org.apache.jetspeed.portlet.Portlet.service(Portlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.wps.pe.pc.legacy.invoker.impl.PortletInvokerImpl.callMethod(PortletInvokerImpl.java(Compiled Code))
at com.ibm.wps.pe.pc.legacy.invoker.impl.PortletInvokerImpl.login(PortletInvokerImpl.java:280)
at com.ibm.wps.pe.pc.legacy.PortletContainerImpl.callPortletMethod(PortletContainerImpl.java(Compiled Code))
at com.ibm.wps.pe.pc.legacy.PortletContainerImpl.initPage(PortletContainerImpl.java:248)
at com.ibm.wps.pe.pc.PortletContainerImpl.initPage(PortletContainerImpl.java:223)
at com.ibm.wps.pe.pc.PortletContainer.initPage(PortletContainer.java:148)
at com.ibm.wps.engine.templates.themes.Home.callPortletContainer(Home.java:303)
at com.ibm.wps.engine.templates.themes.Home.doPreRender(Home.java:246)
at com.ibm.wps.engine.templates.themes.Default.render(Default.java:67)
at com.ibm.wps.engine.templates.ThemeTemplate.render(ThemeTemplate.java:71)
at com.ibm.wps.engine.Servlet.callPortal(Servlet.java:817)
at com.ibm.wps.engine.Servlet.doGet(Servlet.java:484)
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java(Compiled Code))
at com.ibm.wps.mappingurl.impl.URLAnalyzer.doFilter(URLAnalyzer.java:186)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java(Compiled Code))
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java(Compiled Code))
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java(Compiled Code))
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java(Compiled Code))
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java(Compiled Code))
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java(Compiled Code))
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java(Compiled Code))
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java(Compiled Code))
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java(Compiled Code))
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
2005.06.24 11:58:46.166 E com.nciportal.hibernate.plugin.HibernatePlugin error
hibernate error - StackTrace follows...
2005.06.24 11:58:46.166 E com.nciportal.hibernate.plugin.HibernatePlugin error
net.sf.hibernate.HibernateException: Could not find datasource
at net.sf.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:48)
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:1172)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:803)
at com.nciportal.hibernate.plugin.HibernatePlugin.init(HibernatePlugin.java:37)
at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1158)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:486)
at com.ibm.wps.portlets.struts.WpsActionServlet.init(WpsActionServlet.java:203)
at com.ibm.wps.portlets.struts.WpsStrutsPortlet.init(WpsStrutsPortlet.java:475)
at org.apache.jetspeed.portlet.Portlet.dispatch(Portlet.java(Compiled Code))
at org.apache.jetspeed.portlet.Portlet.doGet(Portlet.java:510)
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.ibm.wps.pe.pc.legacy.cache.CacheablePortlet.service(CacheablePortlet.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at org.apache.jetspeed.portlet.Portlet.service(Portlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.wps.pe.pc.legacy.invoker.impl.PortletInvokerImpl.callMethod(PortletInvokerImpl.java(Compiled Code))
at com.ibm.wps.pe.pc.legacy.invoker.impl.PortletInvokerImpl.login(PortletInvokerImpl.java:280)
at com.ibm.wps.pe.pc.legacy.PortletContainerImpl.callPortletMethod(PortletContainerImpl.java(Compiled Code))
at com.ibm.wps.pe.pc.legacy.PortletContainerImpl.initPage(PortletContainerImpl.java:248)
at com.ibm.wps.pe.pc.PortletContainerImpl.initPage(PortletContainerImpl.java:223)
at com.ibm.wps.pe.pc.PortletContainer.initPage(PortletContainer.java:148)
at com.ibm.wps.engine.templates.themes.Home.callPortletContainer(Home.java:303)
at com.ibm.wps.engine.templates.themes.Home.doPreRender(Home.java:246)
at com.ibm.wps.engine.templates.themes.Default.render(Default.java:67)
at com.ibm.wps.engine.templates.ThemeTemplate.render(ThemeTemplate.java:71)
at com.ibm.wps.engine.Servlet.callPortal(Servlet.java:817)
at com.ibm.wps.engine.Servlet.doGet(Servlet.java:484)
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java(Compiled Code))
at com.ibm.wps.mappingurl.impl.URLAnalyzer.doFilter(URLAnalyzer.java:186)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java(Compiled Code))
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java(Compiled Code))
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java(Compiled Code))
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java(Compiled Code))
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java(Compiled Code))
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java(Compiled Code))
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java(Compiled Code))
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java(Compiled Code))
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java(Compiled Code))
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
Caused by: java.lang.ClassCastException: com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource
at net.sf.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:44)
... 63 more
2005.06.24 11:58:46.196 E com.ibm.wps.portlets.struts.WpsStrutsPortlet init
Could not initialize from configuration - StackTrace follows...
2005.06.24 11:58:46.196 E com.ibm.wps.portlets.struts.WpsStrutsPortlet init
javax.servlet.ServletException
at com.nciportal.hibernate.plugin.HibernatePlugin.init(HibernatePlugin.java:46)
at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1158)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:486)
at com.ibm.wps.portlets.struts.WpsActionServlet.init(WpsActionServlet.java:203)
at com.ibm.wps.portlets.struts.WpsStrutsPortlet.init(WpsStrutsPortlet.java:475)
at org.apache.jetspeed.portlet.Portlet.dispatch(Portlet.java(Compiled Code))
at org.apache.jetspeed.portlet.Portlet.doGet(Portlet.java:510)
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.ibm.wps.pe.pc.legacy.cache.CacheablePortlet.service(CacheablePortlet.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at org.apache.jetspeed.portlet.Portlet.service(Portlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.wps.pe.pc.legacy.invoker.impl.PortletInvokerImpl.callMethod(PortletInvokerImpl.java(Compiled Code))
at com.ibm.wps.pe.pc.legacy.invoker.impl.PortletInvokerImpl.login(PortletInvokerImpl.java:280)
at com.ibm.wps.pe.pc.legacy.PortletContainerImpl.callPortletMethod(PortletContainerImpl.java(Compiled Code))
at com.ibm.wps.pe.pc.legacy.PortletContainerImpl.initPage(PortletContainerImpl.java:248)
at com.ibm.wps.pe.pc.PortletContainerImpl.initPage(PortletContainerImpl.java:223)
at com.ibm.wps.pe.pc.PortletContainer.initPage(PortletContainer.java:148)
at com.ibm.wps.engine.templates.themes.Home.callPortletContainer(Home.java:303)
at com.ibm.wps.engine.templates.themes.Home.doPreRender(Home.java:246)
at com.ibm.wps.engine.templates.themes.Default.render(Default.java:67)
at com.ibm.wps.engine.templates.ThemeTemplate.render(ThemeTemplate.java:71)
at com.ibm.wps.engine.Servlet.callPortal(Servlet.java:817)
at com.ibm.wps.engine.Servlet.doGet(Servlet.java:484)
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java(Compiled Code))
at com.ibm.wps.mappingurl.impl.URLAnalyzer.doFilter(URLAnalyzer.java:186)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java(Compiled Code))
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java(Compiled Code))
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java(Compiled Code))
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java(Compiled Code))
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java(Compiled Code))
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java(Compiled Code))
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java(Compiled Code))
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java(Compiled Code))
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java(Compiled Code))
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
2005.06.24 11:58:46.196 E org.apache.jetspeed.portlet.PortletLog error
Servlet Exception on innerActionServlet.init!
2005.06.24 11:58:48.009 I org.apache.struts.util.PropertyMessageResources info
Initializing, config='org.apache.struts.taglib.logic.LocalStrings', returnNull=true
2005.06.24 11:58:48.029 E org.apache.struts.action.RequestProcessor error
Invalid path /SkillTracking/start was requested
2005.06.24 11:58:48.039 E org.apache.struts.action.RequestProcessor error
Invalid path /Education/start was requested
2005.06.24 11:58:48.039 E org.apache.struts.action.RequestProcessor error
Invalid path /Skill/start was requested
Name and version of the database you are using:SQLServer 2000
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt: