Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-1701

REST resource generation fails when DTOs are generated

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.4.1.Final
    • 2.3.0.Final
    • Java EE
    • None

      The following stacktrace was reported, thanks to rhn-support-ggastald :

      org.jboss.forge.addon.resource.ResourceException: cannot obtain stream to file: file does not exist: /usr/local/runtime-EclipseApplication/demo/src/main/java/java/lang/Long.java
      at org.jboss.forge.addon.resource.AbstractFileResource.getResourceInputStream(AbstractFileResource.java:64)
      at org.jboss.forge.addon.parser.java.resources.JavaResourceImpl.getJavaSource(JavaResourceImpl.java:137)
      at org.jboss.forge.addon.javaee.rest.generator.impl.RootAndNestedDTOResourceGenerator.tryGetJavaClass(RootAndNestedDTOResourceGenerator.java:263)
      at org.jboss.forge.addon.javaee.rest.generator.impl.RootAndNestedDTOResourceGenerator.generatedDTOGraphForEntity(RootAndNestedDTOResourceGenerator.java:155)
      at org.jboss.forge.addon.javaee.rest.generator.impl.RootAndNestedDTOResourceGenerator.from(RootAndNestedDTOResourceGenerator.java:122)
      at org.jboss.forge.addon.javaee.rest.generator.impl.RootAndNestedDTOResourceGenerator.generateFrom(RootAndNestedDTOResourceGenerator.java:79)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor$1.call(ClassLoaderInterceptor.java:59)
      at org.jboss.forge.furnace.util.ClassLoaders.executeIn(ClassLoaders.java:34)
      at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor.invoke(ClassLoaderInterceptor.java:75)
      at org.jboss.forge.addon.javaee.rest.generator.impl.RootAndNestedDTOResourceGenerator_$$_javassist_a678dfaa-6e4f-4280-932e-3795b0ce00e6.generateFrom(RootAndNestedDTOResourceGenerator_$$_javassist_a678dfaa-6e4f-4280-932e-3795b0ce00e6.java)
      at org.jboss.forge.addon.angularjs.JSONRestResourceFromEntityCommand.generateEndpoints(JSONRestResourceFromEntityCommand.java:172)
      at org.jboss.forge.addon.angularjs.JSONRestResourceFromEntityCommand.execute(JSONRestResourceFromEntityCommand.java:152)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor$1.call(ClassLoaderInterceptor.java:59)
      at org.jboss.forge.furnace.util.ClassLoaders.executeIn(ClassLoaders.java:34)
      at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor.invoke(ClassLoaderInterceptor.java:75)
      at org.jboss.forge.addon.angularjs.JSONRestResourceFromEntityCommand_$$_javassist_a6b7e273-40a1-4e58-a962-0763efc91c66.execute(JSONRestResourceFromEntityCommand_$$_javassist_a6b7e273-40a1-4e58-a962-0763efc91c66.java)
      at org.jboss.forge.addon.ui.impl.controller.WizardCommandControllerImpl.execute(WizardCommandControllerImpl.java:153)
      at org.jboss.forge.addon.ui.impl.controller.NoUIWizardControllerDecorator.execute(NoUIWizardControllerDecorator.java:152)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.jboss.forge.furnace.proxy.ClassLoaderAdapterCallback$1.call(ClassLoaderAdapterCallback.java:98)
      at org.jboss.forge.furnace.util.ClassLoaders.executeIn(ClassLoaders.java:34)
      at org.jboss.forge.furnace.proxy.ClassLoaderAdapterCallback.invoke(ClassLoaderAdapterCallback.java:71)
      at org.jboss.forge.addon.ui.controller.CommandController_$$_javassist_37cdcaa4-3435-413b-ab19-8e252a2922fd.execute(CommandController_$$_javassist_37cdcaa4-3435-413b-ab19-8e252a2922fd.java)
      at org.jboss.tools.forge.ui.ext.wizards.ForgeWizard$1.run(ForgeWizard.java:86)
      at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
      

      We should probably handle or swallow the ResourceException instead of letting it bubble up.

              vineet.reynolds_jira Vineet Reynolds (Inactive)
              vineet.reynolds_jira Vineet Reynolds (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: