cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Error while accessing the H2 database from a thing service

pbadiger
1-Newbie

Error while accessing the H2 database from a thing service

I am using internal H2 db to host my application data as well. So I have created a database and a table in H2 database from H2 console. When I try to connect to this database and access the table data, I am getting error IO Exception: "java.io.IOException: The filename, directory name, or volume label syntax is incorrect"; "TCP:C:/ThingworxStorage/database/<my_database_name>.mv.db" [90031-192]

Note: I can see that <my_database_name>.mv file is getting created under ThingworxStorage/database

Message was edited by: Pawan Badiger added note

1 ACCEPTED SOLUTION

Accepted Solutions

This is now resolved.

I changed the connection string to use H2 console, I closed all the browser sessions, which included the H2 console session. This closed the open H2 session allowing thingworx to access the H2 db properly and it worked.

View solution in original post

4 REPLIES 4
supandey
19-Tanzanite
(To:pbadiger)

Hi Pawan, just curious any specific reason why you prefer to create custom tables in H2 DB rather than connecting an RDBMS via JDBC driver?

Can you share your connection string?

This is because we are currently working on a PoC and are restricted to working with limited resources.

Below are the connection details

JDBC Driver class: org.h2.Driver

jdbc:h2:TCP:C:\ThingworxStorage\database\<my_database_name>

Thank you in advance

This is now resolved.

I changed the connection string to use H2 console, I closed all the browser sessions, which included the H2 console session. This closed the open H2 session allowing thingworx to access the H2 db properly and it worked.

supandey
19-Tanzanite
(To:pbadiger)

thanks for confirming, was still in the process of validating with a local setup.

Top Tags