glassfish
  1. glassfish
  2. GLASSFISH-10520

SDK6:Rest:managed-beans-war:failed to build/run with NB6.8

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: V3
    • Fix Version/s: V3
    • Component/s: sample_apps
    • Labels:
      None
    • Environment:

      Operating System: Windows XP
      Platform: PC

    • Issuezilla Id:
      10,520

      Description

      import com.sun.jersey.spi.resource.Singleton library missing when build tthe
      project with NB6.8

      Steps To Reproduce:
      1. Download and install SDK6, b68 build with jdk1.6.0_16 (eg, winXP) from
      http://javaweb.sfbay/java/re/glassfish/v3/promoted/fcs/b68/archive/bundles/java_ee_sdk-6-b24-windows.exe
      2. Install NB6.8 beta
      3. Configure build.properties file accordingly
      4. Start domain1 and Derby database
      5. Start the IDE -> open the rest/managed-bean-war project
      Note:
      Some indication that in managedBeanSingletonResouce.java file that
      "Singleton" library was missing
      6. Select "Build target" to build the project

      BUG:
      init:
      deps-module-jar:
      deps-ear-jar:
      deps-jar:
      Created dir:
      E:\sun\SDK6-b68\glassfish\samples\javaee6\rest\managed-beans-war\build\web\WEB-INF\classes
      Copying 3 files to
      E:\sun\SDK6-b68\glassfish\samples\javaee6\rest\managed-beans-war\build\web
      library-inclusion-in-archive:
      library-inclusion-in-manifest:
      Created dir:
      E:\sun\SDK6-b68\glassfish\samples\javaee6\rest\managed-beans-war\build\empty
      Compiling 2 source files to
      E:\sun\SDK6-b68\glassfish\samples\javaee6\rest\managed-beans-war\build\web\WEB-INF\classes
      E:\sun\SDK6-b68\glassfish\samples\javaee6\rest\managed-beans-war\src\java\enterprise\managedbeans\resources\ManagedBeanSingletonResource.java:40:
      package com.sun.jersey.spi.resource does not exist
      import com.sun.jersey.spi.resource.Singleton;
      E:\sun\SDK6-b68\glassfish\samples\javaee6\rest\managed-beans-war\src\java\enterprise\managedbeans\resources\ManagedBeanSingletonResource.java:54:
      cannot find symbol
      symbol: class Singleton
      @Singleton
      2 errors
      E:\sun\SDK6-b68\glassfish\samples\javaee6\rest\managed-beans-war\nbproject\build-impl.xml:403:
      The following error occurred while executing this line:
      E:\sun\SDK6-b68\glassfish\samples\javaee6\rest\managed-beans-war\nbproject\build-impl.xml:226:
      Compile failed; see the compiler error output for details.
      BUILD FAILED (total time: 0 seconds)

        Activity

        Hide
        msreddy added a comment -

        request Pave;'s help

        Show
        msreddy added a comment - request Pave;'s help
        Hide
        Pavel Bucek added a comment -

        what exactly is java_ee_sdk? I don't test my sample with it, I use "regular"
        glassfish (try
        http://javaweb.sfbay/java/re/glassfish/v3/promoted/fcs/b68/archive/bundles/glassfish-v3-b68-windows.exe
        please).

        And about that error - it seems like jersey is not integrated into java_ee_sdk
        or there is some problem with locating dependencies for that sample..

        Show
        Pavel Bucek added a comment - what exactly is java_ee_sdk? I don't test my sample with it, I use "regular" glassfish (try http://javaweb.sfbay/java/re/glassfish/v3/promoted/fcs/b68/archive/bundles/glassfish-v3-b68-windows.exe please). And about that error - it seems like jersey is not integrated into java_ee_sdk or there is some problem with locating dependencies for that sample..
        Hide
        vince kraemer added a comment -

        I took a look at this issue, to see what might be wrong.

        It looks like you expect to have the jar that contains com.sun.jersey.spi.resource.Singleton on the
        classpath to compile this project. I found it in this jar (glassfish/modules/jersey-gf-bundle.jar) but I do
        not know if that is the right jar to reference.

        Please let me know, since I will probably need to update the GF integration for NetBeans to address this...
        but I have to hear from you about the correct jar file to use...

        Show
        vince kraemer added a comment - I took a look at this issue, to see what might be wrong. It looks like you expect to have the jar that contains com.sun.jersey.spi.resource.Singleton on the classpath to compile this project. I found it in this jar (glassfish/modules/jersey-gf-bundle.jar) but I do not know if that is the right jar to reference. Please let me know, since I will probably need to update the GF integration for NetBeans to address this... but I have to hear from you about the correct jar file to use...
        Hide
        Pavel Bucek added a comment -

        Yes, this is correct, I expect jersey-gf-bundle.jar to be on classpath. Actually
        I'm pretty sure that this is a common expectation in all samples - and not only
        this jar, whole glassfish/modules directory..

        Show
        Pavel Bucek added a comment - Yes, this is correct, I expect jersey-gf-bundle.jar to be on classpath. Actually I'm pretty sure that this is a common expectation in all samples - and not only this jar, whole glassfish/modules directory..
        Hide
        vince kraemer added a comment -

        integrated fix.

        Show
        vince kraemer added a comment - integrated fix.
        Show
        vince kraemer added a comment - https://glassfish-samples.dev.java.net/servlets/ReadMsg?list=cvs&msgNo=1399

          People

          • Assignee:
            vince kraemer
            Reporter:
            davisn
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: