Ubuntu-Tomcat-MySQL installaton issue

classic Classic list List threaded Threaded
35 messages Options
12
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
Here it is orbeon.zip

And this is the current log4j.xml: 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
It's there:


user@ubuntu-1404-server-amd64-dist:/var/lib/tomcat7/common/lib$ ls -l
total 952
-rw-r--r-- 1 root root 972009 Sep 22 10:58 mysql-connector-java-5.1.36-bin.jar
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu-Tomcat-MySQL installaton issue

dmz1970
In reply to this post by bruno.buzzi
So, what can I try next?
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 couldn't set max-allowed-packet this way:

user@ubuntu-1404-server-amd64-dist:/var/lib/tomcat7/common/lib$ sudo service mysql restart --max-allowed-packet=50M
stop: invalid option: --max-allowed-packet=50M
Try `stop --help' for more information.
start: invalid option: --max-allowed-packet=50M
Try `start --help' for more information.


However, this is /etc/mysql/my.cnf having max_allowed_packet = 100M: my.cnf


Also, it doesn't look there's a problem with the credentials:

user@ubuntu-1404-server-amd64-dist:/var/lib/tomcat7/common/lib$ sudo service mysql restart
mysql stop/waiting
mysql start/running, process 52226
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 36
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> describe orbeon_form_data;
+--------------------+--------------+------+-----+---------------------+-----------------------------+
| Field              | Type         | Null | Key | Default             | Extra                       |
+--------------------+--------------+------+-----+---------------------+-----------------------------+
| created            | timestamp    | NO   |     | CURRENT_TIMESTAMP   | on update CURRENT_TIMESTAMP |
| last_modified_time | timestamp    | NO   |     | 0000-00-00 00:00:00 |                             |
| last_modified_by   | varchar(255) | YES  |     | NULL                |                             |
| username           | varchar(255) | YES  |     | NULL                |                             |
| groupname          | varchar(255) | YES  |     | NULL                |                             |
| app                | varchar(255) | YES  |     | NULL                |                             |
| form               | varchar(255) | YES  |     | NULL                |                             |
| form_version       | int(11)      | NO   |     | NULL                |                             |
| document_id        | varchar(255) | YES  |     | NULL                |                             |
| draft              | char(1)      | NO   |     | NULL                |                             |
| deleted            | char(1)      | NO   |     | NULL                |                             |
| xml                | mediumtext   | YES  |     | NULL                |                             |
+--------------------+--------------+------+-----+---------------------+-----------------------------+
12 rows in set (0.00 sec)

mysql> insert into orbeon_form_data(form) values('This is a test');
Query OK, 1 row affected, 3 warnings (0.13 sec)

mysql> select * from orbeon_form_data;
+---------------------+---------------------+------------------+----------+-----------+------+----------------+--------------+-------------+-------+---------+------+
| created             | last_modified_time  | last_modified_by | username | groupname | app  | form           | form_version | document_id | draft | deleted | xml  |
+---------------------+---------------------+------------------+----------+-----------+------+----------------+--------------+-------------+-------+---------+------+
| 2015-09-24 07:30:16 | 0000-00-00 00:00:00 | NULL             | NULL     | NULL      | NULL | This is a test |            0 | NULL        |       |         | NULL |
+---------------------+---------------------+------------------+----------+-----------+------+----------------+--------------+-------------+-------+---------+------+
1 row in set (0.02 sec)

mysql> delete from orbeon_form_data where form='This is a test';
Query OK, 1 row affected (0.02 sec)

mysql> exit
Bye
user@ubuntu-1404-server-amd64-dist:/var/lib/tomcat7/common/lib$



Maybe, my context.xml is not properly constructed/located?

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="**********"
            url="jdbc:mysql://localhost:3306/orbeon?useUnicode=true&amp;characterEncoding=UTF8"/>
    </Context>


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
This post was updated on .
I've added WatchedResource, restarted Tomcat, but this didn't solve the problem.

user@ubuntu-1404-server-amd64-dist:/var/lib/tomcat7/webapps/orbeon/META-INF$ cat context.xml
    <Context>

        <WatchedResource>WEB-INF/web.xml</WatchedResource>

        <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="*********"
            url="jdbc:mysql://localhost:3306/orbeon?useUnicode=true&amp;characterEncoding=UTF8"/>
    </Context>

user@ubuntu-1404-server-amd64-dist:/var/lib/tomcat7/webapps/orbeon/META-INF$ sudo service tomcat7 restart
 * Stopping Tomcat servlet engine tomcat7                                                                                                                                                                                             [ OK ]
 * Starting Tomcat servlet engine tomcat7      

This is the latest full log: orbeon.zip


Is it possible, I'm missing some prerequisite module?
Also, the system didn't work before MySQL configuration, when it was supposed to be using eXist. Maybe the problem has nothing to do with MySQL...
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
What's the right location for it

/var/lib/tomcat7/webapps/orbeon/WEB-INF/lib/

or

/var/lib/tomcat7/common/lib/
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 very very much!
"Document saved successfully" - at last!


In my case the directory is /usr/share/tomcat7/lib:

user@ubuntu-1404-server-amd64-dist:/usr/share/tomcat7/lib$ ls -l
total 816
lrwxrwxrwx 1 root root     44 Jun 19 17:22 annotations-api.jar -> ../../java/tomcat-annotations-api-7.0.52.jar
lrwxrwxrwx 1 root root     34 Jun 19 17:22 catalina-ant.jar -> ../../java/catalina-ant-7.0.52.jar
lrwxrwxrwx 1 root root     40 Jun 19 17:22 catalina-ha.jar -> ../../java/tomcat-catalina-ha-7.0.52.jar
lrwxrwxrwx 1 root root     37 Jun 19 17:22 catalina.jar -> ../../java/tomcat-catalina-7.0.52.jar
lrwxrwxrwx 1 root root     37 Jun 19 17:22 catalina-tribes.jar -> ../../java/catalina-tribes-7.0.52.jar
lrwxrwxrwx 1 root root     27 Jun 19 17:22 commons-dbcp.jar -> ../../java/commons-dbcp.jar
lrwxrwxrwx 1 root root     27 Jun 19 17:22 commons-pool.jar -> ../../java/commons-pool.jar
lrwxrwxrwx 1 root root     32 Jun 19 17:22 el-api.jar -> ../../java/tomcat-el-api-2.2.jar
lrwxrwxrwx 1 root root     38 Jun 19 17:22 jasper-el.jar -> ../../java/tomcat-jasper-el-7.0.52.jar
lrwxrwxrwx 1 root root     35 Jun 19 17:22 jasper.jar -> ../../java/tomcat-jasper-7.0.52.jar
lrwxrwxrwx 1 root root     33 Jun 19 17:22 jsp-api.jar -> ../../java/tomcat-jsp-api-2.2.jar
-rw-r--r-- 1 root root 832960 Sep 24 10:27 mysql-connector-java-5.jar
lrwxrwxrwx 1 root root     37 Jun 19 17:22 servlet-api.jar -> ../../java/tomcat-servlet-api-3.0.jar
lrwxrwxrwx 1 root root     32 Jun 19 17:22 tomcat-api.jar -> ../../java/tomcat-api-7.0.52.jar
lrwxrwxrwx 1 root root     35 Jun 19 17:22 tomcat-coyote.jar -> ../../java/tomcat-coyote-7.0.52.jar
lrwxrwxrwx 1 root root     36 Jun 19 17:22 tomcat-i18n-es.jar -> ../../java/tomcat-i18n-es-7.0.52.jar
lrwxrwxrwx 1 root root     36 Jun 19 17:22 tomcat-i18n-fr.jar -> ../../java/tomcat-i18n-fr-7.0.52.jar
lrwxrwxrwx 1 root root     36 Jun 19 17:22 tomcat-i18n-ja.jar -> ../../java/tomcat-i18n-ja-7.0.52.jar
lrwxrwxrwx 1 root root     33 Jun 19 17:22 tomcat-jdbc.jar -> ../../java/tomcat-jdbc-7.0.52.jar
lrwxrwxrwx 1 root root     33 Jun 19 17:22 tomcat-util.jar -> ../../java/tomcat-util-7.0.52.jar
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
Actually, the problem was not the version. It was me putting the jar into a wrong directory. Your screen shot helped me to find the right one. Thank you again!
12