Hi.

I am trying to use an MySQL database for access to external data. I think, the database is set up in the rigth way, but it's not working at all.

For the access to the database, I've created the file %TOMCAT_DIR%/webapps/ode/META-INF/context.xml with the following lines:
----------------------

<?xml version="1.0" encoding="UTF-8"?>
<Context reloadable="true" crossContext="true">
  <Resource name="TestDB" auth="Container" type="javax.sql.DataSource"
            maxActive="100" maxIdle="30" maxWait="10000"
username="test_dab" password="moep" driverClassName="com.mysql.jdbc.Driver"

url="jdbc:mysql://mysqlhost.uni-koblenz.de:3306/TestDB?autoReconnect=true"/>
</Context>

In %TOMCAT_DIR%/webapps/ode/WEB-INF/conf/ode-axis2.properties I've changed the following lines (the only active lines btw.):
----------------------
ode-axis2.db.mode=EXTERNAL
ode-axis2.db.ext.dataSource=java:comp/env/TestDB

After that I created the database called "TestDB" with a table "TestTab". After this, I also imported the ODE schema from sql/maysql.sql, which was located in the ZIP file of ode.

If you wanna check the database you can login with:
Username: test_dab
Password: moep

Now I wanted to test the database by using external variables, so I edited the example called "TestVar" from: http://svn.apache.org/repos/asf/ode/trunk/bpel-test/src/test/resources/bpel/2.0/

The changed example can be downloaded as Zip here: http://www.uni-koblenz.de/~brchrist/20100712database.zip
Or file by file here: http://www.uni-koblenz.de/~brchrist/20100712database/

After deployment, i get the attached error log.

Where's the error? Hope you can help me.

TIA
Christian

The error log:
----------------------
C:\Eigene Dateien\Downloads\Diplomarbeit\Evtl. neue Entwicklungsumgebung\apache-
tomcat-7.0.0-ode2DB\bin>catalina run
Using CATALINA_BASE: "C:\Eigene Dateien\Downloads\Diplomarbeit\Evtl. neue Entw
icklungsumgebung\apache-tomcat-7.0.0-ode2DB"
Using CATALINA_HOME: "C:\Eigene Dateien\Downloads\Diplomarbeit\Evtl. neue Entw
icklungsumgebung\apache-tomcat-7.0.0-ode2DB"
Using CATALINA_TMPDIR: "C:\Eigene Dateien\Downloads\Diplomarbeit\Evtl. neue Entw
icklungsumgebung\apache-tomcat-7.0.0-ode2DB\temp"
Using JRE_HOME:        "C:\Programme\Java\jdk1.6.0_20"
Using CLASSPATH: "C:\Eigene Dateien\Downloads\Diplomarbeit\Evtl. neue Entw icklungsumgebung\apache-tomcat-7.0.0-ode2DB\bin\bootstrap.jar;C:\Eigene Dateien\ Downloads\Diplomarbeit\Evtl. neue Entwicklungsumgebung\apache-tomcat-7.0.0-ode2D
B\bin\tomcat-juli.jar"
12.07.2010 12:12:08 org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.20.
12.07.2010 12:12:08 org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], ra
ndom [true].
12.07.2010 12:12:10 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 3327 ms
12.07.2010 12:12:10 org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
12.07.2010 12:12:10 org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.0
12.07.2010 12:12:10 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
12.07.2010 12:12:12 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
12.07.2010 12:12:13 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory host-manager
12.07.2010 12:12:13 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory manager
12.07.2010 12:12:13 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ode
DEBUG - GeronimoLog.debug(66) | Loading properties
DEBUG - GeronimoLog.debug(66) | Initializing transaction manager
DEBUG - GeronimoLog.debug(66) | Initializing transaction manager using org.apach
e.ode.il.EmbeddedGeronimoFactory
DEBUG - GeronimoLog.debug(66) | Creating data source.
DEBUG - GeronimoLog.debug(66) | Starting DAO.
INFO - GeronimoLog.info(79) | Using DAO Connection Factory class org.apache.ode.
dao.jpa.BPELDAOConnectionFactoryImpl.
DEBUG - GeronimoLog.debug(66) | Initializing BPEL process store.
DEBUG - GeronimoLog.debug(66) | Initializing BPEL server.
DEBUG - GeronimoLog.debug(66) | ODE initializing
DEBUG - GeronimoLog.debug(66) | BPEL SERVER initializing
DEBUG - GeronimoLog.debug(66) | BPEL SERVER starting.
INFO - GeronimoLog.info(79) | BPEL Server Started.
DEBUG - GeronimoLog.debug(66) | Initializing JCA adapter.
INFO - GeronimoLog.info(79) | Poller started.
INFO - GeronimoLog.info(79) | Process deployment polling started on path C:\Eige ne Dateien\Downloads\Diplomarbeit\Evtl. neue Entwicklungsumgebung\apache-tomcat-
7.0.0-ode2DB\webapps\ode\WEB-INF\processes.
INFO - GeronimoLog.info(79) | ODE Service Engine has been started.
12.07.2010 12:12:48 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
12.07.2010 12:12:48 org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
12.07.2010 12:12:48 org.apache.coyote.http11.Http11AprProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
12.07.2010 12:12:48 org.apache.coyote.ajp.AjpAprProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
12.07.2010 12:12:48 org.apache.coyote.ajp.AjpAprProtocol start
INFO: Starting Coyote AJP/1.3 on ajp-8009
12.07.2010 12:12:48 org.apache.catalina.startup.Catalina start
INFO: Server startup in 37998 ms
DEBUG - GeronimoLog.debug(66) | Process store event: {ProcessStoreEvent#DEPLOYED
:{http://ode/bpel/unit-test}HelloWorld2-5}
DEBUG - GeronimoLog.debug(66) | Ignoring store event: {ProcessStoreEvent#DEPLOYE
D:{http://ode/bpel/unit-test}HelloWorld2-5}
DEBUG - GeronimoLog.debug(66) | Process store event: {ProcessStoreEvent#ACTIVATE
D:{http://ode/bpel/unit-test}HelloWorld2-5}
DEBUG - GeronimoLog.debug(66) | register: {http://ode/bpel/unit-test}HelloWorld2
-5
DEBUG - GeronimoLog.debug(66) | Registering process {http://ode/bpel/unit-test}H
elloWorld2-5 with server.
DEBUG - GeronimoLog.debug(66) | Register process: serviceId={http://ode/bpel/uni t-test.wsdl}HelloService:HelloPort, process=ODEProcess[{http://ode/bpel/unit-tes
t}HelloWorld2-5]
DEBUG - GeronimoLog.debug(66) | Activating {http://ode/bpel/unit-test}HelloWorld
2-5
DEBUG - GeronimoLog.debug(66) | Destroying service helloWorld port HelloPort
DEBUG - GeronimoLog.debug(66) | Couldn't find service helloWorld port HelloPort
to destroy.
DEBUG - GeronimoLog.debug(66) | Create AxisService: service={http://ode/bpel/uni t-test.wsdl}HelloService port=HelloPort WSDL=HelloWorld2.wsdl BPEL=HelloWorld2.b
pel
DEBUG - GeronimoLog.debug(66) | Looking for Axis2 service configuration file: fi
le:/C:/Eigene%20Dateien/Downloads/Diplomarbeit/Evtl.%20neue%20Entwicklungsumgebu
ng/apache-tomcat-7.0.0-ode2DB/webapps/ode/WEB-INF/processes/helloWorld/HelloServ
ice.axis2
DEBUG - GeronimoLog.debug(66) | Axis2 service configuration not found: file:/C:/
Eigene%20Dateien/Downloads/Diplomarbeit/Evtl.%20neue%20Entwicklungsumgebung/apac
he-tomcat-7.0.0-ode2DB/webapps/ode/WEB-INF/processes/helloWorld/HelloService.axi
s2
DEBUG - GeronimoLog.debug(66) | Created Axis2 service {http://ode/bpel/unit-test
.wsdl}HelloService
DEBUG - GeronimoLog.debug(66) | Activated {http://ode/bpel/unit-test}HelloWorld2
-5 myrole helloPartnerLink: EPR is org.apache.ode.il.epr.wsaendpo...@5e7663
DEBUG - GeronimoLog.debug(66) | Activated {http://ode/bpel/unit-test}HelloWorld2
-5
ERROR - GeronimoLog.error(108) | External variable subsystem configuration error
.
org.apache.ode.bpel.evar.ExternalVariableModuleException: Data source reference "TestDB" not found for external variable {http://ode/bpel/unit-test}HelloWorld2-
5#evar1; make sure to register the data source with the engine!
at org.apache.ode.bpel.extvar.jdbc.JdbcExternalVariableModule.configure(
JdbcExternalVariableModule.java:72)
at org.apache.ode.bpel.engine.extvar.ExternalVariableManager.<init>(Exte
rnalVariableManager.java:76)
at org.apache.ode.bpel.engine.ODEProcess.initExternalVariables(ODEProces
s.java:197)
at org.apache.ode.bpel.engine.ODEProcess$HydrationLatch.doHydrate(ODEPro
cess.java:1256)
at org.apache.ode.bpel.engine.ODEProcess$HydrationLatch.access$200(ODEPr
ocess.java:1215)
at org.apache.ode.bpel.engine.ODEProcess$HydrationLatch$2.run(ODEProcess
.java:1226)
at org.apache.ode.bpel.engine.NStateLatch.latch(NStateLatch.java:89) at org.apache.ode.bpel.engine.ODEProcess.hydrate(ODEProcess.java:847) at org.apache.ode.bpel.engine.BpelServerImpl.register(BpelServerImpl.jav
a:383)
        at org.apache.ode.axis2.ODEServer.handleEvent(ODEServer.java:626)
        at org.apache.ode.axis2.ODEServer.access$100(ODEServer.java:91)
at org.apache.ode.axis2.ODEServer$ProcessStoreListenerImpl.onProcessStor
eEvent(ODEServer.java:613)
at org.apache.ode.store.ProcessStoreImpl.fireEvent(ProcessStoreImpl.java
:517)
at org.apache.ode.store.ProcessStoreImpl.fireStateChange(ProcessStoreImp
l.java:523)
at org.apache.ode.store.ProcessStoreImpl.deploy(ProcessStoreImpl.java:30
1)
at org.apache.ode.axis2.deploy.DeploymentPoller.check(DeploymentPoller.j
ava:144)
at org.apache.ode.axis2.deploy.DeploymentPoller.access$300(DeploymentPol
ler.java:55)
at org.apache.ode.axis2.deploy.DeploymentPoller$PollingThread.run(Deploy
mentPoller.java:188)
WARN - GeronimoLog.warn(92) | Deployment failed within the engine, store undeplo
ying process.
DEBUG - GeronimoLog.debug(66) | Process store event: {ProcessStoreEvent#UNDEPLOY
ED:{http://ode/bpel/unit-test}HelloWorld2-5}
DEBUG - GeronimoLog.debug(66) | deactivating non-shared endpoint {http://ode/bpe
l/unit-test.wsdl}HelloService:HelloPort
DEBUG - GeronimoLog.debug(66) | Destroying service {http://ode/bpel/unit-test.ws
dl}HelloService port HelloPort
DEBUG - GeronimoLog.debug(66) | Couldn't find service {http://ode/bpel/unit-test
.wsdl}HelloService port HelloPort to destroy.
DEBUG - GeronimoLog.debug(66) | removing process {http://ode/bpel/unit-test}Hell oWorld2-5; handle ODEProcess[{http://ode/bpel/unit-test}HelloWorld2-5]; exists t
rue
INFO - GeronimoLog.info(79) | Unregistered process {http://ode/bpel/unit-test}He
lloWorld2-5.
ERROR - GeronimoLog.error(108) | Deployment of helloWorld failed, aborting for n
ow.
org.apache.ode.bpel.iapi.ContextException: Deployment failed within the engine. at org.apache.ode.store.ProcessStoreImpl.deploy(ProcessStoreImpl.java:30
8)
at org.apache.ode.axis2.deploy.DeploymentPoller.check(DeploymentPoller.j
ava:144)
at org.apache.ode.axis2.deploy.DeploymentPoller.access$300(DeploymentPol
ler.java:55)
at org.apache.ode.axis2.deploy.DeploymentPoller$PollingThread.run(Deploy
mentPoller.java:188)
Caused by: org.apache.ode.bpel.iapi.BpelEngineException: External variable subsy
stem configuration error.
at org.apache.ode.bpel.engine.extvar.ExternalVariableManager.<init>(Exte
rnalVariableManager.java:79)
at org.apache.ode.bpel.engine.ODEProcess.initExternalVariables(ODEProces
s.java:197)
at org.apache.ode.bpel.engine.ODEProcess$HydrationLatch.doHydrate(ODEPro
cess.java:1256)
at org.apache.ode.bpel.engine.ODEProcess$HydrationLatch.access$200(ODEPr
ocess.java:1215)
at org.apache.ode.bpel.engine.ODEProcess$HydrationLatch$2.run(ODEProcess
.java:1226)
at org.apache.ode.bpel.engine.NStateLatch.latch(NStateLatch.java:89) at org.apache.ode.bpel.engine.ODEProcess.hydrate(ODEProcess.java:847) at org.apache.ode.bpel.engine.BpelServerImpl.register(BpelServerImpl.jav
a:383)
        at org.apache.ode.axis2.ODEServer.handleEvent(ODEServer.java:626)
        at org.apache.ode.axis2.ODEServer.access$100(ODEServer.java:91)
at org.apache.ode.axis2.ODEServer$ProcessStoreListenerImpl.onProcessStor
eEvent(ODEServer.java:613)
at org.apache.ode.store.ProcessStoreImpl.fireEvent(ProcessStoreImpl.java
:517)
at org.apache.ode.store.ProcessStoreImpl.fireStateChange(ProcessStoreImp
l.java:523)
at org.apache.ode.store.ProcessStoreImpl.deploy(ProcessStoreImpl.java:30
1)
        ... 3 more
Caused by: org.apache.ode.bpel.evar.ExternalVariableModuleException: Data source reference "TestDB" not found for external variable {http://ode/bpel/unit-test}H
elloWorld2-5#evar1; make sure to register the data source with the engine!
at org.apache.ode.bpel.extvar.jdbc.JdbcExternalVariableModule.configure(
JdbcExternalVariableModule.java:72)
at org.apache.ode.bpel.engine.extvar.ExternalVariableManager.<init>(Exte
rnalVariableManager.java:76)
        ... 16 more
DEBUG - GeronimoLog.debug(66) | Checking for Operation using SOAP message body's
 first child's local name : listAllProcesses
DEBUG - GeronimoLog.debug(66) | Found operation org.apache.axis2.description.InO
utaxisoperat...@1e565bd

Reply via email to