You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shale.apache.org by Thomas Walland <of...@walland.net> on 2006/10/29 20:42:18 UTC

Re[3]: Problems with example war

Because I don't want to build the source by my own, i tried also the
nightly build version of the example. But with the same result:

org.apache.jasper.JasperException: Exception in JSP: /welcome.jsp:1

1: <jsp:forward page="/usecases.faces"/>


Stacktrace:
        org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:506)
        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        org.apache.shale.application.faces.ShaleApplicationFilter.doFilter(ShaleApplicationFilter.java:267)

root cause

javax.servlet.ServletException: Servlet.init() for servlet faces threw exception
        org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:688)
        org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:658)
        org.apache.jsp.welcome_jsp._jspService(welcome_jsp.java:43)
        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        org.apache.shale.application.faces.ShaleApplicationFilter.doFilter(ShaleApplicationFilter.java:267)

root cause

java.lang.IllegalStateException: No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure that you properly include all configuration settings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your web application and your container for any exceptions!
If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener is not setup in your web.xml.
A typical config looks like this;
<listener>
  <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>

        javax.faces.FactoryFinder.getFactory(FactoryFinder.java:90)
        javax.faces.webapp.FacesServlet.init(FacesServlet.java:88)
        org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:688)
        org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:658)
        org.apache.jsp.welcome_jsp._jspService(welcome_jsp.java:43)
        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        org.apache.shale.application.faces.ShaleApplicationFilter.doFilter(ShaleApplicationFilter.java:267)

Seems there is something wrong with the jsf-config or something? Do I
need something additional? Again, I have windows xp with java 1.5 and
tomcat 5.5. I don't have experience with jsf. Until now I have developed
struts-applications. But my next project should be realized with shale
because of the advantages.


Re: Re[10]: Problems with example war

Posted by samju <ju...@netscape.net>.


Thomas Walland wrote:
> 
> I solved the problem!
> 
> I don't know if this is only a problem on my machine. I used a german
> windows xp professional edition and installed tomcat in de suggested
> default path unter c:\programms\apache software foundation\tomcat
> 5.5\...
> 
> Seems this is a too long name for shale or something other or some
> part of the framework or something other is not able to handle blanks
> in directory names.
> 
> Now i have reinstalled tomcat under c:\tomcat55. A very short
> directory name without blanks. After putting the war to this directory
> and starting the server the example works well.
> 
> maybe this is only a problem with windows users or with german windows
> users? i don't know. But the default path to install doesn't work
> well.
> 
> Thank's for your help :-)
> 
> Thomas
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Problems-with-example-war-tf2535268.html#a7295632
Sent from the Shale - User mailing list archive at Nabble.com.


Re[10]: Problems with example war

Posted by Thomas Walland <of...@walland.net>.
I solved the problem!

I don't know if this is only a problem on my machine. I used a german
windows xp professional edition and installed tomcat in de suggested
default path unter c:\programms\apache software foundation\tomcat
5.5\...

Seems this is a too long name for shale or something other or some
part of the framework or something other is not able to handle blanks
in directory names.

Now i have reinstalled tomcat under c:\tomcat55. A very short
directory name without blanks. After putting the war to this directory
and starting the server the example works well.

maybe this is only a problem with windows users or with german windows
users? i don't know. But the default path to install doesn't work
well.

Thank's for your help :-)

Thomas


Re: Re[8]: Problems with example war

Posted by Craig McClanahan <cr...@apache.org>.
On 10/30/06, Thomas Walland <of...@walland.net> wrote:
>
> I am sure, that tomcat 5.5 is running. I start the server on the
> console with tomcat5.exe. When i do this, i get the following:
>
> C:\Programme\Apache Software Foundation\Tomcat 5.5\bin>tomcat5.exe
> 30.10.2006 09:33:34 org.apache.catalina.core.AprLifecycleListenerlifecycleEvent
>
> INFO: The Apache Tomcat Native library which allows optimal performance in
> produ
> ction environments was not found on the java.library.path:
> C:\Programme\Apache S
> oftware Foundation\Tomcat 5.5\bin
> ;.;C:\WINDOWS\system32;C:\WINDOWS;C:\Programme\
> MiKTeX 2.5\miktex\bin
> ;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:
> \Programme\Gemeinsame Dateien\GTK\2.0\bin;C:\Programme\OpenVPN\bin
> 30.10.2006 09:33:34 org.apache.coyote.http11.Http11BaseProtocol init
> INFO: Initializing Coyote HTTP/1.1 on http-8080
> 30.10.2006 09:33:34 org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 951 ms
> 30.10.2006 09:33:34 org.apache.catalina.core.StandardService start
> INFO: Starting service Catalina
> 30.10.2006 09:33:34 org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/5.5.20
> 30.10.2006 09:33:34 org.apache.catalina.core.StandardHost start
> INFO: XML validation disabled
> 30.10.2006 09:33:35 org.apache.catalina.startup.HostConfig deployWAR
> INFO: Deploying web application archive shale-clay-usecases.war
> log4j:WARN No appenders could be found for logger (
> org.apache.commons.digester.D
> igester.sax).
> log4j:WARN Please initialize the log4j system properly.
> log4j:WARN No appenders could be found for logger (
> org.apache.commons.digester.D
> igester.sax).
> log4j:WARN Please initialize the log4j system properly.
> 30.10.2006 09:33:43 org.apache.coyote.http11.Http11BaseProtocol start
> INFO: Starting Coyote HTTP/1.1 on http-8080
> 30.10.2006 09:33:43 org.apache.jk.common.ChannelSocket init
> INFO: JK: ajp13 listening on /0.0.0.0:8009
> 30.10.2006 09:33:43 org.apache.jk.server.JkMain start
> INFO: Jk running ID=0 time=0/70  config=null
> 30.10.2006 09:33:43 org.apache.catalina.storeconfig.StoreLoader load
> INFO: Find registry server-registry.xml at classpath resource
> 30.10.2006 09:33:43 org.apache.catalina.startup.Catalina start
> INFO: Server startup in 9113 ms
>
>
> CATALINA_HOME is set to the C:\Prog....\Tomcat 5.5\. Also JAVA_HOME
> points to my java folder.


That makes sense.  So, how are you deploying the Shale applications?  The
mystery here is why it works (with Tomcat 5.5) for all the developers, but
does not work for you.  Are there *any* other interesting messages in the
Tomcat log files?  For that matter, do you see (in the Tomcat log files) the
messages from MyFaces as it initializes itself for a particular webapp?

Finally, it would be really interesting for you to try a version of the
sample apps from the current nightly builds[1], instead of the
1.0.3release.  A behavior difference here would indicate that
something dramatic
has changed.

Thomas
>
>
Craig

[1] http://people.apache.org/builds/shale/nightly/

Re[8]: Problems with example war

Posted by Thomas Walland <of...@walland.net>.
I am sure, that tomcat 5.5 is running. I start the server on the
console with tomcat5.exe. When i do this, i get the following:

C:\Programme\Apache Software Foundation\Tomcat 5.5\bin>tomcat5.exe
30.10.2006 09:33:34 org.apache.catalina.core.AprLifecycleListener lifecycleEvent

INFO: The Apache Tomcat Native library which allows optimal performance in produ
ction environments was not found on the java.library.path: C:\Programme\Apache S
oftware Foundation\Tomcat 5.5\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\Programme\
MiKTeX 2.5\miktex\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:
\Programme\Gemeinsame Dateien\GTK\2.0\bin;C:\Programme\OpenVPN\bin
30.10.2006 09:33:34 org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
30.10.2006 09:33:34 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 951 ms
30.10.2006 09:33:34 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
30.10.2006 09:33:34 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.20
30.10.2006 09:33:34 org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
30.10.2006 09:33:35 org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive shale-clay-usecases.war
log4j:WARN No appenders could be found for logger (org.apache.commons.digester.D
igester.sax).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN No appenders could be found for logger (org.apache.commons.digester.D
igester.sax).
log4j:WARN Please initialize the log4j system properly.
30.10.2006 09:33:43 org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
30.10.2006 09:33:43 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
30.10.2006 09:33:43 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/70  config=null
30.10.2006 09:33:43 org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
30.10.2006 09:33:43 org.apache.catalina.startup.Catalina start
INFO: Server startup in 9113 ms


CATALINA_HOME is set to the C:\Prog....\Tomcat 5.5\. Also JAVA_HOME
points to my java folder.

Thomas


Re: Re[6]: Problems with example war

Posted by Craig McClanahan <cr...@apache.org>.
On 10/29/06, Thomas Walland <of...@walland.net> wrote:
>
> I still have some troubles with shale. I found out that myfaces only
> works, if i paste this to the web.xml:
>
> <listener>
>    <listener-class>
>        org.apache.myfaces.webapp.StartupServletContextListener
>    </listener-class>
> </listener>


The fundamental issue here seems to be that your servlet container is not
automatically recognizing the need to load a startup listener that is
registered in a tag library descriptor (TLD) file, which is included in the
META-INF directory of a JAR in WEB-INF/lib.  Both MyFaces and the JSF RI
rely on this capability to initialize themselves -- and the error message
you are seeing implies that this initialization is not being performed.

That leads to the next question -- are you *sure* you are actually using
Tomcat 5.5?  The behavior you are describing is what I would expect to see
if you were using some Tomcat 4.x version, instead of 5.5, because that
version of Tomcat did not correctly implement this feature.

So, how are you starting the Tomcat instance you are trying to use?  In
particular, what is the value of CATALINA_HOME that is reported when you
start up Tomcat?

Craig

Re[6]: Problems with example war

Posted by Thomas Walland <of...@walland.net>.
I still have some troubles with shale. I found out that myfaces only
works, if i paste this to the web.xml:

<listener>
   <listener-class>
       org.apache.myfaces.webapp.StartupServletContextListener
   </listener-class>
</listener>

After that I get another error which looks like this:

javax.servlet.ServletException: ComponentConfigBean is not loaded.
        javax.faces.webapp.FacesServlet.service(FacesServlet.java:121)
        org.apache.shale.faces.ShaleApplicationFilter.doFilter(ShaleApplicationFilter.java:268)

root cause

java.lang.NullPointerException: ComponentConfigBean is not loaded.
        org.apache.shale.clay.component.Clay.getRootElement(Clay.java:266)
        org.apache.shale.clay.component.Clay.encodeBegin(Clay.java:314)
        org.apache.shale.clay.faces.ClayViewHandler.recursiveRender(ClayViewHandler.java:463)
        org.apache.shale.clay.faces.ClayViewHandler.renderView(ClayViewHandler.java:394)
        org.apache.shale.view.faces.ViewViewHandler.renderView(ViewViewHandler.java:151)
        org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
        javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
        org.apache.shale.faces.ShaleApplicationFilter.doFilter(ShaleApplicationFilter.java:268)

Could somebody tell me please what goes wrong with my configuration? I
just want to get the example war's started? Today I tried out an
simple example of myfaces. After pasting the listener above it works.

Thomas :-)


Re[5]: Problems with example war

Posted by Thomas Walland <of...@walland.net>.
these are very strange errors. I've tried the following: If I copy the
jar-lib's from the war file to the commons/lib directory of tomcat, I
can start the webapp and see the first page of the example.

But I cannot click anything? If I click, i get other errors...




Re: Re[3]: Problems with example war

Posted by Wendy Smoak <ws...@gmail.com>.
On 10/29/06, Thomas Walland <of...@walland.net> wrote:

> Because I don't want to build the source by my own, i tried also the
> nightly build version of the example. But with the same result:
>
> org.apache.jasper.JasperException: Exception in JSP: /welcome.jsp:1

Strange.  I tried the 1.0.3 version you linked to, and it works fine here.

I suppose the next thing I'd try is a clean install of Tomcat, but
maybe someone else has a suggestion.

-- 
Wendy