Ubuntu-Tomcat-MySQL installaton issue

classic Classic list List threaded Threaded
35 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Ubuntu-Tomcat-MySQL installaton issue

dmz1970
I'm a totally new to tomcat and orbeon. Have some experience with MySQL.

I've followed the quick setup steps, but clicking the "Save" button in the Form Builder leads to "There was an error communicating with the database. Please contact the application administrator."

What am I missing?



MySQL Connector/J:

user@ubuntu-1404-server-amd64-dist:/var/lib/tomcat7/common/lib$ ls
mysql-connector-java-5.1.36-bin.jar



context.xml:

user@ubuntu-1404-server-amd64-dist:/var/lib/tomcat7/webapps/orbeon/META-INF$ cat context.xml
<Context>
    <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?useUnicode=true&amp;characterEncoding=UTF8"/>
</Context>



orbeon database in MySQL:

user@ubuntu-1404-server-amd64-dist:/var/lib/tomcat7/common/lib$ mysql -u orbeon -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 76
Server version: 5.5.44-0ubuntu0.14.04.1 (Ubuntu)

Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use orbeon;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+-------------------------------+
| Tables_in_orbeon              |
+-------------------------------+
| orbeon_form_data              |
| orbeon_form_data_attach       |
| orbeon_form_definition        |
| orbeon_form_definition_attach |
+-------------------------------+
4 rows in set (0.00 sec)



This is what I see in Tomcat's log:

Sep 22, 2015 11:46:24 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Allocate exception for servlet exist-rest-servlet
javax.servlet.ServletException: No database instance available
        at org.exist.http.servlets.EXistServlet.init(EXistServlet.java:140)
        at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1279)
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1192)
        at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:864)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:134)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu-Tomcat-MySQL installaton issue

bruno.buzzi
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu-Tomcat-MySQL installaton issue

dmz1970
I added the rows, but the problem persists.

user@ubuntu-1404-server-amd64-dist:/var/lib/tomcat7/webapps/orbeon/WEB-INF/resources/config$ cat properties-local.xml

<properties xmlns:xs="http://www.w3.org/2001/XMLSchema"
            xmlns:oxf="http://www.orbeon.com/oxf/processors">
    <property as="xs:string" name="oxf.fr.persistence.provider.*.*.*" value="mysql"/>
    <property as="xs:string" name="oxf.fr.persistence.mysql.datasource" value="mysql"/>
    <property as="xs:boolean" name="oxf.fr.persistence.mysql.versioning" value="true"/>
    <property as="xs:boolean" name="oxf.fr.persistence.mysql.permissions" value="true"/>
    <property as="xs:boolean" name="oxf.fr.persistence.mysql.autosave" value="true"/>
</properties>
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu-Tomcat-MySQL installaton issue

bruno.buzzi
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu-Tomcat-MySQL installaton issue

dmz1970
Bruno,

Yes, I did restart tomcat.

I don't think orbeon.log is generated... where should it be?
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu-Tomcat-MySQL installaton issue

bruno.buzzi
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu-Tomcat-MySQL installaton issue

dmz1970
>* Check in the Tomcat App Manger if Orbeon is running ?

How do I do this? Sorry, I'm new to tomcat.

* What version of Orbeon are you using ? (PE or Community)
Community Edition


user@ubuntu-1404-server-amd64-dist:/var/lib/tomcat7$ sudo find / -name orbeon.log
[sudo] password for user:
user@ubuntu-1404-server-amd64-dist:/var/lib/tomcat7$
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu-Tomcat-MySQL installaton issue

bruno.buzzi
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu-Tomcat-MySQL installaton issue

dmz1970
tomcat7

Orbeon listed as running in Tomcat Manager
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu-Tomcat-MySQL installaton issue

bruno.buzzi
In reply to this post by dmz1970
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu-Tomcat-MySQL installaton issue

dmz1970
Any idea why orbeon.log doesn't get created?

user@ubuntu-1404-server-amd64-dist:/var/lib/tomcat7/webapps/orbeon/WEB-INF/resources/config$ cat log4j.xml | grep orbeon.log
       
       


user@ubuntu-1404-server-amd64-dist:/var/lib/tomcat7/logs$ ls
catalina.2015-09-22.log  catalina.out  localhost.2015-09-22.log  localhost_access_log.2015-09-22.txt

Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu-Tomcat-MySQL installaton issue

bruno.buzzi
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu-Tomcat-MySQL installaton issue

dmz1970
Thank you for your help.

BTW, I'm OK with using eXist instead of MySQL, if it's easier to configure. Unfortunately, it didn't work for me out of the box.
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu-Tomcat-MySQL installaton issue

bruno.buzzi
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu-Tomcat-MySQL installaton issue

bruno.buzzi
In reply to this post by dmz1970
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu-Tomcat-MySQL installaton issue

dmz1970
Mine looks the same

log4j.xml
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu-Tomcat-MySQL installaton issue

bruno.buzzi
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu-Tomcat-MySQL installaton issue

dmz1970
I've set it to /tmp/orbeon.log, and uncommented


    <category name="org.orbeon.oxf.processor.xmldb.XMLDBProcessor">
        <priority value="debug"/>
    </category>

    <category name="org.orbeon.oxf.processor.sql.SQLProcessor">
        <priority value="debug"/>
    </category>


This is the log: orbeon.log
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu-Tomcat-MySQL installaton issue

bruno.buzzi
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu-Tomcat-MySQL installaton issue

dmz1970
I've changed my.cnf:

max_allowed_packet      = 100M

Restarted MySQL and tomcat, but the problem persists.
12