Tuesday, May 5, 2015

OpenJPA will not be used


a customer was complaining today about his stdour/stderr file being flooded by the message "OpenJPA will not be used".

The link above explains very well the story. The only issue is that not always it's advisable to redirect the stderr to the weblogic log file (I like very much the idea, but if already some monitoring mechanism is in place, it has to be adjusted)

Anyway in the config.xml you should have

for the domain:

    <filter-expression>NOT(MESSAGE LIKE '%OpenJPA will not be used%')</filter-expression>

then for each server


and also


According to Oracle Support, "This message comes up whenever a persistence provider (ex: Eclipse) other than Kodo or OpenJPA is used in Weblogic Server. "

In config.xml you can have one of 2 values:





See http://docs.oracle.com/cd/E24329_01/web.1211/e24972/using_toplink.htm#EJBAD1415 , possibly the application is setting the provider in the code : "Specify the provider in the javax.persistence.provider property passed to the Map parameter of the javax.persistence.Persistence.createEntityManagerFactory(String, Map) method."

No comments: