Hi.
Am 10.07.2010 06:15, schrieb Caldarale, Charles R:
From: Christian Bruckhoff [mailto:christian.bruckh...@gmx.de]
Subject: Re: Connecting Tomcat to a database
ERROR - GeronimoLog.error(108) | Failed to resolved external
DataSource at "java:comp/env/jdbc/TestDB".
javax.naming.NameNotFoundException: Name jdbc is not bound
in this Context
Any idea, what's wrong?
I downloaded and installed ODE on Tomcat 7, configured it for MySQL, and was
able to reproduce the above error. (Contrary to popular belief, there is no
space in the error message - that was just a figment of whatever transposition
mechanism the OP used. The grammar in the message is flawed, though.)
Luckily, there's an easy fix (or at least a workaround): get rid of the original .war
file. Once Tomcat has expanded ode.war into the ode directory, the .war file is no
longer needed, and in fact is somehow interfering with the use of the directory.
Deleting the .war (or changing the extension) lets the META-INF/context.xml file get
processed, thus defining the JNDI data source. The same effect can be achieved by
placing the<Context> element in conf/Catalina/[host]/ode.xml, which will
override any in META-INF/context.xml (in either the .war file or the directory).
I have no idea if things are supposed to work this way, or if this is a bug in
Tomcat 7 (haven't tried ODE on any other version). Perhaps the lack of a
context.xml file inside META-INF of the .war causes Tomcat to ignore the one in
the expanded directory.
I tried it that way and at least it seems, as if tomcat recognizes the
database. But now, I get another error (see end of message). Do I have
to import the ODE schema even if I want to use the database for ODE
external data?
As a side note, I found two problems with the ODE 2.0 beta:
1) It doesn't shut down properly. You can't use Tomcat's shutdown.bat (or .sh)
script to stop Tomcat, since ODE starts extra threads and fails to terminate
them when the webapp is being stopped. You can use a signal (CTRL-c on
Windows) to get the JVM to shutdown cleanly.
Better then the bugs, happening with 1.x :-D
2) The ODE instructions specify the wrong name for the SQL script to initialize
the database; it should be sql/mysql.sql, not ode_openjpa_mysql-1.3.2.sql (the
latter appears to be some ancient name).
Can't find this location. :-( Do I have to change something there?
Greetings
Christian
-----------
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 10:55:50 org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.20.
12.07.2010 10:55:50 org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters
[false], ra
ndom [true].
12.07.2010 10:55:54 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 5583 ms
12.07.2010 10:55:54 org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
12.07.2010 10:55:54 org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.0
12.07.2010 10:55:55 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
12.07.2010 10:55:55 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
12.07.2010 10:55:56 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory host-manager
12.07.2010 10:55:56 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory manager
12.07.2010 10:55:56 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.
ERROR - GeronimoLog.error(108) | Error retrieving node list.
org.apache.ode.scheduler.simple.DatabaseException:
com.mysql.jdbc.exceptions.jdb
c4.MySQLSyntaxErrorException: Table 'TestDB.ODE_JOB' doesn't exist
at
org.apache.ode.scheduler.simple.JdbcDelegate.getNodeIds(JdbcDelegate.
java:118)
at
org.apache.ode.scheduler.simple.SimpleScheduler$1.call(SimpleSchedule
r.java:248)
at
org.apache.ode.scheduler.simple.SimpleScheduler$1.call(SimpleSchedule
r.java:247)
at
org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(Simpl
eScheduler.java:154)
at
org.apache.ode.scheduler.simple.SimpleScheduler.start(SimpleScheduler
.java:245)
at
org.apache.ode.bpel.engine.BpelServerImpl.start(BpelServerImpl.java:2
24)
at org.apache.ode.axis2.ODEServer.init(ODEServer.java:175)
at org.apache.ode.axis2.ODEServer.init(ODEServer.java:116)
at
org.apache.ode.axis2.hooks.ODEAxisServlet.init(ODEAxisServlet.java:53
)
at
org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.
java:1164)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
java:1118)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:10
05)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex
t.java:4529)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContex
t.java:4800)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:785)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:76
3)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:558)
at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.jav
a:1124)
at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.j
ava:1047)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:542
)
at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1390)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
:355)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:119)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBa
se.java:89)
at
org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:31
2)
at
org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:29
2)
at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.ja
va:998)
at
org.apache.catalina.core.StandardHost.startInternal(StandardHost.java
:772)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.ja
va:990)
at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.
java:275)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
at
org.apache.catalina.core.StandardService.startInternal(StandardServic
e.java:424)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
at
org.apache.catalina.core.StandardServer.startInternal(StandardServer.
java:648)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
at org.apache.catalina.startup.Catalina.start(Catalina.java:576)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:415)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:
Table 'Tes
tDB.ODE_JOB' doesn't exist
at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
at com.mysql.jdbc.Util.getInstance(Util.java:384)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1054)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3566)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3498)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2113)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2568)
at
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.ja
va:2113)
at
com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:
2275)
at
org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(
DelegatingPreparedStatement.java:96)
at
org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(
DelegatingPreparedStatement.java:96)
at
org.apache.ode.scheduler.simple.JdbcDelegate.getNodeIds(JdbcDelegate.
java:107)
... 43 more
ERROR - GeronimoLog.error(108) | ODE BPEL Server failed to start.
org.apache.ode.bpel.iapi.ContextException: Error retrieving node list.
at
org.apache.ode.scheduler.simple.SimpleScheduler.start(SimpleScheduler
.java:255)
at
org.apache.ode.bpel.engine.BpelServerImpl.start(BpelServerImpl.java:2
24)
at org.apache.ode.axis2.ODEServer.init(ODEServer.java:175)
at org.apache.ode.axis2.ODEServer.init(ODEServer.java:116)
at
org.apache.ode.axis2.hooks.ODEAxisServlet.init(ODEAxisServlet.java:53
)
at
org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.
java:1164)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
java:1118)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:10
05)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex
t.java:4529)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContex
t.java:4800)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:785)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:76
3)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:558)
at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.jav
a:1124)
at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.j
ava:1047)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:542
)
at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1390)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
:355)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:119)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBa
se.java:89)
at
org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:31
2)
at
org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:29
2)
at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.ja
va:998)
at
org.apache.catalina.core.StandardHost.startInternal(StandardHost.java
:772)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.ja
va:990)
at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.
java:275)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
at
org.apache.catalina.core.StandardService.startInternal(StandardServic
e.java:424)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
at
org.apache.catalina.core.StandardServer.startInternal(StandardServer.
java:648)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
at org.apache.catalina.startup.Catalina.start(Catalina.java:576)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:415)
Caused by: org.apache.ode.scheduler.simple.DatabaseException:
com.mysql.jdbc.exc
eptions.jdbc4.MySQLSyntaxErrorException: Table 'TestDB.ODE_JOB' doesn't
exist
at
org.apache.ode.scheduler.simple.JdbcDelegate.getNodeIds(JdbcDelegate.
java:118)
at
org.apache.ode.scheduler.simple.SimpleScheduler$1.call(SimpleSchedule
r.java:248)
at
org.apache.ode.scheduler.simple.SimpleScheduler$1.call(SimpleSchedule
r.java:247)
at
org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(Simpl
eScheduler.java:154)
at
org.apache.ode.scheduler.simple.SimpleScheduler.start(SimpleScheduler
.java:245)
... 39 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:
Table 'Tes
tDB.ODE_JOB' doesn't exist
at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
at com.mysql.jdbc.Util.getInstance(Util.java:384)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1054)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3566)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3498)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2113)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2568)
at
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.ja
va:2113)
at
com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:
2275)
at
org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(
DelegatingPreparedStatement.java:96)
at
org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(
DelegatingPreparedStatement.java:96)
at
org.apache.ode.scheduler.simple.JdbcDelegate.getNodeIds(JdbcDelegate.
java:107)
... 43 more
12.07.2010 10:56:13 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
12.07.2010 10:56:13 org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
12.07.2010 10:56:13 org.apache.coyote.http11.Http11AprProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
12.07.2010 10:56:13 org.apache.coyote.ajp.AjpAprProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
12.07.2010 10:56:13 org.apache.coyote.ajp.AjpAprProtocol start
INFO: Starting Coyote AJP/1.3 on ajp-8009
12.07.2010 10:56:13 org.apache.catalina.startup.Catalina start
INFO: Server startup in 18749 ms
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org