6 Replies Latest reply on Dec 10, 2006 6:40 AM by Peter Kovgan

    JBPM(BPEL) conflicts (hibernate settings) with my app.

    Peter Kovgan Newbie

      Hi! Help me , please!

      I try to deploy JBPM(BPEL) and my app and run both.

      My app is web app(war) that consists of several web services and
      hibernate connection to MSSQL2005 DB, using net.sourceforge.jtds.jdbc.Driver.

      My app brings hibernate-1.3.1 jar inside war and connects to db.
      It is ok without JBPM.

      But, when I deploy BPEL service to JBoss(with default connection settins from jbpm-bpel.sar), my app failed to use right hibernate settings(it seems so), and (it seems so) uses BPEL engine hibernate settings instead. I have errors.

      How to separate them?

      Thanks a lot!! I need your help!!


        • 1. Re: JBPM(BPEL) conflicts (hibernate settings) with my app.
          Cutberto Ocampo Newbie

          This is not a jBPM question, but an Hibernate question; wrong forum...

          However, here is the answer:

          import org.hibernate.Session;
          import org.hibernate.cfg.Configuration;
          ...
          
          Configuration configuration = new Configuration();
          configuration.configure("anotherDB.cfg.xml");
          SessionFactory sessionFactory = configuration.buildSessionFactory();
          


          For more info, read your Hibernate docs (section 3.8).

          Regards.

          • 3. Re: JBPM(BPEL) conflicts (hibernate settings) with my app.
            Peter Kovgan Newbie

            cocampo!
            Unfortunately,
            This does not work!

            I have discovered, that I already do exacly what you have written.

            sessionFactory = (new Configuration()).configure("WEB-INF/hibernate-jtds.cfg.xml").buildSessionFactory();


            This does not help,
            There is some difference between server logs, when JBPL deployed and when it was not deployed.

            And JBPM does somthing with JBoss-Hibernate configuration that redirect my actuall call to MSSQL to JBoss default data base...
            Could you or someone help?


            • 4. Re: JBPM(BPEL) conflicts (hibernate settings) with my app.
              Peter Kovgan Newbie

              Server started:

              06:31:46,145 INFO [Server] JBoss (MX MicroKernel) [4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)] Started in 31s:865
              ms



              Then deploy JBPM service:

              06:32:32,152 INFO [WrapperDataSourceService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=jbpmBpelDS' t
              o JNDI name 'java:jbpmBpelDS'
              06:32:32,162 INFO [JbpmConfiguration] using jbpm configuration resource 'jbpm.cfg.xml'
              06:32:32,262 INFO [TomcatDeployer] deploy, ctxPath=/jbpm-bpel, warUrl=.../tmp/deploy/tmp5593jbpm-bpel-exp.war/
              


              Then deploy my app:

              06:33:29,544 INFO [TomcatDeployer] deploy, ctxPath=/quickstart, warUrl=.../tmp/deploy/tmp5594quickstart-exp.war/



              Now I call my app!, note: I do not call any JBPM yet.

              This is as always:
              06:33:50,084 INFO [Environment] Hibernate 3.1.3



              But this is new(no such thing without JBPM):
              06:33:50,094 INFO [Environment] loaded properties from resource hibernate.properties: {hibernate.cglib.use_reflection_optimi
              zer=true, hibernate.dialect=org.hibernate.dialect.HSQLDialect, hibernate.hbm2ddl.auto=update, hibernate.format_sql=true, hibe
              rnate.connection.datasource=java:/jbpmBpelDS}
              




              ...

              I take configuration from my file:
              06:33:50,214 INFO [Configuration] configuring from resource: WEB-INF/hibernate-jtds.cfg.xml
              06:33:50,214 INFO [Configuration] Configuration resource: WEB-INF/hibernate-jtds.cfg.xml
              


              But this does not help and errors below you can see.
              It seems like my app goes to wrong DB and so errors are coming.

              Here rest of the log:
              06:33:50,334 INFO [Configuration] Reading mappings from resource: WEB-INF/com.sap.xtp.customer.entities.Customer_Customer_Ro
              ot.hbm.xml
              06:33:50,494 INFO [HbmBinder] Mapping class: com.sap.xtp.customer.entities.Customer_Root -> Customer_Customer_Root
              06:33:51,045 INFO [Configuration] Reading mappings from resource: WEB-INF/com.sap.xtp.product.entities.Product_Product_Root.
              hbm.xml
              06:33:51,546 INFO [HbmBinder] Mapping class: com.sap.xtp.product.entities.Product_Root -> Product_Product_Root
              06:33:51,546 INFO [Configuration] Reading mappings from resource: WEB-INF/com.sap.xtp.salesorder.entities.SalesOrder_SalesOr
              der_Root.hbm.xml
              06:33:51,826 INFO [HbmBinder] Mapping class: com.sap.xtp.salesorder.entities.SalesOrder_Root -> SalesOrder_SalesOrder_Root
              06:33:51,846 INFO [Configuration] Reading mappings from resource: WEB-INF/com.sap.xtp.salesorderline.entities.SalesOrderLine
              _SalesOrderLine_Root.hbm.xml
              06:33:51,906 INFO [HbmBinder] Mapping class: com.sap.xtp.salesorderline.entities.SalesOrderLine_Root -> SalesOrderLine_Sales
              OrderLine_Root
              06:33:51,906 INFO [Configuration] Reading mappings from resource: WEB-INF/com.sap.xtp.salesinvoice.entities.SalesInvoice_Sal
              esInvoice_Root.hbm.xml
              06:33:51,946 INFO [HbmBinder] Mapping class: com.sap.xtp.salesinvoice.entities.SalesInvoice_Root -> SalesInvoice_SalesInvoic
              e_Root
              06:33:51,956 INFO [Configuration] Reading mappings from resource: WEB-INF/com.sap.xtp.salesinvoiceline.entities.SalesInvoice
              Line_SalesInvoiceLine_Root.hbm.xml
              06:33:52,056 INFO [HbmBinder] Mapping class: com.sap.xtp.salesinvoiceline.entities.SalesInvoiceLine_Root -> SalesInvoiceLine
              _SalesInvoiceLine_Root
              06:33:52,056 INFO [Configuration] Configured SessionFactory: null
              06:33:52,177 INFO [NamingHelper] JNDI InitialContext properties:{}
              06:33:52,177 INFO [DatasourceConnectionProvider] Using datasource: java:/jbpmBpelDS
              06:33:52,187 INFO [SettingsFactory] RDBMS: HSQL Database Engine, version: 1.8.0
              06:33:52,187 INFO [SettingsFactory] JDBC driver: HSQL Database Engine Driver, version: 1.8.0
              06:33:52,217 INFO [Dialect] Using dialect: org.hibernate.dialect.SQLServerDialect
              06:33:52,237 INFO [TransactionFactoryFactory] Transaction strategy: org.hibernate.transaction.JDBCTransactionFactory
              06:33:52,237 INFO [TransactionManagerLookupFactory] No TransactionManagerLookup configured (in JTA environment, use of read-
              write or transactional second-level cache is not recommended)
              06:33:52,237 INFO [SettingsFactory] Automatic flush during beforeCompletion(): disabled
              06:33:52,237 INFO [SettingsFactory] Automatic session close at end of transaction: disabled
              06:33:52,237 INFO [SettingsFactory] Scrollable result sets: enabled
              06:33:52,247 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): disabled
              06:33:52,247 INFO [SettingsFactory] Connection release mode: auto
              06:33:52,247 INFO [SettingsFactory] Default batch fetch size: 1
              06:33:52,247 INFO [SettingsFactory] Generate SQL with comments: disabled
              06:33:52,247 INFO [SettingsFactory] Order SQL updates by primary key: disabled
              06:33:52,247 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
              06:33:52,267 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
              06:33:52,277 INFO [SettingsFactory] Query language substitutions: {}
              06:33:52,277 INFO [SettingsFactory] Second-level cache: enabled
              06:33:52,277 INFO [SettingsFactory] Query cache: disabled
              06:33:52,277 INFO [SettingsFactory] Cache provider: org.hibernate.cache.EhCacheProvider
              06:33:52,287 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
              06:33:52,287 INFO [SettingsFactory] Structured second-level cache entries: disabled
              06:33:52,297 INFO [SettingsFactory] Statistics: disabled
              06:33:52,297 INFO [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
              06:33:52,297 INFO [SettingsFactory] Default entity-mode: pojo
              06:33:52,357 INFO [SessionFactoryImpl] building session factory
              06:33:53,559 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
              06:33:53,579 INFO [SchemaExport] Running hbm2ddl schema export
              06:33:53,579 INFO [SchemaExport] exporting generated schema to database
              06:33:53,589 ERROR [SchemaExport] Unsuccessful: create table quickstart.dbo.Customer_Customer_Root (id int identity not null,
               customerName varchar(255) null, description varchar(255) null, address varchar(255) null, primary key (id))
              06:33:53,589 ERROR [SchemaExport] Three part identifiers prohibited in statement [create table quickstart.dbo.]
              06:33:53,589 ERROR [SchemaExport] Unsuccessful: create table quickstart.dbo.Product_Product_Root (id int identity not null, m
              aterialName varchar(255) null, costOfGoodsSoldAccount varchar(255) null, primary key (id))
              06:33:53,589 ERROR [SchemaExport] Three part identifiers prohibited in statement [create table quickstart.dbo.]
              06:33:53,589 ERROR [SchemaExport] Unsuccessful: create table quickstart.dbo.SalesInvoiceLine_SalesInvoiceLine_Root (id int id
              entity not null, salesInvoiceId int null, productId int null, lineTotal int null, primary key (id))
              06:33:53,589 ERROR [SchemaExport] Three part identifiers prohibited in statement [create table quickstart.dbo.]
              06:33:53,589 ERROR [SchemaExport] Unsuccessful: create table quickstart.dbo.SalesInvoice_SalesInvoice_Root (id int identity n
              ot null, customerName varchar(255) null, status varchar(255) null, creationDate varchar(255) null, description varchar(255) n
              ull, salesOrderId int null, total int null, linesTotal int null, taxAmount int null, primary key (id))
              06:33:53,589 ERROR [SchemaExport] Three part identifiers prohibited in statement [create table quickstart.dbo.]
              06:33:53,589 ERROR [SchemaExport] Unsuccessful: create table quickstart.dbo.SalesOrderLine_SalesOrderLine_Root (id int identi
              ty not null, unitPrice int null, quantity int null, productId int null, lineTotal int null, salesOrderId int null, primary ke
              y (id))
              06:33:53,599 ERROR [SchemaExport] Three part identifiers prohibited in statement [create table quickstart.dbo.]
              06:33:53,599 ERROR [SchemaExport] Unsuccessful: create table quickstart.dbo.SalesOrder_SalesOrder_Root (id int identity not n
              ull, customerId int null, status varchar(255) null, orderDate varchar(255) null, description varchar(255) null, primary key (
              id))
              06:33:53,599 ERROR [SchemaExport] Three part identifiers prohibited in statement [create table quickstart.dbo.]
              06:33:53,599 INFO [SchemaExport] schema export complete
              06:33:53,739 INFO [STDOUT] in create of ImplClass -#1
              06:33:53,739 INFO [STDOUT] in save of ImplClass -#1
              06:33:53,769 WARN [JDBCExceptionReporter] SQL Error: -226, SQLState: 22019
              06:33:53,769 ERROR [JDBCExceptionReporter] Three part identifiers prohibited in statement [insert into quickstart.dbo.Custome
              r_Customer_Root (customerName, description, address) values (?, ?, ?) select scope_identity()]
              06:33:53,779 ERROR [STDERR] org.hibernate.exception.DataException: could not insert: [com.sap.xtp.customer.entities.Customer_
              Root]
               at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:77)
               at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
               at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:1986)
               at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2405)
               at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:37)
               at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
               at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:269)
               at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:167)
               at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:101)
               at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventLi
              stener.java:186)
               at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33)
               at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:1
              75)
               at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27)
               at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
               at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:530)
               at org.hibernate.impl.SessionImpl.save(SessionImpl.java:518)
               at org.hibernate.impl.SessionImpl.save(SessionImpl.java:514)
               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:585)
               at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java
              :301)
               at $Proxy54.save(Unknown Source)
               at com.sap.xtp.customer.Customer.save(Customer.java:62)
               at com.sap.xtp.customer.flow.CreateAction.execute(CreateAction.java:98)
               at com.sap.xtp.customer.Customer.create(Customer.java:106)
               at com.sap.xtp.customer.webservices.CustomerService.create(CustomerService.java:71)
               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:585)
               at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
               at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
               at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
               at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
               at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
               at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
               at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453)
               at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
               at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
               at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
               at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
               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.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
               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.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
               at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
               at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
               at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
               at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
               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:869)
               at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
              
               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: java.sql.SQLException: Three part identifiers prohibited in statement [insert into quickstart.dbo.Customer_Custome
              r_Root (customerName, description, address) values (?, ?, ?) select scope_identity()]
               at org.hsqldb.jdbc.Util.throwError(Unknown Source)
               at org.hsqldb.jdbc.jdbcPreparedStatement.<init>(Unknown Source)
               at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source)
               at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.doPrepareStatement(BaseWrapperManagedConnection.java:
              349)
               at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.prepareStatement(BaseWrapperManagedConnection.java:34
              4)
               at org.jboss.resource.adapter.jdbc.WrappedConnection.prepareStatement(WrappedConnection.java:187)
               at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:442)
               at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:93)
               at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:1948)
               ... 59 more
              06:33:53,849 INFO [CachedConnectionManager] Closing a connection for you. Please close them yourself: org.jboss.resource.ad
              apter.jdbc.WrappedConnection@c6a26b
              java.lang.Throwable: STACKTRACE
               at org.jboss.resource.connectionmanager.CachedConnectionManager.registerConnection(CachedConnectionManager.java:290)
               at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:417)
               at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnecti
              onManager2.java:842)
               at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:103)
               at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:66)
               at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:417)
               at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
               at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:129)
               at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:57)
               at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1290)
               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:585)
               at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java
              :301)
               at $Proxy54.beginTransaction(Unknown Source)
               at com.sap.xtp.common.XTPDummyTransactionManager.startTransaction(XTPDummyTransactionManager.java:23)
               at com.sap.xtp.customer.webservices.CustomerService.create(CustomerService.java:70)
               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:585)
               at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
               at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
               at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
               at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
               at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
               at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
               at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453)
               at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
               at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
               at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
               at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
               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.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
               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.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
               at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
               at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
               at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
               at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
               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:869)
               at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
              
               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)
              


              • 5. Re: JBPM(BPEL) conflicts (hibernate settings) with my app.
                Alejandro Guizar Master

                when you deploy resources in a service archive (.sar) they are visible to all modules. in this cause your web app detects the hibernate.properties resource from jbpm-bpel.sar and tries to apply the properties there.

                try renaming the hibernate configuration files. to do so, follow the steps below:

                1. edit src/config/jbpm.cfg.xml:

                <jbpm-configuration>
                
                 <!-- jbpm context -->
                 ...
                 <!-- hibernate configuration resources -->
                 <string name="resource.hibernate.cfg.xml" value="hibernate-bpel.cfg.xml" />
                 <string name="resource.hibernate.properties" value="hibernate-bpel.properties" />
                
                 <!-- configuration resources in jbpm-{version}.jar -->
                 ...
                 <!-- configuration resources in jbpm-bpel-{version}.jar -->
                 ...
                </jbpm-configuration>


                2. in directory src/resources/jbpm-bpel.sar, rename hibernate.properties to hibernate-bpel.properties

                3. in directory src/config, rename hibernate.cfg.xml to hibernate-bpel.cfg.xml

                4. the main build file includes hibernate.cfg.xml by exact name; change it to include all *.cfg.xml files:
                <target name="build.service.404"
                 description="build service archive for JBoss 4.0.4">
                 <mkdir dir="${output.root}" />
                 <jar destfile="${output.root}/jbpm-bpel.sar">
                 <!--libraries-->
                 ...
                 <!--configuration-->
                 <fileset dir="${src.config}">
                 <include name="*.cfg.xml" />
                 </fileset>
                 <!--service files-->
                 ...
                 <!-- web module -->
                 ...
                 </jar>
                 </target>


                5. rebuild and deploy the bpel service archive.