Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Re: error while building jetty 8 from svn

Pieter,

I've tested all the glassfish samples and they're all
working fine with head of jetty-8.

You may notice an exception with the async chat app if you
close the page or browse way. This is due to this code
in the chat app:

for (AsyncContext ac : queue) {
    try {
         PrintWriter acWriter = ac.getResponse().getWriter();
         acWriter.println(cMessage);
         acWriter.flush();
    } catch(IOException ex) {
      System.out.println(ex);
      queue.remove(ac);
    }
 }

This code tries to write the async context representing the
closed connection and discovers that the connection has
been closed. Note that PrintWriter specifically cannot
throw IOException, so the try/catch statement in this
code is a bit pointless. It would have been more correct
to do the println() and then call checkError() to see if
the println succeeded or not.

Now, the other factor at play - and the reason you can see
an exception - is that Jetty actually throws an
UncheckedIOException which is a RuntimeException when
the PrintWriter implementation encounters an error. We
do this for the very reason that 99% of people just don't
check the error on PrintWriter IO operations.  I think
perhaps we need to make the throwing of the UncheckedIOException
configurable, so I've raised this issue for it:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=318551

Thanks for pointing out the javaee RI sample apps, it
was quite illustrative running them, I fixed up a few
little problems they revealed.

cheers
Jan

On 23/06/10 19:09, Pieter Libin wrote:
Dear Jan,

Are you also working on the servlet 3.0 async code?
Since running the glassfish chat example
(http://blogs.sun.com/enterprisetechtips/entry/asynchronous_support_in_servlet_3)
doesn't seem to work.

Kind regards,

Pieter

On Wed, Jun 23, 2010 at 3:06 AM, Jan Bartel <janb@xxxxxxxxxxx
<mailto:janb@xxxxxxxxxxx>> wrote:

    Pieter,

    Thanks for that! I've updated the jetty-8 repo.

    Just a word of warning - I'm doing a lot of refactoring work in the
    jetty-webapp and jetty-annotation modules, so things might be a little
    unstable for a day or two.

    cheers
    Jan

    Pieter Libin wrote:

        Dear all,

        after changing tests/test-loginservice/pom.xml

        - <version>7.1.5-SNAPSHOT</version>
        + <version>8.0.0.M1-SNAPSHOT</version>


        and removing <module>jetty-jsp-2.1</module> from the main pom.xml,

        the build seems to work fine again.

        Kind regards,

        Pieter


        On Mon, Jun 21, 2010 at 11:48 AM, Pieter Libin
        <pieter.libin@xxxxxxxxx <mailto:pieter.libin@xxxxxxxxx>
        <mailto:pieter.libin@xxxxxxxxx <mailto:pieter.libin@xxxxxxxxx>>>
        wrote:

            Dear all,

            after checking out Jetty 8 from svn

          (http://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/branches/jetty-8),
            I try to build it using mvn install (mvn 2.2.0).
            This returns the following exception:

            org.apache.maven.reactor.MavenExecutionException: Cannot find
            parent: org.eclipse.jetty:jetty-project for project:
            null:jetty-jsp-2.1:jar:null for project
        null:jetty-jsp-2.1:jar:null
                at
        org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:404)
                at
        org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:272)
                at
        org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
                at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
                at

          org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
                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.project.ProjectBuildingException: Cannot
            find parent: org.eclipse.jetty:jetty-project for project:
            null:jetty-jsp-2.1:jar:null for project
        null:jetty-jsp-2.1:jar:null
                at

          org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1396)
                at

          org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:823)
                at

          org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:508)
                at

          org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:200)
                at
        org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:604)
                at

          org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:487)
                at

          org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:560)
                at
        org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:391)
                ... 12 more
            Caused by:
        org.apache.maven.project.ProjectBuildingException: POM
        'org.eclipse.jetty:jetty-project' not found in repository: Unable to
            download the artifact from any repository

              org.eclipse.jetty:jetty-project:pom:7.1.5-SNAPSHOT

            from the specified remote repositories:
              central (http://repo1.maven.org/maven2)

             for project org.eclipse.jetty:jetty-project
                at

          org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:605)
                at

          org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1392)
                ... 19 more
            Caused by:

          org.apache.maven.artifact.resolver.ArtifactNotFoundException:
        Unable
            to download the artifact from any repository

              org.eclipse.jetty:jetty-project:pom:7.1.5-SNAPSHOT

            from the specified remote repositories:
              central (http://repo1.maven.org/maven2)


                at

          org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:228)
                at

          org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:90)
                at

          org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:558)
                ... 20 more
            Caused by: org.apache.maven.wagon.ResourceDoesNotExistException:
            Unable to download the artifact from any repository
                at

          org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWagonManager.java:404)
                at

          org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:216)
                ... 22 more



        ------------------------------------------------------------------------

        _______________________________________________
        jetty-users mailing list
        jetty-users@xxxxxxxxxxx <mailto:jetty-users@xxxxxxxxxxx>
        https://dev.eclipse.org/mailman/listinfo/jetty-users


    --
    Jan Bartel, Webtide LLC | janb@xxxxxxxxxxx <mailto:janb@xxxxxxxxxxx>
    | http://www.webtide.com
    _______________________________________________
    jetty-users mailing list
    jetty-users@xxxxxxxxxxx <mailto:jetty-users@xxxxxxxxxxx>
    https://dev.eclipse.org/mailman/listinfo/jetty-users



--
Jan Bartel, Webtide LLC | janb@xxxxxxxxxxx | http://www.webtide.com


Back to the top