Convert mapping from 9.0.3 to 10g

Advertisement

Convert mapping from 9.0.3 to 10g
When I use workbench of TL 10g to convert my mvp project from TL 9.0.3, I got following exception.
Local Exception Stack:
Exception [TOPLINK-99] (OracleAS TopLink - 10g (10.0.3) Developer Preview (Build 030902.1548)): oracle.toplink.exceptions.DescriptorException
Exception Description: The method [isStub] on the object [oracle.toplink.workbench.model.meta.MWClass] triggered an exception.
Internal Exception: java.lang.reflect.InvocationTargetException
Target Invocation Exception: java.lang.NullPointerException
Mapping: oracle.toplink.mappings.DirectToFieldMapping[stub-->class.stub]
Descriptor: XMLDescriptor(oracle.toplink.workbench.model.meta.MWClass --> [DatabaseTable(class)])
     at oracle.toplink.exceptions.DescriptorException.targetInvocationWhileGettingValueThruMethodAccessor(DescriptorException.java:1420)
     at oracle.toplink.internal.descriptors.MethodAttributeAccessor.getAttributeValueFromObject(MethodAttributeAccessor.java:45)
     at oracle.toplink.mappings.DatabaseMapping.getAttributeValueFromObject(DatabaseMapping.java:313)
     at oracle.toplink.mappings.DirectToFieldMapping.buildCloneValue(DirectToFieldMapping.java:97)
     at oracle.toplink.mappings.DirectToFieldMapping.buildClone(DirectToFieldMapping.java:82)
     at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
     at oracle.toplink.publicinterface.UnitOfWork.cloneAndRegisterNewObject(UnitOfWork.java:580)
     at oracle.toplink.publicinterface.UnitOfWork.internalRegisterObject(UnitOfWork.java:2330)
     at oracle.toplink.publicinterface.UnitOfWork.registerObject(UnitOfWork.java:3133)
     at oracle.toplink.mappings.CollectionMapping.buildElementClone(CollectionMapping.java:152)
     at oracle.toplink.mappings.CollectionMapping.buildCloneForPartObject(CollectionMapping.java:101)
     at oracle.toplink.internal.indirection.NoIndirectionPolicy.cloneAttribute(NoIndirectionPolicy.java:43)
     at oracle.toplink.mappings.ForeignReferenceMapping.buildClone(ForeignReferenceMapping.java:161)
     at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
     at oracle.toplink.mappings.AggregateMapping.buildClonePart(AggregateMapping.java:129)
     at oracle.toplink.mappings.AggregateMapping.buildClone(AggregateMapping.java:105)
     at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
     at oracle.toplink.publicinterface.UnitOfWork.cloneAndRegisterNewObject(UnitOfWork.java:580)
     at oracle.toplink.publicinterface.UnitOfWork.internalRegisterObject(UnitOfWork.java:2330)
     at oracle.toplink.publicinterface.UnitOfWork.registerObject(UnitOfWork.java:3133)
     at oracle.toplink.workbench.ui.WorkbenchSession.registerProject(WorkbenchSession.java:563)
     at oracle.toplink.workbench.ui.WorkbenchSession.addProject(WorkbenchSession.java:147)
     at oracle.toplink.workbench.ui.WorkbenchSession.addNewProject(WorkbenchSession.java:133)
     at oracle.toplink.workbench.ui.MainView.addNewProject(MainView.java:239)
     at oracle.toplink.workbench.filesystem.MWFileFactory.openImp(MWFileFactory.java:204)
     at oracle.toplink.workbench.filesystem.MWFileFactory.open(MWFileFactory.java:156)
     at oracle.toplink.tsceditor.persistence.PersistenceManager.open(PersistenceManager.java:747)
     at oracle.toplink.tsceditor.ui.persistence.DefaultUIPersistence.open(DefaultUIPersistence.java:181)
     at oracle.toplink.tsceditor.ui.persistence.UIPersistenceManager.open(UIPersistenceManager.java:625)
     at oracle.toplink.tsceditor.ui.persistence.UIPersistenceManager$OpenFile.execute(UIPersistenceManager.java:1095)
     at oracle.toplink.tsceditor.utility.Thread.run(Thread.java:114)
Caused by: java.lang.reflect.InvocationTargetException
     at sun.reflect.GeneratedMethodAccessor104.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
     at java.lang.reflect.Method.invoke(Unknown Source)
     at oracle.toplink.internal.descriptors.MethodAttributeAccessor.getAttributeValueFromObject(MethodAttributeAccessor.java:39)
     ... 29 more
Caused by: java.lang.NullPointerException
     at oracle.toplink.workbench.model.meta.MWClass.superclassIsDefaultValue(MWClass.java:1253)
     at oracle.toplink.workbench.model.meta.MWClass.isStub(MWClass.java:1214)
     ... 33 more
Does some one know how to solve it?
Thanks a lot
Repaly
Hi,
Bug #3358348 relates to this issue and was fixed in the 9.0.4.1 Mapping Workbench, but not in the Developer Preview. I recommend downloading a copy of 9.0.4.1 and saving your project there. Then you can either continue working in 9.0.4.1 or if you would prefer, go ahead and upgrade the 9.0.4.1 copy of the project in to the Developer Preview. This should work because the project will have been fixed during the 9.0.4.1 upgrade process. If this still causes problems you will need to send your project in to support.
thanks,
Karen Moore
Read More: The other 2 answers