1

I am using GlassFish 4.1, using REST services within my web.xml (using JAX-RS,) and running queries on my temporary ObjectDB database. I need the input to by checked and return a JSON object with my desired information.

I have tested the entire program off of the server, and it works perfectly. However, while I am hosting it on the local port 8080 and I enter a valid search entry, when it attempts to add to the list, I get an error:

Warning: StandardWrapperValve[DataSearch2]: Servlet.service() for servlet DataSearch2 threw exception
javax.persistence.PersistenceException: No Persistence provider for EntityManager named $objectdb/db/customerDetails.odb
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:85)

If I run the HTML and submit a search that will return 0 results I DO get a blank JSON file back!

But if I run a valid search that would return actual information, I get the "no persistence" error.

This is happening when I have the driver update its own list. I AM sure that I have the correct .jar in the web.inf folder.

Any idea why this would be happening?

I did find a resource outlining a similar problem in No Persistence provider for EntityManager named, but since it is not the same framework, the answers don't really help me.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Jason V
  • 623
  • 1
  • 10
  • 30

1 Answers1

1

The error message indicates that objectdb-jee.jar is missing.

ObjectDB
  • 1,312
  • 8
  • 9
  • I definitely have the objectdb-jee.jar in both my resource library and my web-inf library... – Jason V May 24 '17 at 18:57
  • 1
    Still, somehow, JPA cannot find the ObjectDB jar file. You may start with an ObjectDB web tutorial (http://www.objectdb.com/tutorial). Assuming it would work - change the project step by step to your application. – ObjectDB May 25 '17 at 08:45
  • so youre 100% sure it is the jar file not being recognized? I'll definitely look into it. – Jason V May 25 '17 at 11:48
  • OK this WAS the problem! Thank you very much. What had happened was, i added both the objectDB.jar AND the ObjectDb-jee.jar and it appears it was trying to reference the objectDb.jar instead of the objectDB-jee.jar. Once i removed the ObjectDb.jar it worked! – Jason V May 25 '17 at 12:09