ODBC in Docker Container

689 views
Skip to first unread message

Matthias Caesar

unread,
Feb 11, 2022, 3:20:54 PM2/11/22
to Orbeon Forms
Copying from GitHub:


"Hi @avernet I downloaded the driver files from mySQL.com too and placed them in the ./lib folder but this did not have the desired effect. What information would you need from me to help. I would want to try to setup Orbeon in a local docker to test and evaluate. Thanks a mil!"

Would be great if you could help us with our evaluation.

Thanks a mil!
Matthias


Alessandro Vernet

unread,
Feb 11, 2022, 3:27:14 PM2/11/22
to Orbeon Forms
Hi Matthias,

I feel like I'm missing some information. How are you creating the Docker image? Is MySQL running in a separate container, or the same container? Have you done the required setup at the Orbeon, Tomcat, and MySQL level for that database (more on this on the page linked below)?

Alessandro Vernet

unread,
Feb 22, 2022, 8:57:24 PM2/22/22
to Orbeon Forms
Hi Matthias,

Did you get a chance to make some progress on that setup with Docker and MySQL? If so, did things work out for you, or did you hit any other issue along the way?

-Alex

Matthias Caesar

unread,
Mar 4, 2022, 12:42:03 PM3/4/22
to Orbeon Forms
This is my config:
2022-03-03 19_11_35-docker-compose-ce.yml - orbeon-docker - Visual Studio Code.png

I can create a form but not save it. The database connection is wrong.
This is the error message:
2022-03-03 19_15_02-Form Builder.png

BTW, already when I create a new form, I get this message:
2022-03-03 19_15_27-Form Builder.png

Any idea what I am doing wrong?

Thank you so much for your help!

Matthias

Matthias Caesar

unread,
Mar 4, 2022, 12:42:03 PM3/4/22
to Orbeon Forms
I am using  Dyomedea/orbeon-docker: Docker images for Orbeon Forms - orbeon-docker - Gitea: Git with a cup of tea.
The instance starts just fine using this docker config. I can create a form and all. Only when I want to Save or Publish, the ODBC connection is needed to store the form in the database. That is where it stops working.
So any information, any hint regarding how the ODBC connect might be setup in docker is highly appreciated.
Thank you so much, Alessandro!
Matthias

Alessandro Vernet schrieb am Mittwoch, 23. Februar 2022 um 02:57:24 UTC+1:

Matthias Caesar

unread,
Mar 4, 2022, 12:42:03 PM3/4/22
to Orbeon Forms
Seems to be this error, related to ODBC, no?

at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1364)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1185)
at org.apache.tomcat.dbcp.dbcp2.BasicDataSource.createConnectionFactory(BasicDataSource.java:483)


Alessandro Vernet schrieb am Mittwoch, 23. Februar 2022 um 02:57:24 UTC+1:

Matthias Caesar

unread,
Mar 4, 2022, 12:42:03 PM3/4/22
to Orbeon Forms
I am trying to make  Dyomedea/orbeon-docker: Docker images for Orbeon Forms - orbeon-docker - Gitea: Git with a cup of tea work.
The issue is still that I have no idea how to configure a working instance of the ODBC Connector using docker.
The Oberon instance I created with this docker container works. It starts, all fine. Onle no database connection can be established.
Any hints how ODBC can be put to work in this scenario are very welcome. 
Thank you so much, Alessandro!

Alessandro Vernet schrieb am Mittwoch, 23. Februar 2022 um 02:57:24 UTC+1:

Alessandro Vernet

unread,
Mar 9, 2022, 12:20:36 PM3/9/22
to Orbeon Forms
Hi Matthias,

I don't have any experience with those Docker images. You mention ODBC, but I think you're referring to JDBC, or more generally the connection between Tomcat / Orbeon Forms and MySQL, correct?

In your message from March 4, you quoted the error "java.lang.ClassNotFoundException: com.mysql.jdbc.Driver". This seems to indicate that the MySQL JDBC driver is missing on the Tomcat / Orbeon Forms side. Have you copied the driver to `mysql/tomcat/lib/`, as mentioned on the page linked below?

Matthias Caesar

unread,
Mar 10, 2022, 11:43:20 AM3/10/22
to Orbeon Forms
Yes, I think.
Isn't that what I did in the config I shared? Sorry if this is a very basic question.
See image above:
mySQL.png

Alessandro Vernet

unread,
Mar 10, 2022, 5:44:00 PM3/10/22
to Orbeon Forms
Hi Matthias,

Ah, yes, that seems correct. And you're saying that with this you're getting the error "java.lang.ClassNotFoundException: com.mysql.jdbc.Driver" in the log?

-Alex
Reply all
Reply to author
Forward
0 new messages