Issue Details (XML | Word | Printable)

Key: SAMPLES-5
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Jerome Velociter
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Samples

Running usertypes sample 3.1 throws exceptions

Created: 06/Aug/12 09:37 PM   Updated: 16/Aug/12 02:51 PM   Resolved: 16/Aug/12 02:51 PM
Component/s: None
Affects Version/s: None
Fix Version/s: None

Environment: maven, hsqldb, linux

Datastore: HSQL


 Description  « Hide
When running usertypes 3.1 (as downloaded from http://www.datanucleus.org/project/download.html) and running the project with mvn java:exec (after successfully "mvn clean install") logs the following exception :

{code}

[INFO] ------------------------------------------------------------------------
[INFO] Building DataNucleus AccessPlatform Usertype Sample 3.1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> exec-maven-plugin:1.1:java (default-cli) @ datanucleus-samples-usertypes >>>
[INFO]
[INFO] <<< exec-maven-plugin:1.1:java (default-cli) @ datanucleus-samples-usertypes <<<
[INFO]
[INFO] --- exec-maven-plugin:1.1:java (default-cli) @ datanucleus-samples-usertypes ---
DataNucleus Samples : User-Types
================================
>> Persisting Machine objects with a field of a user-defined type
javax.jdo.JDODataStoreException: Cannot set Object parameter: value = 192.168.1.1 for column "MACHINE.IP" : Object of type mydomain.usertypes.IPAddress isnt Serializable
at org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:421)
at org.datanucleus.api.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java:735)
at org.datanucleus.api.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceManager.java:755)
at mydomain.Main.main(Main.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:290)
at java.lang.Thread.run(Thread.java:679)
NestedThrowablesStackTrace:
Object of type mydomain.usertypes.IPAddress isnt Serializable
org.datanucleus.exceptions.NucleusDataStoreException: Object of type mydomain.usertypes.IPAddress isnt Serializable
at org.datanucleus.store.rdbms.mapping.AbstractLargeBinaryRDBMSMapping.setObject(AbstractLargeBinaryRDBMSMapping.java:235)
at org.datanucleus.store.mapped.mapping.SingleFieldMapping.setObject(SingleFieldMapping.java:207)
at org.datanucleus.store.rdbms.fieldmanager.ParameterSetter.storeObjectField(ParameterSetter.java:201)
at org.datanucleus.state.AbstractStateManager.providedObjectField(AbstractStateManager.java:1447)
at mydomain.usertypes.Machine.jdoProvideField(Machine.java)
at mydomain.usertypes.Machine.jdoProvideFields(Machine.java)
at org.datanucleus.state.AbstractStateManager.provideFields(AbstractStateManager.java:1515)
at org.datanucleus.store.rdbms.request.InsertRequest.execute(InsertRequest.java:291)
at org.datanucleus.store.rdbms.RDBMSPersistenceHandler.insertTable(RDBMSPersistenceHandler.java:166)
at org.datanucleus.store.rdbms.RDBMSPersistenceHandler.insertObject(RDBMSPersistenceHandler.java:142)
at org.datanucleus.state.JDOStateManager.internalMakePersistent(JDOStateManager.java:2377)
at org.datanucleus.state.JDOStateManager.makePersistent(JDOStateManager.java:2353)
at org.datanucleus.ObjectManagerImpl.persistObjectInternal(ObjectManagerImpl.java:1905)
at org.datanucleus.ObjectManagerImpl.persistObjectWork(ObjectManagerImpl.java:1754)
at org.datanucleus.ObjectManagerImpl.persistObject(ObjectManagerImpl.java:1601)
at org.datanucleus.api.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java:730)
at org.datanucleus.api.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceManager.java:755)
at mydomain.Main.main(Main.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:290)
at java.lang.Thread.run(Thread.java:679)
javax.jdo.JDONullIdentityException: Unable to find the object with a null id!
at org.datanucleus.api.jdo.JDOPersistenceManager.getObjectById(JDOPersistenceManager.java:1716)
at org.datanucleus.api.jdo.JDOPersistenceManager.getObjectById(JDOPersistenceManager.java:1702)
at mydomain.Main.main(Main.java:74)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:290)
at java.lang.Thread.run(Thread.java:679)
{code}

Sort Order: Ascending order - Click to sort in descending order
Jerome Velociter added a comment - 06/Aug/12 09:40 PM

Jerome Velociter added a comment - 06/Aug/12 09:41 PM
Looks like a missing MANIFEST.MF file

21:38:56,162 (main) WARN [DataNucleus.Plugin] - Could not find MANIFEST.MF file for plugin file "file:/home/twister/Downloads/datanucleus-samples-usertypes-3.1/target/classes/plugin.xml" so ignoring it

Andy Jefferson added a comment - 16/Aug/12 02:51 PM
SourceForge archive works now.