JSF2 upgrade to existing project - jsf-2

Im tring to upgrade existing project JSF2.I faced so many problems with combination of SUN RI and myfaces so i eliminated all SUN RI's from classpath now combination of facelets and myfaces is giving problem. I wanted to know if we eliminate facelets and make use of just apache myfaces what should be the taglib namespace?? im getting this error
27 Dec, 2010 7:08:28 PM org.apache.myfaces.view.facelets.FaceletViewHandler handleRenderException SEVERE: Error Rendering View[/login.xhtml]
java.lang.NullPointerException at org.apache.myfaces.view.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:57)
at org.apache.myfaces.view.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:45)
at org.apache.myfaces.view.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:322)
at org.apache.myfaces.view.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:369)
at org.apache.myfaces.view.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:363)
at org.apache.myfaces.view.facelets.tag.UserTagHandler.apply(UserTagHandler.java:116)
at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:51)
at org.apache.myfaces.view.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:57) at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:51)
Please help me if anyone worked on JSF2 upgrade..

I'm currently working on a JSF 2 / Facelets project using MyFaces 2.0.2. I have only the myfaces-impl and myfaces-api JARs plus some from Apache Commons in the classpath.
My Facelets namespace declaration is xmlns:ui="http://java.sun.com/jsf/facelets".

Related

Up gradation issue while migrate the struts version 2.2.1 from struts 2.3.24.1

Server: Weblogic
IDE: Intellej IDEA
Hi, I'm trying to migrate the struts version from 2.2.1 to 2.3.24.1
Added the required jars for Struts version 2.3.24.1 by following the below URL's
http://mvnrepository.com/artifact/org.apache.struts/struts2-core/2.3.24.1
http://mvnrepository.com/artifact/org.apache.struts.xwork/xwork-core/2.3.24.1
but getting the following error:
Could not load user defined filter in web.xml: org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.
java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:213)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:240)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:967)
Truncated. see log file for complete stacktrace
As error suggests "StringUtils" class not found in the Commons-lang3 jar but i already added the commons-lang3-3.2 jar
but still I'm facing the same error above i mentioned.
Added Jars in the pom.xml
struts2-core 2.3.24.1,commons-fileupload 1.3.1,commons-io 2.4,ognl 3.0.6,javassist 3.11.0.GA,freemarker 2.3.22,xwork-core 2.3.24.1,asm 3.3,asm-commons 3.3,commons-lang3 3.2,servlet-api 2.4,jsp-api 2.0,log4j 1.2.17
Could anyone suggest me how to solve this issue?

Is it possible to run Spring Security from vaading4spring together with Vaadin Spring Boot?

Is it possible to run Spring Security from vaading4spring together with Vaadin Spring Boot?
When I mix both at build.gradle as
// Official VaadinSpring Integration
compile("com.vaadin:vaadin-spring:1.0.0.beta2")
compile("com.vaadin:vaadin-spring-boot:1.0.0.beta2")
compile("com.vaadin:vaadin-spring-boot-starter:1.0.0.beta2")
// Supporting (unofficial) vaadin4spring
compile("org.vaadin.spring:spring-vaadin:0.0.5.RELEASE")
compile("org.vaadin.spring:spring-boot-vaadin:0.0.5.RELEASE")
compile("org.vaadin.spring:spring-vaadin-security:0.0.5.RELEASE")
new annotations (such as #SpringUI) does not work.
when I remove
compile("org.vaadin.spring:spring-vaadin:0.0.5.RELEASE")
compile("org.vaadin.spring:spring-boot-vaadin:0.0.5.RELEASE")
from build.gradle,
I got an exception says
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.vaadin.spring.http.HttpService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {#org.springframework.beans.factory.annotation.Autowired(required=true)}
at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:1301)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1047)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:942)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:533)
... 77 more
I appreciate any help.
vaadin4spring 0.0.5 is the last standalone release and you should use it as such (don't mix!). the next version of vaadin4spring will build on the official spring vaadin addon, but this is work in progress (Details about this are here: https://github.com/peholmst/vaadin4spring/issues/164)
For your specific problem see https://github.com/peholmst/vaadin4spring/issues/206
for a spring security example see the vaadin4spring:
https://github.com/peholmst/vaadin4spring/tree/v0.0.5/samples/security-sample

Failed to check license ilog.rules.res.xu.IlrLocalizedResourceException: error code: XU.ERROR.10700

I am trying to execute iLog jRules (Version 7.1) from Plain Java program. I am using J2SE session factory. Still I am getting below error. Can someone please enlighten ? Also what is the best and simple way to execute jRules rules from java main method ?
6/9/14 4:48 PM [SEVERE] 10700 - -.- - Failed to check license ilog.rules.res.xu.IlrLocalizedResourceException: Failed to check license, error code: XU.ERROR.10700
at ilog.rules.res.xu.util.IlrResourceExceptionHelper.createResourceException(IlrResourceExceptionHelper.java:44)
at ilog.rules.res.xu.util.IlrResourceExceptionHelper.createResourceException(IlrResourceExceptionHelper.java:78)
at ilog.rules.res.xu.spi.IlrManagedXUConnectionFactory.verifyRESLicense(IlrManagedXUConnectionFactory.java:1108)
at ilog.rules.res.xu.spi.IlrManagedXUConnectionFactory.getRulesetProvider(IlrManagedXUConnectionFactory.java:883)
at ilog.rules.res.xu.spi.IlrManagedXUConnection.getRulesetProvider(IlrManagedXUConnection.java:280)
at ilog.rules.res.xu.spi.IlrManagedXUConnection.createEngineManager(IlrManagedXUConnection.java:1659)
at ilog.rules.res.xu.spi.IlrManagedXUConnection.getEngineManager(IlrManagedXUConnection.java:1591)
at ilog.rules.res.xu.spi.IlrManagedXUConnection.getRulesetParameters(IlrManagedXUConnection.java:1508)
at ilog.rules.res.xu.cci.IlrXUConnection.getRulesetParameters(IlrXUConnection.java:499)
at ilog.rules.res.xu.cci.IlrXUInteraction.getRulesetInformation(IlrXUInteraction.java:739)
at ilog.rules.res.xu.cci.IlrXUInteraction.dispatchExecution(IlrXUInteraction.java:185)
at ilog.rules.res.xu.cci.IlrXUInteraction.execute(IlrXUInteraction.java:343)
at ilog.rules.res.xu.cci.IlrXUInteraction.execute(IlrXUInteraction.java:459)
at ilog.rules.res.xu.cci.IlrCCIClient.executeInteraction(IlrCCIClient.java:189)
at ilog.rules.res.xu.cci.IlrCCIRuleEngineClient.getRulesetArchiveProperties(IlrCCIRuleEngineClient.java:699)
at ilog.rules.res.session.util.IlrTraceHelper.<init>(IlrTraceHelper.java:111)
at ilog.rules.res.session.impl.IlrStatelessSessionBase.execute(IlrStatelessSessionBase.java:97)
at poc.PojoClientRunnerImpl.executeentpocrules(PojoClientRunnerImpl.java:88)
at poc.Main.main(Main.java:28)
Caused by: ilog.jum.client700.IluSAMAccessDeniedException: At 2014-06-09 11:18:33 GMT, SAM 3.0.0.1040: Access denied to module 'RES4J'.
If you want to inspect your access key, please do the following:
java -cp [location]sam.jar ilog.jum.client700.IluSAMAccessKey -summary
I got this issue resolved. It was because jar version mismatch. I was using jRules Studio version 7.1.1 and was executing using jRules version 7.0.0 jars .
I modified my classpath to use version 7.1.1 jars for jRules version 7.1.1 rule studio.

IncompatibleClassChangeError with grails rendering plugin 0.44

I have grails 2.0.4 application with rendering plugin 0.44. It works fine in dev environment, however, fails in production with IncompatibleClassChangeError.
Looked into the jars to see if there are any duplicates or incompatibilities, couldn't trace anything suspicious.
Tried with clean war (grails clean, war) but didn't help.
Both production and development test are running similar setup except java minor versions - java 1.6.0_65 (dev test/mac os) and java 1.6.0_30 (production/cent os).
Any help much appreciated, thanks!
Here is my BuildConfig.groovy:
plugins{
------
compile ":qrcode:0.3"
compile ":rendering:0.4.4"
}
Here is the stack trace:
org.codehaus.groovy.grails.web.servlet.mvc.exceptions.ControllerExecutionException: Executing action [our function] of controller [com.x.ourcontroller] caused exception: Runtime error executing action
at org.grails.jaxrs.web.JaxrsFilter.doFilterInternal(JaxrsFilter.java:46)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
at java.lang.Thread.run(Thread.java:701)
Caused by: org.codehaus.groovy.grails.web.servlet.mvc.exceptions.ControllerExecutionException: Runtime error executing action
... 7 more
Caused by: java.lang.reflect.InvocationTargetException
... 7 more
Caused by: java.lang.IncompatibleClassChangeError
at grails.plugin.rendering.document.RenderEnvironment.init(RenderEnvironment.groovy:37)
at grails.plugin.rendering.document.RenderEnvironment.with(RenderEnvironment.groovy:75)
at grails.plugin.rendering.document.RenderEnvironment.with(RenderEnvironment.groovy:67)
at grails.plugin.rendering.document.XhtmlDocumentService.generateXhtml(XhtmlDocumentService.groovy:64)
at grails.plugin.rendering.document.XhtmlDocumentService.createDocument(XhtmlDocumentService.groovy:34)
at grails.plugin.rendering.RenderingService.render(RenderingService.groovy:36)
at grails.plugin.rendering.RenderingService.render(RenderingService.groovy:35)
at grails.plugin.rendering.RenderingService.render(RenderingService.groovy:65)
at RenderingGrailsPlugin$_closure3.doCall(RenderingGrailsPlugin.groovy:59)
at com.xx.yy..
... 7 more
2014-03-19 20:55:52,025 [TP-Processor16] ERROR servlet.GrailsDispatcherServlet - HandlerInterceptor.afterCompletion threw exception
java.lang.IncompatibleClassChangeError
at org.grails.jaxrs.web.JaxrsFilter.doFilterInternal(JaxrsFilter.java:46)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
at java.lang.Thread.run(Thread.java:701)
2014-03-19 20:55:52,026 [TP-Processor16] ERROR servlet.GrailsDispatcherServlet - HandlerInterceptor.afterCompletion threw exception
java.lang.IncompatibleClassChangeError
at org.grails.jaxrs.web.JaxrsFilter.doFilterInternal(JaxrsFilter.java:46)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891) at java.lang.Thread.run(Thread.java:701)
java.lang.IncompatibleClassChangeError was happening due to a conflict between classes across different plugins with respect to MockHttpServletRequest and MockHttpServletResponse classes coming for jax-rs plugin. Tried the latest jax-rs plugin (0.9 for 2.0.x grails) which mentions in release notes that these are removed. However, this version of plugin didn't fix the problem. Manually removed the mock directory under jax-rs plugin from the war and repackaging it as a workaround for now. Removing the mock/* files fixed the problem.

Upgrade WebLogic 10.3.0 to JSF 2 via webapp-provided JAR

I have a Java EE 5 Web Application running on WebLogic 10.3.0.
I want to use JSF 2.x, but WebLogic 10.x only supports JSF 1.2.
So I did the following in order to use JSF 2.x instead.
I deployed a WAR cointaining those JARs:
wls.jsf.di.jar
glassfish.jstl_1.2.0.1.jar
javax.jsf_1.0.0.0_2-0.jar (jsf 2.0)
glassfish.jsf_1.0.0.0_2-0-4.jar
I added the following JARs to build path purely for compilation:
javax.faces-2.1.26.jar
jstl-1.2.jar
Created a Servlet 2.5 compatible web.xml and a weblogic.xml (1.0).
Included this in weblogic.xml:
<library-ref>
<library-name>jsf</library-name>
<specification-version>2.0</specification-version>
<implementation-version>1.0.0.0_2-0-2</implementation-version>
<exact-match>false</exact-match>
</library-ref>
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
For EL 2.2-like method arguments support in EL 2.1, I added this JAR:
jboss-el-2.0.0.GA.jar
And placed this in web.xml:
<context-param>
<param-name>com.sun.faces.injectionProvider</param-name>
<param-value>
com.sun.faces.vendor.WebContainerInjectionProvider
</param-value>
</context-param>
After all this changes WebLogic Console is still saying the following:
Initializing Sun's JavaServer Faces implementation (1.2_03-b04-FCS)
for context
As you can see, it is still using JSF 1.2. What else can i do to fully use JSF 2?
Well, after doing some tests i was really using JSF 2! So yes, that is enough to make Weblogic 10.3.0 work with JSF 2. I don't remember if i got rid of the "Initializing JSF 1.2" message tho, i recommend to just ignore it

Resources