KoenRenders
KoenRenders

Reputation: 1

Orbeon - MySQL connection problem

Orbeon was working well. The next step was to connect to a MySQL-database.

I followed the following instructions on http://wiki.orbeon.com/forms/doc/developer-guide/form-runner/mysql-persistence-layer

  1. Creation database + tables for the user "orbeon" and "orbeon" as a password

  2. Placed "mysql-connector-java-5.1.13-bin.jar" in "/etc/apache-tomcat-5.5.31/common/lib"

  3. Tested the jdbc-driver with the following instructions (MySQL DBCP Example on tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html). this example worked fine, so I concluded that there is nothing wrong with the JDBC-driver.

  4. Added the following to "server.xml" in "etc/apache-tomcat-5.3.1/conf"

    <Context path="/orbeon" docBase="orbeon"
            debug="5" reloadable="true" crossContext="true">
    
    
       <Resource name="jdbc/mysql" auth="Container" type="javax.sql.DataSource"
        initialSize="3" maxActive="10" maxIdle="20" maxWait="30000"
        driverClassName="com.mysql.jdbc.Driver"
        poolPreparedStatements="true"
        username="orbeon"
        password="orbeon"
        url="jdbc:mysql://localhost:3306/orbeon"/>
    
    
    </Context>
    
  5. Created a new file "properties-local.xml" on "etc/apache-tomcat-5.3.1/webapps/orbeon/WEB-INF/config" and added the following line:

    < property as="xs:anyURI" name="oxf.fr.persistence.app.uri...*" value="/fr/service/mysql"/>

When I did a shutdown and restart from tomcat there is no problem, the problems start when I want to add data to an existing form or want to add a new form definition.

I'm looking 4 hours on this allready and I can't solve it.

Does someone knows the problem?

Many thx.

Koen

PS: THIS IS THE ORBEON LOG-FILE:

2010-11-29 07:35:57,829 INFO  OrbeonServletContextListener  - Servlet Context Listener - Context initialized.
2010-11-29 07:35:57,908 INFO  ProcessorService  - Servlet - Servlet initialized.
2010-11-29 07:35:57,927 INFO  ProcessorService  - Servlet - Servlet initialized.
2010-11-29 07:35:57,968 INFO  EXistServlet  - EXistServlet: exist.home=/etc/apache-tomcat-5.5.31/webapps/orbeon/WEB-INF
2010-11-29 07:35:57,968 INFO  EXistServlet  - reading configuration from /etc/apache-tomcat-5.5.31/webapps/orbeon/WEB-INF/exist-conf.xml
2010-11-29 07:35:57,983 INFO  Configuration  - Reading configuration from file /etc/apache-tomcat-5.5.31/webapps/orbeon/WEB-INF/exist-conf.xml
2010-11-29 07:35:58,771 WARN  eXistURLStreamHandlerFactory  - The JVM has already an URLStreamHandlerFactory registered, skipping...
2010-11-29 07:35:58,771 INFO  eXistURLStreamHandlerFactory  - Setting java.protocol.handler.pkgs to org.exist.protocolhandler.protocols
2010-11-29 07:35:58,788 INFO  Configuration  - Add catalog uri file:/etc/apache-tomcat-5.5.31/webapps/orbeon//WEB-INF/catalog.xml
2010-11-29 07:35:58,789 INFO  GrammarPool  - Initializing GrammarPool.
2010-11-29 07:35:58,792 INFO  EXistServlet  - configuring eXist instance
2010-11-29 07:35:58,876 INFO  SimpleThreadPool  - Job execution threads will use class loader of thread: main
2010-11-29 07:35:58,913 INFO  QuartzScheduler  - Quartz Scheduler v.1.6.0 created.
2010-11-29 07:35:58,916 INFO  RAMJobStore  - RAMJobStore initialized.
2010-11-29 07:35:58,917 INFO  StdSchedulerFactory  - Quartz scheduler 'exist_QuartzScheduler' initialized from an externally provided properties instance.
2010-11-29 07:35:58,917 INFO  StdSchedulerFactory  - Quartz scheduler version: 1.6.0
2010-11-29 07:35:58,950 INFO  DefaultCacheManager  - Cache settings: 49,152k; totalPages: 12,288; maxCacheSize: 11,059
2010-11-29 07:35:58,956 WARN  AgentFactory  - Class not found for JMX agent: org.exist.management.impl.JMXAgent
2010-11-29 07:35:58,964 INFO  XQueryPool  - QueryPool: size = 128; maxStackSize = 5; timeout = 120,000; timeoutCheckInterval = 30,000
2010-11-29 07:35:59,190 INFO  IndexManager  - Registered index org.exist.indexing.ngram.NGramIndex as ngram-index
2010-11-29 07:35:59,196 INFO  IndexManager  - Registered index org.exist.fulltext.FTIndex as ft-legacy-index
2010-11-29 07:35:59,649 INFO  QuartzScheduler  - Scheduler exist_QuartzScheduler_$_NON_CLUSTERED started.
2010-11-29 07:35:59,660 INFO  EXistServlet  - registering XMLDB driver
2010-11-29 07:35:59,731 INFO  EXistServlet  - Using default user guest for all unauthorized requests.
2010-11-29 07:35:59,949 INFO  XmlLibraryChecker  - Looking for a valid Parser...
Checking for Xerces, found version Xerces-J 2.9.0
OK!

2010-11-29 07:35:59,950 INFO  XmlLibraryChecker  - Looking for a valid Transformer...
Checking for Saxon, found version 9.1.0.8
OK!

2010-11-29 07:35:59,951 INFO  XmlLibraryChecker  - Looking for a valid Resolver...
Checking for Resolver, found version XmlResolver 1.2
OK!

2010-11-29 07:35:59,952 INFO  XmlLibraryChecker  - Using parser org.orbeon.oxf.xml.xerces.XercesSAXParser
2010-11-29 07:35:59,962 INFO  XmlLibraryChecker  - Using transformer com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl
2010-11-29 07:37:28,534 INFO  ProcessorService  - /fr/orbeon/bookshelf/new - Received request
2010-11-29 07:37:32,992 INFO  ProcessorService  - /fr/service/resource/crud/orbeon/bookshelf/form/form.xhtml - Received request
2010-11-29 07:37:33,972 INFO  ProcessorService  - /fr/service/resource/crud/orbeon/bookshelf/form/form.xhtml - Timing: 958 - Cache hits for cache.main: 323, fault: 62, adds: 61, expirations: 0, success rate: 83%
2010-11-29 07:37:35,220 WARN  XFormsServer  - ignoring property on xforms:model element {name: "computed-binds"}
2010-11-29 07:37:37,871 INFO  ProcessorService  - /fr/service/i18n/fr-resources/orbeon/bookshelf - Received request
2010-11-29 07:37:40,059 INFO  ProcessorService  - /fr/service/i18n/fr-resources/orbeon/bookshelf - Timing: 2188 - Cache hits for cache.main: 354, fault: 71, adds: 72, expirations: 0, success rate: 83%
2010-11-29 07:37:40,607 WARN  XFormsServer  - xxforms:instance() - instance not found {instance id: "fr-uuid"}
2010-11-29 07:37:40,608 WARN  XFormsServer  - xxforms:instance() - instance not found {instance id: "fr-save-locally-file-name"}
2010-11-29 07:37:40,949 WARN  XFormsServer  - xxforms:instance() - instance not found {instance id: "fr-uuid"}
2010-11-29 07:37:40,949 WARN  XFormsServer  - xxforms:instance() - instance not found {instance id: "fr-save-locally-file-name"}
2010-11-29 07:37:41,007 WARN  XFormsServer  - xxforms:instance() - instance not found {instance id: "fr-uuid"}
2010-11-29 07:37:41,008 WARN  XFormsServer  - xxforms:instance() - instance not found {instance id: "fr-save-locally-file-name"}
2010-11-29 07:37:41,081 WARN  XFormsServer  - xxforms:instance() - instance not found {instance id: "fr-uuid"}
2010-11-29 07:37:41,097 WARN  XFormsServer  - xxforms:instance() - instance not found {instance id: "fr-save-locally-file-name"}
2010-11-29 07:37:41,323 INFO  DatabaseImpl  - Collection /db/orbeon/xforms/cache not found
2010-11-29 07:37:43,553 INFO  ProcessorService  - /fr/orbeon/bookshelf/new - Timing: 15081 - Cache hits for cache.main: 846, fault: 227, adds: 225, expirations: 0, success rate: 78%
2010-11-29 07:38:18,053 INFO  ProcessorService  - /xforms-server - Received request
2010-11-29 07:38:18,458 INFO  ProcessorService  - /xforms-server - Timing: 405 - Cache hits for cache.main: 24, fault: 18, adds: 15, expirations: 0, success rate: 57%
2010-11-29 07:38:21,977 INFO  ProcessorService  - /xforms-server - Received request
2010-11-29 07:38:22,213 WARN  XFormsServer  - xxforms:instance() - instance not found {instance id: "fr-uuid"}
2010-11-29 07:38:22,215 WARN  XFormsServer  - xxforms:instance() - instance not found {instance id: "fr-save-locally-file-name"}
2010-11-29 07:38:22,309 WARN  XFormsServer  - xxforms:instance() - instance not found {instance id: "fr-uuid"}
2010-11-29 07:38:22,309 WARN  XFormsServer  - xxforms:instance() - instance not found {instance id: "fr-save-locally-file-name"}
2010-11-29 07:38:22,372 WARN  XFormsServer  - xxforms:instance() - instance not found {instance id: "fr-uuid"}
2010-11-29 07:38:22,378 WARN  XFormsServer  - xxforms:instance() - instance not found {instance id: "fr-save-locally-file-name"}
2010-11-29 07:38:22,414 WARN  XFormsServer  - xxforms:instance() - instance not found {instance id: "fr-uuid"}
2010-11-29 07:38:22,415 WARN  XFormsServer  - xxforms:instance() - instance not found {instance id: "fr-save-locally-file-name"}
2010-11-29 07:38:22,552 INFO  ProcessorService  - /xforms-server - Timing: 575 - Cache hits for cache.main: 24, fault: 1, adds: 0, expirations: 0, success rate: 96%
2010-11-29 07:38:26,092 INFO  ProcessorService  - /xforms-server - Received request
2010-11-29 07:38:26,163 WARN  XFormsServer  - xxforms:instance() - instance not found {instance id: "fr-uuid"}
2010-11-29 07:38:26,163 WARN  XFormsServer  - xxforms:instance() - instance not found {instance id: "fr-save-locally-file-name"}
2010-11-29 07:38:26,200 WARN  XFormsServer  - xxforms:instance() - instance not found {instance id: "fr-uuid"}
2010-11-29 07:38:26,200 WARN  XFormsServer  - xxforms:instance() - instance not found {instance id: "fr-save-locally-file-name"}
2010-11-29 07:38:26,230 WARN  XFormsServer  - xxforms:instance() - instance not found {instance id: "fr-uuid"}
2010-11-29 07:38:26,231 WARN  XFormsServer  - xxforms:instance() - instance not found {instance id: "fr-save-locally-file-name"}
2010-11-29 07:38:26,276 WARN  XFormsServer  - xxforms:instance() - instance not found {instance id: "fr-uuid"}
2010-11-29 07:38:26,276 WARN  XFormsServer  - xxforms:instance() - instance not found {instance id: "fr-save-locally-file-name"}
2010-11-29 07:38:26,305 WARN  XFormsServer  - xxforms:instance() - instance not found {instance id: "fr-uuid"}
2010-11-29 07:38:26,306 WARN  XFormsServer  - xxforms:instance() - instance not found {instance id: "fr-save-locally-file-name"}
2010-11-29 07:38:26,394 INFO  ProcessorService  - /fr/service/exist/crud/orbeon/bookshelf/data/aa845779246c964aeaed3e017edcfe18/data.xml - Received request
2010-11-29 07:38:26,869 WARN  Descriptor  - Giving up unable to read descriptor file from /etc/apache-tomcat-5.5.31/webapps/orbeon/WEB-INF/descriptor.xml
2010-11-29 07:38:26,870 WARN  Descriptor  - Giving up unable to read descriptor.xml file from classloader in package org.exist.http
2010-11-29 07:38:27,560 INFO  ProcessorService  - /fr/service/exist/crud/orbeon/bookshelf/data/aa845779246c964aeaed3e017edcfe18/data.xml - Timing: 1166 - Cache hits for cache.main: 320, fault: 60, adds: 54, expirations: 4, success rate: 84%
2010-11-29 07:38:27,565 WARN  XFormsServer  - instance() - instance not found {instance id: "fr-persistence-instance"}
2010-11-29 07:38:27,596 WARN  XFormsServer  - xxforms:instance() - instance not found {instance id: "fr-uuid"}
2010-11-29 07:38:27,596 WARN  XFormsServer  - xxforms:instance() - instance not found {instance id: "fr-save-locally-file-name"}
2010-11-29 07:38:27,622 WARN  XFormsServer  - xxforms:instance() - instance not found {instance id: "fr-uuid"}
2010-11-29 07:38:27,626 WARN  XFormsServer  - xxforms:instance() - instance not found {instance id: "fr-save-locally-file-name"}
2010-11-29 07:38:27,650 WARN  XFormsServer  - xxforms:instance() - instance not found {instance id: "fr-uuid"}
2010-11-29 07:38:27,650 WARN  XFormsServer  - xxforms:instance() - instance not found {instance id: "fr-save-locally-file-name"}
2010-11-29 07:38:27,725 INFO  ProcessorService  - /xforms-server - Timing: 1633 - Cache hits for cache.main: 24, fault: 1, adds: 0, expirations: 0, success rate: 96%

Upvotes: 0

Views: 1403

Answers (1)

avernet
avernet

Reputation: 31753

You are saying that the problems start when you want to add data to an existing form, but don't say what the problem is. So I am not sure how to help. Could you tell us more about the problems you encountered updating your question and posting a comment (then I can update my response accordingly)?

One thing I notice in your log is that Orbeon Forms still seems to go to eXist (see the requests to /fr/service/exist). Instead, you'd like to see requests to MySQL in the log (/fr/service/mysql). In your question, the markup for the oxf.fr.persistence.app.uri property seem to have been partially lost above. Could you check that you defined it as:

<property as="xs:anyURI"  name="oxf.fr.persistence.app.uri.*.*.*" value="/fr/service/mysql"/>

Upvotes: 1

Related Questions