Jetty
  1. Jetty
  2. JETTY-212

build failures using JDK 1.6 (windows XP)

    Details

    • Type: Improvement Improvement
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.0.0pre0
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows XP - JDK 1.6
    • Number of attachments :
      0

      Description

      Ahh, you're using jdk1.6, I didn't notice that on your previous
      email.

      Someone else has reported build issues with jdk1.6 over on jetty-discuss
      (see thread "Latest sources + JDK 6").

      I know that glassfish (from whence the jsp2.1 source comes) uses a couple
      of special classes for jdk1.6. They may also do some other special stuff
      with a build under jdk1.6 too. So far jetty has only been designed to build
      under 1.5 (with some bits as 1.4).

      Feel free to open an issue for converting the jetty build to support jdk1.6
      and assign it to me and I'll take a look at it. I have to admit up front
      though that it won't be at the top of my to-do list right now.

      regards
      Jan

      Robert Koberg wrote:
      > On Tue, 09 Jan 2007 22:55:38 -0500, Armi Lyn B. Manlosa
      > <amanlosa@webtide.com> wrote:
      >
      >> Hello Robert,
      >>
      >> I did an svn update of jetty just this morning and likewise did an mvn
      >> install on windows xp w/ java build 1.6.0-b105.
      >> It worked fine for me though.. no failures in the tests.
      >
      > Hi,
      >
      > I was doing a mvn clean install. I seem to get build failures quite a bit
      > .
      >
      > One question: As I only use jetty for servlets/filters, is there a way to
      > build only what is necessary to test/run those? I am not familiar with
      > maven - is there a 'target' or some similar thing?
      >
      > But, I just updated from SVN, removed everything from my user's
      > .m2/repository. I have nothing on my classpath before running the build.
      > One strange thing is I had to remove the modules/servlet-api-2.5 directory
      > and update again to get it back. Now I get a different build failure
      > (other than alot of warnings about using xerces/xalan com.sun... packages)
      > on what looks like compiling the jsp api - not sure though:
      >
      > extract-src:
      > [INFO] Executed tasks
      > [INFO] Registering compile source root
      > c:\workspace\Jetty_6\modules\jsp-api-2.1\target\generated-sources\main\java
      > [INFO] [resources:resources]
      > [INFO] Using default encoding to copy filtered resources.
      > [INFO] [compiler:compile]
      > Compiling 226 source files to
      > c:\workspace\Jetty_6\modules\jsp-api-2.1\target\classes
      > [INFO]
      > ------------------------------------------------------------------------
      > [ERROR] BUILD FAILURE
      > [INFO]
      > ------------------------------------------------------------------------
      > [INFO] Compilation failure
      >
      > When running maven with '-e' switch I get this stacktrace (don't think it
      > is too helpful...):
      > [INFO]
      > ------------------------------------------------------------------------
      > [INFO] Trace
      > org.apache.maven.BuildFailureException: Compilation failure
      > at
      > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:555)
      > at
      > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:
      > 5)
      > at
      > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
      > at
      > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.j
      > a:306)
      > at
      > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
      > at
      > org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
      > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
      > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
      > at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
      > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      > at
      > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      > at
      > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      > at java.lang.reflect.Method.invoke(Method.java:597)
      > at
      > org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
      > at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
      > at
      > org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
      > at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
      > Caused by: org.apache.maven.plugin.CompilationFailureException:
      > Compilation failure
      > at
      > org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:505)
      > at
      > org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:111)
      > at
      > org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
      > at
      > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
      > ... 16 more
      >
      > thanks,
      > -Rob
      >
      >
      >> It would be good if you could provide some more details on what you did
      >> if the same failure still occurs for you.
      >>
      >> Best regards,
      >> Armi
      >>
      >> Robert Koberg wrote:
      >>> Hi,
      >>>
      >>> Using the latest Jetty from SVN on Windows XP with JDK build
      >>> 1.6.0-b105, I
      >>> am getting a build error:
      >>>
      >>> Running org.mortbay.jetty.SelectChannelServerTest
      >>> 2007-01-09 04:02:29.109::INFO: jetty-6.1.x
      >>> 2007-01-09 04:02:29.328::INFO: Started SelectChannelConnector @
      >>> 0.0.0.0:1047
      >>> 2007-01-09 04:02:30.671::INFO: jetty-6.1.x
      >>> 2007-01-09 04:02:30.671::INFO: Started SelectChannelConnector @
      >>> 0.0.0.0:1051
      >>> 2007-01-09 04:02:30.968::INFO: jetty-6.1.x
      >>> 2007-01-09 04:02:30.968::INFO: Started SelectChannelConnector @
      >>> 0.0.0.0:1056
      >>> 2007-01-09 04:02:31.250::INFO: jetty-6.1.x
      >>> 2007-01-09 04:02:31.250::INFO: Started SelectChannelConnector @
      >>> 0.0.0.0:1060
      >>> 2007-01-09 04:02:31.531::INFO: jetty-6.1.x
      >>> 2007-01-09 04:02:31.531::INFO: Started SelectChannelConnector @
      >>> 0.0.0.0:1086
      >>> 2007-01-09 04:02:32.234::INFO: jetty-6.1.x
      >>> 2007-01-09 04:02:32.234::INFO: Started SelectChannelConnector @
      >>> 0.0.0.0:1109
      >>> 2007-01-09 04:02:34.234::INFO: jetty-6.1.x
      >>> 2007-01-09 04:02:34.234::INFO: Started SelectChannelConnector @
      >>> 0.0.0.0:1239
      >>> 2007-01-09 04:02:34.562::INFO: jetty-6.1.x
      >>> 2007-01-09 04:02:34.562::INFO: Started SelectChannelConnector @
      >>> 0.0.0.0:1246
      >>> Tests run: 8, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 6.562
      >>> sec
      >>> <<< FAILURE!
      >>>

        Issue Links

          Activity

          Hide
          Leopoldo Agdeppa III added a comment -

          david has started working on this issue

          Show
          Leopoldo Agdeppa III added a comment - david has started working on this issue
          Hide
          David Yu added a comment -

          java 1.6 compiler didn't allow compiling the javax.* classes (servelt-api and jsp-api modules).
          if servlet-api and jsp-api are treated as a dependency rather than a module, the project will be built normally.

          Show
          David Yu added a comment - java 1.6 compiler didn't allow compiling the javax.* classes (servelt-api and jsp-api modules). if servlet-api and jsp-api are treated as a dependency rather than a module, the project will be built normally.
          Hide
          Leopoldo Agdeppa III added a comment -

          dyu, I suggest that you put an activation profile for the parent pom, if its < 1.6 then, include the servelt and jsp modules, if its = 1.6 then exclude then servlet and jsp, then add it to dependency

          Show
          Leopoldo Agdeppa III added a comment - dyu, I suggest that you put an activation profile for the parent pom, if its < 1.6 then, include the servelt and jsp modules, if its = 1.6 then exclude then servlet and jsp, then add it to dependency
          Hide
          Jan Bartel added a comment -

          David,

          Can you take a look at this? Also, can you look into ensuring the jetty maven plugin works under jdk1.6?

          thanks
          Jan

          Show
          Jan Bartel added a comment - David, Can you take a look at this? Also, can you look into ensuring the jetty maven plugin works under jdk1.6? thanks Jan
          Hide
          Jan Bartel added a comment -

          Resolved with jetty trunk svn rev 2612.

          The jdk1.6 libs have changed some apis, and the compiler now generates warnings for the use of some classes in com.sun package, which the glassfish jsp impl relies on. The fix was to patch the classes to implement the new apis, and to suppress the warnings from the compiler, because the maven compiler plugin (v2.0.2) was choking on them.

          Jan

          Show
          Jan Bartel added a comment - Resolved with jetty trunk svn rev 2612. The jdk1.6 libs have changed some apis, and the compiler now generates warnings for the use of some classes in com.sun package, which the glassfish jsp impl relies on. The fix was to patch the classes to implement the new apis, and to suppress the warnings from the compiler, because the maven compiler plugin (v2.0.2) was choking on them. Jan

            People

            • Assignee:
              David Yu
              Reporter:
              Rob Koberg
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: