Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] WebAppContext only produces "HTTP ERROR: 503"

The message here ...

--(snip)--
log4j:WARN No appenders could be found for logger (DataNucleus.ClassLoading).
log4j:WARN Please initialize the log4j system properly.
--(snip)--

Tells us that you have some DataNucleus classes that are emitting log4j logging events.
Yet, you do not have a log4j configuration in place telling the log4j library what to do with those logging events.
That message is created by log4j itself telling you that there's no configuration for it found by log4j itself.

- Joakim

On Thu, Mar 4, 2010 at 4:27 PM, Keith Lea <keithl@xxxxxxxxx> wrote:
Hi, I'm new to jetty and am using version 7.0.1.v20091125, using JDK 1.5.0_22 32bit on Windows 7. I've tried this both with the eclipse jetty and the hightide jetty. I can't get WebAppContext to work at all! 

Here's my code:

    public static void main(String[] args) throws Exception {
        Server server = new Server(8081);

        WebAppContext context = new WebAppContext();
        context.setWar("C:/Users/Keith/Code/Libraries/jetty-distribution-7.0.1.v20091125/webapps/test.war");
        context.setContextPath("/");
        context.setParentLoaderPriority(true);
        server.setHandler(context);
        System.out.println(server.dump());
        server.start();
        System.out.println("Server started: " + server.dump());
        Thread.sleep(5000);
        System.out.println(server.dump());
    }

Running jetty from the command line using start.jar works fine, I see the demo at localhost:8080. However, when I run this code

I also can't get any logging to show up! I am running with -DDEBUG=true -DVERBOSE=true
I also can't find any jetty source code distribution so I could step through the code to find out what's wrong! Does this exist or do I need to check out from svn and build myself?

Here's the output. Can anyone tell me what is going wrong?? Thanks!

log4j:WARN No appenders could be found for logger (DataNucleus.ClassLoading).
log4j:WARN Please initialize the log4j system properly.
[edu.umd.cs.findbugs.flybush.local.Thing@161509b]
org.eclipse.jetty.server.Server@143073a STOPPED
 +-WebAppContext@6c2a78@6c2a78/,null,C:/Users/Keith/Code/Libraries/jetty-distribution-7.0.1.v20091125/webapps/test.war STOPPED
    +-null

Server started: org.eclipse.jetty.server.Server@143073a started
 +-WebAppContext@6c2a78@6c2a78/,file:/C:/temp/Jetty_0_0_0_0_8081_test.war____.m7loam/webapp/,C:/Users/Keith/Code/Libraries/jetty-distribution-7.0.1.v20091125/webapps/test.war started
    +-SessionHandler@1705316 STOPPED
       +-ConstraintSecurityHandler@4d6b1a STOPPED
          +-ServletHandler@15ee9e3 STOPPED
             +-null
             +-[/*]/[]==0=>QoSFilter
             +-[/dump/*]/[]==0=>MultiPart
             +-[/*]/[]==0=>GzipFilter
             +-[/]=>default
             +-[*.jsp, *.jspf, *.jspx, *.xsp, *.JSP, *.JSPF, *.JSPX, *.XSP]=>jsp
             +-[/hello/*]=>Hello
             +-[/dump/*, *.dump]=>Dump
             +-[/session/*]=>Session
             +-[/cookie/*]=>Cookie
             +-[/dispatch/*]=>Dispatch
             +-[/cgi-bin/*]=>CGI
             +-[/chat/*]=>Chat
             +-[/ws/*]=>WSChat
             +-[/rewritten/*, /redirected/*]=>Rewrite
             +-[/secureMode/*]=>SecureMode
             +-[/google/*]=>TransparentProxy
          +=roles=[user, admin]
          +=/auth/relax.txt={HEAD={RoleInfo[]}, GET={RoleInfo[]}}
          +=/={TRACE={RoleInfo,F,C[]}}
          +=/dump/auth/*={null={RoleInfo,C[user, admin]}}
          +=/auth/*={null={RoleInfo,F,C[]}}
          +=/dump/auth/admin/*={null={RoleInfo,C[admin]}}
          +=/dump/auth/noaccess/*={null={RoleInfo,F,C[]}}
          +=/dump/auth/ssl/*={null={RoleInfo[]}}
          +=/dump/auth/relax/*={HEAD={RoleInfo[]}, GET={RoleInfo[]}}
          +=*.htm={null={RoleInfo,C[user, admin]}}

org.eclipse.jetty.server.Server@143073a started
 +-WebAppContext@6c2a78@6c2a78/,file:/C:/temp/Jetty_0_0_0_0_8081_test.war____.m7loam/webapp/,C:/Users/Keith/Code/Libraries/jetty-distribution-7.0.1.v20091125/webapps/test.war started
    +-SessionHandler@1705316 STOPPED
       +-ConstraintSecurityHandler@4d6b1a STOPPED
          +-ServletHandler@15ee9e3 STOPPED
             +-null
             +-[/*]/[]==0=>QoSFilter
             +-[/dump/*]/[]==0=>MultiPart
             +-[/*]/[]==0=>GzipFilter
             +-[/]=>default
             +-[*.jsp, *.jspf, *.jspx, *.xsp, *.JSP, *.JSPF, *.JSPX, *.XSP]=>jsp
             +-[/hello/*]=>Hello
             +-[/dump/*, *.dump]=>Dump
             +-[/session/*]=>Session
             +-[/cookie/*]=>Cookie
             +-[/dispatch/*]=>Dispatch
             +-[/cgi-bin/*]=>CGI
             +-[/chat/*]=>Chat
             +-[/ws/*]=>WSChat
             +-[/rewritten/*, /redirected/*]=>Rewrite
             +-[/secureMode/*]=>SecureMode
             +-[/google/*]=>TransparentProxy
          +=roles=[user, admin]
          +=/auth/relax.txt={HEAD={RoleInfo[]}, GET={RoleInfo[]}}
          +=/={TRACE={RoleInfo,F,C[]}}
          +=/dump/auth/*={null={RoleInfo,C[user, admin]}}
          +=/auth/*={null={RoleInfo,F,C[]}}
          +=/dump/auth/admin/*={null={RoleInfo,C[admin]}}
          +=/dump/auth/noaccess/*={null={RoleInfo,F,C[]}}
          +=/dump/auth/ssl/*={null={RoleInfo[]}}
          +=/dump/auth/relax/*={HEAD={RoleInfo[]}, GET={RoleInfo[]}}
          +=*.htm={null={RoleInfo,C[user, admin]}}


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



Back to the top