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:
<log-filter> <name>OpenJPA</name> <filter-expression>NOT(MESSAGE LIKE '%OpenJPA will not be used%')</filter-expression> </log-filter>
then for each server
<stdout-filter>OpenJPA</stdout-filter>
and also
<redirect-stderr-to-server-log-enabled>true</redirect-stderr-to-server-log-enabled>
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:
TOPLINK
<jpa> <default-jpa-provider>org.eclipse.persistence.jpa.PersistenceProvider</default-jpa-provider> </jpa>
KODO
<jpa> <default-jpa-provider>org.apache.openjpa.persistence.PersistenceProviderImpl</default-jpa-provider> </jpa> <log>
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:
Post a Comment