1

https://wiki.eclipse.org/OM2M/one/Advanced_DB

I am developing an IoT project based on Eclipse OM2M project. I've been trying to do the same thing as the tutorial above did in the "Run H2 in another mode" part. In the tutorial, it said that the default database(h2) was running in embedded mode. My goal was to run the h2 database in server mode as the tutorial above did.

In h2 database part:

I started a TCP server using command

java -jar h2-1.4.196.jar -webAllowOthers -tcpAllowOthers

and it showed that the TCP server is running at tcp://127.0.1.1:41903 (The port may change every time I started a new TCP server). After I successfully started the server, I tested the connection using the web console of h2 so I think my h2 server was started correctly.

In OM2M part:

I modified some configurations in the config.ini file as below:

org.eclipse.om2m.dbUrl=jdbc:h2:tcp://127.0.1.1:41903/~/indb (set database url) org.eclipse.om2m.dbUser=sa (set database user)
org.eclipse.om2m.dbPassword= (no database password)

However, when I ran sh start.sh in cmd to start the CSE, there were always errors shown in the picture below:

enter image description here

Since there's only a few information in the tutorial, I don't really know if I configure the file wrong. It seems like OM2M was not able to find my h2 database.

Can anyone tell me where I did it wrong?

plamut
  • 3,085
  • 10
  • 29
  • 40
Leo Miao
  • 11
  • 1

0 Answers0