- This topic has 7 replies, 4 voices, and was last updated 13 years, 1 month ago by joerg.vollmer.
-
AuthorPosts
-
PeterMemberHi!
First of all I just wanted to say thank you for ME4S it looks awesome and has pretty much everything I was hoping it would!
I am running into a problem when generating a CRUD app using JSF.
All I did was:
-Create a new web project
-Enable Spring DSL
-Add JSF capabilities
-Scaffold a simple account table
-Deploy on Myeclipse Tomcat and start serverI get this error:
SEVERE: Unable to instantiate ExpressionFactory 'com.sun.el.ExpressionFactoryImpl' Apr 5, 2011 5:12:34 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener com.sun.faces.config.ConfigurationException: It appears the JSP version of the container is older than 2.1 and unable to locate the EL RI expression factory, com.sun.el.ExpressionFactoryImpl. If not using JSP or the EL RI, make sure the context initialization parameter, com.sun.faces.expressionFactory, is properly set. at com.sun.faces.config.ConfigureListener.registerELResolverAndListenerWithJsp(ConfigureListener.java:639) at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:238) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:566) 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:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Not sure if I’m doing something wrong, but I would assume that the steps i took should be fine.
Thanks!
Peter
PeterMemberok I found out what the problem was.
When I Enable Spring DSL, I would just click the Finish button without going through the wizard, but when I actually went through once I found that by default all the runtime dependencies were checked other than Expression Language 2.2 Libraries. So when I check it, the problem goes away.
BUT now I’m getting a whole new problem. Following the same basic steps of scaffolding a simple 1 object application with JSF, i get the following problem:
SEVERE: Servlet.service() for servlet jsp threw exception java.lang.NullPointerException at org.apache.jsp.index_jsp._jspInit(index_jsp.java:23) at org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52) at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:159) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:129) at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:113) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) 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.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619)
PLEASE HELP! It’s gettig really frustrating not being able to scaffold a simple JSF app.
PeterMembersorry wrong error. this is the error im getting:
SEVERE: Servlet.service() for servlet jsp threw exception java.lang.LinkageError: loader constraint violation: when resolving interface method "javax.servlet.jsp.JspApplicationContext.getExpressionFactory()Ljavax/el/ExpressionFactory;" the class loader (instance of org/apache/jasper/servlet/JasperLoader) of the current class, org/apache/jsp/index_jsp, and the class loader (instance of org/apache/catalina/loader/StandardClassLoader) for resolved class, javax/servlet/jsp/JspApplicationContext, have different Class objects for the type javax/el/ExpressionFactory used in the signature at org.apache.jsp.index_jsp._jspInit(index_jsp.java:23) at org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52) at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:159) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:129) at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:113) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) 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.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619)
cconwayMemberHi Peter,
The JSF issue you’ve encountered is covered in the release notes and tutorials for 9.0 that we are in the process of posting. There is also a tutorial in the product’s embedded help that shows the workarounds. I apologize that you’ve encountered this before we had our online collateral available. Below is a direct link to the online version of the tutorial. It would be worthwhile to read the entire text but specifically the two things you need to resolve the issue are discussed in sections 5 and 7.
In essence, the problem is that the EL libraries in Tomcat are incompatible with the version of JSF scaffolded by My Eclipse for Spring. Checking the Expression Language 2.2 libraries will not solve the problem, and will in fact cause additional issues, so please remove those from your classpath if you’ve already added them. Sections 5 and 7 of the above linked article will direct you to enable the JSF capabilities on the project and also modify the classpath of Tomcat.
Please let us know if you are able to move past the problem after applying the workarounds.
PeterMemberHi mate!
Thanks so much for that! I went through the tutorial and it worked fine!
Except when I go through the tutorial and I chose “Add Maven Support” and it doesnt work. I keep getting the following error when i go to a page that has a date.
avax.servlet.ServletException: Expression Error: Named Object: timeConverterForCalendar not found. javax.faces.webapp.FacesServlet.service(FacesServlet.java:321) com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:129) com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77) org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:113) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) root cause javax.faces.FacesException: Expression Error: Named Object: timeConverterForCalendar not found. com.sun.faces.application.ApplicationImpl.createConverter(ApplicationImpl.java:1275) com.sun.faces.facelets.tag.jsf.ValueHolderRule$LiteralConverterMetadata.applyMetadata(ValueHolderRule.java:81) com.sun.faces.facelets.tag.MetadataImpl.applyMetadata(MetadataImpl.java:77) javax.faces.view.facelets.MetaTagHandler.setAttributes(MetaTagHandler.java:125) javax.faces.view.facelets.DelegatingMetaTagHandler.setAttributes(DelegatingMetaTagHandler.java:96) com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.doNewComponentActions(ComponentTagHandlerDelegateImpl.java:345) com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:146) javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:114) javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:94) javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:131) com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:162) javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:114) javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:94) javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:131) com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:162) javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:114) javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:94) javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:131) com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:162) javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:114) javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:94) com.sun.faces.facelets.tag.ui.DefineHandler.applyDefinition(DefineHandler.java:99) com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:174) com.sun.faces.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:392) com.sun.faces.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:363) com.sun.faces.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:104) javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:94) javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:131) com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:162) javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:114) javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:94) com.sun.faces.facelets.tag.jsf.core.ViewHandler.apply(ViewHandler.java:156) javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:94) com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:89) javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:94) com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:79) com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:304) com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:363) com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:342) com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:196) com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:151) com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:89) com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:79) com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:148) com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(FaceletViewHandlingStrategy.java:734) com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:96) com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97) com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:135) javax.faces.webapp.FacesServlet.service(FacesServlet.java:309) com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:129) com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77) org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:113) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
Is Maven supported with ME4S crud generation and DSL?
jayperkinsMemberIt looks like you may not be getting the latest version of skyway-spring-utils. The skyway-spring-utils-7.1.3.jar should contain a class called org.skyway.spring.util.jsf.TimeConverterForCalendar if you have the latest. It looks like it does not exist in yours.
Just delete it from your local maven repo and it should get the latest:
repository\org\skywaysoftware\skyway-spring-utils\7.1.3Please let me know if this does not solve your problem.
Thanks,
Jay
PeterMemberThanks a lot Jay!
Yes it works wonderfully now 🙂
joerg.vollmerMemberThe NullPointerException (at org.apache.jsp.index_jsp._jspInit(index_jsp.java:23) )happens also if JavaEE 6.0 instead of JavaEE 5.0 is choosen on the first page of the wizzard.
-
AuthorPosts