Orbeon - MySQL连接问题

时间:2010-11-29 06:41:05

标签: mysql xforms orbeon

Orbeon运作良好。下一步是连接到MySQL数据库。

我按照http://wiki.orbeon.com/forms/doc/developer-guide/form-runner/mysql-persistence-layer

上的以下说明操作
  1. 创建数据库+用户“orbeon”和“orbeon”作为密码的表

  2. 在“/etc/apache-tomcat-5.5.31/common/lib”中放置“mysql-connector-java-5.1.13-bin.jar”

  3. 使用以下说明测试了jdbc-driver(tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html上的MySQL DBCP示例)。这个例子运行正常,所以我得出结论,JDBC驱动程序没有任何问题。

  4. 在“etc / apache-tomcat-5.3.1 / conf”中的“server.xml”中添加了以下内容

    <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. 在“etc / apache-tomcat-5.3.1 / webapps / orbeon / WEB-INF / config”上创建了一个新文件“properties-local.xml”,并添加了以下行:

    &LT; property as =“xs:anyURI”name =“oxf.fr.persistence.app.uri。。*”value =“/ fr / service / mysql”/&gt;

    < / LI>

    当我执行关闭并从tomcat重新启动时没有问题,当我想将数据添加到现有表单或想要添加新的表单定义时,问题就开始了。

    我已经准备好了4个小时,我无法解决它。

    有人知道这个问题吗?

    很多人。

    柯恩

    PS:这是ORBEON日志文件:

    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%
    

1 个答案:

答案 0 :(得分:1)

您说当您想要将数据添加到现有表单时问题就开始了,但是没有说出问题所在。所以我不确定如何提供帮助。您能否告诉我们您更新问题和发表评论时遇到的问题(然后我可以相应更新我的回复)?

我在日志中注意到的一件事是Orbeon Forms似乎仍然转到eXist(请参阅/fr/service/exist的请求)。相反,您希望在日志(/fr/service/mysql)中看到对MySQL的请求。在您的问题中,oxf.fr.persistence.app.uri属性的标记似乎已部分丢失。你能检查一下你把它定义为:

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