Mapping Workbench Java Project Export Exception

Hello,
We're using TopLink Workbench 9.0.4.1 build 040128
We are experiencing exceptions when we try to export our Mapping Workbench Project as a java project file. (We have never had this problem before).
I fear we may have somehow corrupted the TopLink mapping project file(s) when we were last editing them. We can open the project file and all mappings and tables look clean. However, when we try to export the java project file we get an exception (see the stack trace below).
Is there any way to recover our project file? We had made a lot of changes before noticing the problem with the java project generation. It would be a lot of work to go back to our last good back-up copy and apply the updates all over again.
Here's the stack trace from the Workbench when trying to export the java project file:
java.lang.NullPointerException
     at oracle.toplink.workbench.persistence.MWProjectToRuntimeProjectConverter.convertAggregatePathToFieldIntoTranslationDictionaries(MWProjectToRuntimeProjectConverter.java:189)
     at oracle.toplink.workbench.persistence.MWProjectToRuntimeProjectConverter.convertMappings(MWProjectToRuntimeProjectConverter.java:715)
     at oracle.toplink.workbench.persistence.MWProjectToRuntimeProjectConverter.convert(MWProjectToRuntimeProjectConverter.java:74)
     at oracle.toplink.workbench.model.MWProject.exportJavaSource(MWProject.java:885)
     at oracle.toplink.workbench.model.MWProject.exportJavaSource(MWProject.java:848)
     at oracle.toplink.workbench.ui.ProjectSourceGenerationCoordinator.exportProjectSource(ProjectSourceGenerationCoordinator.java:162)
     at oracle.toplink.workbench.ui.MainView.exportSelectedProjectsToJavaSource(MainView.java:616)
     at oracle.toplink.workbench.ui.ActionManager$50.actionPerformed(ActionManager.java:1395)
     at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
     at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
     at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
     at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
     at javax.swing.AbstractButton.doClick(Unknown Source)
     at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
     at javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseReleased(Unknown Source)
     at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
     at java.awt.Component.processMouseEvent(Unknown Source)
     at java.awt.Component.processEvent(Unknown Source)
     at java.awt.Container.processEvent(Unknown Source)
     at java.awt.Component.dispatchEventImpl(Unknown Source)
     at java.awt.Container.dispatchEventImpl(Unknown Source)
     at java.awt.Component.dispatchEvent(Unknown Source)
     at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
     at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
     at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
     at java.awt.Container.dispatchEventImpl(Unknown Source)
     at java.awt.Window.dispatchEventImpl(Unknown Source)
     at java.awt.Component.dispatchEvent(Unknown Source)
     at java.awt.EventQueue.dispatchEvent(Unknown Source)
     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
     at java.awt.EventDispatchThread.run(Unknown Source)

Are there many aggregate mappings in your project? Or do you know of any aggregate mappings or mappings in aggregate descriptors that have changed since you last exported your java source successfully. It appears that something in an aggregate mapping has become corrupted and I'm just wondering if you can narrow down where the problem might have occured. If this is possible, then try remapping those aggregate mappings and then generating the java source again.
If it is not possible or this does not solve the problem, you will need to send this project and the class files in to support.
Thanks,
Karen Moore

Similar Messages

  • Mapping Workbench error when exporting project XML

    The following error pops up when trying to export the project deployment xml file.
    "The following descriptors do not have corresponding class files. Please check your class path."
    The window then lists all of my descriptors.
    I have the Oracle 10g database configured and I have created 3 java classes from it. The source code was generated with out any problems.
    TopLink version is 10.1.2 on Windows.
    Thanks.

    I had the same problem, but had already exported source, compiled and put the entry in the classpath in MWB. My problem was caused by some conflict caused by using Java 1.5 to compile the model source but Java 1.4.1 (by default) supplied with MWB. I changed the JRE_HOME and the project deployment file is created and looks OK.
    Hope that helps anyone else as silly as I
    Mike

  • New problem  --  My java code can't see my CLASSES from Mapping Workbench

    Donald and others -
    I am VERY new to TopLink......
    I was at the last Oracle Developer Days in Northern Virginia. Donald convinced me and my co-workers to use TopLink for our upcoming project. I have been having tons of problems getting it to work correctly. Maybe I need a TOPLINK license plate, like Donald!!!
    Here is my newest problem. I can create a DatabaseSession, login to it, write a query and log out of it.
    However, I can only do this if I remove my classes from the Mapping Workbench. As soon as I add even one class to the Mapping Workbench......I get an error as follows:
    LOCAL EXCEPTION STACK:
    EXCEPTION [TOPLINK-3007] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.ConversionException
    EXCEPTION DESCRIPTION: The object [mil.usa.lbit.isr.TestIsr], of class [class java.lang.String], could not be converted to [class java.lang.Class]. Please ensure that the class [class java.lang.Class] is on the CLASSPATH. You may need to use alternate API passing in the appropriate class loader as required, or setting it on the default ConversionManager
    INTERNAL EXCEPTION: java.lang.ClassNotFoundException: mil.usa.lbit.isr.TestIsr
    Can anyone tell me where I need to put my class files so the java code can see them via the ISR.xml deployment file.
    I currently have these files in a .jar file on the system path and in my web-inf folder and in my project settings. I put them everywhere I could think of, but no luck.
    Here is my code:
    package mil.usa.lbit.isr;
    import mil.usa.lbit.LbitColors;
    import java.util.*;
    import java.math.*;
    import oracle.toplink.sessions.*;
    import oracle.toplink.tools.schemaframework.*;
    import oracle.toplink.exceptions.*;
    import oracle.toplink.expressions.*;
    import oracle.toplink.queryframework.*;
    import oracle.toplink.tools.workbench.*;
    public class TestIsr extends ISR {
    public DatabaseSession session;
         public Project project;
    public TestIsr() {
    this.name = "TestISR";
    this.color = LbitColors.AMBER;
    this.metric = 97.00;
    public boolean isConnected() {
    if (session == null)
    System.out.println("Not Connected");
    return false;     
    System.out.println("Connected");
    return session.isConnected();
    public void loginToDatabase() {
    Project builderProject;
    System.out.println("Attempt to login to database using TopLink:");
    project = XMLProjectReader.read("C:\\LBIT TopLink\\ISR\\ISR.xml");
    session = project.createDatabaseSession();
    session.login();
    System.out.println("Logged in");
    public void runQuery() {
    ExpressionBuilder builder = new ExpressionBuilder();
    Expression expression = builder.get("isr_id").equal(3);
    System.out.println(expression);          
    //TestIsr isr = (TestIsr) session.readObject(TestIsr.class, expression);
    //System.out.println(isr);     
    public void logoutOfDatabase() {
    session.logout();     
    System.out.println("Logged out");          
    public static void main(String[] args) {     
    TestIsr testing = new TestIsr();
    testing.isConnected();     
    testing.loginToDatabase();          
    testing.isConnected();
    testing.runQuery();
    testing.logoutOfDatabase();     
    Thanks in advance.
    Donald please email me and maybe we can chat on the phone if you want to offer some help.
    Andy

    Thanks for the reply!
    However, I did try to implement that yesterday.
    When I add the "getClass().getClassLoader()" to the "XMLProjectReader.read" call, the codes loses site of my project (.xml) file.
    Here is the new line:
    project = XMLProjectReader.read("C:\\LBIT TopLink\\ISR\\ISR.xml", getClass().getClassLoader());
    Here is the new error:
    EXCEPTION [TOPLINK-7099] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.ValidationException
    EXCEPTION DESCRIPTION: Could not find xml project file which is specified in properties file: xmlProjectFile=C:\LBIT TopLink\ISR\ISR.xml.
         oracle.toplink.exceptions.ValidationException oracle.toplink.exceptions.ValidationException.projectXMLNotFound(java.lang.String, java.lang.Exception)
         oracle.toplink.sessions.Project oracle.toplink.tools.workbench.XMLProjectReader.read(java.lang.String, java.lang.ClassLoader)
    But my code could find that file before I added the "getClass().getClassLoader()" code.
    Maybe I can avoid this problem by "deploying the XML file in my application jar?" Could you please explain more about this option after answering the first part of my question.
    Any other posters feel free to help me too.
    I know TopLink is a powerful tool, I just keep hitting these hurdles. ARRRRRRRGGGG!!!
    Thanks again,
    Andy

  • Error migrating 9.0.4 mapping workbench project to 10.1.3.4.0

    I get the following error, when I tryt o open the 9.0.4 mapping workbench project file woth Toplink Mapping workbench 10.1.3.4.0 for migration. Please help.
    oracle.toplink.workbench.framework.OpenException: Exception [TOPLINK-106] (Oracle TopLink - 10g Release 3 (10.1.3.4.0) (Build 080602)): oracle.toplink.exceptions.DescriptorException
    Exception Description: The method [legacy50SetTypeNameForTopLink] on the object is throwing an exception.
    Argument: [null]
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: java.lang.NullPointerException
    Mapping: oracle.toplink.mappings.DirectToFieldMapping[type-->type]
    Descriptor: XMLDescriptor(oracle.toplink.workbench.mappingsmodel.meta.MWTypeDeclaration --> [DatabaseTable(type-declaration)])
         at oracle.toplink.workbench.mappingsplugin.MappingsPlugin.open(MappingsPlugin.java:290)
         at oracle.toplink.workbench.framework.internal.FrameworkApplication.open(FrameworkApplication.java:689)
         at oracle.toplink.workbench.framework.internal.FrameworkNodeManager.openCallback(FrameworkNodeManager.java:341)
         at oracle.toplink.workbench.framework.internal.RunnableProjectLoader.run2(RunnableProjectLoader.java:76)
         at oracle.toplink.workbench.framework.internal.RunnableProjectLoader.run(RunnableProjectLoader.java:63)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: Exception [TOPLINK-106] (Oracle TopLink - 10g Release 3 (10.1.3.4.0) (Build 080602)): oracle.toplink.exceptions.DescriptorException
    Exception Description: The method [legacy50SetTypeNameForTopLink] on the object is throwing an exception.
    Argument: [null]
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: java.lang.NullPointerException
    Mapping: oracle.toplink.mappings.DirectToFieldMapping[type-->type]
    Descriptor: XMLDescriptor(oracle.toplink.workbench.mappingsmodel.meta.MWTypeDeclaration --> [DatabaseTable(type-declaration)])
         at oracle.toplink.exceptions.DescriptorException.targetInvocationWhileSettingValueThruMethodAccessor(DescriptorException.java:1686)
         at oracle.toplink.internal.descriptors.MethodAttributeAccessor.setAttributeValueInObject(MethodAttributeAccessor.java:145)
         at oracle.toplink.mappings.DatabaseMapping.setAttributeValueInObject(DatabaseMapping.java:1143)
         at oracle.toplink.mappings.DatabaseMapping.readFromRowIntoObject(DatabaseMapping.java:1046)
    Thanks

    I dont have any multitables enabled on the project. Also there are no childs referring to the same tables as parent. This seems to be something to do with the legacy data types.
    Is there any way to identify the descriptor/elemnt that is causing this error? Is there any way to enable debug trace?
    Unfortunately, I cannot send the project, neither my metalink account works.

  • DP3 project won't load into DP4 mapping workbench

    I have a toplink mapping project created with Toplink DP3r2. I tried to load it using the mapping workbench in Toplink DP4 (Build 050715).
    Here's the error:
    oracle.toplink.workbench.framework.OpenException: java.lang.NullPointerException
         at oracle.toplink.workbench.mappingsplugin.MappingsPlugin.open(MappingsPlugin.java:297)
         at oracle.toplink.workbench.framework.internal.FrameworkApplication.open(FrameworkApplication.java:653)
         at oracle.toplink.workbench.framework.internal.FrameworkNodeManager.openCallback(FrameworkNodeManager.java:339)
         at oracle.toplink.workbench.framework.internal.RunnableProjectLoader.run2(RunnableProjectLoader.java:75)
         at oracle.toplink.workbench.framework.internal.RunnableProjectLoader.run(RunnableProjectLoader.java:62)
         at java.lang.Thread.run(Thread.java:534)
    Caused by: java.lang.NullPointerException
         at oracle.toplink.workbench.utility.node.AbstractNodeModel.setChildBackpointers(AbstractNodeModel.java:274)
         at oracle.toplink.workbench.utility.node.AbstractNodeModel.setChildBackpointers(AbstractNodeModel.java:275)
         at oracle.toplink.workbench.mappingsmodel.project.MWProject.postProjectBuild(MWProject.java:1067)
         at oracle.toplink.workbench.mappingsio.ProjectReader.readProject(ProjectReader.java:166)
         at oracle.toplink.workbench.mappingsio.ProjectReader.read(ProjectReader.java:89)
         at oracle.toplink.workbench.mappingsio.ProjectIOManager.read(ProjectIOManager.java:53)
         at oracle.toplink.workbench.mappingsio.ProjectIOManager.read(ProjectIOManager.java:49)
         at oracle.toplink.workbench.mappingsplugin.MappingsPlugin.open(MappingsPlugin.java:295)
         ... 5 more

    The previews are not forward portable.
    We are trying to ensure that the DP4 files can be read in to the final 10.1.3 release.
    Doug

  • Null pointer exception from 10.1.3dp4 Mapping Workbench

    Using 10.1.3dp4 Mapping Workbench I opened a very simple 9.0.4 project successfully. I then successfully saved the project in a different folder. I then successfully logged into the database. When I right click on the database and "Add or update existing tables from database" or select a table and "Refresh from database", I get the following error:
    What am I doing wrong?
    java.lang.NullPointerException
         at oracle.toplink.workbench.mappingsmodel.db.MWDatabase.buildExternalDatabase(MWDatabase.java:480)
         at oracle.toplink.workbench.mappingsmodel.db.MWDatabase.getExternalDatabase(MWDatabase.java:473)
         at oracle.toplink.workbench.mappingsmodel.db.MWDatabase.catalogNames(MWDatabase.java:716)
         at oracle.toplink.workbench.mappingsplugin.ui.db.TableImporterDialog.buildCatalogs(TableImporterDialog.java:171)
         at oracle.toplink.workbench.mappingsplugin.ui.db.TableImporterDialog.initialize(TableImporterDialog.java:142)
         at oracle.toplink.workbench.mappingsplugin.ui.db.TableImporterDialog.<init>(TableImporterDialog.java:114)
         at oracle.toplink.workbench.mappingsplugin.ui.db.AddOrRefreshTablesAction.execute(AddOrRefreshTablesAction.java:42)
         at oracle.toplink.workbench.mappingsplugin.ui.db.AddOrRefreshTablesAction.execute(AddOrRefreshTablesAction.java:36)
         at oracle.toplink.workbench.framework.action.AbstractFrameworkAction.actionPerformed(AbstractFrameworkAction.java:135)
         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)

    I just started the Mapping Workbench and it works fine, so at a minimum, stopping and restarting the workbench will do it. Sorry but I don't know if closing and reopening the project will do the trick.

  • Unable to generate toplink java project file Eclipselink Workbench 2.1.2

    I am getting the following exception, I verfied eclipselink.jar exists and is part of the classpath. Any ideas would be helpful. Thanks
    Local Exception Stack:
    Exception [EclipseLink-7042] (Eclipse Persistence Services - 2.1.0.v20100614-r7608): org.eclipse.persistence.exceptions.ValidationException
    Exception Description: Database platform class [org.eclipse.persistence.platform.database.oracle.Oracle11Platform] not found.
    Internal Exception: java.lang.NoClassDefFoundError: org/eclipse/persistence/platform/database/oracle/Oracle11Platform
         at org.eclipse.persistence.exceptions.ValidationException.platformClassNotFound(ValidationException.java:1504)
         at org.eclipse.persistence.sessions.DatasourceLogin.setPlatformClassName(DatasourceLogin.java:515)
         at org.eclipse.persistence.tools.workbench.mappingsmodel.db.MWLoginSpec.buildRuntimeDatabaseLogin(MWLoginSpec.java:518)
         at org.eclipse.persistence.tools.workbench.mappingsmodel.db.MWLoginSpec.buildDeploymentRuntimeDatabaseLogin(MWLoginSpec.java:502)
         at org.eclipse.persistence.tools.workbench.mappingsmodel.db.MWDatabase.buildDeploymentRuntimeDatabaseLogin(MWDatabase.java:837)
         at org.eclipse.persistence.tools.workbench.mappingsmodel.project.relational.MWRelationalProject.buildRuntimeLogin(MWRelationalProject.java:437)
         at org.eclipse.persistence.tools.workbench.mappingsmodel.project.MWProject.buildRuntimeProject(MWProject.java:925)
         at org.eclipse.persistence.tools.workbench.mappingsmodel.project.MWProject.exportProjectSource(MWProject.java:820)
         at org.eclipse.persistence.tools.workbench.mappingsplugin.ProjectSourceGenerationCoordinator.exportProjectSource(ProjectSourceGenerationCoordinator.java:81)
         at org.eclipse.persistence.tools.workbench.mappingsplugin.ExportJavaSourceAction.execute(ExportJavaSourceAction.java:44)
         at org.eclipse.persistence.tools.workbench.framework.action.AbstractFrameworkAction.actionPerformed(AbstractFrameworkAction.java:147)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
         at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1051)
         at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1092)
         at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
         at java.awt.Component.processMouseEvent(Component.java:5517)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
         at java.awt.Component.processEvent(Component.java:5282)
         at java.awt.Container.processEvent(Container.java:1966)
         at java.awt.Component.dispatchEventImpl(Component.java:3984)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3819)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1791)
         at java.awt.Component.dispatchEvent(Component.java:3819)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    Caused by: java.lang.NoClassDefFoundError: org/eclipse/persistence/platform/database/oracle/Oracle11Platform
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:242)
         at org.eclipse.persistence.internal.helper.ConversionManager.convertObjectToClass(ConversionManager.java:437)
         at org.eclipse.persistence.internal.helper.ConversionManager.convertObject(ConversionManager.java:141)
         at org.eclipse.persistence.internal.helper.ConversionManager.loadClass(ConversionManager.java:858)
         at org.eclipse.persistence.sessions.DatasourceLogin.setPlatformClassName(DatasourceLogin.java:501)
         at org.eclipse.persistence.tools.workbench.mappingsmodel.db.MWLoginSpec.buildRuntimeDatabaseLogin(MWLoginSpec.java:518)
         at org.eclipse.persistence.tools.workbench.mappingsmodel.db.MWLoginSpec.buildDeploymentRuntimeDatabaseLogin(MWLoginSpec.java:503)
         at org.eclipse.persistence.tools.workbench.mappingsmodel.db.MWDatabase.buildDeploymentRuntimeDatabaseLogin(MWDatabase.java:837)
         at org.eclipse.persistence.tools.workbench.mappingsmodel.project.relational.MWRelationalProject.buildRuntimeLogin(MWRelationalProject.java:437)
         at org.eclipse.persistence.tools.workbench.mappingsmodel.project.MWProject.buildRuntimeProject(MWProject.java:925)
         at org.eclipse.persistence.tools.workbench.mappingsmodel.project.MWProject.exportProjectSource(MWProject.java:820)
         at org.eclipse.persistence.tools.workbench.mappingsplugin.ProjectSourceGenerationCoordinator.exportProjectSource(ProjectSourceGenerationCoordinator.java:81)
         at org.eclipse.persistence.tools.workbench.mappingsplugin.ExportJavaSourceAction.execute(ExportJavaSourceAction.java:44)
         at org.eclipse.persistence.tools.workbench.framework.action.AbstractFrameworkAction.actionPerformed(AbstractFrameworkAction.java:147)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2170)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.AbstractButton.doClick(AbstractButton.java:303)
         at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1052)
         at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1092)
         at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
         at java.awt.Component.processMouseEvent(Component.java:5517)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3136)
         at java.awt.Component.processEvent(Component.java:5282)
         at java.awt.Container.processEvent(Container.java:1967)
         at java.awt.Component.dispatchEventImpl(Component.java:3984)
         at java.awt.Container.dispatchEventImpl(Container.java:2026)
         at java.awt.Component.dispatchEvent(Component.java:3820)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1792)
         at java.awt.Component.dispatchEvent(Component.java:3820)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:158)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:150)
         ... 1 more

    Hi,
    I've added ojdbc6.jar to the classpath. Did not help. Still have got the same error when tried to generate project deployment xml for Oracle10 database.
    I've also tried to set Oracle11 as database platform and generate project deployment xml. I've got the following error:
    Exception [EclipseLink-7042] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.ValidationException
    Exception Description: Database platform class *[org.eclipse.persistence.platform.database.oracle.Oracle11Platform]* not found.
    Internal Exception: java.lang.NoClassDefFoundError: org.eclipse.persistence.platform.database.oracle.Oracle10Platform
    Notice the strange inconsistency in the error above. Different classes appear in the error message.
    Following is stack trace of this error:
    Local Exception Stack:
    Exception [EclipseLink-7042] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.ValidationException
    Exception Description: Database platform class [org.eclipse.persistence.platform.database.oracle.Oracle11Platform] not found.
    Internal Exception: java.lang.NoClassDefFoundError: org.eclipse.persistence.platform.database.oracle.Oracle10Platform
         at org.eclipse.persistence.exceptions.ValidationException.platformClassNotFound(ValidationException.java:1507)
         at org.eclipse.persistence.sessions.DatasourceLogin.setPlatformClassName(DatasourceLogin.java:515)
         at org.eclipse.persistence.tools.workbench.mappingsmodel.db.MWDatabase.buildDeploymentRuntimeDatabaseLogin(MWDatabase.java:834)
         at org.eclipse.persistence.tools.workbench.mappingsmodel.project.relational.MWRelationalProject.buildRuntimeLogin(MWRelationalProject.java:437)
         at org.eclipse.persistence.tools.workbench.mappingsmodel.project.MWProject.buildRuntimeProject(MWProject.java:925)
         at org.eclipse.persistence.tools.workbench.mappingsmodel.project.MWProject.exportDeploymentXML(MWProject.java:800)
         at org.eclipse.persistence.tools.workbench.mappingsplugin.ProjectDeploymentXmlGenerationCoordinator.exportProjectDeploymentXml(ProjectDeploymentXmlGenerationCoordinator.java:59)
         at org.eclipse.persistence.tools.workbench.mappingsplugin.ExportDeploymentXmlAction.execute(ExportDeploymentXmlAction.java:40)
         at org.eclipse.persistence.tools.workbench.framework.action.AbstractFrameworkAction.actionPerformed(AbstractFrameworkAction.java:147)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
         at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
         at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1223)
         at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1264)
         at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
         at java.awt.Component.processMouseEvent(Component.java:6263)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
         at java.awt.Component.processEvent(Component.java:6028)
         at java.awt.Container.processEvent(Container.java:2041)
         at java.awt.Component.dispatchEventImpl(Component.java:4630)
         at java.awt.Container.dispatchEventImpl(Container.java:2099)
         at java.awt.Component.dispatchEvent(Component.java:4460)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
         at java.awt.Container.dispatchEventImpl(Container.java:2085)
         at java.awt.Window.dispatchEventImpl(Window.java:2478)
         at java.awt.Component.dispatchEvent(Component.java:4460)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Caused by: java.lang.NoClassDefFoundError: org.eclipse.persistence.platform.database.oracle.Oracle10Platform
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:247)
         at org.eclipse.persistence.internal.helper.ConversionManager.convertObjectToClass(ConversionManager.java:438)
         at org.eclipse.persistence.internal.helper.ConversionManager.convertObject(ConversionManager.java:141)
         at org.eclipse.persistence.internal.helper.ConversionManager.loadClass(ConversionManager.java:859)
         at org.eclipse.persistence.sessions.DatasourceLogin.setPlatformClassName(DatasourceLogin.java:501)
         ... 35 more

  • Java null pointer exception setting new preferences on a project

    Using thw Warehouse Builder Client 9.0.3 with Oracle 9i 9.0.1, I tried to change the Naming option on the Naming Tab to the "logical name mode". Then i pressed the Ok button and this caused a crash with a Java Null Pointer Exception. At this time, All commands on project generated the same error responce. I shut down the machine, restarted the Oracle Instance and all related services, an as a result, I am not able to re-open no Warehouse Builder project. The system seems to be in an infinite loop while trying to open the currently selected project. Can anybody help me?
    Thanks.
    Marco

    This seems to be a bug. Can you open a TAR on this?
    Regards:
    Igor

  • Java mapping of application triggered an exception

    Hi,
    We have ascenario where a vendor will be sending us a cXML file which has the second line as <!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.009/InvoiceDetail.dtd">. If I open it in XMLSpy, it is saying the file as invalid. XI is unable to map this file. So we decided to remove that line using Java mapping and then do the regular graphical mapping.
    I took the java code from the SAP note 812966 and used the aii_map_api.jar, dom.jar, jaxp-api.jar to create the class of that java file and used that class file by importing that into XI as a jar file.
    I'm getting this error in the request message mapping of SXMB_MONI
    <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>Application</SAP:Category>
      <SAP:Code area="MAPPING">STREAM_TRANSFORMATION_EX</SAP:Code>
      <SAP:P1>mypackage/DeleteDTDDeclarationWithDOM</SAP:P1>
      <SAP:P2>Failed to load resource from the context classloa~</SAP:P2>
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Java mapping of application triggered an exception</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    I'm new to this java mapping, Can you please provide me some details about what files need to be loaded into the XI along with the class file.
    Appreciate you help.
    Thanks,
    MT.

    Hi Prateek,
    Thanks for your quick reply. Yes I have downloaded the aii_map_api.jar from <SAP_install_dir>/<system_name>/<instance_name>/j2ee/cluster/server<number>/apps/sap.com/com.sap.xi.services/
    And also I have compiled my java code using the dom.jar, sax.jar, jaxp-api.jar and aii_map_api.jar.
    I took the class file of my javacode and all the class files of the above mentioned jar files and prepared one single jar file, which I imported into XI.
    It is not allowing me to make a single jar of the actual class file and all the supporting jar files.
    What is the actual method of doing it.
    Appreciate all your help. Thanks very much.
    Thanks,
    Maulik.

  • Java.Lang.NullPoint.Exception in OWB Mapping

    Hello Everybody
    We are building Data Warehouse using OWB Repository 9.2.0.2.0. When we are validating or deploying the created map we are getting Java.Lang.NullPoint.Exception. This leads to blank screen. We are unable to recover the map. Sometimes, synchronization works to recover the map, but not all the times.
    Is there any solution to it?

    Mark
    Is it possible to solve the problem without migrating? I have the details of error as follows --
    java.lang.NullPointerException
    java.lang.NullPointerException
         at oracle.wh.service.impl.mapping.metadata.WBMappingGraphImpl.<init>(WBMappingGraphImpl.java:43)
         at oracle.wh.service.impl.mapping.metadata.WBMappingGraphHelper.createMappingGraph(WBMappingGraphHelper.java:31)
         at oracle.wh.ui.mapping.MappingGraphNew.drawStage(MappingGraphNew.java:2660)
         at oracle.wh.ui.mapping.MappingGraphNew.setStage(MappingGraphNew.java:484)
         at oracle.wh.ui.mapping.MappingEditorCanvas.refresh(MappingEditorCanvas.java:287)
         at oracle.wh.ui.common.WhFolderEditor.refreshCanvas(WhFolderEditor.java:951)
         at oracle.wh.ui.common.WhFolderEditor.refresh(WhFolderEditor.java:604)
         at oracle.wh.ui.common.WhFolderEditor$1$MyRefresh.run(WhFolderEditor.java:424)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:154)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:337)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:131)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:98)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)
    I appreciate your feedback.
    Cheers, Bana

  • Mapping Workbench & JDeveloper

    I am having significant problems working with both the Toplink Mapping Workbench 10g (9.0.4.2 build 040311) and JDeveloper 10g (Version 9.0.5.2 build 1618) on the same project.
    For instance, I created an empty Toplink-enabled Project in JDeveloper. Closed JD and opened the .mwp project from the Workbench. Created some CMP 2.0 Entity EJBs and exported the model java source. Closed WB in order to open JD and add the ejb-jar.xml file to the project, but JB now errored on the .mwp project file. This seems such a basic incompatibility that I’m wondering whether I’m not using the tools the way they are intended.
    What is the recommended way of working with Toplink and JDeveloper? I know that some of the workbench functionality is available within JD, but there seemed to be things that I couldn’t do without the workbench (e.g. export model java source)
    I’d appreciate any advice anyone can give me

    Matthew,
    Switching between the workbench and JDeveloper is not supported at this time. You can however, import a workbench project in JDeveloper by performing manual steps. Please look at the JDeveloper release notes for that information.
    Exporting model java source is not available in JDeveloper since you will always be working with your .java to begin with.
    To get yourself started quickly, you can use POJO from tables (TopLink) wizard in JDeveloper.

  • Using SQL as query type from the mapping workbench

    Hi
    We are upgrading a project from toplink 2.x to 9.03. The old used the java builder syntax for the finders, this is not supported anymore in 9.03. Therefore we need to convert these finders to either EBQL or SQL.
    As our developers here mostly know standard SQL we'll like to use this. But in the toplink doc's we cant find any good examples how to use this. All the examples are also only with EBQL.
    The questions is mostly how do you define the bind parameters in the SQL query string in the workbench.
    select * from user where user.username = ?
    select * from user where user.username = ?1
    select * from user where user.username = #param1
    select * from user where user.username = #param1#
    select * from user where user.username = #1
    select * from user where user.username = #1#
    Any help?
    /Denver

    What do you mean by "The old used the java builder syntax for the finders, this is not supported anymore in 9.03"?
    TopLink still absolutely supports the Java builder syntax! In 9.03 we added Mapping Workbench support but just for EJBQL and SQL for that release -- you can still use the expression builder in code! In the upcoming 9.04 I've seen that you can use the builder syntax in the mapping workbench too!
    - Don

  • Object-XML Binding: How do I map from java to enumerated xml tags

    Hi. I'm new to Object-XML binding and toplink. XML that I'm trying to model in a schema has enumerated elements, e.g. </module_0></module_1><module_n> instead of many </module> elements. To simplify the schema I've opted to use </module> anyway with unbounded cardinality and imported this into a new project.
    What I would like to know is if I can use Toplink to map the java object back to the enumerate element types and vice versa?
    Thanks for your help.
    GeePee

    Hi Geepee,
    Below is an approach you can use if you have a fixed number of moduleX elements. In the example below X=3.
    Assume a 2 object model Root & Module, where Root has a list of Module instances:
    @XmlRootElement(name="root")
    public class Root {
        private List<Module> module = new ArrayList<Module>(3);
        ...// Accessors omitted
    }It is currently not possible to map the items in the module list to the XML elements (module1-module3), but it would be possbile to map an object (see below) with 3 properties to those XML elements:
    public class AdaptedModuleList {
        private Module module1;
        private Module module2;
        private Module module3;
        ...// Accessors omitted
    }What is required is a means to convert the unmappable object to a mappable one. This is done using a Converter:
    import org.eclipse.persistence.mappings.DatabaseMapping;
    import org.eclipse.persistence.mappings.converters.Converter;
    import org.eclipse.persistence.sessions.Session;
    public class ModuleListConverter implements Converter {
        public void initialize(DatabaseMapping mapping, Session session) {}
        public Object convertDataValueToObjectValue(Object dataValue, Session session) {
            AdaptedModuleList adaptedModuleList = (AdaptedModuleList) dataValue;
            if(null == adaptedModuleList) {
                return null;
            List<Module> moduleList = new ArrayList<Module>(3);
            moduleList.add(adaptedModuleList.getModule1());
            moduleList.add(adaptedModuleList.getModule2());
            moduleList.add(adaptedModuleList.getModule3());
            return moduleList;
        public Object convertObjectValueToDataValue(Object objectValue, Session session) {
            List<Module> moduleList = (List<Module>) objectValue;
            if(null == moduleList) {
                return null;
            AdaptedModuleList adaptedModuleList = new AdaptedModuleList();
            int moduleListSize = moduleList.size();
            if(moduleListSize > 0) {
                adaptedModuleList.setModule1(moduleList.get(0));
            if(moduleListSize > 1) {
                adaptedModuleList.setModule2(moduleList.get(1));
            if(moduleListSize > 2) {
                adaptedModuleList.setModule3(moduleList.get(2));
            return adaptedModuleList;
        public boolean isMutable() {
            return true;
    }The converter is added to the mapping metadata through the use of a Customizer:
    import org.eclipse.persistence.config.DescriptorCustomizer;
    import org.eclipse.persistence.descriptors.ClassDescriptor;
    import org.eclipse.persistence.oxm.mappings.XMLCompositeCollectionMapping;
    import org.eclipse.persistence.oxm.mappings.XMLCompositeObjectMapping;
    public class RootCustomizer implements DescriptorCustomizer {
        public void customize(ClassDescriptor descriptor) throws Exception {
            XMLCompositeCollectionMapping originalModuleMapping = (XMLCompositeCollectionMapping) descriptor.removeMappingForAttributeName("module");
            XMLCompositeObjectMapping newModuleMapping = new XMLCompositeObjectMapping();
            newModuleMapping.setAttributeName(originalModuleMapping.getAttributeName());
            newModuleMapping.setXPath(".");
            newModuleMapping.setReferenceClass(AdaptedModuleList.class);
            newModuleMapping.setConverter(new ModuleListConverter());
            descriptor.addMapping(newModuleMapping);
    }Part 1/2

  • Commons-logging breaks mapping workbench

    I'm experimenting with TopLink on a simple project. I have some very simple classes mapped. Reading, saving, deleting them is no problem, so I know I've got it all working properly. However, then I add this to the class:
    private static final Log log = LogFactory.getLog(xxx);
    And when I refresh the class in the mapping workbench, all of that class' members disappear. (That's after I add commons-logging.jar to the project classpath.) I'm using common-logging api with Log4J and TopLink 9.0.3. Thoughts anyone?

    projectFile.createDatabaseSession().readAllObjects(X.class) Is a runtime API, are you now getting the error at runtime? What is the exception and stack trace?
    It sounds like you are missing classes on your classpath that the classes are referencing, or the classes are referencing different versions of the classes. You need to make sure your classpath is setup correctly and your classes are compiled correctly, and all their dependecies are also on the classpath.

  • Vulnerability - Oracle toplink mapping workbench password algorithm

    Could someone from Oracle post security contact info. This is regarding a possible vulnerability in TopLink referred to in this posting:
    http://marc.theaimsgroup.com/?l=bugtraq&m=107531028325112&w=2
    I would like to know Oracle's response to this item before I publish a report to our clients.
    Thanks,
    Mark Hoffman

    It has come to our attention that a 3rd party has published the algorithm used to obfuscate a database password stored in the runtime configuration file (project.xml or java source file) generated by the TopLink Mapping Workbench version 9.0.3.
    This database password is NOT used when TopLink is using an application server’s database connection pool and this issue does not apply. In this case TopLink uses a specified data source name and the application server manages the database password.
    For those not using the app server connection pool, the obfuscation is not meant to offer encryption protection for the password stored in the file. It is a mechanism meant to make the password in the file unreadable to the naked eye. It is not a replacement for proper file permission and access control to protect the file.
    It is an optional convenience feature that customers have requested as they have found it to be useful during development and internal testing. The only way the password is saved in the file is if the option that is explicitly marked “Save Password (Unencrypted)” is used.
    For encrypted security protection using technology such as Java Cryptography Extension (JCE), the unencrypted password can be set using APIs provided in the TopLink runtime libraries. A code example follows:
    boolean shouldLoginSession = false;
    DatabaseSession session = null;
    session = (DatabaseSession)SessionManager.getManager().getSession("MySessionName", shouldLoginSession);
    String password = //retrieve the password as an unencrypted string from somewhere
    session.getLogin().setPassword(password); //note this assumes that the user is already set in the project
    session.login();
    Guidelines:
    1.     If you are using the application server’s database connection pool, this issue does not apply. TopLink simply specifies a data source name and the application server manages, stores and encrypts the password.
    2.     If you are not using the application server’s database connection pool, use the optional Mapping Workbench feature to store the password in the project.xml or java source file for development or internal testing purposes only if there is proper file permission and access control to protect the file.
    3.     For deployment or unsecured development environments utilize the TopLink API’s provided that allow secure password encryption technology to be used.
    This issue only applies to version 9.0.3 and prior; in 9.0.4 the TopLink Mapping Workbench uses JCE to encrypt the file.
    Regards,
    Dennis Leung
    Oracle Corp.

Maybe you are looking for