I've included all jars the application requires, I'm trying to use Jetty Embedded
I have a simple java class with a main method that has the following setup, servlets still work correctly just can't get JSP's to work. All required jars are included, started with basic Jetty jars then added all from the jsp folder.
Server server = new Server(8080);
WebAppContext context = new WebAppContext();
context.setDescriptor("WebRoot/WEB-INF/web.xml");
context.setResourceBase("WebRoot/");
context.setContextPath("/");
context.setParentLoaderPriority(true);
server.setHandler(context);
server.start();
server.join();
Error:
2010-10-29 09:53:14.031:INFO::jetty-7.2.0.v20101020
2010-10-29 09:53:14.577:WARN::FAILED jsp: java.lang.ExceptionInInitializerError
2010-10-29 09:53:14.577:WARN::FAILED WebAppContext@1c0e45a@1c0e45a/,file:/D:/eclipseworkspaces/eone/dash/JettyEmbededWeb/WebRoot/: java.lang.ExceptionInInitializerError
2010-10-29 09:53:14.577:WARN::Error starting handlers
java.lang.ExceptionInInitializerError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at org.eclipse.jetty.servlet.ServletContextHandler$Context.createServlet(ServletContextHandler.java:602)
at org.eclipse.jetty.servlet.ServletHolder.newInstance(ServletHolder.java:741)
at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:421)
at org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:259)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:762)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:244)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1132)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:577)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:491)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:93)
at org.eclipse.jetty.server.Server.doStart(Server.java:243)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
at com.example.handlers.WebappCtxtHandlerNonWar.main(WebappCtxtHandlerNonWar.java:32)
Caused by:
com.sun.org.apache.commons.logging.LogConfigurationException: com.sun.org.apache.commons.logging.LogConfigurationException: java.lang.NullPointerException (Caused by java.lang.NullPointerException) (Caused by com.sun.org.apache.commons.logging.LogConfigurationException: java.lang.NullPointerException (Caused by java.lang.NullPointerException))
at com.sun.org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
at com.sun.org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
at com.sun.org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
at com.sun.org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
at org.apache.jasper.servlet.JspServlet.<clinit>(JspServlet.java:116)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at org.eclipse.jetty.servlet.ServletContextHandler$Context.createServlet(ServletContextHandler.java:602)
at org.eclipse.jetty.servlet.ServletHolder.newInstance(ServletHolder.java:741)
at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:421)
at org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:259)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:762)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:244)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1132)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:577)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:491)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:93)
at org.eclipse.jetty.server.Server.doStart(Server.java:243)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
at com.example.handlers.WebappCtxtHandlerNonWar.main(WebappCtxtHandlerNonWar.java:32)
Caused by:
com.sun.org.apache.commons.logging.LogConfigurationException: java.lang.NullPointerException (Caused by java.lang.NullPointerException)
at com.sun.org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:397)
at com.sun.org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
at com.sun.org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
at com.sun.org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
at com.sun.org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
at org.apache.jasper.servlet.JspServlet.<clinit>(JspServlet.java:116)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at org.eclipse.jetty.servlet.ServletContextHandler$Context.createServlet(ServletContextHandler.java:602)
at org.eclipse.jetty.servlet.ServletHolder.newInstance(ServletHolder.java:741)
at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:421)
at org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:259)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:762)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:244)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1132)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:577)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:491)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:93)
at org.eclipse.jetty.server.Server.doStart(Server.java:243)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
at com.example.handlers.WebappCtxtHandlerNonWar.main(WebappCtxtHandlerNonWar.java:32)
Caused by:
java.lang.NullPointerException
at com.sun.org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:374)
at com.sun.org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
at com.sun.org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
at com.sun.org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
at com.sun.org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
at org.apache.jasper.servlet.JspServlet.<clinit>(JspServlet.java:116)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at org.eclipse.jetty.servlet.ServletContextHandler$Context.createServlet(ServletContextHandler.java:602)
at org.eclipse.jetty.servlet.ServletHolder.newInstance(ServletHolder.java:741)
at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:421)
at org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:259)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:762)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:244)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1132)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:577)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:491)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:93)
at org.eclipse.jetty.server.Server.doStart(Server.java:243)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
at com.example.handlers.WebappCtxtHandlerNonWar.main(WebappCtxtHandlerNonWar.java:32)
2010-10-29 09:53:14.592:INFO::Started [email protected]:8080