From: Noor M. <no...@op...> - 2010-03-09 08:28:28
|
For my previous thread, i got this error Error : java.lang.IllegalStateException: Application was not properly initialized at st rtup, could not find Factory: javax.faces.context.FacesContextFactory at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:256) at javax.faces.webapp.FacesServlet.init(FacesServlet.java:142) at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.ja a:440) at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:2 3) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java 50) at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.j va:685) at org.mortbay.jetty.servlet.Context.startContext(Context.java:140) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.ja a:1250) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java 517) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:46 ) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java 50) at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollectio .java:152) at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHa dlerCollection.java:156) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java 50) at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollectio .java:152) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java 50) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java 130) at org.mortbay.jetty.Server.doStart(Server.java:224) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java 50) at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:985) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.mortbay.start.Main.invokeMain(Main.java:194) at org.mortbay.start.Main.start(Main.java:534) at org.mortbay.start.Main.start(Main.java:441) at org.mortbay.start.Main.main(Main.java:119) On Tue, Mar 9, 2010 at 1:30 PM, Noor Mohamed <no...@op...>wrote: > hi everybody, > > I created one *webapp using jpa(java persistence API) / jsf with TopLink > in netbeans6.5*. > It *works good*, with *glassfish* server. > > And when i trying to run in *jetty server*, it gives *error* in > -- annotations > -- faces context exception > -- com.sun.faces.config.ConfigurationException: CONFIGURATION > FAILED! > for this above *config err* : > i) I've used one java class("* > AuthenticationPhaseListener.java*") inside my webapp, which implements "* > javax.faces.event.PhaseListener*" > ii) But it shows this config err as, *AuthenticationPhaseListener > *is not an instance of interface *javax.faces.event.PhaseListener* > > I am using Jetty-6.1.22 (got from > http://dist.codehaus.org/jetty/jetty-6.1.22 - "jetty-6.1.22.zip" ) > And i put my webapp's ".war" file in webapps folder of jetty6.1.22. > > I ran jetty by, "*java -jar start.jar etc/jetty.xml etc/jetty-plus.xml > etc/jetty-mywebapp.xml*" > I didn;t change anything inside jetty.xml and jetty-plus.xml. > I created a new file inside *etc* folder as, *jetty-mywebapp.xml*. It has > the following content : > > ================================================================================================ > <?xml version="1.0"?> > <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD > Configure//EN" "http://jetty.mortbay.org/configure.dtd"> > <Configure id="Server" class="org.mortbay.jetty.Server"> > <New id="CNB" class="org.mortbay.jetty.plus.naming.Resource" > name="addConnectionPoolDataSource"> > <Arg>jdbc/cnb</Arg> > <Arg> > <!--<New class="javax.sql.DataSource > org.apache.commons.dbcp.BasicDataSource" > name="addConnectionPoolDataSource">--> > <New class="org.apache.commons.dbcp.BasicDataSource"> > <Set > name="driverClassName">com.microsoft.sqlserver.jdbc.SQLServerDriver</Set> > <Set name="url">jdbc:sqlserver://10.10.200.102:1433 > ;databaseName=CNB</Set> > <Set name="username">sa</Set> > <Set name="password">test</Set> > </New> > </Arg> > </New> > </Configure> > > ================================================================================================ > > Can anybody, pls provide me the solution to run my webapp (uses jpa / jsf > things) in JETTY server ..... ? > > Thanks and regards, > Noor > > |