You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Christopher Schmidt <fa...@googlemail.com> on 2010/06/09 18:23:44 UTC

identity class IllegalArgumentException

Hi list,

I am using OpenJPA 2.0, Posgresql and JDBC4

and the following entity (well - its Scala ;-) @BeanProperty
translates to a private property and a setter- and getter-method):

@Entity
@Table(name = "org_struct")
@IdClass(classOf[OrganisationStructureId])
@SequenceGenerator(name = "org_struct_index_seq", sequenceName =
"org_struct_index_sequence", allocationSize = 1)
class OrganisationStructure extends MIPEntity {
  @Id
  @GeneratedValue(strategy = GenerationType.SEQUENCE, generator =
"org_struct_index_seq")
  @Column(name = "org_struct_ix", nullable = false, length = 20)
  @BeanProperty
  protected var ix: BigInteger = _

  @Id
  @ManyToOne(fetch = FetchType.EAGER)
  @JoinColumn(name = "org_struct_root_org_id", nullable = false,
updatable = false)
  @BeanProperty
  protected var orgStructRootOrg: Organisation = _
}


/**
 * ID Class
 */
class OrganisationStructureId {
  @BeanProperty
  var orgStructRootOrg: BigInteger = _
  @BeanProperty
  var ix: BigInteger = _

  . . .
}


Doing persist I get the following exception:

org.apache.openjpa.persistence.PersistenceException: Can not set
java.math.BigInteger field
org.pf4mip.persistence.popo.OrganisationStructureId.orgStructRootOrg
to org.pf4mip.persistence.popo.Organisation
	at org.apache.openjpa.kernel.BrokerImpl.persist(BrokerImpl.java:2605)
	at org.apache.openjpa.kernel.BrokerImpl.persist(BrokerImpl.java:2423)
	at org.apache.openjpa.kernel.DelegatingBroker.persist(DelegatingBroker.java:1069)
	at org.apache.openjpa.persistence.EntityManagerImpl.persist(EntityManagerImpl.java:705)
	at org.jpaextension.manager.EntityManagerWrapper$class.persistAndFlush(EntityManagerWrapper.scala:114)
	...
Caused by: java.lang.IllegalArgumentException: Can not set
java.math.BigInteger field
org.pf4mip.persistence.popo.OrganisationStructureId.orgStructRootOrg
to org.pf4mip.persistence.popo.Organisation
	at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:146)
	at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:150)
	...
Caused by: java.lang.IllegalArgumentException: Error while setting
value org.pf4mip.persistence.popo.Organisation@30e33af5 of class
org.pf4mip.persistence.popo.Organisation on field private
java.math.BigInteger
org.pf4mip.persistence.popo.OrganisationStructureId.orgStructRootOrg
of instance org.pf4mip.persistence.popo.OrganisationStructureId@0 by
reflection.
	at org.apache.openjpa.enhance.Reflection.wrapReflectionException(Reflection.java:334)
	at org.apache.openjpa.enhance.Reflection.set(Reflection.java:540)
	... 96 more


I think OpenJPA tries to put an Organisation into the BigInt field. Any advice?

Christopher

Re: identity class IllegalArgumentException

Posted by Christopher Schmidt <fa...@googlemail.com>.
Pinaki, here we go (last caused by):

java.lang.IllegalArgumentException: Error while setting value
org.pf4mip.persistence.popo.Organisation@3429cf1 of class
org.pf4mip.persistence.popo.Organisation on field private
java.math.BigInteger
org.pf4mip.persistence.popo.OrganisationStructureId.orgStructRootOrg
of instance org.pf4mip.persistence.popo.OrganisationStructureId@0 by
reflection.
	at org.apache.openjpa.enhance.Reflection.wrapReflectionException(Reflection.java:334)
	at org.apache.openjpa.enhance.Reflection.set(Reflection.java:540)
	at org.apache.openjpa.enhance.org$pf4mip$persistence$popo$OrganisationStructure$pcsubclass.pcCopyKeyFieldsToObjectId(Unknown
Source)
	at org.apache.openjpa.enhance.PCRegistry.copyKeyFieldsToObjectId(PCRegistry.java:166)
	at org.apache.openjpa.util.ApplicationIds.fromPKValues(ApplicationIds.java:218)
	at org.apache.openjpa.enhance.ReflectingPersistenceCapable.pcNewObjectIdInstance(ReflectingPersistenceCapable.java:277)
	at org.apache.openjpa.util.ApplicationIds.create(ApplicationIds.java:421)
	at org.apache.openjpa.kernel.BrokerImpl.persist(BrokerImpl.java:2576)
	at org.apache.openjpa.kernel.BrokerImpl.persist(BrokerImpl.java:2423)
	at org.apache.openjpa.kernel.DelegatingBroker.persist(DelegatingBroker.java:1069)
	at org.apache.openjpa.persistence.EntityManagerImpl.persist(EntityManagerImpl.java:705)
	at org.jpaextension.manager.EntityManagerWrapper$class.persistAndFlush(EntityManagerWrapper.scala:114)
	at org.jpaextension.test.OrgStructTest.persistAndFlush(OrgStructTest.scala:16)
	at org.jpaextension.test.OrgStructTest$$anonfun$1$$anonfun$apply$2$$anonfun$apply$mcV$sp$2$$anonfun$apply$mcV$sp$3.apply(OrgStructTest.scala:54)
	at org.jpaextension.test.OrgStructTest$$anonfun$1$$anonfun$apply$2$$anonfun$apply$mcV$sp$2$$anonfun$apply$mcV$sp$3.apply(OrgStructTest.scala:49)
	at scala.collection.Iterator$class.foreach(Iterator.scala:631)
	at scala.collection.JavaConversions$JIteratorWrapper.foreach(JavaConversions.scala:474)
	at scala.collection.IterableLike$class.foreach(IterableLike.scala:79)
	at scala.collection.JavaConversions$JListWrapper.foreach(JavaConversions.scala:521)
	at org.jpaextension.test.OrgStructTest$$anonfun$1$$anonfun$apply$2$$anonfun$apply$mcV$sp$2.apply$mcV$sp(OrgStructTest.scala:48)
	at org.jpaextension.test.OrgStructTest$$anonfun$1$$anonfun$apply$2$$anonfun$apply$mcV$sp$2.apply(OrgStructTest.scala:48)
	at org.jpaextension.test.OrgStructTest$$anonfun$1$$anonfun$apply$2$$anonfun$apply$mcV$sp$2.apply(OrgStructTest.scala:48)
	at org.jpaextension.manager.UsesEntityManager$class.withTrxAndCommit(UsesEntityManager.scala:39)
	at org.jpaextension.test.OrgStructTest.withTrxAndCommit(OrgStructTest.scala:16)
	at org.jpaextension.test.OrgStructTest$$anonfun$1$$anonfun$apply$2.apply$mcV$sp(OrgStructTest.scala:47)
	at org.jpaextension.test.OrgStructTest$$anonfun$1$$anonfun$apply$2.apply(OrgStructTest.scala:45)
	at org.jpaextension.test.OrgStructTest$$anonfun$1$$anonfun$apply$2.apply(OrgStructTest.scala:45)
	at org.specs.specification.LifeCycle$class.withCurrent(ExampleLifeCycle.scala:60)
	at org.specs.specification.Examples.withCurrent(Examples.scala:52)
	at org.specs.specification.Examples$$anonfun$specifyExample$1.apply(Examples.scala:108)
	at org.specs.specification.Examples$$anonfun$specifyExample$1.apply(Examples.scala:108)
	at org.specs.specification.ExampleExecution$$anonfun$3$$anonfun$apply$5.apply(ExampleLifeCycle.scala:214)
	at scala.Option.getOrElse(Option.scala:59)
	at org.specs.specification.LifeCycle$class.executeExpectations(ExampleLifeCycle.scala:82)
	at org.specs.specification.BaseSpecification.executeExpectations(BaseSpecification.scala:58)
	at org.specs.specification.ExampleContext$$anonfun$executeExpectations$2$$anonfun$apply$3$$anonfun$apply$4.apply(ExampleContext.scala:73)
	at org.specs.specification.ExampleContext$$anonfun$executeExpectations$2$$anonfun$apply$3$$anonfun$apply$4.apply(ExampleContext.scala:73)
	at scala.Option.map(Option.scala:74)
	at org.specs.specification.ExampleContext$$anonfun$executeExpectations$2$$anonfun$apply$3.apply(ExampleContext.scala:73)
	at org.specs.specification.ExampleContext$$anonfun$executeExpectations$2$$anonfun$apply$3.apply(ExampleContext.scala:73)
	at org.specs.specification.ExampleContext$class.id$1(ExampleContext.scala:32)
	at org.specs.specification.ExampleContext$$anonfun$1.apply(ExampleContext.scala:33)
	at org.specs.specification.ExampleContext$$anonfun$1.apply(ExampleContext.scala:33)
	at org.specs.specification.ExampleContext$$anonfun$executeExpectations$2.apply(ExampleContext.scala:73)
	at org.specs.specification.ExampleContext$$anonfun$executeExpectations$2.apply(ExampleContext.scala:72)
	at scala.Option.map(Option.scala:74)
	at org.specs.specification.ExampleContext$class.executeExpectations(ExampleContext.scala:72)
	at org.specs.specification.Examples.executeExpectations(Examples.scala:52)
	at org.specs.specification.ExampleContext$$anonfun$executeExpectations$2$$anonfun$apply$3$$anonfun$apply$4.apply(ExampleContext.scala:73)
	at org.specs.specification.ExampleContext$$anonfun$executeExpectations$2$$anonfun$apply$3$$anonfun$apply$4.apply(ExampleContext.scala:73)
	at scala.Option.map(Option.scala:74)
	at org.specs.specification.ExampleContext$$anonfun$executeExpectations$2$$anonfun$apply$3.apply(ExampleContext.scala:73)
	at org.specs.specification.ExampleContext$$anonfun$executeExpectations$2$$anonfun$apply$3.apply(ExampleContext.scala:73)
	at org.specs.specification.ExampleContext$class.id$1(ExampleContext.scala:32)
	at org.specs.specification.ExampleContext$$anonfun$1.apply(ExampleContext.scala:33)
	at org.specs.specification.ExampleContext$$anonfun$1.apply(ExampleContext.scala:33)
	at org.specs.specification.ExampleContext$$anonfun$executeExpectations$2.apply(ExampleContext.scala:73)
	at org.specs.specification.ExampleContext$$anonfun$executeExpectations$2.apply(ExampleContext.scala:72)
	at scala.Option.map(Option.scala:74)
	at org.specs.specification.ExampleContext$class.executeExpectations(ExampleContext.scala:72)
	at org.specs.specification.Examples.executeExpectations(Examples.scala:52)
	at org.specs.specification.ExampleExecution$$anonfun$3.apply(ExampleLifeCycle.scala:214)
	at org.specs.specification.ExampleExecution$$anonfun$3.apply(ExampleLifeCycle.scala:193)
	at org.specs.specification.ExampleExecution$$anonfun$2.apply(ExampleLifeCycle.scala:176)
	at org.specs.specification.ExampleExecution.execute(ExampleLifeCycle.scala:247)
	at org.specs.specification.Examples$$anonfun$executeThis$1.apply(Examples.scala:71)
	at org.specs.specification.Examples$$anonfun$executeThis$1.apply(Examples.scala:71)
	at scala.Option.map(Option.scala:74)
	at org.specs.specification.Examples.executeThis(Examples.scala:71)
	at org.specs.specification.ExampleLifeCycle$class.executeExample(ExampleLifeCycle.scala:118)
	at org.specs.specification.Examples.executeExample(Examples.scala:52)
	at org.specs.specification.Examples.executeExample(Examples.scala:52)
	at org.specs.specification.Examples$$anonfun$executeExamples$1.apply(Examples.scala:80)
	at org.specs.specification.Examples$$anonfun$executeExamples$1.apply(Examples.scala:80)
	at scala.Option.map(Option.scala:74)
	at org.specs.specification.Examples.executeExamples(Examples.scala:80)
	at org.specs.specification.ExampleStructure$class.ownSkipped(ExampleStructure.scala:60)
	at org.specs.specification.Examples.ownSkipped(Examples.scala:52)
	at org.specs.runner.ExampleTestCase.run(JUnit.scala:197)
	at junit.framework.TestSuite.runTest(TestSuite.java:232)
	at junit.framework.TestSuite.run(TestSuite.java:227)
	at org.specs.runner.JUnitSuite$class.run(JUnit.scala:62)
	at org.specs.runner.ExamplesTestSuite.run(JUnit.scala:164)
	at junit.framework.TestSuite.runTest(TestSuite.java:232)
	at junit.framework.TestSuite.run(TestSuite.java:227)
	at org.specs.runner.JUnitSuite$class.run(JUnit.scala:62)
	at org.specs.SpecificationWithJUnit.run(SpecificationWithJUnit.scala:29)
	at org.specs.runner.JUnitSuiteRunner.run(JUnitSuiteRunner.scala:45)
	at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
	at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
	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:597)
	at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
	at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)


JPAExtension is my code and test class (Scala) is here:
http://github.com/FaKod/JPA-for-Scala/blob/UsingScalaDAOs/src/test/scala/org/jpaextension/test/OrgStructTest.scala


Thx for help.
Christopher

On Wed, Jun 9, 2010 at 7:24 PM, Pinaki Poddar <pp...@apache.org> wrote:
>
>> org.pf4mip.persistence.popo.OrganisationStructureId.orgStructRootOrg
>> of instance org.pf4mip.persistence.popo.OrganisationStructureId@0 by
>> reflection.
>>        at
>> org.apache.openjpa.enhance.Reflection.wrapReflectionException(Reflection.java:334)
>>        at org.apache.openjpa.enhance.Reflection.set(Reflection.java:540)
>>        ... 96 more
>
>> I think OpenJPA tries to put an Organisation into the BigInt field. Any
>> advice?
>
> Can I see few more (10-20 lines) of that 96 lines stack traces?
>
> -----
> Pinaki
> --
> View this message in context: http://openjpa.208410.n2.nabble.com/identity-class-IllegalArgumentException-tp5159262p5159535.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>

Re: identity class IllegalArgumentException

Posted by Christopher Schmidt <fa...@googlemail.com>.
Pinaki,

I switched my old maven compile time enhancement on and it worked! So
it seems to be only a runtime issue.

I blogged some of my Scala JPA entities and query examples to
http://blog.fakod.eu/?p=955 (if you are interested...)


Thx so much for help

Christopher

(Next thing is to work with Scala Collections. So I am sure I'll be
back soon ;-)



On Wed, Jun 9, 2010 at 11:33 PM, Pinaki Poddar <pp...@apache.org> wrote:
>
>> I remember that I had some problems doing compile time enhancements
>> (with Scala and Maven) but I will retry this tomorrow.
>
> I am not conversant with Scala to comment whether that will introduce any
> further complexity to OpenJPA enhancement step. But I have heard numerous
> painful user experience on enhancement.
> It is sad because build-time enhancement is really a simple (I mean simple
> as easy) process of
> invoking a Java program with correct classpath and a single argument.
>
> I have added the bare essentials in an Ant script required to enhance domain
> classes.
>
> Please note that
>   1. how the ${jap.properties} variable is defined with its parent
> directory META-INF followed by the file name persistence.xml and then
> appended with an unit name. The content of the persistence.xml should use
> the same unit name and list all the classes in <class> clause.
>
>   2. the classpath should include the parent directory of META-INF
> directory
>
>   3. fork the java process
>
>   4. ensure OpenJPA libraries are in classpath. Recent OpenJPA distribution
> folds all runtime dependencies in a single jar file.
>
>
>        <!-- JPA configuration file anchored by the persistence unit name       -->
>        <property name="jpa.properties"
> value="META-INF/persistence.xml#OpenBooks"/>
>        <!-- root directory of Java Source files                                -->
>        <property name="src.dir"      value="${basedir}/src/main/java"/>
>        <!-- root directory of compiled class files                             -->
>        <property name="classes.dir"  value="${target.dir}/classes"/>
>        <!-- root directory of resource files e.g web.xml or persistence.xml    -->
>        <property name="rsrc.dir"     value="${basedir}/src/main/resources"/>
>
>        <path id="compile.classpath"
>                description="Compilation classpath requires OpenJPA specific library
> because of bytecode enhancement">
>                <pathelement location="${src.dir}" />
>                <pathelement location="${classes.dir}" />
>                <pathelement location="${rsrc.dir}" />
>                <fileset dir="${openjpa.lib}">
>                        <include name="*.jar" />
>                </fileset>
>        </path>
>
>        <target name="enhance"
>                description="Enhance persistent domain classes.">
>                <java classname="org.apache.openjpa.enhance.PCEnhancer" fork="true">
>                        <arg value="-properties" />
>                        <arg value="${jpa.properties}" />
>                        <classpath refid="compile.classpath" />
>                </java>
>        </target>
>
>
> -----
> Pinaki
> --
> View this message in context: http://openjpa.208410.n2.nabble.com/identity-class-IllegalArgumentException-tp5159262p5160588.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>

Re: identity class IllegalArgumentException

Posted by Pinaki Poddar <pp...@apache.org>.
> I remember that I had some problems doing compile time enhancements
> (with Scala and Maven) but I will retry this tomorrow.

I am not conversant with Scala to comment whether that will introduce any
further complexity to OpenJPA enhancement step. But I have heard numerous
painful user experience on enhancement.
It is sad because build-time enhancement is really a simple (I mean simple
as easy) process of
invoking a Java program with correct classpath and a single argument.

I have added the bare essentials in an Ant script required to enhance domain
classes.

Please note that
   1. how the ${jap.properties} variable is defined with its parent
directory META-INF followed by the file name persistence.xml and then
appended with an unit name. The content of the persistence.xml should use
the same unit name and list all the classes in <class> clause.
 
   2. the classpath should include the parent directory of META-INF
directory

   3. fork the java process

   4. ensure OpenJPA libraries are in classpath. Recent OpenJPA distribution
folds all runtime dependencies in a single jar file. 


	<!-- JPA configuration file anchored by the persistence unit name       --> 
	<property name="jpa.properties" 
value="META-INF/persistence.xml#OpenBooks"/>
	<!-- root directory of Java Source files                                -->
	<property name="src.dir"      value="${basedir}/src/main/java"/>
	<!-- root directory of compiled class files                             -->
	<property name="classes.dir"  value="${target.dir}/classes"/>
	<!-- root directory of resource files e.g web.xml or persistence.xml    -->
	<property name="rsrc.dir"     value="${basedir}/src/main/resources"/>

	<path id="compile.classpath" 
		description="Compilation classpath requires OpenJPA specific library
because of bytecode enhancement">
		<pathelement location="${src.dir}" />
		<pathelement location="${classes.dir}" />
		<pathelement location="${rsrc.dir}" />
		<fileset dir="${openjpa.lib}">
			<include name="*.jar" />
		</fileset>
	</path>

	<target name="enhance" 
		description="Enhance persistent domain classes.">
		<java classname="org.apache.openjpa.enhance.PCEnhancer" fork="true">
			<arg value="-properties" />
			<arg value="${jpa.properties}" />
			<classpath refid="compile.classpath" />
		</java>
	</target>


-----
Pinaki 
-- 
View this message in context: http://openjpa.208410.n2.nabble.com/identity-class-IllegalArgumentException-tp5159262p5160588.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: identity class IllegalArgumentException

Posted by Christopher Schmidt <fa...@googlemail.com>.
Pinaki, thx for your answer and your interest

non-composite works fine, queries are working fine, mapped superclass
works fine... So no problems till now.

I always used BigInteger for primary keys, long will not work because
Scala does not support basic types. But I will do some tests, what
Scala makes out of class Long and if this works with OpenJPA (and
Javas reflection API).

I remember that I had some problems doing compile time enhancements
(with Scala and Maven) but I will retry this tomorrow.

Christopher

On Wed, Jun 9, 2010 at 9:53 PM, Pinaki Poddar <pp...@apache.org> wrote:
>
> Hi Christopher,
>  "Simple" as opposed to "non-composite" identity in JPA sense. Simply
> speaking, it's a primary key that corresponds to single persistent field or
> property of the entity class. So what I was asking was does the following
> work:
>  public class A {
>    @Id
>     private long id;
>   }
>
> or
>  public class B {
>    @Id
>     private BigDecimal id;
>   }
>
>
> Thank you for the stack trace.
>
> Few things to note
>
> 1. at
> ...ReflectingPersistenceCapable.pcNewObjectIdInstance(ReflectingPersistenceCapable.java:277)
>        at
> org.apache.openjpa.util.ApplicationIds.create(ApplicationIds.java:421)
>
>   Apparently the Java persistent domain classes are being "enhanced" at
> runtime. If the environment permits, I will highly recommend to switch to
> build-time enhancement [1].
>   OpenJPA manages user domain objects by "enhancing" their bytecode. While
> this bytecode enhancement  can be triggered via different means and at
> different time points -- the reliable/stable means is to run a
> post-compilation command on the normally compiled classes to "enhance" them.
>   Build-time enhancement will help to focus on the "real" Scala-JPA
> integration issues rather than chasing OpenJPA problems introduced by
> non-build-time enhancement techniques.
>
>  If switching to build-time enhancement does not resolve the problem, (or
> even otherwise) please post further outcome/progress of your interesting
> project.
>
> [1]
> http://openjpa.apache.org/builds/latest/docs/manual/manual.html#ref_guide_pc_enhance_build
>
>
>
>
>
>
> -----
> Pinaki
> --
> View this message in context: http://openjpa.208410.n2.nabble.com/identity-class-IllegalArgumentException-tp5159262p5160183.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>

Re: identity class IllegalArgumentException

Posted by Pinaki Poddar <pp...@apache.org>.
Hi Christopher,
  "Simple" as opposed to "non-composite" identity in JPA sense. Simply
speaking, it's a primary key that corresponds to single persistent field or
property of the entity class. So what I was asking was does the following
work:
  public class A {
    @Id 
     private long id;
   }

or
  public class B {
    @Id 
     private BigDecimal id;
   }


Thank you for the stack trace. 

Few things to note

1. at
...ReflectingPersistenceCapable.pcNewObjectIdInstance(ReflectingPersistenceCapable.java:277)
        at
org.apache.openjpa.util.ApplicationIds.create(ApplicationIds.java:421) 

   Apparently the Java persistent domain classes are being "enhanced" at
runtime. If the environment permits, I will highly recommend to switch to
build-time enhancement [1]. 
   OpenJPA manages user domain objects by "enhancing" their bytecode. While
this bytecode enhancement  can be triggered via different means and at
different time points -- the reliable/stable means is to run a
post-compilation command on the normally compiled classes to "enhance" them.
   Build-time enhancement will help to focus on the "real" Scala-JPA
integration issues rather than chasing OpenJPA problems introduced by
non-build-time enhancement techniques. 

  If switching to build-time enhancement does not resolve the problem, (or
even otherwise) please post further outcome/progress of your interesting
project. 

[1]
http://openjpa.apache.org/builds/latest/docs/manual/manual.html#ref_guide_pc_enhance_build






-----
Pinaki 
-- 
View this message in context: http://openjpa.208410.n2.nabble.com/identity-class-IllegalArgumentException-tp5159262p5160183.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: identity class IllegalArgumentException

Posted by Christopher Schmidt <fa...@googlemail.com>.
Pinaki, "simple" means?

Christopher

On Wed, Jun 9, 2010 at 7:27 PM, Pinaki Poddar <pp...@apache.org> wrote:
>
> Also, does simple identity work? with long? with BigDecimal?
>
> -----
> Pinaki
> --
> View this message in context: http://openjpa.208410.n2.nabble.com/identity-class-IllegalArgumentException-tp5159262p5159552.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>

Re: identity class IllegalArgumentException

Posted by Pinaki Poddar <pp...@apache.org>.
Also, does simple identity work? with long? with BigDecimal?

-----
Pinaki 
-- 
View this message in context: http://openjpa.208410.n2.nabble.com/identity-class-IllegalArgumentException-tp5159262p5159552.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: identity class IllegalArgumentException

Posted by Pinaki Poddar <pp...@apache.org>.
> org.pf4mip.persistence.popo.OrganisationStructureId.orgStructRootOrg
> of instance org.pf4mip.persistence.popo.OrganisationStructureId@0 by
> reflection.
>        at
> org.apache.openjpa.enhance.Reflection.wrapReflectionException(Reflection.java:334)
>        at org.apache.openjpa.enhance.Reflection.set(Reflection.java:540)
>        ... 96 more 

> I think OpenJPA tries to put an Organisation into the BigInt field. Any
> advice? 

Can I see few more (10-20 lines) of that 96 lines stack traces?

-----
Pinaki 
-- 
View this message in context: http://openjpa.208410.n2.nabble.com/identity-class-IllegalArgumentException-tp5159262p5159535.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.