• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSF error with Maven & cayenne

 
yunus ali
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi..I am using maven project with JSF 1.2 having Cayenne for persistence. As soon as i entered the information through JSP page and click on action button it is giving error...Please tell me how to solve it...


type Exception report

message

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

exception

javax.servlet.ServletException: #{registerBean.register}: java.lang.NoClassDefFoundError: org/apache/cayenne/query/Query
javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)


root cause

javax.faces.FacesException: #{registerBean.register}: java.lang.NoClassDefFoundError: org/apache/cayenne/query/Query
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:118)
javax.faces.component.UICommand.broadcast(UICommand.java:387)
javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
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)


root cause

javax.faces.el.EvaluationException: java.lang.NoClassDefFoundError: org/apache/cayenne/query/Query
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)
javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
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)


root cause

java.lang.NoClassDefFoundError: org/apache/cayenne/query/Query
org.cayenne.Manager.RegisterManager.addRegister(RegisterManager.java:18)
org.cayenne.managedBean.RegisterBean.register(RegisterBean.java:142)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.apache.el.parser.AstValue.invoke(AstValue.java:152)
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)
javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
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)


root cause

java.lang.ClassNotFoundException: org.apache.cayenne.query.Query
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1360)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1206)
org.cayenne.Manager.RegisterManager.addRegister(RegisterManager.java:18)
org.cayenne.managedBean.RegisterBean.register(RegisterBean.java:142)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.apache.el.parser.AstValue.invoke(AstValue.java:152)
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)
javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
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)

 
Tim Holloway
Bartender
Posts: 18412
58
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Yunus!

If you use the "Code" button in the message editor, it will generate special tags that can be used to wrap sample code, XML, and other pre-formatted text, making it easier for us to read.

Your problem isn't with JSF, it's with the WAR. You apparently didn't include the Cayenne jar in your WAR's WEB-INF/lib directory.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!