TopLink Workbench Webservices tutorial
Hi,
can you point me to a tutorial explaining how to use TopLink and Webservices ? I know there is an article and sample code on OTN for webservices/toplink but it doesn't say how you actually start ..
That is : which are the steps one would have to make to expose TopLink data (objects) through webservices ?
Thank you,
F
Hi there,
Can you provide a little more information about the type of TopLink project you currently have mapped? Presumably you have mapped your object model to a relational database and wish to access the cached TopLink data through a web service?
Our TopLink 10.1.3 release offers the ability to use TopLink as a serializer/deserializer in a web service environment, as highlighted in the How To: http://www.oracle.com/technology/products/ias/toplink/preview/10.1.3dp3/howto/webSrv/index.htm , but I'm guessing that's not what you're looking for. Let me know which article you were looking at on OTN and I can point you in the right direction from there.
Regards,
Dave
Similar Messages
-
Hi all,
I am having problems migrating my Toplink Workbench project from 9.0.4.5 to 10.1.3.1.0! I used the Toplink Workbench to open and convert the existing project. The conversion succeeded, but when I tried to export the mappings I got this:
java.lang.NullPointerException
at oracle.toplink.workbench.mappingsmodel.descriptor.relational.MWRelationalPrimaryKeyPolicy.adjustRuntimeDescriptor(MWRelationalPrimaryKeyPolicy.java:174)
at oracle.toplink.workbench.mappingsmodel.descriptor.relational.MWRelationalTransactionalPolicy.adjustRuntimeDescriptor(MWRelationalTransactionalPolicy.java:85)
at oracle.toplink.workbench.mappingsmodel.descriptor.MWDescriptor.buildRuntimeDescriptor(MWDescriptor.java:423)
at oracle.toplink.workbench.mappingsmodel.descriptor.MWMappingDescriptor.buildRuntimeDescriptor(MWMappingDescriptor.java:860)
at oracle.toplink.workbench.mappingsmodel.descriptor.relational.MWRelationalClassDescriptor.buildRuntimeDescriptor(MWRelationalClassDescriptor.java:791)
at oracle.toplink.workbench.mappingsmodel.descriptor.relational.MWTableDescriptor.buildRuntimeDescriptor(MWTableDescriptor.java:955)
at oracle.toplink.workbench.mappingsmodel.project.MWProject.buildRuntimeProject(MWProject.java:932)
at oracle.toplink.workbench.mappingsmodel.project.MWProject.exportDeploymentXML(MWProject.java:804)
at oracle.toplink.workbench.mappingsplugin.ProjectDeploymentXmlGenerationCoordinator.exportProjectDeploymentXml(ProjectDeploymentXmlGenerationCoordinator.java:46)
at oracle.toplink.workbench.mappingsplugin.ExportDeploymentXmlAction.execute(ExportDeploymentXmlAction.java:27)
at oracle.toplink.workbench.framework.action.AbstractFrameworkAction.actionPerformed(AbstractFrameworkAction.java:134)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
at java.awt.Component.processMouseEvent(Component.java:5100)
at java.awt.Component.processEvent(Component.java:4897)
at java.awt.Container.processEvent(Container.java:1569)
at java.awt.Component.dispatchEventImpl(Component.java:3615)
at java.awt.Container.dispatchEventImpl(Container.java:1627)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
at java.awt.Container.dispatchEventImpl(Container.java:1613)
at java.awt.Window.dispatchEventImpl(Window.java:1606)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:480)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
Anyone seen this error before? This is very critical for us. Please help. Thanks.
Regards,
gkk1969I am seeing the same problem when i try to do Export to Java Source
java.lang.NullPointerException
at oracle.toplink.workbench.mappingsmodel.descriptor.relational.MWRelationalPrimaryKeyPolicy.adjustRuntimeDescriptor(MWRelationalPrimaryKeyPolicy.java:174)
at oracle.toplink.workbench.mappingsmodel.descriptor.relational.MWRelationalTransactionalPolicy.adjustRuntimeDescriptor(MWRelationalTransactionalPolicy.java:85)
at oracle.toplink.workbench.mappingsmodel.descriptor.MWDescriptor.buildRuntimeDescriptor(MWDescriptor.java:423)
at oracle.toplink.workbench.mappingsmodel.descriptor.MWMappingDescriptor.buildRuntimeDescriptor(MWMappingDescriptor.java:860)
at oracle.toplink.workbench.mappingsmodel.descriptor.relational.MWRelationalClassDescriptor.buildRuntimeDescriptor(MWRelationalClassDescriptor.java:791)
at oracle.toplink.workbench.mappingsmodel.descriptor.relational.MWTableDescriptor.buildRuntimeDescriptor(MWTableDescriptor.java:955)
at oracle.toplink.workbench.mappingsmodel.project.MWProject.buildRuntimeProject(MWProject.java:932)
at oracle.toplink.workbench.mappingsmodel.project.MWProject.exportProjectSource(MWProject.java:824)
at oracle.toplink.workbench.mappingsplugin.ProjectSourceGenerationCoordinator.exportProjectSource(ProjectSourceGenerationCoordinator.java:68)
at oracle.toplink.workbench.mappingsplugin.ExportJavaSourceAction.execute(ExportJavaSourceAction.java:31)
at oracle.toplink.workbench.framework.action.AbstractFrameworkAction.actionPerformed(AbstractFrameworkAction.java:134)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.AbstractButton.doClick(AbstractButton.java:289)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1113)
at javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseReleased(BasicMenuItemUI.java:943)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
at java.awt.Component.processMouseEvent(Component.java:5100)
at java.awt.Component.processEvent(Component.java:4897)
at java.awt.Container.processEvent(Container.java:1569)
at java.awt.Component.dispatchEventImpl(Component.java:3615)
at java.awt.Container.dispatchEventImpl(Container.java:1627)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
at java.awt.Container.dispatchEventImpl(Container.java:1613)
at java.awt.Window.dispatchEventImpl(Window.java:1606)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) -
Using TopLink Workbench in Jdeveloper HELP!!!!!
HI! I want to know how can I use TopLink Workbench in JDeveloper to configure java classes???
Please Help!!!
Best RegardsJDeveloper has built in TopLink design time - so you don't need the external TopLink Workbench.
Try following one of the TopLink Tutorials here:
http://www.oracle.com/technology/obe/obe1013jdev/10131/10131_adftoplink/master-detail-edit_page_adf_toplink.htm
and
http://www.oracle.com/technology/obe/ADF_tutorial_1013/10131/index.htm -
Toplink Workbench Exceptions â¦â¦.
When I tried to open a Toplink project (project.mwp) generated by Toplink 9.0.3 in the newer version 9.0.4, I got the following errors during the conversion process. What should I do to correct this issue? Many thanks for the help.
Throwable Class Name:
oracle.toplink.exceptions.DescriptorException
Message:
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)])
Stack trace:
Local Exception Stack:
Exception [TOPLINK-99] (OracleAS TopLink - 10g (9.0.4) (Build 031126)): 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:1371)
at oracle.toplink.internal.descriptors.MethodAttributeAccessor.getAttributeValueFromObject(MethodAttributeAccessor.java:47)
at oracle.toplink.mappings.DatabaseMapping.getAttributeValueFromObject(DatabaseMapping.java:304)
at oracle.toplink.mappings.DirectToFieldMapping.buildClone(DirectToFieldMapping.java:61)
at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1493)
at oracle.toplink.publicinterface.UnitOfWork.cloneAndRegisterNewObject(UnitOfWork.java:580)
at oracle.toplink.publicinterface.UnitOfWork.internalRegisterObject(UnitOfWork.java:2261)
at oracle.toplink.publicinterface.UnitOfWork.registerObject(UnitOfWork.java:3093)
at oracle.toplink.mappings.CollectionMapping.buildElementClone(CollectionMapping.java:148)
at oracle.toplink.mappings.CollectionMapping.buildCloneForPartObject(CollectionMapping.java:107)
at oracle.toplink.internal.indirection.NoIndirectionPolicy.cloneAttribute(NoIndirectionPolicy.java:43)
at oracle.toplink.mappings.ForeignReferenceMapping.buildClone(ForeignReferenceMapping.java:160)
at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1493)
at oracle.toplink.mappings.AggregateMapping.buildClonePart(AggregateMapping.java:132)
at oracle.toplink.mappings.AggregateMapping.buildClone(AggregateMapping.java:110)
at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1493)
at oracle.toplink.publicinterface.UnitOfWork.cloneAndRegisterNewObject(UnitOfWork.java:580)
at oracle.toplink.publicinterface.UnitOfWork.internalRegisterObject(UnitOfWork.java:2261)
at oracle.toplink.publicinterface.UnitOfWork.registerObject(UnitOfWork.java:3093)
at oracle.toplink.workbench.ui.WorkbenchSession.registerProject(WorkbenchSession.java:551)
at oracle.toplink.workbench.ui.WorkbenchSession.addProject(WorkbenchSession.java:151)
at oracle.toplink.workbench.ui.WorkbenchSession.addNewProject(WorkbenchSession.java:138)
at oracle.toplink.workbench.ui.MainView.addNewProject(MainView.java:265)
at oracle.toplink.workbench.filesystem.MWFileFactory.openImp(MWFileFactory.java:206)
at oracle.toplink.workbench.filesystem.MWFileFactory.open(MWFileFactory.java:158)
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.GeneratedMethodAccessor107.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:40)
... 28 more
Caused by: java.lang.NullPointerException
at oracle.toplink.workbench.model.meta.MWClass.superclassIsDefaultValue(MWClass.java:1275)
at oracle.toplink.workbench.model.meta.MWClass.isStub(MWClass.java:1236)
... 32 moreoracle.toplink.workbench.framework.OpenException: Exception [TOPLINK-98] (Oracle TopLink - 10g Developer Preview 3 (10.1.3.0 ) (Build 041012)): oracle.toplink.exceptions.DescriptorException
Exception Description: The underlying descriptor callback method [legacy45PostBuild], with parameter (DescriptorEvent), triggered an exception.
Internal Exception: java.lang.reflect.InvocationTargetException
Target Invocation Exception: java.lang.NullPointerException
Descriptor: XMLDescriptor(oracle.toplink.workbench.mappingsmodel.project.relational.MWRelationalProject --> [DatabaseTable(BldrProject)])
at oracle.toplink.workbench.mappingsplugin.MWPlugin.open(MWPlugin.java:262)
at oracle.toplink.workbench.framework.internal.FrameworkApplication.open(FrameworkApplication.java:605)
at oracle.toplink.workbench.framework.internal.FrameworkNodeManager.openCallback(FrameworkNodeManager.java:325)
at oracle.toplink.workbench.framework.internal.RunnableProjectLoader.run2(RunnableProjectLoader.java:81)
at oracle.toplink.workbench.framework.internal.RunnableProjectLoader.run(RunnableProjectLoader.java:68)
at java.lang.Thread.run(Thread.java:534)
Caused by: Exception [TOPLINK-98] (Oracle TopLink - 10g Developer Preview 3 (10.1.3.0 ) (Build 041012)): oracle.toplink.exceptions.DescriptorException
Exception Description: The underlying descriptor callback method [legacy45PostBuild], with parameter (DescriptorEvent), triggered an exception.
Internal Exception: java.lang.reflect.InvocationTargetException
Target Invocation Exception: java.lang.NullPointerException
Descriptor: XMLDescriptor(oracle.toplink.workbench.mappingsmodel.project.relational.MWRelationalProject --> [DatabaseTable(BldrProject)])
at oracle.toplink.exceptions.DescriptorException.targetInvocationWhileEventExecution(DescriptorException.java:1598)
at oracle.toplink.publicinterface.DescriptorEventManager.executeEvent(DescriptorEventManager.java:177)
at oracle.toplink.internal.descriptors.ObjectBuilder.buildAttributesIntoObject(ObjectBuilder.java:256)
at oracle.toplink.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:504)
at oracle.toplink.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:372)
at oracle.toplink.queryframework.ObjectLevelReadQuery.buildObject(ObjectLevelReadQuery.java:408)
at oracle.toplink.queryframework.ReadObjectQuery.executeObjectLevelReadQuery(ReadObjectQuery.java:372)
at oracle.toplink.queryframework.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:727)
at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:559)
at oracle.toplink.queryframework.ReadObjectQuery.execute(ReadObjectQuery.java:336)
at oracle.toplink.publicinterface.Session.internalExecuteQuery(Session.java:1977)
at oracle.toplink.publicinterface.Session.executeQuery(Session.java:973)
at oracle.toplink.publicinterface.Session.executeQuery(Session.java:930)
at oracle.toplink.publicinterface.Session.readObject(Session.java:2429)
at oracle.toplink.workbench.mappingsio.legacy.PersistenceTools45.readMWProjectNamed(PersistenceTools45.java:230)
at oracle.toplink.workbench.mappingsio.legacy.LegacyIOFacade.read45Project(LegacyIOFacade.java:18)
at oracle.toplink.workbench.mappingsio.ProjectReader.readPreviousVersion(ProjectReader.java:97)
at oracle.toplink.workbench.mappingsio.ProjectReader.read(ProjectReader.java:85)
at oracle.toplink.workbench.mappingsio.ProjectIOManager.read(ProjectIOManager.java:48)
at oracle.toplink.workbench.mappingsio.ProjectIOManager.read(ProjectIOManager.java:44)
at oracle.toplink.workbench.mappingsplugin.MWPlugin.open(MWPlugin.java:260)
... 5 more
Caused by: java.lang.reflect.InvocationTargetException
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:324)
at oracle.toplink.internal.security.PrivilegedAccessController.invokeMethod(PrivilegedAccessController.java:416)
at oracle.toplink.publicinterface.DescriptorEventManager.executeEvent(DescriptorEventManager.java:170)
... 24 more
Caused by: java.lang.NullPointerException
at oracle.toplink.workbench.mappingsmodel.desc.relational.MWRelationalPrimaryKeyPolicy.nodeRemoved(MWRelationalPrimaryKeyPolicy.java:185)
at oracle.toplink.workbench.utility.node.AbstractNodeModel.nodeRemoved(AbstractNodeModel.java:288)
at oracle.toplink.workbench.utility.node.AbstractNodeModel.nodeRemoved(AbstractNodeModel.java:288)
at oracle.toplink.workbench.mappingsmodel.desc.MWMappingDescriptor.nodeRemoved(MWMappingDescriptor.java:1174)
at oracle.toplink.workbench.mappingsmodel.desc.relational.MWTableDescriptor.nodeRemoved(MWTableDescriptor.java:1054)
at oracle.toplink.workbench.utility.node.AbstractNodeModel.nodeRemoved(AbstractNodeModel.java:288)
at oracle.toplink.workbench.mappingsmodel.MWModel.removeNodeFromCollection(MWModel.java:152)
at oracle.toplink.workbench.mappingsmodel.meta.MWClass.removeAttribute(MWClass.java:960)
at oracle.toplink.workbench.mappingsmodel.meta.MWClass.removeAttributes(MWClass.java:969)
at oracle.toplink.workbench.mappingsmodel.meta.MWClass.removeAttributes(MWClass.java:964)
at oracle.toplink.workbench.mappingsmodel.meta.MWClass.clearAttributes(MWClass.java:974)
at oracle.toplink.workbench.mappingsmodel.meta.MWClass.legacyXXReworkCoreType(MWClass.java:3108)
at oracle.toplink.workbench.mappingsmodel.meta.MWClass.legacy45PostPostProjectBuild(MWClass.java:3084)
at oracle.toplink.workbench.mappingsmodel.MWModel.legacy45PostPostProjectBuild(MWModel.java:575)
at oracle.toplink.workbench.mappingsmodel.meta.MWClassRepository.legacy45PostPostProjectBuild(MWClassRepository.java:1271)
at oracle.toplink.workbench.mappingsmodel.MWModel.legacy45PostPostProjectBuild(MWModel.java:575)
at oracle.toplink.workbench.mappingsmodel.project.MWProject.legacy45PostBuild(MWProject.java:1233)
at oracle.toplink.workbench.mappingsmodel.project.relational.MWRelationalProject.legacy45PostBuild(MWRelationalProject.java:651)
... 30 more -
One of our teams is having the following problem:
when we refresh one class in toplink workbench to add a new field, we can no longer save. we get the following error. What is curious, is that our local classes get listed in the workbench. I'm not sure exactly what this means, and the classes referred to in the stack trace are our local framework classes. Has anyone seen something like this before, or have an idea of what it might mean?. Once again the error below is shown in the workbench not runtime.
LOCAL EXCEPTION STACK: EXCEPTION [TOPLINK-6004] (TopLink - 4.0 (Build 345)): com.webgain.integrator.exceptions.QueryException EXCEPTION DESCRIPTION: The object [BldrClass[3c8807] (com.cna.exceptions.CfRuntimeException, modifier = public, array=, implements [BldrClass[3aa0bb] (com.cna.exceptions.CiException, modifier = public abstract interface, interface, array=, implements [])], extends RuntimeException)], of class [class com.webgain.workbench.model.meta.BldrClass], with identity hashcode (System.identityHashCode()) [3,966,983], is not from this UnitOfWork object space, but the parent session's. The object was never registered in this UnitOfWork, but read from the parent session and related to an object registered in the UnitOfWork. Ensure that you are correctly registering your objects. If you are still having problems, you can use the UnitOfWork.validateObjectSpace() method to help debug where the error occurred. For more information, see the manual or FAQ. QUERY: WriteObjectQuery(BldrClass[3c8807] (com.cna.exceptions.CfRuntimeException, modifier = public, array=, implements [BldrClass[3aa0bb] (com.cna.exceptions.CiException, modifier = public abstract interface, interface, array=, implements [])], extends RuntimeException)) at com.webgain.integrator.exceptions.QueryException.backupCloneIsOriginalFromParent(QueryException.java:143) at com.webgain.integrator.publicinterface.UnitOfWork.getBackupClone(UnitOfWork.java:1284) at com.webgain.integrator.publicinterface.UnitOfWork.getBackupCloneForCommit(UnitOfWork.java:1316) at com.webgain.integrator.queryframework.ObjectLevelModifyQuery.prepareForExecution(ObjectLevelModifyQuery.java:144) at com.webgain.integrator.queryframework.WriteObjectQuery.prepareForExecution(WriteObjectQuery.java:102) at com.webgain.integrator.queryframework.DatabaseQuery.execute(DatabaseQuery.java:473) at com.webgain.integrator.publicinterface.Session.internalExecuteQuery(Session.java:1869) at com.webgain.integrator.publicinterface.UnitOfWork.internalExecuteQuery(UnitOfWork.java:1962) at com.webgain.integrator.publicinterface.Session.executeQuery(Session.java:1034) at com.webgain.integrator.publicinterface.Session.executeQuery(Session.java:988)The easiest workaround to this problem is normally to perform a "save as" of the project, which will normally work.
TopLink - 4.0 (Build 345) - is a fairly old release, you may wish to contact support to get the latest patch for this release, or to upgrade to a newer version of the product. -
Oracle TopLink 10g Introductory Tutorial: No Table Reference available
Hi,
I'm trying to work through the Oracle TopLink 10g Introductory Tutorial (http://www.oracle.com/technology/products/ias/toplink/doc/10131/main/_tutorial/index.htm).
At the point 'Map the Java Classes: Create One-to-One Mappings' (http://www.oracle.com/technology/products/ias/toplink/doc/10131/main/_tutorial/index.htm) I'm not able to select a table reference because there is no one available.
As result i get the following message after generating 'Mapping Status Report':
TopLink Map 'tut01Map' -> One of the packages is incomplete.
Package example.model -> One of the descriptors in this package is incomplete.
Descriptor Employee -> Some mappings are incomplete.
Mapping address -> No table reference is selected.
Mapping address -> Table reference is invalid because of the target table chosen.
Mapping version -> Mapping references write lock field stored in cache, but is not read-only.
Mapping phoneNumbers -> No table reference is selected.
Mapping phoneNumbers -> Table reference is invalid because of the target table chosen.
Descriptor PhoneNumber -> Some mappings are incomplete.
Descriptor PhoneNumber -> The following primary key fields are unmapped: EMP_ID
Descriptor PhoneNumber -> The following primary key fields have no writable mappings: EMP_ID
Mapping owner -> No table reference is selected.
Mapping owner -> Table reference is invalid because of the target table chosen.
End TopLink Map 'tut01Map'
Did I make a mistake or is there a wrong configuration? Please help.
I'm using:
JDeveloper 10.1.3.2.0
MySQL 5.0.33 with Connector/J 5.0.5
Windows XP
Thanks, TGau
Message was edited by:
TGau
UpdateYes I did. But my database storage engine is set to MyISAM which don't support foreign keys. So this 'error' results from database configuration (Info: InnoDB do support foreign keys).
I'm wondering why the queries didn't throw any errors. So the foreign key/reference part was just skipped.
Thank you very much, rsapir.
PS:
How can I configure configure 'application side' references/associations? It is described in the TopLink Developers Guide on site 34-10 ... but I have no Add/New Buttons? -
Hi All
I'm using JDeveloper 11g. When I started JDeveloper, the following error appear.
Unexpected severe error has occurred in JDeveloper
The program may be unstable, which could result in data loss. Decide how you want to proceed and click OK.
View errory details.
+Invoking command: Toggle Comments[ from oracle.ide.ceditor.CodeEditor ]+
+Performing action Undo Toggle Comments[ from oracle.ide.ceditor.CodeEditor ]+
+Performing action Close All[ from oracle.ide.ceditor.CodeEditor ]+
An error was detected while opening a persistence file.
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
j.lang.String.substring(String.java:1932)
j.lang.String.substring(String.java:1905)
o.toplink.workbench.addin.mappings.spi.db.JDeveloperDBObject.getCatalogName(JDeveloperDBObject.java:41)
o.toplink.workbench.mappingsmodel.db.MWDatabase.refreshTables(MWDatabase.java:1157)
o.toplink.workbench.mappingsmodel.db.MWDatabase.refreshRelations(MWDatabase.java:1142)
o.toplink.workbench.mappingsmodel.db.MWDatabase.refresh(MWDatabase.java:1074)
o.toplink.workbench.mappingsmodel.sessions.MWSessionsProject.initializeDatabases(MWSessionsProject.java:501)
o.toplink.workbench.mappingsmodel.sessions.MWSessionsProject.initialize(MWSessionsProject.java:487)
o.toplink.workbench.mappingsmodel.sessions.MWSessionsProject.<init>(MWSessionsProject.java:153)
o.toplink.workbench.addin.application.SessionsProjectContext.buildTopLinkSessionsProject(SessionsProjectContext.java:63)
o.toplink.workbench.addin.application.SessionsProjectContext.initialize(SessionsProjectContext.java:101)
o.toplink.workbench.addin.application.AbstractTopLinkContext.<init>(AbstractTopLinkContext.java:51)
o.toplink.workbench.addin.application.SessionsProjectContext.<init>(SessionsProjectContext.java:45)
o.toplink.workbench.addin.application.ContextManager.openTopLinkSessions(ContextManager.java:1376)
o.toplink.workbench.addin.application.ContextManager.openTopLinkContexts(ContextManager.java:1325)
o.toplink.workbench.addin.TopLinkProjectChangeListener$TopLinkContextWorker.run(TopLinkProjectChangeListener.java:370)
j.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
j.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
j.util.concurrent.FutureTask.run(FutureTask.java:138)
j.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
j.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
j.lang.Thread.run(Thread.java:619)
Thankyou.
Thiensu2810I am using 10.1.3.0.1 and for me there are still grave issues with interface management in the WB.
First of all, I get a NullPointerException when clicking the "add" Button on the interface descriptor's implementor list after having refreshed all classes by selecting the project packages and doing "refresh classes" from the context menu. I have to close and restart the WB in order to be able to continue working.
Then, some attributes which are not common among the implementor classes are detected as common query keys.
Lastly, if I use variable one-to-one relationships and de-select some class indicator values, the de-selected implementor descriptors are displayed as selected after workbench restart again, showing me errors about missing class indicator values for selected descriptors (Error 0055). -
Hi,
I'm testing TopLink, my 1st step is running Workbench, but after I define the database and save project, the exception exception below always occur, with Workbench
and I can't do anything,
Plataform is:
Linux kernel 2.4.18
SUN J2SDK 1.4.1_01
java.lang.NullPointerException
at oracle.toplink.workbench.persistence.BldrDatabasePlatformPersistenceTools.loadPlatformNamesFromFileNames(Unknown Source)
at oracle.toplink.workbench.persistence.BldrDatabasePlatformPersistenceTools.initialize(Unknown Source)
at oracle.toplink.workbench.persistence.BldrDatabasePlatformPersistenceTools.<init>(Unknown Source)
at oracle.toplink.workbench.persistence.BldrDatabasePlatformPersistenceTools.instance(Unknown Source)
at oracle.toplink.workbench.model.db.BldrDatabase.getPlatform(Unknown Source)
at oracle.toplink.workbench.ui.BldrProjectPropertiesSequencingPage.updateSequenceNativeChoice(Unknown Source)
at oracle.toplink.workbench.ui.BldrProjectPropertiesSequencingPage.populatePage(Unknown Source)
at oracle.toplink.workbench.ui.BldrProjectPropertiesPanel.populate(Unknown Source)
at oracle.toplink.workbench.ui.tree.BldrProjectNode.populate(Unknown Source)
at oracle.toplink.workbench.ui.BldrMainView.maintainPropertiesPanel(Unknown Source)
at oracle.toplink.workbench.ui.BldrMainView.access$100(Unknown Source)
at oracle.toplink.workbench.ui.BldrMainView$TreeSelectionHandler.valueChanged(Unknown Source)
at javax.swing.JTree.fireValueChanged(JTree.java:2406)
at javax.swing.JTree$TreeSelectionRedirector.valueChanged(JTree.java:2777)
at javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(DefaultTreeSelectionModel.java:629)
at javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange(DefaultTreeSelectionModel.java:1076)
at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPaths(DefaultTreeSelectionModel.java:287)
at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPath(DefaultTreeSelectionModel.java:170)
at javax.swing.JTree.setSelectionPath(JTree.java:1181)
at javax.swing.plaf.basic.BasicTreeUI.selectPathForEvent(BasicTreeUI.java:2192)
at javax.swing.plaf.basic.BasicTreeUI$MouseHandler.handleSelection(BasicTreeUI.java:2840)
at javax.swing.plaf.basic.BasicTreeUI$MouseHandler.mousePressed(BasicTreeUI.java:2801)
at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:218)
at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:217)
at java.awt.Component.processMouseEvent(Component.java:5090)
at java.awt.Component.processEvent(Component.java:4890)
at java.awt.Container.processEvent(Container.java:1566)
at java.awt.Component.dispatchEventImpl(Component.java:3598)
at java.awt.Container.dispatchEventImpl(Container.java:1623)
at java.awt.Component.dispatchEvent(Component.java:3439)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3162)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
at java.awt.Container.dispatchEventImpl(Container.java:1609)
at java.awt.Window.dispatchEventImpl(Window.java:1585)
at java.awt.Component.dispatchEvent(Component.java:3439)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)I found the problem
The steps to simulate are ,
1) open a Konsole of KDE.
2) type sh workbench.sh.
3) create the project, save and close workbench.
4) retype sh workbench.sh.
now all clicks throw the exception,
then if you don't reopen workbench, all works, or open it in another Konsole. -
EJB3.0 and toplink workbench
Hi,
I have a question to the new TopLink release and EJB 3.0 support.
Is it possible that TopLink workbench generates EJB 3.0 persistence classes from database with annotations or mappings in the project.xml?
I don't want to write all the persistence classes with annotations by myself.EJB 3.0's Java Persistence API (JPA) is not supported directly from the workbench. You can however take your existing TopLink XML config files (sessions and Map/Project) and use them with JPA (no annotations).
When working with annotations it becomes more relevant to be doing these operations within an IDE. To this end we have already delivered early support for JPA in JDeveloper. You can generate a persistent entity model from tables with full annotations and then generate a session bean facade exposing the persistence operations as needed.
For those of you not using JDeveloper we are also leading a project to add this functionality to Eclipse within WTP. For more information on project dali go to www.eclipse.org/dali.
Doug -
TopLink workbench won't run (can't find "~1\bin\javaw.exe" error)
Hello,
I'm having a tough time getting the TopLink WorkBench to run on Windows XP. I'm trying to run TopLink WorkBench 10g Release 3 (10.1.3.0.0) Build 060118. I've also installed Oracle Application Server 10g Release 3 (10.1.3.0.0) which is working fine (other than the Toplink part). I've managed to get EJB's deployed and access them through RMI and WS.
When I run "workbench.cmd" I get the error
Windows cannot find `~1\bin\javaw.exe"
If I manually remove the setenv.cmd call and cutout all the fixpath bits, Toplink Workbench comes up fine (as far as I can tell), but I cannot connect to my Oracle databases. When I try to connect, I get "The class oracle.jdbc.OracleDriver was not found".
I've been told this is because my J2EE 1.5 environment is incompatible with standalone Toplink Workbench. Is this true? I have both J2EE 1.5 SDK installed as well as J2EE 1.4 SDK but not amount of rearranging the system CLASSPATH seems to make everything work. (I've restarted Workbench to make sure the new env vars take effect when I change them)
Is there a step by step document on getting this to work?
Thanks in advance,
James Ewell
Seismic Micro technology
Houston, TX
PS - I am running WinXP 64-bit if that matters. The specific java bits are
W:\>java -version
java version "1.5.0_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05)
Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode)I was referred to this "step by step" link
http://download-west.oracle.com/docs/cd/B25221_04/web.1013/b13593/mw002.htm#CJADJEEE
which helps (it walks through the required edits in setenv.cmd). I still have the "can't find ~\bin\javaw.exe" problem though.
Perhaps this is a JRE 1.5 issue or a WinXP (64-bit) issue.
James Ewell -
Primary key issue in toplink workbench
Hi All,
I am getting No primary keys specified in (xxx is the table name) table error in workbench.
I my table,don't have any primary keys,i try to do direct to field mapping for all the fields with the table.
After mapping,was getting this warning.
Is there any mandatory thing in toplink workbench that we need to have atleast one primary key defined in a table.
Please let me know!!!!!!!!!!!!
Appreciate your hekp............Yes, it needs to know how to uniquely identify the row to do deletes and updates, etc. If you have no PK, then actually every field is needed to uniquely identify the row, and therefore just slect every field in the MW as being the PK... Note that the PK specified in the MW doesn't have to actually be the PK on the database, it just has to be unique for when TL does update/delete, etc.
- Don -
Where to find example code referenced in Java WebServices Tutorial, v1.5_01
Java WebServices Tutorial, v1.5_01 refenced a lot of code examples, which are supposed to be in <JWSDP_HOME>/docs/tutorial/examples.
I have downloaded and installed "Java Web Services Developer Pack v1.5" and "Java WebServices Tutorial, v1.5_01" from http://java.sun.com/webservices/downloads/webservicespack.html
But none of these downloads includes the code examples.
Thanks for any hitns.Thanks.
But you were talking about a different set of examples referenced in a different document. You can get these examples when you install downloaded file:jwsdp-1_5-windows-i586.exe
The code examples I am looking for are referenced in:
"Java WebServices Tutorial, v1.5_01"
and this document can be downloaded at:
http://java.sun.com/webservices/downloads/webservicespack.html -
J2me, webservices tutorial
hi,
im looking for some J2me and webservices tutorial. ill apprecialte early help
thanks
waiting...JSR 172 is still not supported by many mobile phones.
So, we have to use external SOAP libraries (like kSOAP) to access XML webservices.
try , KSOAP ...I used it during one of my projects. -
Sun J2ee webservice tutorial doubt
Hi,
I am trying to understand how the JAX RPC static stub client is built in Sun Webservices tutorial
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JAXRPC3.html
Here we have HelloIF and HelloImpl classes. Both these classes are in the
package helloservice.
package helloservice;
public interface HelloIF extends Remote {
}These have been built using
asant build, asant create-war, asant deploy-war commands.Now the client HelloClient.java is in package staticstub.
package staticstub;
import javax.xml.rpc.Stub;
public class HelloClient {
public static void main(String[] args) {
HelloIF hello = (HelloIF)stub;
}}I wanted to know how does HelloClient compile WITHOUT importing package helloservice in which HelloIF has been declared.
Isn't this against the basic java rules.
Or is there a smart way ANT does.
Can someone please explain or give me a plain javac command to compile the HelloClient.java
regards
VasimHello,
Could you post a stack trace?
Thanks,
Bruce
zbcong wrote:
>
hello
i want to deploy the jax-rpc sample that come with the sun's tutorial(hello) and
can works well in the tomcat into wls7,but the wls tell me that some files can't
be found,then i add enough jar files under the jwsdp to the lib directory of the
war package till the deployment success,but when i invoke it in the browser,the
browser tell me "no jax-rpc context available",why?and the same package even can't
be deployed in the jboss,the jboss always complain that the "class not found",but
i am sure the classes is included in the lib jar files,why?who can help me?
thank you -
Oracle TopLink as a Custom Serializer in a Webservice tutorial question
Tutorial link: http://www.oracle.com/technology/products/ias/toplink/technical/tips/jaxRpc11/index.htm
Has anyone successfuly completed that tutorial using Toplink and JDeveloper 10.1.3? If so I have some questions for you. If not, then it could be possible there is a bug in the IDE with the automatic creation of serializers. I read in the documentation for Oracle, that the serializer classes are to have default constructors but none of the IDE auto-generated serializers do however.
SuryaIf anyone is interested, I have recreated the Toplink part and the directory structures including the source code and the compiled classes. All that is to be done is to create the web service. I can send it to whoever is interested in trying to solve this problem.
I am going to give it a shot at creating the service through the IDE or creating it separately through the command prompt and see how it goes.
Maybe you are looking for
-
i backed up and restored my iPod and now when I plug it in to put my things back on my iPod touch, iTunes stops working and the programme closes please help soon!
-
Backing up KM Folders via Portal Drive
Hi Experts, We've implemented Netweaver Portal 7.0 with SP14 for a local company. Company migrated all shared folders from filesystem into KM via Portal Drive. Portal is running on a VMWARE machine with Linux OS. Followings are common questions, when
-
Hi, I would like to design the layout of my application using ADF components (I use JSF). I´m trying to use <afh:tablelayout>, but when I use the <jsp:include> to the menu page, the menu doesn´t render. Someone can help me? Thanks!
-
How to repair the disk using recovery HD??
how to repair the disk using recovery HD??
-
Need an IR Code for a set top box (Explorer 4642HDC) to allow my DVD recorder to change channels.