Posted by
Sylvain DEROSIAUX on
Mar 08, 2011; 2:40pm
URL: https://discuss.orbeon.com/Orbeon-3-8-and-MySQL-as-persistence-layer-doesn-t-work-tp3341523.html
Hi !
I'm testing Orbeon 3.8.0 CE under Debian Lenny with Tomcat 5.5 and Sun
JRE 6.
With default configuration, forms works with exist database but I want
data in MySQL so I have followed the wiki page talking about MySQL as a
persistence layer :
http://wiki.orbeon.com/forms/doc/developer-guide/form-runner/mysql-persistence-layer.
I have installed MySQL 5.0, created the user, the database, the tables
and tested successfully the connection.
I have added the MySQL resource named orbeon-mysql in server.xml :
root@lab1:~# grep -A7 mysql-orbeon /etc/tomcat5.5/server.xml
<Resource name="mysql-orbeon" auth="Container" type="javax.sql.DataSource"
initialSize="3" maxActive="10" maxIdle="20" maxWait="30000"
driverClassName="com.mysql.jdbc.Driver"
poolPreparedStatements="true"
username="orbeon"
password="******"
url="jdbc:mysql://localhost:3306/orbeon"/>
I have created the properties-local.xml file :
root@lab1:~# cat
/var/lib/tomcat5.5/webapps/orbeon/WEB-INF/resources/config/properties-local.xml
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is an empty template for your own properties-local.xml
file. Please follow the instructions here:
http://wiki.orbeon.com/forms/doc/developer-guide/configuration-properties-->
<properties xmlns:xs="
http://www.w3.org/2001/XMLSchema"
xmlns:oxf="
http://www.orbeon.com/oxf/processors">
<property as="xs:anyURI"
name="oxf.fr.persistence.service.mysql.datasource" value="mysql-orbeon"/>
<property as="xs:anyURI" name="oxf.fr.persistence.app.uri.*.*.*"
value="/fr/service/mysql"/>
</properties>
Then I have restarded the whole but it doesn't work and exist is always
used :/
Here the logs :
2011-03-08 15:38:11,713 INFO OrbeonServletContextListener - Servlet
Context Listener - Context initialized.
2011-03-08 15:38:11,773 INFO ProcessorService - Servlet - Servlet
initialized.
2011-03-08 15:38:11,797 INFO ProcessorService - Servlet - Servlet
initialized.
2011-03-08 15:38:11,837 INFO EXistServlet - EXistServlet:
exist.home=/var/lib/tomcat5.5/webapps/orbeon/WEB-INF
2011-03-08 15:38:11,837 INFO EXistServlet - reading configuration from
/var/lib/tomcat5.5/webapps/orbeon/WEB-INF/exist-conf.xml
2011-03-08 15:38:11,849 INFO Configuration - Reading configuration
from file /var/lib/tomcat5.5/webapps/orbeon/WEB-INF/exist-conf.xml
2011-03-08 15:38:12,509 WARN eXistURLStreamHandlerFactory - The JVM
has already an URLStreamHandlerFactory registered, skipping...
2011-03-08 15:38:12,509 INFO eXistURLStreamHandlerFactory - System
property java.protocol.handler.pkgs has not been updated.
2011-03-08 15:38:12,805 INFO Configuration - Add catalog uri
file:/var/lib/tomcat5.5/webapps/orbeon//WEB-INF/catalog.xml
2011-03-08 15:38:12,805 INFO GrammarPool - Initializing GrammarPool.
2011-03-08 15:38:12,813 INFO EXistServlet - configuring eXist instance
2011-03-08 15:38:12,901 INFO SimpleThreadPool - Job execution threads
will use class loader of thread: main
2011-03-08 15:38:12,957 INFO QuartzScheduler - Quartz Scheduler
v.1.6.0 created.
2011-03-08 15:38:12,961 INFO RAMJobStore - RAMJobStore initialized.
2011-03-08 15:38:12,961 INFO StdSchedulerFactory - Quartz scheduler
'exist_QuartzScheduler' initialized from an externally provided
properties instance.
2011-03-08 15:38:12,961 INFO StdSchedulerFactory - Quartz scheduler
version: 1.6.0
2011-03-08 15:38:12,965 INFO FileLock - File lock last access
timestamp: 8 mars 2011
/var/lib/tomcat5.5/webapps/orbeon/WEB-INF/exist-data/dbx_dir.lck
2011-03-08 15:38:12,965 INFO FileLock - Waiting a short time for the
lock to be released...
/var/lib/tomcat5.5/webapps/orbeon/WEB-INF/exist-data/dbx_dir.lck
2011-03-08 15:38:23,169 INFO FileLock - File lock last access
timestamp: 8 mars 2011
/var/lib/tomcat5.5/webapps/orbeon/WEB-INF/exist-data/dbx_dir.lck
2011-03-08 15:38:23,169 INFO FileLock - Waiting a short time for the
lock to be released...
/var/lib/tomcat5.5/webapps/orbeon/WEB-INF/exist-data/dbx_dir.lck
2011-03-08 15:38:33,372 ERROR [/orbeon] - La servlet /orbeon a généré
une exception "load()"
org.exist.EXistException: The database directory seems to be locked by
another database instance. Found a valid lock file:
/var/lib/tomcat5.5/webapps/orbeon/WEB-INF/exist-data/dbx_dir.lck
at org.exist.storage.BrokerPool.canReadDataDir(BrokerPool.java:680)
at org.exist.storage.BrokerPool.<init>(BrokerPool.java:632)
at org.exist.storage.BrokerPool.configure(BrokerPool.java:203)
at org.exist.storage.BrokerPool.configure(BrokerPool.java:177)
at
org.exist.http.servlets.EXistServlet.startup(EXistServlet.java:613)
at org.exist.http.servlets.EXistServlet.init(EXistServlet.java:113)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4230)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)
at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at
org.apache.catalina.core.StandardService.start(StandardService.java:448)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
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:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
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:597)
at
org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:177)
Have an idea ? (The EXistException is always here even from a fresh
install...)
Best regards,
Sylvain
--
You receive this message as a subscriber of the
[hidden email] mailing list.
To unsubscribe: mailto:
[hidden email]
For general help: mailto:
[hidden email]?subject=help
OW2 mailing lists service home page:
http://www.ow2.org/wws