cannot export java classes

Help
teoteo
2010-11-03
2013-05-13
  • teoteo
    teoteo
    2010-11-03

    hi to all,
    I installed ERMaster in a Helios Eclipse version 3.6 (32 bit), Tomcat7, jdk1.7.

    I have a project.erm to exporting in java source but clicking "OK" nothing matters.

     
  • Lyndon Smith
    Lyndon Smith
    2011-02-13

    Hi

    Same here, the export Java does not appear to work.

    Shame, it looks very nice and light-weight…

     
  • gecko
    gecko
    2011-04-20

    HI,

    I have the same problem and the cause are the template files in the directory java located in the jar file which cannot be found via getResourceAsStream. I tested exporting to java classes with eclipse 3.5, 3.6 and 3.7 Win32 using JDK 1.5  - all end up with the following exception:

    java.lang.ExceptionInInitializerError
    at org.insightech.er.editor.model.dbexport.java.ExportToJavaManager.<clinit>(ExportToJavaManager.java:91)
    at org.insightech.er.editor.view.dialog.dbexport.ExportToJavaDialog.perfomeOK(ExportToJavaDialog.java:133)
    at org.insightech.er.common.dialog.AbstractDialog.buttonPressed(AbstractDialog.java:221)
    at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3910)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
    at org.eclipse.jface.window.Window.open(Window.java:801)
    at org.insightech.er.editor.view.action.dbexport.ExportToJavaAction.execute(ExportToJavaAction.java:34)
    at org.insightech.er.editor.view.action.AbstractBaseAction.runWithEvent(AbstractBaseAction.java:67)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3910)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
    Caused by: java.io.FileNotFoundException: java\template.txt
    at org.insightech.er.editor.model.dbexport.java.ExportToJavaManager.loadResource(ExportToJavaManager.java:219)
    at org.insightech.er.editor.model.dbexport.java.ExportToJavaManager.<clinit>(ExportToJavaManager.java:68)
    … 39 more

    The eclipse versions 3.5 and 3.6 were freshly installed merely containing the ERMaster plugin. Trying to play around changing the eclipse classpath (vmargs) or save the java-template directory in well known directories like %JAVA_HOME%\jre\ext\lib or %JAVA_HOME%\jre\classes or %ECLIPSE_HOME%\plugins have no success.

    Thanks

     
  • gecko
    gecko
    2011-04-20

    Hi again,

    the resource name 'java\template.txt' contains a backslash but Javadoc for getResource() mentions a forward slash:

        /**
         * Finds the resource with the given name.  A resource is some data
         * (images, audio, text, etc) that can be accessed by class code in a way
         * that is independent of the location of the code.
         *
         * <p> The name of a resource is a '<tt>/</tt>'-separated path name that
         * identifies the resource.

         *
         * <p> This method will first search the parent class loader for the
         * resource; if the parent is <tt>null</tt> the path of the class loader
         * built-in to the virtual machine is searched.  That failing, this method
         * will invoke {@link #findResource(String)} to find the resource.  </p>
         *
         * @param  name
         *         The resource name
         *
         * @return  A <tt>URL</tt> object for reading the resource, or
         *          <tt>null</tt> if the resource could not be found or the invoker
         *          doesn't have adequate  privileges to get the resource.
         *
         * @since  1.1
         */
        public URL getResource(String name)

    Thanks

     
  • LiYing
    LiYing
    2011-12-27

    Hi, same problem happened to me.

    I am using Eclipse 3.7(indigo), and ERMaster 1.0.0.v20110821-2153.

    The error message is:

    java.lang.NoClassDefFoundError: Could not initialize class org.insightech.er.editor.model.dbexport.java.ExportToJavaWithProgressManager
    at org.insightech.er.editor.view.dialog.dbexport.ExportToJavaDialog.perfomeOK(ExportToJavaDialog.java:134)
    at org.insightech.er.common.dialog.AbstractDialog.buttonPressed(AbstractDialog.java:221)
    at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
    at org.eclipse.jface.window.Window.open(Window.java:801)
    at org.insightech.er.editor.view.action.dbexport.ExportToJavaAction.execute(ExportToJavaAction.java:34)
    at org.insightech.er.editor.view.action.AbstractBaseAction.runWithEvent(AbstractBaseAction.java:66)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
    at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)

    I checked the content of , found this class file.
    Don't know why it is not loaded successfullly

     
  • LiYing
    LiYing
    2011-12-27

    Hi, guys

    I upgraded to ,

    the exception changed to:

    java.lang.ExceptionInInitializerError
    at org.insightech.er.editor.model.dbexport.java.ExportToJavaManager.<clinit>(ExportToJavaManager.java:91)
    at org.insightech.er.editor.view.dialog.dbexport.ExportToJavaDialog.perfomeOK(ExportToJavaDialog.java:134)
    at org.insightech.er.common.dialog.AbstractDialog.buttonPressed(AbstractDialog.java:221)
    ……
    ……
    Caused by: java.io.FileNotFoundException: java\template.txt
    at org.insightech.er.editor.model.dbexport.java.ExportToJavaManager.loadResource(ExportToJavaManager.java:219)
    at org.insightech.er.editor.model.dbexport.java.ExportToJavaManager.<clinit>(ExportToJavaManager.java:68)
    … 40 more

    same as gkalbrecht has reported.