Mar 7, 2014, 10:34 AM
3 Posts

JPA eclipse

  • Category: Managed Beans in NSF
  • Platform: Windows
  • Release: 9.0.1
  • Role: Developer
  • Tags:
  • Replies: 4

Hello,

I try create Persistence connection (JPA) form xpage to Postgres using eclipseLink plugin. It works under Eclipse and it works under Domino Designer 9.0 too.

But in Designer 9.01 are problems. I have error "No Persistence provider for EntityManager named conn".

---------------

I import to my project resources:

eclipselink.jar, 

javax.persistence_1.0.0.jar, 

javax.persistence_2.0.5.v201212031355.jar,

org.eclipse.persistence.jpars.source_2.4.2.v20130514-5956486.jar,

org.eclipse.persistence.jpars_2.4.2.v20130514-5956486.jar

postgresql-9.3-1101.jdbc4.jar

and META-INF\persistence.xml

------------

What was changed in designer 9.01?   Please help....

Mar 7, 2014, 3:16 PM
366 Posts
They tweaked the JRE...

and not for the better.  TIghtend security.  Are you getting a class loader error in the error log in the IBM_TECHNICAL_SUPPORT folder ?

 

Only fix I have found unfortunately is setting the jvm security properties to grant all.

Mar 7, 2014, 4:47 PM
3 Posts
java.policy

Thanks for reply.

When was a standard restriction rules in java.polcy I had GetClassLoader error. After add "permission java.security.AllPermission;" I have

"No Persistence provider.." error. Still something is wrong. JPA is great framework but IBM made our life difficult.;]

Mar 10, 2014, 3:01 PM
261 Posts
issue with java.policy in 9.0.1

You already implemented a workaround for the getClassLoader issue, so this won't solve your specific problem, but there's an issue with changing the java.policy file in 9.0.

I've seen this myself on 9.0.1 too. Details: http://www-01.ibm.com/support/docview.wss?uid=swg21661567

Mar 16, 2014, 6:50 AM
3 Posts
re:issue with java.policy in 9.0.1
Thanks, but in designer 9.0 and 9.01 I added to java.policy file line: "permission java.security.AllPermission;".
Only in Designer 9.0 my JPA library worked.
I found on OpenNTF Custom persistent layer for Xpages project, but this not worked with my persistence.xml file.