Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-11379

Failed to build or refresh the JAX-RS metamodel message while editiing package-info.java

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.3.0.Beta2
    • 3.3.0.Beta1
    • webservices
    • None
    • Hide

      1. Create JPA Project, add HB4 libraries
      2. add package-info.java
      3. edit file
      @TypeDefs({
      @TypeDef(Name="addr",
      typeClass=test.pack.AddressTypeDescriptor.class,
      defaultForType=test.pack.AddressType.class,
      parameters = @Parameter(name = "pp", value = "bb")),
      @TypeDef(name="intt", typeClass=test.pack.IntTypeDescriptor.class, defaultForType=int.class)
      })
      @GenericGenerator(name="gg1",stragety="hillo")
      @NamedQuery(name = "hibNamed")
      package test.pack
      import org.hibernate.annotations.*;

      Show
      1. Create JPA Project, add HB4 libraries 2. add package-info.java 3. edit file @TypeDefs({ @TypeDef(Name="addr", typeClass=test.pack.AddressTypeDescriptor.class, defaultForType=test.pack.AddressType.class, parameters = @Parameter(name = "pp", value = "bb")), @TypeDef(name="intt", typeClass=test.pack.IntTypeDescriptor.class, defaultForType=int.class) }) @GenericGenerator(name="gg1",stragety="hillo") @NamedQuery(name = "hibNamed") package test.pack import org.hibernate.annotations.*;

      java.lang.ClassCastException: org.eclipse.jdt.internal.core.PackageDeclaration cannot be cast to org.eclipse.jdt.core.IMember
      at org.jboss.tools.ws.jaxrs.core.jdt.JdtUtils.getCompilationUnit(JdtUtils.java:93)
      at org.jboss.tools.ws.jaxrs.core.jdt.JdtUtils.isWorkingCopy(JdtUtils.java:157)
      at org.jboss.tools.ws.jaxrs.core.internal.metamodel.builder.JavaElementDeltaFilter.apply(JavaElementDeltaFilter.java:132)
      at org.jboss.tools.ws.jaxrs.core.internal.metamodel.builder.JavaElementDeltaScanner.scanDelta(JavaElementDeltaScanner.java:136)
      at org.jboss.tools.ws.jaxrs.core.internal.metamodel.builder.JavaElementDeltaScanner.scanAndFilterEvent(JavaElementDeltaScanner.java:71)
      at org.jboss.tools.ws.jaxrs.core.internal.metamodel.builder.JaxrsMetamodelBuildJob.run(JaxrsMetamodelBuildJob.java:51)
      at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

              xcoulon@redhat.com Xavier Coulon
              jpeterka_jira Jiri Peterka (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: