Re: [jetty-user] NullPointerException at XmlConfiguration$1.run(XmlConfiguration.java:1138) in jetty-8.0.4.v20111024

Jan Bartel <[email protected]> Thu, 3 Nov 2011 13:57:33 +1100
Newsgroups gmane.comp.java.jetty.support
Message-ID <CALg=Vpj1PCyZZ-pdidy9KCc5F2unCTjT-R=D6O4PNq10EkQRTQ@mail.gmail.com>
Justin,

If you're not trying to start jetty in an embedded mode, use "java
-jar start.jar". jetty will take care of setting up classpaths and
classloaders for itself and for any webapps. To use jetty in this
fashion, do not set up anything on your classpath. Just have the jdk
on the system classpath.

If you are trying to start jetty in an embedded fashion, then the best
way to do that is to write yourself a main class, following the
tutorials here:

http://wiki.eclipse.org/Jetty/Tutorial/Embedding_Jetty
http://wiki.eclipse.org/Jetty/Tutorial/Jetty_HelloWorld

cheers
Jan

On 3 November 2011 13:27, Justin Cranford <[email protected]> wrote:
> Hello,
>
> Here is my environment:
> 1) Jetty Version: jetty-8.0.4.v20111024
> 2) IE 9.0.3 x32 (9.0.8112.16421)
> 3) OS Platform: Windows 7 Ultimate x64
> 4) JVM Version: Oracle JDK 6u27 x32
> 5) Command Line: ***See end of email***
>
> I am running jetty-8.0.4.v20111024. I am getting this NullPointerException
> each time Jetty starts.
>
> WARN [2011/11/02 21:35:02.989][main](XmlConfiguration.java:1152)
> java.lang.NullPointerException
> at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1138)
> at java.security.AccessController.doPrivileged(Native Method)
> at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1126)
> 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.eclipse.jetty.start.Main.invokeMain(Main.java:469)
> at org.eclipse.jetty.start.Main.start(Main.java:612)
> at org.eclipse.jetty.start.Main.parseCommandLine(Main.java:265)
> at org.eclipse.jetty.start.Main.main(Main.java:79)
> INFO [2011/11/02 21:35:03.051][main](Server.java:253) jetty-8.0.4.v20111024
>
> I get this NPE even when I strip down my Jetty deployment to bare minimum
> with no contexts, no sample webapps, and just jetty-justin.xml listed in my
> start.ini. This is the data in jetty-justin.xml.
>
> <?xml version="1.0"?>
> <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN"
> "http://www.eclipse.org/jetty/configure.dtd">
> <Configure id="Server" class="org.eclipse.jetty.server.Server">
> </Configure>
>
> I originally thought it was related to my webapp but it occurs even when I
> strip out my webapps/mywebap.war, etc/mycontext.xml and etc/jetty-justin.xml
> (<Configure> contents).
>
>
> The exception happens immediately at startup time, but it does not seem to
> affect my webapp's functionality. What could be causing such an exception?
> Is it a known issue? How can I investigate?
>
> Here is the command I use to invoke Jetty. Note my bootclasspath and
> classpath are virtually the same (SLF4J, LOG4J, Jetty Hightide 8.0.4),
> except my bootclasspath has my JRE + Jetty resources directory
> (log4j.properties needed during my webapp servlet initialization), and my
> classpath has the Jetty start.jar. The command is split below to illustrate
> the bootclasspath and classpath similarities.
>
> C:\jdk6u27\bin\javaw.exe -Dfile.encoding=Cp1252
>
> -Xbootclasspath:C:\jdk6u27\jre\lib\resources.jar;C:\jdk6u27\jre\lib\rt.jar;C:\jdk6u27\jre\lib\jsse.jar;C:\jdk6u27\jre\lib\jce.jar;C:\jdk6u27\jre\lib\charsets.jar;C:\jdk6u27\lib\tools.jar;C:\lib\slf4j16\slf4j-api-1.6.3.jar;C:\lib\slf4j16\slf4j-log4j12-1.6.3.jar;C:\lib\apache\log4j\log4j-1.2.16.jar;C:\lib\jetty-ajp-8.0.4.v20111024.jar;C:\lib\jetty-all-8.0.4.v20111024-javadoc.jar;C:\lib\jetty-annotations-8.0.4.v20111024.jar;C:\lib\jetty-client-8.0.4.v20111024.jar;C:\lib\jetty-continuation-8.0.4.v20111024.jar;C:\lib\jetty-deploy-8.0.4.v20111024.jar;C:\lib\jetty-http-8.0.4.v20111024.jar;C:\lib\jetty-io-8.0.4.v20111024.jar;C:\lib\jetty-jmx-8.0.4.v20111024.jar;C:\lib\jetty-jndi-8.0.4.v20111024.jar;C:\lib\jetty-overlay-deployer-8.0.4.v20111024.jar;C:\lib\jetty-plus-8.0.4.v20111024.jar;C:\lib\jetty-policy-8.0.4.v20111024.jar;C:\lib\jetty-rewrite-8.0.4.v20111024.jar;C:\lib\jetty-security-8.0.4.v20111024.jar;C:\lib\jetty-server-8.0.4.v20111024.jar;C:\lib\jetty-servlet-8.0.4.v20111024.jar;C:\lib\jetty-servlets-8.0.4.v20111024.jar;C:\lib\jetty-util-8.0.4.v20111024.jar;C:\lib\jetty-webapp-8.0.4.v20111024.jar;C:\lib\jetty-websocket-8.0.4.v20111024.jar;C:\lib\jetty-xml-8.0.4.v20111024.jar;C:\lib\servlet-api-3.0.jar;C:\lib\annotations\asm-3.1.jar;C:\lib\annotations\asm-commons-3.1.jar;C:\lib\annotations\asm-tree-3.1.jar;C:\lib\annotations\geronimo-annotation_1.0_spec-1.1.1.jar;C:\lib\annotations\javax.annotation_1.1.0.v201105051105.jar;C:\lib\annotations\org.objectweb.asm_3.3.1.v201101071600.jar;C:\lib\jdbc\derby\derby-10.6.1.0.jar;C:\lib\jdbc\derby\derbytools-10.6.1.0.jar;C:\lib\jndi\javax.activation_1.1.0.v201105071233.jar;C:\lib\jndi\javax.mail.glassfish_1.4.1.v201005082020.jar;C:\lib\jta\javax.transaction_1.1.1.v201004190952.jar;C:\lib\jta\atomikos\atomikos-util-3.7.0.jar;C:\lib\jta\atomikos\transactions-3.7.0.jar;C:\lib\jta\atomikos\transactions-api-3.7.0.jar;C:\lib\jta\atomikos\transactions-jdbc-3.7.0.jar;C:\lib\jta\atomikos\transactions-jta-3.7.0.jar;C:\lib\monitor\jetty-monitor-8.0.4.v20111024.jar;C:\lib\jsp\com.sun.el_2.2.0.v201105051105.jar;C:\lib\jsp\javax.el_2.2.0.v201105051105.jar;C:\lib\jsp\javax.servlet.jsp.jstl_1.2.0.v201004190952.jar;C:\lib\jsp\javax.servlet.jsp_2.2.0.v201103241009.jar;C:\lib\jsp\org.apache.jasper.glassfish_2.2.2.v201108011116.jar;C:\lib\jsp\org.apache.taglibs.standard.glassfish_1.2.0.v201004190952.jar;C:\lib\setuid\jetty-setuid-java-8.0.4.v20111024.jar;C:\lib\setuid\jna-3.2.2.jar;C:\lib\spring\jetty-spring-8.0.4.v20111024.jar;C:\resources
>
> -classpath
> C:\lib\slf4j16\slf4j-api-1.6.3.jar;C:\lib\slf4j16\slf4j-log4j12-1.6.3.jar;C:\lib\apache\log4j\log4j-1.2.16.jar;C:\lib\jetty-ajp-8.0.4.v20111024.jar;C:\lib\jetty-all-8.0.4.v20111024-javadoc.jar;C:\lib\jetty-annotations-8.0.4.v20111024.jar;C:\lib\jetty-client-8.0.4.v20111024.jar;C:\lib\jetty-continuation-8.0.4.v20111024.jar;C:\lib\jetty-deploy-8.0.4.v20111024.jar;C:\lib\jetty-http-8.0.4.v20111024.jar;C:\lib\jetty-io-8.0.4.v20111024.jar;C:\lib\jetty-jmx-8.0.4.v20111024.jar;C:\lib\jetty-jndi-8.0.4.v20111024.jar;C:\lib\jetty-overlay-deployer-8.0.4.v20111024.jar;C:\lib\jetty-plus-8.0.4.v20111024.jar;C:\lib\jetty-policy-8.0.4.v20111024.jar;C:\lib\jetty-rewrite-8.0.4.v20111024.jar;C:\lib\jetty-security-8.0.4.v20111024.jar;C:\lib\jetty-server-8.0.4.v20111024.jar;C:\lib\jetty-servlet-8.0.4.v20111024.jar;C:\lib\jetty-servlets-8.0.4.v20111024.jar;C:\lib\jetty-util-8.0.4.v20111024.jar;C:\lib\jetty-webapp-8.0.4.v20111024.jar;C:\lib\jetty-websocket-8.0.4.v20111024.jar;C:\lib\jetty-xml-8.0.4.v20111024.jar;C:\lib\servlet-api-3.0.jar;C:\lib\annotations\asm-3.1.jar;C:\lib\annotations\asm-commons-3.1.jar;C:\lib\annotations\asm-tree-3.1.jar;C:\lib\annotations\geronimo-annotation_1.0_spec-1.1.1.jar;C:\lib\annotations\javax.annotation_1.1.0.v201105051105.jar;C:\lib\annotations\org.objectweb.asm_3.3.1.v201101071600.jar;C:\lib\jdbc\derby\derby-10.6.1.0.jar;C:\lib\jdbc\derby\derbytools-10.6.1.0.jar;C:\lib\jndi\javax.activation_1.1.0.v201105071233.jar;C:\lib\jndi\javax.mail.glassfish_1.4.1.v201005082020.jar;C:\lib\jta\javax.transaction_1.1.1.v201004190952.jar;C:\lib\jta\atomikos\atomikos-util-3.7.0.jar;C:\lib\jta\atomikos\transactions-3.7.0.jar;C:\lib\jta\atomikos\transactions-api-3.7.0.jar;C:\lib\jta\atomikos\transactions-jdbc-3.7.0.jar;C:\lib\jta\atomikos\transactions-jta-3.7.0.jar;C:\lib\monitor\jetty-monitor-8.0.4.v20111024.jar;C:\lib\jsp\com.sun.el_2.2.0.v201105051105.jar;C:\lib\jsp\javax.el_2.2.0.v201105051105.jar;C:\lib\jsp\javax.servlet.jsp.jstl_1.2.0.v201004190952.jar;C:\lib\jsp\javax.servlet.jsp_2.2.0.v201103241009.jar;C:\lib\jsp\org.apache.jasper.glassfish_2.2.2.v201108011116.jar;C:\lib\jsp\org.apache.taglibs.standard.glassfish_1.2.0.v201004190952.jar;C:\lib\setuid\jetty-setuid-java-8.0.4.v20111024.jar;C:\lib\setuid\jna-3.2.2.jar;C:\lib\spring\jetty-spring-8.0.4.v20111024.jar;C:\start.jar
>
> org.eclipse.jetty.start.Main
>
>
> Sincerely,
> Justin
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email