eclipse-ee4j / glassfish

Eclipse GlassFish
https://eclipse-ee4j.github.io/glassfish/
385 stars 143 forks source link

SDK sample, servletcontainerinitializer-war, fails to run #18093

Closed glassfishrobot closed 12 years ago

glassfishrobot commented 12 years ago

After installing and configuring $S1AS_HOME/samples/bp-project/build.properties file to point to the correct location of the GlassFish libraries, using the SDK build. An attempt to run the $S1AS_HOME/samples/javaee6/web/servlet/servletcontainerinitializer-war, fails with the following error:

stop-domain: [echo] Stopping default domain for /home/sqe/workspace/glassfish3/glassfish [exec] Waiting for the domain to stop ... [exec] Command stop-domain executed successfully. [javac] Compiling 1 source file to /home/sqe/workspace/glassfish3/glassfish/samples/javaee6/web/servlet/servletcontainerinitializer-war/containerinitializerlibrary/build [javac] /home/sqe/workspace/glassfish3/glassfish/samples/javaee6/web/servlet/servletcontainerinitializer-war/containerinitializerlibrary/src/web/servlet/servletcontainerinitializer_lib/SharedLibrary.java:44: package javax.servlet does not exist [javac] import javax.servlet.; [javac] ^ [javac] /home/sqe/workspace/glassfish3/glassfish/samples/javaee6/web/servlet/servletcontainerinitializer-war/containerinitializerlibrary/src/web/servlet/servletcontainerinitializer_lib/SharedLibrary.java:45: package javax.servlet.annotation does not exist [javac] import javax.servlet.annotation.; [javac] ^ [javac] /home/sqe/workspace/glassfish3/glassfish/samples/javaee6/web/servlet/servletcontainerinitializer-war/containerinitializerlibrary/src/web/servlet/servletcontainerinitializer_lib/SharedLibrary.java:48: cannot find symbol [javac] symbol: class ServletContainerInitializer [javac] public class SharedLibrary implements ServletContainerInitializer { [javac] ^ [javac] /home/sqe/workspace/glassfish3/glassfish/samples/javaee6/web/servlet/servletcontainerinitializer-war/containerinitializerlibrary/src/web/servlet/servletcontainerinitializer_lib/SharedLibrary.java:47: cannot find symbol [javac] symbol: class HandlesTypes [javac] @HandlesTypes(WebServlet.class) [javac] ^ [javac] /home/sqe/workspace/glassfish3/glassfish/samples/javaee6/web/servlet/servletcontainerinitializer-war/containerinitializerlibrary/src/web/servlet/servletcontainerinitializer_lib/SharedLibrary.java:50: cannot find symbol [javac] symbol : class ServletContext [javac] location: class web.servlet.servletcontainerinitializer_lib.SharedLibrary [javac] public void onStartup(Set<Class<?>> c, ServletContext ctx) { [javac] ^ [javac] 5 errors

BUILD FAILED

The exact commands executed were:

glassfishrobot commented 6 years ago
glassfishrobot commented 12 years ago

@glassfishrobot Commented scatari said: Please make sure that /glassfish/lib/javaee.jar is included in the CLASSPATH as a workaround. We will scan our samples scripts to see if this is done.

glassfishrobot commented 12 years ago

@glassfishrobot Commented ap2257 said: It would be interesting to know why this is happening as the (Hudson) test scripts have worked with all previous releases (3.1.1) and builds (b13). I will use the suggested workaround as a temporary solution until a decision or conclusion is made.

glassfishrobot commented 12 years ago

@glassfishrobot Commented ap2257 said: Seeing the same problem on the Web SDK distribution (javaee_sdk_6u4-web-b16-jdk7-solarix-x86.sh) with this sample. The suggested workaround resolves the "run" issue.

glassfishrobot commented 12 years ago

@glassfishrobot Commented ap2257 said: Not sure what excluding the issue on 3.1.2 means. Did you scan the samples? Do I need to apply the workaround as a the solution to this issue? Please advise.

glassfishrobot commented 12 years ago

@glassfishrobot Commented @romain-grecourt said: For the being I'm not sure I'll have time to fix this (I've reproduced the issue, but I've not investigated the right fix yet). Let me talk to Sathyan to see if we can do this for 3.1.2.

glassfishrobot commented 12 years ago

@glassfishrobot Commented @romain-grecourt said: The cause of this issue is the following:

<javac srcdir="./containerinitializerlibrary/src"
destdir="./containerinitializerlibrary/build"
classpath="${javaee.home}/modules/javax.servlet.jar"
debug="on"
failonerror="true"/>

javax.servlet.jar no more exists, it has been renamed to "javax.servlet-api.jar".

glassfishrobot commented 12 years ago

@glassfishrobot Commented @romain-grecourt said: What is the impact on the customer of the bug?

User following instructions will not be able to run the sample.

What is the cost/risk of fixing the bug? The fix is very simple (a har was renamed).

Is there an impact on documentation or message strings? No.

Which tests should QA (re)run to verify the fix did not destabilize GlassFish? Try to run the sample again.

Which is the targeted build of 3.1.2 for this fix? b20.

glassfishrobot commented 7 years ago

@glassfishrobot Commented This issue was imported from java.net JIRA GLASSFISH-18093

glassfishrobot commented 12 years ago

@glassfishrobot Commented Reported by ap2257

glassfishrobot commented 12 years ago

@glassfishrobot Commented Marked as fixed on Wednesday, February 1st 2012, 8:03:42 am