aspose file tools*
The moose likes JBoss/WildFly and the fly likes JSF issue with JBoss Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "JSF issue with JBoss" Watch "JSF issue with JBoss" New topic
Author

JSF issue with JBoss

srinivas chhatrapathy
Greenhorn

Joined: Sep 16, 2008
Posts: 5
I have an issue with JBoss server. Please try to understand the below problem, and let me know any solution.

Actually we are working on two projects (say UW & PO). We are using Tomcat as our developement server and we need to deploy the same in JBoss at client's site.

When we deployed UW in Tomcat, then it worked fine without any issues. But when we deployed the same application (UW) in JBoss, then we got some errors, so we removed some jar files (like jsf*.jar and servlet.jar as they are provided by JBoss also) from the UW.war and deployed in JBoss, then it worked fine.

Now, we deployed the PO also in Tomcat and it worked fine without any issues. But when PO is deployed in JBoss (by following the same procedure like removing some jar file, etc). It's giving java.lang.NoClassDefFoundError indicating some JSF related classes.

If this is the problem with the coding, then it should have given the same error when we deployed in Tomcat aslo. If this is the problem with JBoss configuration, then why the UW worked in JBoss?

It would be great if you could give me any direction to solve this issue.

-Srinivas.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10059
    
163

Please post the entire exception stacktrace, the version of JBoss you are using and also the version of Java.


[My Blog] [JavaRanch Journal]
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10059
    
163

"srinivas bh",

Welcome to JavaRanch

Please check your private message for a message from JavaRanch.
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Hi there and welcome to Javaranch,

Firstly it's Javaranch policy to use 'real 'first and last names so if you could change your screen name to match that policy it would be much appreciated.

Now onto your question!

Originally posted by srinivas bh:
I have an issue with JBoss server. Please try to understand the below problem, and let me know any solution.

Actually we are working on two projects (say UW & PO). We are using Tomcat as our developement server and we need to deploy the same in JBoss at client's site.

When we deployed UW in Tomcat, then it worked fine without any issues. But when we deployed the same application (UW) in JBoss, then we got some errors.


What errors did you get here?

Originally posted by srinivas bh:
So we removed some jar files (like jsf*.jar and servlet.jar as they are provided by JBoss also) from the UW.war and deployed in JBoss, then it worked fine.


OK, seems reasonable (as stated above would be nice to know what error you originally got).

Originally posted by srinivas bh:

Now, we deployed the PO also in Tomcat and it worked fine without any issues. But when PO is deployed in JBoss (by following the same procedure like removing some jar file, etc). It's giving java.lang.NoClassDefFoundError indicating some JSF related classes.

If this is the problem with the coding, then it should have given the same error when we deployed in Tomcat aslo. If this is the problem with JBoss configuration, then why the UW worked in JBoss?

It would be great if you could give me any direction to solve this issue.

-Srinivas.


One thing to check here is that the version of servlet.jar and jsf*.jar that Jboss supplies is the same version as what you supplied for Tomcat

Hope that helps!


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
srinivas chhatrapathy
Greenhorn

Joined: Sep 16, 2008
Posts: 5
Hi, the versions of both the servers (Tomcat, JBoss) are same for both the projects.

Please see the complete error page here:

HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: #{loginLDAPBean.passwordValidation}: java.lang.NoClassDefFoundError
javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:147)
org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:256)
org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:362)
org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:488)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


root cause

javax.faces.FacesException: #{loginLDAPBean.passwordValidation}: java.lang.NoClassDefFoundError
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:118)
javax.faces.component.UICommand.broadcast(UICommand.java:387)
org.ajax4jsf.component.UIDataAdaptor.broadcast(UIDataAdaptor.java:1326)
org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:317)
org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:292)
org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:249)
org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:462)
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:147)
org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:256)
org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:362)
org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:488)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


root cause

javax.faces.el.EvaluationException: java.lang.NoClassDefFoundError
javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
javax.faces.component.UICommand.broadcast(UICommand.java:387)
org.ajax4jsf.component.UIDataAdaptor.broadcast(UIDataAdaptor.java:1326)
org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:317)
org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:292)
org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:249)
org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:462)
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:147)
org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:256)
org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:362)
org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:488)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


root cause

java.lang.NoClassDefFoundError
com.medpro.po.common.login.dao.LdapDao.getUserProfile(Unknown Source)
com.medpro.po.common.login.LoginLDAPBean.loadUserProfileToHeader(Unknown Source)
com.medpro.po.common.login.LoginLDAPBean.passwordValidation(Unknown Source)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
org.apache.el.parser.AstValue.invoke(AstValue.java:131)
org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
javax.faces.component.UICommand.broadcast(UICommand.java:387)
org.ajax4jsf.component.UIDataAdaptor.broadcast(UIDataAdaptor.java:1326)
org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:317)
org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:292)
org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:249)
org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:462)
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:147)
org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:256)
org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:362)
org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:488)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


note The full stack trace of the root cause is available in the JBossWeb/2.0.1.GA logs.
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Originally posted by srinivas bh:


..
<snip>
..

root cause

java.lang.NoClassDefFoundError
com.medpro.po.common.login.dao.LdapDao.getUserProfile(Unknown Source)
com.medpro.po.common.login.LoginLDAPBean.loadUserProfileToHeader(Unknown Source)
com.medpro.po.common.login.LoginLDAPBean.passwordValidation(Unknown Source)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
org.apache.el.parser.AstValue.invoke(AstValue.java:131)
org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
javax.faces.component.UICommand.broadcast(UICommand.java:387)
org.ajax4jsf.component.UIDataAdaptor.broadcast(UIDataAdaptor.java:1326)
org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:317)
org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:292)
org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:249)
org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:462)
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:147)
org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:256)
org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:362)
org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:488)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


note The full stack trace of the root cause is available in the JBossWeb/2.0.1.GA logs.


It's not giving us a clue as to what class it thinks it is missing. What does com.medpro.po.common.login.dao.LdapDao.getUserProfile(Unknown Source) call?
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

Srinivas, you posted the error as it appears in the browser. Could you locate the corresponding exception stack trace in the console log or server.log and post that? That usually have more detailed and accurate information.


JBoss In Action
srinivas chhatrapathy
Greenhorn

Joined: Sep 16, 2008
Posts: 5
Hi, for you to understanding I am posting the complete error log from server.log.
Please check this:

ERROR [javax.enterprise.resource.webcontainer.jsf.application] java.lang.NoClassDefFoundError
javax.faces.el.EvaluationException: java.lang.NoClassDefFoundError
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
at javax.faces.component.UICommand.broadcast(UICommand.java:387)
at org.ajax4jsf.component.UIDataAdaptor.broadcast(UIDataAdaptor.java:1326)
at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:317)
at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:292)
at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:249)
at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:462)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:147)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:256)
at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:362)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:488)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.NoClassDefFoundError
at com.medpro.po.common.login.LoginLDAPBean.getUserProfile(Unknown Source)
at com.medpro.po.common.login.LoginLDAPBean.loadUserProfileToHeader(Unknown Source)
at com.medpro.po.common.login.LoginLDAPBean.passwordValidation(Unknown Source)
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:585)
at org.apache.el.parser.AstValue.invoke(AstValue.java:131)
at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
at org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
... 35 more
2008-09-17 10:51:01,162 WARN [javax.enterprise.resource.webcontainer.jsf.lifecycle] #{loginLDAPBean.passwordValidation}: java.lang.NoClassDefFoundError
javax.faces.FacesException: #{loginLDAPBean.passwordValidation}: java.lang.NoClassDefFoundError
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:118)
at javax.faces.component.UICommand.broadcast(UICommand.java:387)
at org.ajax4jsf.component.UIDataAdaptor.broadcast(UIDataAdaptor.java:1326)
at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:317)
at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:292)
at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:249)
at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:462)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:147)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:256)
at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:362)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:488)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.faces.el.EvaluationException: java.lang.NoClassDefFoundError
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
... 34 more
Caused by: java.lang.NoClassDefFoundError
at com.medpro.po.common.login.LoginLDAPBean.getUserProfile(Unknown Source)
at com.medpro.po.common.login.LoginLDAPBean.loadUserProfileToHeader(Unknown Source)
at com.medpro.po.common.login.LoginLDAPBean.passwordValidation(Unknown Source)
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:585)
at org.apache.el.parser.AstValue.invoke(AstValue.java:131)
at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
at org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
... 35 more
2008-09-17 10:51:01,162 ERROR [javax.enterprise.resource.webcontainer.jsf.lifecycle] JSF1054: (Phase ID: INVOKE_APPLICATION 5, View ID: /jsps/login1.jsp) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@10f7612]
2008-09-17 10:51:01,162 DEBUG [javax.enterprise.resource.webcontainer.jsf.timing] [TIMING] - [47ms] : Execution time for phase (including any PhaseListeners) -> INVOKE_APPLICATION 5
2008-09-17 10:51:01,162 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/purchaseorder].[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
java.lang.NoClassDefFoundError
at com.medpro.po.common.login.LoginLDAPBean.getUserProfile(Unknown Source)
at com.medpro.po.common.login.LoginLDAPBean.loadUserProfileToHeader(Unknown Source)
at com.medpro.po.common.login.LoginLDAPBean.passwordValidation(Unknown Source)
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:585)
at org.apache.el.parser.AstValue.invoke(AstValue.java:131)
at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
at org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
at javax.faces.component.UICommand.broadcast(UICommand.java:387)
at org.ajax4jsf.component.UIDataAdaptor.broadcast(UIDataAdaptor.java:1326)
at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:317)
at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:292)
at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:249)
at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:462)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:147)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:256)
at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:362)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:488)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:595)
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Hmm, I still don't see what class it exactly thinks is missing, but since I'm 1/2 asleep this morning is there anyone else who can spot it?
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10059
    
163

Originally posted by Martijn Verburg:
is there anyone else who can spot it?


The exception is not logging the exact class name. But it appears to happen with

java.lang.NoClassDefFoundError
at com.medpro.po.common.login.LoginLDAPBean.getUserProfile(Unknown Source)


Srinivas,

Please do not ignore our earlier message about the naming policy. Please check your private message.

As for the exception, the com.medpro.po.common.login.LoginLDAPBean is not a JBoss AS class. Are you sure the classes/jars referenced by this class (through import statements or through some other means) are available in the classpath?
srinivas chhatrapathy
Greenhorn

Joined: Sep 16, 2008
Posts: 5
Hi, all the classes/jars are in the classpath. Anyway, now I got the solution. This is how I followed the process.

Actually, I used to build the application and prepare the UW.war by using ANT and then I used to remove the jsf*.jar and servlet.jar files by opening the UW.war with winzip. And it (UW) worked fine in JBoss. And the same process I followed for PO.war. But it was not working.

So, now I followed some other way for PO. I Built(&compiled) the application and then removed the jar files and then I made the PO.war file by using ANT command and deployed the PO.war in JBoss, now it's working fine.

What I made the change here is, in the first procedure I removed jars after making the PO.war file. In the next procedure, I removed the jars before making the PO.war file. Is there any difference between these two processes? If there is difference, then how it worked for UW.war with first procedure? Is there any role of the manifest file while building war files?

But this solution is not generic. Because even I too don't know what was the actual solution. Just I blindly followed this process and solved the problem. I wanted to follow the same procedure for both the projects with the generic solution.
Please help me.

-Srinivas
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

There shouldn't be a difference in the 2 processes, but the way you did it the 2nd time (removing the JAR files before you build the WAR) is a more 'correct' way of doing it (I assume you're simply excluding these jars using an ANT exclude filter). Removing files from archives using zip utils such as Winzip can be hazardous at times!

Glad you solved your problem and thanks for posting the result for others to share!
srinivas chhatrapathy
Greenhorn

Joined: Sep 16, 2008
Posts: 5
I used to create the war first before removing jars. Because that war file I used to deploy in Tomcat. Then I remove the jars from a copy of the war, to deploy this war in JBoss.

-Srinivas
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

That makes sense!

I would suggest that you have two different targets in your ANT script to deal with this (say buildForTomcat and buildForJBoss), that way you can avoid manual editing of the WAR file afterwards.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSF issue with JBoss