openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Sutter <kwsut...@gmail.com>
Subject Re: May be issue about OpenJPA 2.2.1 or configuration issue, could you help me to solve this issue.
Date Tue, 22 Jan 2013 20:01:00 GMT
Hi,
Are you absolutely sure you are running with 2.2.1?  This
CheckDatabaseForCascadePersistToDetachedEntity property on the
Compatibility class has existed since 2.1.1.  And, I just verified that the
source for 2.2.0, 2.2.1, and 2.2.x has this property available.  So, it
would seem that you might accidentally be running with an older version of
OpenJPA than you think you are?  The 2.1.0 release does not have this
property available. And, since you are migrating from 2.1.0, I wonder if
you are still running against this version of the binaries...

Kevin

On Tue, Jan 22, 2013 at 1:10 AM, Wei AL Liu <bjliuwei@cn.ibm.com> wrote:

>
>
> Hi all,
>
>    Our project(base on osgi) upgrade openJPA from 2.1.0 to 2.2.1. I follow
> the user guide add the property in the persistence.xml as following
> <property name="openjpa.Compatibility" value=
> "CheckDatabaseForCascadePersistToDetachedEntity=true" />
>  but after adding it into the persistence.xml, when we do the enhancement
> of the Entity, we run into such kind of error  in red color.
> my enhancement script in eclipse:
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <launchConfiguration
> type="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType">
> <listAttribute key="org.eclipse.debug.ui.favoriteGroups">
> <listEntry value="org.eclipse.ui.externaltools.launchGroup"/>
> </listAttribute>
> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="$
> {system_property:java.home}${system_property:file.separator}bin$
> {system_property:file.separator}java"/>
> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS"
> value="-Djava.ext.dirs=com.ibm.cfs.persistence.jpa$
> {system_property:file.separator}lib -cp com.ibm.cfs.persistence.jpa$
> {system_property:path.separator}com.ibm.cfs.persistence.jpa$
> {system_property:file.separator}target$
> {system_property:file.separator}classes$
> {system_property:path.separator}com.ibm.cfs.core$
> {system_property:file.separator}target$
> {system_property:file.separator}classes${system_property:path.separator}
> org.apache.openjpa.enhance.PCEnhancer ${build_files} -tcl false"/>
> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY"
> value="${workspace_loc}"/>
> </launchConfiguration>
>
>    Anything we missed?
>
>
>  [main] openjpa.Tool - No targets were given. Running on all classes in
> your persistent classes list, or all metadata files in
>  classpath directories if you have not listed your persistent classes. Use
> -help to display tool usage information.
>  Exception in thread "main" org.apache.openjpa.lib.util.ParseException:
> There was an error while setting up the configuration plugin
>  option "Compatibility". The plugin was of type "class
> org.apache.openjpa.conf.Compatibility". The plugin property
>  "CheckDatabaseForCascadePersistToDetachedEntity" had no corresponding
> setter method or accessible field. The plugin property closely
>  matches "CascadeWithDetach"; perhaps the property was misspelled. Ensure
> that your plugin configuration string uses key values that
>  correspond to setter methods in the plugin class. All possible plugin
> properties are: [AbstractMappingUniDirectional, AutoOff,
>  CascadeWithDetach, CloseOnManagedCommit, CopyObjectIds, CopyOnDetach,
> FlushBeforeDetach,
>  IgnoreDetachedStateFieldForProxySerialization, JPQL, JPQL_EXTENDED,
> JPQL_STRICT, JPQL_WARN, NonDefaultMappingAllowed,
>  NonOptimisticVersionCheck, PrivatePersistentProperties,
> QuotedNumbersInQueries, ReloadOnDetach, StoreMapCollectionInEntityAsBlob,
>  StrictIdentityValues, SuperclassDiscriminatorStrategyByDefault,
> UseJPA2DefaultOrderColumnName, ValidateFalseReturnsHollow,
>  ValidateTrueChecksStore].
>  at
> org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:515)
>  at
> org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:443)
>  at org.apache.openjpa.lib.conf.PluginValue.configure(PluginValue.java:115)
>  at org.apache.openjpa.lib.conf.ObjectValue.configure(ObjectValue.java:98)
>  at
> org.apache.openjpa.conf.OpenJPAConfigurationImpl.getCompatibilityInstance(OpenJPAConfigurationImpl.java:1490)
>  at
> org.apache.openjpa.persistence.PersistenceMetaDataDefaults.determineImplicitAccessType(PersistenceMetaDataDefaults.java:376)
>  at
> org.apache.openjpa.persistence.PersistenceMetaDataDefaults.determineAccessType(PersistenceMetaDataDefaults.java:332)
>  at
> org.apache.openjpa.persistence.PersistenceMetaDataDefaults.populate(PersistenceMetaDataDefaults.java:274)
>  at
> org.apache.openjpa.meta.MetaDataRepository.addMetaData(MetaDataRepository.java:914)
>  at
> org.apache.openjpa.meta.MetaDataRepository.addMetaData(MetaDataRepository.java:899)
>  at
> org.apache.openjpa.persistence.AnnotationPersistenceMetaDataParser.getMetaData(AnnotationPersistenceMetaDataParser.java:746)
>  at
> org.apache.openjpa.persistence.AnnotationPersistenceMetaDataParser.parseClassAnnotations
>  (AnnotationPersistenceMetaDataParser.java:545)
>  at
> org.apache.openjpa.persistence.AnnotationPersistenceMetaDataParser.parse(AnnotationPersistenceMetaDataParser.java:415)
>  at
> org.apache.openjpa.persistence.PersistenceMetaDataFactory.load(PersistenceMetaDataFactory.java:260)
>  at
> org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:580)
>  at
> org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:400)
>  at
> org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:384)
>  at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:283)
>  at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:4675)
>  at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:4622)
>  at org.apache.openjpa.enhance.PCEnhancer$1.run(PCEnhancer.java:4592)
>  at
> org.apache.openjpa.lib.conf.Configurations.launchRunnable(Configurations.java:741)
>  at
> org.apache.openjpa.lib.conf.Configurations.runAgainstAllAnchors(Configurations.java:731)
>  at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:4587)
>  at org.apache.openjpa.enhance.PCEnhancer.main(PCEnhancer.java:4578)
>
>
>
> and I download the source code of openJPA, and there is no method invoke
> the method of setCheckDatabaseForCascadePersistToDetachedEntity of
> Compatibility class.
>
>
>
> Thanks for any help or info for this issue

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message