ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From René Bos <r....@pagelink.nl>
Subject RE: Running Ode using an external database (MySql)
Date Mon, 18 Jun 2007 09:46:02 GMT
Hi,

 

I just had time to work on the external (MySQL) database connection. 

As you said I made the ode-axis2.properties file with the following contents:

 

ode-axis2.db.mode=EXTERNAL

ode-axis2.db.ext.dataSource=java:comp/env/jdbc/OdeDB

 

I placed a file mysql-connector-java-5.0.6-bin.jar in the <TOMCAT_INSTALL_DIR>\common\libs
dir.

 

In <TOMCAT_INSTALL_DIR>\conf\Catalina\localhost I added a file named ode.xml with the
following contents:

 

<Context path="/Ode" docBase="ode" debug="5" reloadable="true"                       crossContext="true">

            <Resource name="jdbc/OdeDB" auth="Container"                              
                                         type="javax.sql.DataSource"

                        maxActive="100" maxIdle="30" maxWait="10000"

                        username="username" password="password"                          
                                       driverClassName="com.mysql.jdbc.Driver"

                        url="jdbc:mysql://localhost:3306/ode?autoReconnect=true"         
                         validationQuery="select count(*) from ode_process"/>

</Context>

 

But with this I get the following:

 

DEBUG - GeronimoLog.debug(66) | Invoking ODE using MEX {MyRoleMex#hqejbhcnphr2cxfe0gxg1s [Client
hqejbhcnphr2cxfe0gxg1r] calling {http://OPM_modifyObject.wsdl}OPM_modifyObjectService.initiate(...)}

10:59:37,852 DEBUG [ODEService] Invoking ODE using MEX {MyRoleMex#hqejbhcnphr2cxfe0gxg1s [Client
hqejbhcnphr2cxfe0gxg1r] calling {http://OPM_modifyObject.wsdl}OPM_modifyObjectService.initiate(...)}

DEBUG - GeronimoLog.debug(66) | Message content:  <?xml version="1.0" encoding="UTF-8"?>

<message><processInstanceID xmlns:ns1="http://OPM_modifyObject.wsdl" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">OPM_modifyObject-1182157173</processInstanceID><userID
xmlns:ns1="http://OPM_modifyObject.wsdl" xm

k xmlns:ns1="http://OPM_modifyObject.wsdl" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">Vet
gaaf man</feedback></message>

10:59:37,852 DEBUG [ODEService] Message content:  <?xml version="1.0" encoding="UTF-8"?>

<message><processInstanceID xmlns:ns1="http://OPM_modifyObject.wsdl" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">OPM_modifyObject-1182157173</processInstanceID><userID
xmlns:ns1="http://OPM_modifyObject.wsdl" xm

k xmlns:ns1="http://OPM_modifyObject.wsdl" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">Vet
gaaf man</feedback></message>

DEBUG - GeronimoLog.debug(66) | Routed: svcQname {http://OPM_modifyObject.wsdl}OPM_modifyObjectService
--> BpelProcess[{http://OPM_modifyObject}OPM_modifyObject-4]

10:59:37,872 DEBUG [BpelEngineImpl] Routed: svcQname {http://OPM_modifyObject.wsdl}OPM_modifyObjectService
--> BpelProcess[{http://OPM_modifyObject}OPM_modifyObject-4]

DEBUG - GeronimoLog.debug(66) | invoke() EPR= null ==> BpelProcess[{http://OPM_modifyObject}OPM_modifyObject-4]

10:59:37,882 DEBUG [MyRoleMessageExchangeImpl] invoke() EPR= null ==> BpelProcess[{http://OPM_modifyObject}OPM_modifyObject-4]

DEBUG - GeronimoLog.debug(66) | Commiting ODE MEX {MyRoleMex#hqejbhcnphr2cxfe0gxg1s [Client
hqejbhcnphr2cxfe0gxg1r] calling {http://OPM_modifyObject.wsdl}OPM_modifyObjectService.initiate(...)}

10:59:38,073 DEBUG [ODEService] Commiting ODE MEX {MyRoleMex#hqejbhcnphr2cxfe0gxg1s [Client
hqejbhcnphr2cxfe0gxg1r] calling {http://OPM_modifyObject.wsdl}OPM_modifyObjectService.initiate(...)}

DEBUG - GeronimoLog.debug(66) | Commiting transaction.

10:59:38,073 DEBUG [ODEService] Commiting transaction.

ERROR - GeronimoLog.error(104) | Timeout or execution error when waiting for response to MEX
{MyRoleMex#hqejbhcnphr2cxfe0gxg1s [Client hqejbhcnphr2cxfe0gxg1r] calling {http://OPM_modifyObject.wsdl}OPM_modifyObjectService.init

he.ode.bpel.engine.MyRoleMessageExchangeImpl$ResponseFuture@23d87f timed out when waiting
for a response!

11:01:38,516 ERROR [ODEService] Timeout or execution error when waiting for response to MEX
{MyRoleMex#hqejbhcnphr2cxfe0gxg1s [Client hqejbhcnphr2cxfe0gxg1r] calling {http://OPM_modifyObject.wsdl}OPM_modifyObjectService.initi

e.ode.bpel.engine.MyRoleMessageExchangeImpl$ResponseFuture@23d87f timed out when waiting for
a response!

ERROR - GeronimoLog.error(108) | Servlet.service() for servlet AxisServlet threw exception

java.lang.NullPointerException

        at org.apache.axis2.engine.AxisEngine.extractFaultInformationFromMessageContext(AxisEngine.java:353)

        at org.apache.axis2.engine.AxisEngine.createFaultMessageContext(AxisEngine.java:249)

        at org.apache.axis2.transport.http.AxisServlet.handleFault(AxisServlet.java:317)

        at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:277)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

        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.StandardWrapperValve.invoke(StandardWrapperValve.java:213)

        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)

        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: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.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)

        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)

        at java.lang.Thread.run(Thread.java:595)

11:01:38,626 ERROR [[AxisServlet]] Servlet.service() for servlet AxisServlet threw exception

java.lang.NullPointerException

        at org.apache.axis2.engine.AxisEngine.extractFaultInformationFromMessageContext(AxisEngine.java:353)

        at org.apache.axis2.engine.AxisEngine.createFaultMessageContext(AxisEngine.java:249)

        at org.apache.axis2.transport.http.AxisServlet.handleFault(AxisServlet.java:317)

        at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:277)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

        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.StandardWrapperValve.invoke(StandardWrapperValve.java:213)

        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)

        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: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.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)

        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)

        at java.lang.Thread.run(Thread.java:595)

ERROR - GeronimoLog.error(108) | Servlet.service() for servlet jsp threw exception

java.lang.IllegalStateException: getOutputStream() has already been called for this response

        at org.apache.catalina.connector.Response.getWriter(Response.java:599)

        at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:195)

        at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:124)

        at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:117)

        at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:182)

        at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:115)

        at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:75)

        at org.apache.jsp.axis2_002dweb.Error.error500_jsp._jspService(error500_jsp.java:97)

        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)

        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:802)

        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:465)

        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)

        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)

        at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:363)

        at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:284)

        at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:228)

        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:134)

        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: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.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)

        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)

        at java.lang.Thread.run(Thread.java:595)

11:01:39,307 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception

java.lang.IllegalStateException: getOutputStream() has already been called for this response

        at org.apache.catalina.connector.Response.getWriter(Response.java:599)

        at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:195)

        at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:124)

        at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:117)

        at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:182)

        at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:115)

        at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:75)

        at org.apache.jsp.axis2_002dweb.Error.error500_jsp._jspService(error500_jsp.java:97)

        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)

        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:802)

        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:465)

        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)

        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)

        at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:363)

        at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:284)

        at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:228)

        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:134)

        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: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.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)

        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)

        at java.lang.Thread.run(Thread.java:595)

 

The process I'm using worked fine with the internal database. The deployment of the process
was also OK. It was added to the external database in the bpel_process table.

 

In <TOMCAT_INSTALL_DIR>\webapps\ode\WEB_INF\web.xml I found the following lines. As
the say I uncommented them to for testing, but the  same error as above.

<!-- UNCOMMENT TO USE APPSERVER DATASOURCE -->

<resource-ref>

            <res-ref-name>jdbc/OdeDB</res-ref-name>

            <res-type>javax.sql.DataSource</res-type>

            <res-auth>Container</res-auth>

            <res-sharing-scope>Shareable</res-sharing-scope>

</resource-ref>

<!--  UNCOMMENT TO USE APPSERVER DATASOURCE -->

 

What can be wrong? I used the mysql.sql you provided.

 

Thanks! 

            Rene

 

________________________________

From: Matthieu Riou [mailto:matthieu.riou@gmail.com] 
Sent: dinsdag 12 juni 2007 16:54
To: ode-user@incubator.apache.org
Subject: Re: Running Ode using an external database (MySql)

 

Hi Michael,

I've just cleaned that up a bit, there were a couple of issues there. So to build the MySQL
schema you just need to go into the dao-jpa-ojpa-derby module and run 'rake build'. This should
produce a schema for MySQL in the target directory. Alternatively I've attached the result
to this e-mail if it's easier for you. 

Once MySQL is setup, you just need to configure ODE to use the datasource you've configured
in your application server. Just edit ode-axis2.properties and set the 2 following properties:

ode-axis2.db.mode=EXTERNAL 
ode-axis2.db.ext.dataSource=java:comp/env/jdbc/MYDS

That should be it. If you can write down the different steps you followed to make this work
with your application server, we'd be more than happy to publish it as a small "how to" so
others can reuse it :) 

Thanks,
Matthieu

On 6/12/07, Michael Horwitz <mike.horwitz@gmail.com> wrote:

Hi,

There are various cryptic hints around the site that Ode can be run against
an external database. I have been experiencing a few problems with the
Quartz scheduler not being able to get a connection to the embedded database 
when running asynchronous processes and would like to try running against
MySql to see if it will solve my problems. Are there any scripts available
to create the database?

Thanks

Mike Horwitz

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message