3 Replies Latest reply on Dec 2, 2005 3:51 PM by sateesh kumar

    jBPM on JBoss + Oracle 10g

    sateesh kumar Newbie

      Hi All,

      I am trying to deploy a Simple App we have developed using jBPM in JBoss-4.0.3 and the DB Server i am using is Oracl10.1.0.4.0

      Here is My hibernate.properties file

       hibernate.connection.datasource =jbpmDS
      hibernate.transaction.factory_class = org.hibernate.transaction.JTATransactionFactory
      hibernate.transaction.manager_lookup_class = org.hibernate.transaction.JBossTransactionManagerLookup
      hibernate.session_factory_name=java:comp/env/hibernate/SessionFactory
      hibernate.jndi.url=jnp://localhost:1099
      hibernate.query.substitutions=true 1, false 0
      


      And i am getting the following Error:

      11:26:34,890 INFO [SessionFactoryObjectFactory] Factory name: java:comp/env/hibernate/SessionFactory
      11:26:34,890 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.provider.url=jnp://localhost:1099}
      11:26:34,890 INFO [NamingHelper] Creating subcontext: java:comp
      11:26:34,906 INFO [NamingHelper] Creating subcontext: env
      11:26:34,906 INFO [NamingHelper] Creating subcontext: hibernate
      11:26:34,906 INFO [SessionFactoryObjectFactory] Bound factory to JNDI name: java:comp/env/hibernate/SessionFactory
      11:26:34,906 WARN [SessionFactoryObjectFactory] InitialContext did not implement EventContext
      11:26:34,906 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.provider.url=jnp://localhost:1099}
      11:26:34,906 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
      java.lang.ExceptionInInitializerError
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
      at java.lang.Class.newInstance0(Class.java:350)
      at java.lang.Class.newInstance(Class.java:303)
      at org.apache.myfaces.util.ClassUtils.newInstance(ClassUtils.java:274)
      at org.apache.myfaces.util.ClassUtils.newInstance(ClassUtils.java:265)
      at org.apache.myfaces.config.ManagedBeanBuilder.buildManagedBean(ManagedBeanBuilder.java:49)
      at org.apache.myfaces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:311)
      at org.apache.myfaces.el.ValueBindingImpl$ELVariableResolver.resolveVariable(ValueBindingImpl.java:569)
      at org.apache.commons.el.NamedValue.evaluate(NamedValue.java:124)
      at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:140)
      at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:378)
      at javax.faces.component.UIOutput.getValue(UIOutput.java:75)
      at org.apache.myfaces.renderkit.RendererUtils.getStringValue(RendererUtils.java:225)
      at org.apache.myfaces.renderkit.html.HtmlTextRendererBase.renderInput(HtmlTextRendererBase.java:131)
      at org.apache.myfaces.renderkit.html.HtmlTextRendererBase.encodeEnd(HtmlTextRendererBase.java:49)
      at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331)
      at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:349)
      at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:253)
      at org.apache.jsp.erahome_jsp._jspx_meth_h_inputText_0(org.apache.jsp.erahome_jsp:163)
      at org.apache.jsp.erahome_jsp._jspx_meth_h_form_0(org.apache.jsp.erahome_jsp:132)
      at org.apache.jsp.erahome_jsp._jspx_meth_f_view_0(org.apache.jsp.erahome_jsp:102)
      at org.apache.jsp.erahome_jsp._jspService(org.apache.jsp.erahome_jsp:66)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
      at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:415)
      at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
      at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      at java.lang.Thread.run(Thread.java:595)
      Caused by: org.hibernate.HibernateException: Could not locate TransactionManager
      at org.hibernate.transaction.JNDITransactionManagerLookup.getTransactionManager(JNDITransactionManagerLookup.java:26)
      at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:270)
      at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1005)
      at org.jbpm.db.JbpmSessionFactory.buildSessionFactory(JbpmSessionFactory.java:138)
      at org.jbpm.db.JbpmSessionFactory.(JbpmSessionFactory.java:77)
      at org.jbpm.db.JbpmSessionFactory.buildJbpmSessionFactory(JbpmSessionFactory.java:94)
      at org.jbpm.db.JbpmSessionFactory.buildJbpmSessionFactory(JbpmSessionFactory.java:90)
      at org.jbpm.db.JbpmSessionFactory.buildJbpmSessionFactory(JbpmSessionFactory.java:86)
      at test.TestXMLBean.(TestXMLBean.java:48)
      ... 63 more
      Caused by: javax.naming.NameNotFoundException: TransactionManager not bound
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:514)
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:522)
      at org.jnp.server.NamingServer.getObject(NamingServer.java:528)
      at org.jnp.server.NamingServer.lookup(NamingServer.java:281)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:610)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
      at javax.naming.InitialContext.lookup(InitialContext.java:351)
      at org.hibernate.transaction.JNDITransactionManagerLookup.getTransactionManager(JNDITransactionManagerLookup.java:23)
      ... 71 more
      11:26:34,968 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
      javax.faces.FacesException: javax.servlet.ServletException
      at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:425)
      at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
      at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      at java.lang.Thread.run(Thread.java:595)
      Caused by: javax.servlet.ServletException
      at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
      at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
      at org.apache.jsp.erahome_jsp._jspService(org.apache.jsp.erahome_jsp:76)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
      at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:415)
      ... 25 more


      When i looked into the Source Code of Hibernate it is trying to get the resource java:/TransactionManager . Who needs to register this one in JBoss..Does the Hibernate does is automatically ..


      Thanks
      Sateesh

        • 1. Re: jBPM on JBoss + Oracle 10g
          Alejandro Guizar Master

          Nope. It is the JBoss transaction component who registers this object. To see whether it is actually registered, point your browser to http://localhost:8080/jmx-console/. Under section jboss click service=JNDIView. Scroll down to the list() operation and invoke it. In the result page, look for the following entry under the java: Namespace section:

          +- TransactionManager (class: org.jboss.tm.TxManager)

          Do you see it?

          • 2. Re: jBPM on JBoss + Oracle 10g
            sateesh kumar Newbie

            Hi,

            Thanks a lot for your reply..

            I see that in the JNDI View..

            This is the JNDI View i have in my machine..

            I have changed the JBoss Port from 8080 to 80. Does it has any thing to do with this Problem ? ( i haven't changed any other ports..)

            
            java: Namespace
             +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
             +- DefaultDS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
             +- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory)
             +- DefaultJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter)
             +- comp (class: javax.naming.Context)
             +- JmsXA (class: org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl)
             +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
             +- jaas (class: javax.naming.Context)
             | +- JmsXARealm (class: org.jboss.security.plugins.SecurityDomainContext)
             | +- jbossmq (class: org.jboss.security.plugins.SecurityDomainContext)
             | +- HsqlDbRealm (class: org.jboss.security.plugins.SecurityDomainContext)
             +- timedCacheFactory (class: javax.naming.Context)
            Failed to lookup: timedCacheFactory, errmsg=org.jboss.util.TimedCachePolicy
             +- TransactionPropagationContextExporter (class: org.jboss.tm.TransactionPropagationContextFactory)
             +- StdJMSPool (class: org.jboss.jms.asf.StdServerSessionPoolFactory)
             +- Mail (class: javax.mail.Session)
             +- TransactionPropagationContextImporter (class: org.jboss.tm.TransactionPropagationContextImporter)
             +- TransactionManager (class: org.jboss.tm.TxManager)
            
            Global JNDI Namespace
             +- TopicConnectionFactory (class: org.jboss.naming.LinkRefPair)
             +- jmx (class: org.jnp.interfaces.NamingContext)
             | +- invoker (class: org.jnp.interfaces.NamingContext)
             | | +- RMIAdaptor (proxy: $Proxy39 implements interface org.jboss.jmx.adaptor.rmi.RMIAdaptor,interface org.jboss.jmx.adaptor.rmi.RMIAdaptorExt)
             | +- rmi (class: org.jnp.interfaces.NamingContext)
             | | +- RMIAdaptor[link -> jmx/invoker/RMIAdaptor] (class: javax.naming.LinkRef)
             +- HTTPXAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
             +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
             +- UserTransactionSessionFactory (proxy: $Proxy12 implements interface org.jboss.tm.usertx.interfaces.UserTransactionSessionFactory)
             +- HTTPConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
             +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
             +- UserTransaction (class: org.jboss.tm.usertx.client.ClientUserTransaction)
             +- UILXAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef)
             +- UIL2XAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef)
             +- queue (class: org.jnp.interfaces.NamingContext)
             | +- A (class: org.jboss.mq.SpyQueue)
             | +- testQueue (class: org.jboss.mq.SpyQueue)
             | +- ex (class: org.jboss.mq.SpyQueue)
             | +- DLQ (class: org.jboss.mq.SpyQueue)
             | +- D (class: org.jboss.mq.SpyQueue)
             | +- C (class: org.jboss.mq.SpyQueue)
             | +- B (class: org.jboss.mq.SpyQueue)
             +- topic (class: org.jnp.interfaces.NamingContext)
             | +- testDurableTopic (class: org.jboss.mq.SpyTopic)
             | +- testTopic (class: org.jboss.mq.SpyTopic)
             | +- securedTopic (class: org.jboss.mq.SpyTopic)
             +- console (class: org.jnp.interfaces.NamingContext)
             | +- PluginManager (proxy: $Proxy40 implements interface org.jboss.console.manager.PluginManagerMBean)
             +- UIL2ConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef)
             +- jbpmDS (class: javax.sql.DataSource)
             +- HiLoKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory)
             +- UILConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef)
             +- QueueConnectionFactory (class: org.jboss.naming.LinkRefPair)
             +- UUIDKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.uuid.UUIDKeyGeneratorFactory)
            
            


            Thanks
            Sateesh

            • 3. Re: jBPM on JBoss + Oracle 10g
              sateesh kumar Newbie

              Hi All,

              It seems there is a bug in 4.0.3 and i downloaded the SP1 and everything worked fine..

              Sateesh