Home » Support » Forum » odb files and config file

odb files and config file

#1

Hi,

I used the tutorial (http://www.objectdb.com/tutorial/jpa/eclipse/web/project) to use ObjectDB in my maven project. After that there was a db folder in src/main/java/webapp/WEB-INF/. But there were no obd files in it. I'm getting my EntityManager by doing this:

EntityManagerFactory emf = Persistence.createEntityManagerFactory("$objectdb/db/account.odb");

I looked for the odb files and found it somewhere in my workspace metadata (eclipse plugins). What can I do to save the odb files in src/main/java/webapp/WEB-INF/db/?

I tried this:

EntityManagerFactory emf = Persistence.createEntityManagerFactory("/db/accountodb");

And I got the following error message:

Failed to create a new file '/db/account.odb'

viewId=/index.xhtml
location=/Users/USER/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/PROJECT/index.xhtml
phaseId=RENDER_RESPONSE(6)

And I read (http://www.objectdb.com/java/jpa/setting) that you can define the odb home in a config file. But where to I find the config file in my project?

#2

You can specify an absolute path.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)

Post Reply

To post a reply and/or subscribe to update notifications - please login