Domanda

I recently completed this tutorial,

http://www.objectdb.com/tutorial/jpa/eclipse/spring/run

It says the .odb file is created under the Tomcat directory, but I can't find the Tomcat directory. I did a search on my Mac OSX machine and could not find any .odb files. I searched my project and could not find it. I downloaded Tomcat a while ago and searched the folder which eclipse is pointing to. It has to exist somewhere because when I stop the tomcat server in eclipse and restart it the data comes back and persists.

È stato utile?

Soluzione

You may specify a full path to your preferred ObjectDB database file path in step 2.

Edit the property javax.persistence.jdbc.url in the persistence.xml file.

Any path on your machine with appropriate permissions is a valid value.

Altri suggerimenti

I had a similar problem in not knowing where the .odb file was, although I was running the tutorial using jetty:run (Ubuntu/Eclipse/Spring). After a bit of hunting I discovered that it was being created in the local maven repo:

$ locate *.odb
~/.m2/db/guests.odb

I have found it in the WEB-INF/db folder of the application itself.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top