hi,
this is on 0.9.7-incubating. i am trying to use openjpa in a unit
test from a maven2 project. i am depending on "openjpa-all" as a
"compile" type dependency. when my unit test runs, i see the stack
trace below.
CacheMap is in the openjpa-all-0.9.7-incubating.jar file in .m2/
repository ...
i see issue 256:
https://issues.apache.org/jira/browse/OPENJPA-256?
page=com.atlassian.jira.plugin.system.issuetabpanels:comment-
tabpanel#action_12503158
which looks similar. is there any workaround for this?
125 pomtest INFO [main] openjpa.Runtime - Starting OpenJPA
0.9.7-incubating
615 pomtest INFO [main] openjpa.jdbc.JDBC - Using dictionary
class "org.apache.openjpa.jdbc.sql.DerbyDictionary".
<0.9.7-incubating nonfatal general error>
org.apache.openjpa.persistence.PersistenceException: There were
errors initializing your configuration:
org.apache.openjpa.lib.util.ParseException: Instantiation of plugin
"QueryCompilationCache" with value "true" caused an error
"java.lang.IllegalArgumentException:
java.lang.ClassNotFoundException:
org.apache.openjpa.util.CacheMap". The alias or class name may have
been misspelled (as it closely matches the valid plugin alias
"true"), or the class may not be available in the class path.
Valid aliases for this plugin are: [all, false, true]
at
org.apache.openjpa.lib.conf.Configurations.getCreateException
(Configurations.java:341)
at org.apache.openjpa.lib.conf.Configurations.newInstance
(Configurations.java:198)
at org.apache.openjpa.lib.conf.ObjectValue.newInstance
(ObjectValue.java:103)
at
org.apache.openjpa.conf.QueryCompilationCacheValue.newInstance
(QueryCompilationCacheValue.java:57)
at org.apache.openjpa.lib.conf.PluginValue.instantiate
(PluginValue.java:101)
at org.apache.openjpa.lib.conf.ObjectValue.instantiate
(ObjectValue.java:79)
at
org.apache.openjpa.conf.OpenJPAConfigurationImpl.getQueryCompilationCa
cheInstance(OpenJPAConfigurationImpl.java:1402)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.openjpa.lib.conf.ConfigurationImpl.instantiateAll
(ConfigurationImpl.java:282)
at
org.apache.openjpa.conf.OpenJPAConfigurationImpl.instantiateAll
(OpenJPAConfigurationImpl.java:1411)
at
org.apache.openjpa.kernel.AbstractBrokerFactory.makeReadOnly
(AbstractBrokerFactory.java:547)
at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker
(AbstractBrokerFactory.java:157)
at
org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker
(DelegatingBrokerFactory.java:142)
at
org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityMa
nager(EntityManagerFactoryImpl.java:190)
at
org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityMa
nager(EntityManagerFactoryImpl.java:143)
at
org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityMa
nager(EntityManagerFactoryImpl.java:55)
at com.sun.portal.pom.PersistTest.removeEntity
(PersistTest.java:151)
at com.sun.portal.pom.PersistTest.cleanup(PersistTest.java:211)
at com.sun.portal.pom.PersistTest.testPersist
(PersistTest.java:220)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.maven.surefire.junit.JUnitTestSet.execute
(JUnitTestSet.java:213)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTest
Set(AbstractDirectoryTestSuite.java:138)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute
(AbstractDirectoryTestSuite.java:125)
at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess
(SurefireBooter.java:290)
at org.apache.maven.surefire.booter.SurefireBooter.main
(SurefireBooter.java:818)
Caused by: java.lang.IllegalArgumentException:
java.lang.ClassNotFoundException: org.apache.openjpa.util.CacheMap
at serp.util.Strings.toClass(Strings.java:211)
at serp.util.Strings.toClass(Strings.java:140)
at org.apache.openjpa.lib.conf.Configurations.newInstance
(Configurations.java:194)
... 46 more
at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker
(AbstractBrokerFactory.java:193)
at
org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker
(DelegatingBrokerFactory.java:142)
at
org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityMa
nager(EntityManagerFactoryImpl.java:190)
at
org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityMa
nager(EntityManagerFactoryImpl.java:143)
at
org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityMa
nager(EntityManagerFactoryImpl.java:55)
at com.sun.portal.pom.PersistTest.removeEntity
(PersistTest.java:151)
at com.sun.portal.pom.PersistTest.cleanup(PersistTest.java:211)
at com.sun.portal.pom.PersistTest.testPersist
(PersistTest.java:220)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.maven.surefire.junit.JUnitTestSet.execute
(JUnitTestSet.java:213)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTest
Set(AbstractDirectoryTestSuite.java:138)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute
(AbstractDirectoryTestSuite.java:125)
at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess
(SurefireBooter.java:290)
at org.apache.maven.surefire.booter.SurefireBooter.main
(SurefireBooter.java:818)
Caused by: java.lang.RuntimeException: There were errors
initializing your configuration:
org.apache.openjpa.lib.util.ParseException: Instantiation of plugin
"QueryCompilationCache" with value "true" caused an error
"java.lang.IllegalArgumentException:
java.lang.ClassNotFoundException:
org.apache.openjpa.util.CacheMap". The alias or class name may have
been misspelled (as it closely matches the valid plugin alias
"true"), or the class may not be available in the class path.
Valid aliases for this plugin are: [all, false, true]
at
org.apache.openjpa.lib.conf.Configurations.getCreateException
(Configurations.java:341)
at org.apache.openjpa.lib.conf.Configurations.newInstance
(Configurations.java:198)
at org.apache.openjpa.lib.conf.ObjectValue.newInstance
(ObjectValue.java:103)
at
org.apache.openjpa.conf.QueryCompilationCacheValue.newInstance
(QueryCompilationCacheValue.java:57)
at org.apache.openjpa.lib.conf.PluginValue.instantiate
(PluginValue.java:101)
at org.apache.openjpa.lib.conf.ObjectValue.instantiate
(ObjectValue.java:79)
at
org.apache.openjpa.conf.OpenJPAConfigurationImpl.getQueryCompilationCa
cheInstance(OpenJPAConfigurationImpl.java:1402)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.openjpa.lib.conf.ConfigurationImpl.instantiateAll
(ConfigurationImpl.java:282)
at
org.apache.openjpa.conf.OpenJPAConfigurationImpl.instantiateAll
(OpenJPAConfigurationImpl.java:1411)
at
org.apache.openjpa.kernel.AbstractBrokerFactory.makeReadOnly
(AbstractBrokerFactory.java:547)
at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker
(AbstractBrokerFactory.java:157)
at
org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker
(DelegatingBrokerFactory.java:142)
at
org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityMa
nager(EntityManagerFactoryImpl.java:190)
at
org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityMa
nager(EntityManagerFactoryImpl.java:143)
at
org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityMa
nager(EntityManagerFactoryImpl.java:55)
at com.sun.portal.pom.PersistTest.removeEntity
(PersistTest.java:151)
at com.sun.portal.pom.PersistTest.cleanup(PersistTest.java:211)
at com.sun.portal.pom.PersistTest.testPersist
(PersistTest.java:220)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.maven.surefire.junit.JUnitTestSet.execute
(JUnitTestSet.java:213)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTest
Set(AbstractDirectoryTestSuite.java:138)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute
(AbstractDirectoryTestSuite.java:125)
at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess
(SurefireBooter.java:290)
at org.apache.maven.surefire.booter.SurefireBooter.main
(SurefireBooter.java:818)
Caused by: java.lang.IllegalArgumentException:
java.lang.ClassNotFoundException: org.apache.openjpa.util.CacheMap
at serp.util.Strings.toClass(Strings.java:211)
at serp.util.Strings.toClass(Strings.java:140)
at org.apache.openjpa.lib.conf.Configurations.newInstance
(Configurations.java:194)
... 46 more
at
org.apache.openjpa.lib.conf.ConfigurationImpl.instantiateAll
(ConfigurationImpl.java:296)
at
org.apache.openjpa.conf.OpenJPAConfigurationImpl.instantiateAll
(OpenJPAConfigurationImpl.java:1411)
at
org.apache.openjpa.kernel.AbstractBrokerFactory.makeReadOnly
(AbstractBrokerFactory.java:547)
at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker
(AbstractBrokerFactory.java:157)
... 33 more