Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for JSF 2.1/2.0 on Java EE 6 Container #929

Closed
saravanan-kandaswamy opened this issue Mar 26, 2018 · 11 comments
Closed

Support for JSF 2.1/2.0 on Java EE 6 Container #929

saravanan-kandaswamy opened this issue Mar 26, 2018 · 11 comments

Comments

@saravanan-kandaswamy
Copy link

Hi,

I am trying to use the Bootsfaces for my sample JSF application which is using JSF 2.1. When i try to use the b:image, i ran into runtime error. As per the documentation.

BootsFaces is targeted at Java EE 6/7 and requires a Java 1.6 or later VM.
JSF 2.0, 2.1 and 2.2 are supported.
BootsFaces supports Oracle Mojarra 2.2+ and Apache MyFaces 2.2+

Could you please tell me is Bootsfaces is compatible to be used for JSF 2.1/JSF 2.0 for Java EE 6 ?
If yes what will be known set of limitations.

Thanks in Advance.

Saravanan K

@chongma
Copy link
Collaborator

chongma commented Mar 26, 2018

Could you post the error you are getting? If it is a sample application is the code on GitHub so we can see it? BootsFaces should support jsf versions as specified in the docs

@saravanan-kandaswamy
Copy link
Author

I am trying to use the https://github.com/TheCoder4eu/BootsFacesWeb.git code to deploy in JBoss EAP 6.2 GA. (which is Java EE 6 compatible).

the build is successful, when I try to deploy its goes fine, when i try to access the page which has <b:image JSF tag in it, i am getting the following error.

I know that the code base which is getting referred is from JSF 2.2, since the docs are referring that it will be compatible with JSF 2.0/2.1/2.2.

Wanted to know if there are any alternatives

Log:
13:05:13,159 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/BootsFacesWeb].[Faces Servlet]] (http-/127.0.0.1:8080-1) JBWEB000236: Servlet.service() for servlet Faces Servlet threw exception: java.lang.NoSuchMethodError: javax.faces.application.ResourceHandler.isResourceURL(Ljava/lang/String;)Z
at net.bootsfaces.component.image.ImageRenderer.getImageSource(ImageRenderer.java:122) [bootsfaces-1.2.1-SNAPSHOT.jar:1.2.1-SNAPSHOT]
at net.bootsfaces.component.image.ImageRenderer.encodeBegin(ImageRenderer.java:65) [bootsfaces-1.2.1-SNAPSHOT.jar:1.2.1-SNAPSHOT]
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:826) [jboss-jsf-api_2.1_spec-2.1.19.1.Final-redhat-1.jar:2.1.19.1.Final-redhat-1]
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1777) [jboss-jsf-api_2.1_spec-2.1.19.1.Final-redhat-1.jar:2.1.19.1.Final-redhat-1]
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782) [jboss-jsf-api_2.1_spec-2.1.19.1.Final-redhat-1.jar:2.1.19.1.Final-redhat-1]
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782) [jboss-jsf-api_2.1_spec-2.1.19.1.Final-redhat-1.jar:2.1.19.1.Final-redhat-1]
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782) [jboss-jsf-api_2.1_spec-2.1.19.1.Final-redhat-1.jar:2.1.19.1.Final-redhat-1]
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782) [jboss-jsf-api_2.1_spec-2.1.19.1.Final-redhat-1.jar:2.1.19.1.Final-redhat-1]
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782) [jboss-jsf-api_2.1_spec-2.1.19.1.Final-redhat-1.jar:2.1.19.1.Final-redhat-1]
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:439) [jsf-impl-2.1.19-redhat-2.jar:2.1.19-redhat-2]
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:124) [jsf-impl-2.1.19-redhat-2.jar:2.1.19-redhat-2]
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:286) [jboss-jsf-api_2.1_spec-2.1.19.1.Final-redhat-1.jar:2.1.19.1.Final-redhat-1]
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120) [jsf-impl-2.1.19-redhat-2.jar:2.1.19-redhat-2]
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.1.19-redhat-2.jar:2.1.19-redhat-2]
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) [jsf-impl-2.1.19-redhat-2.jar:2.1.19-redhat-2]
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594) [jboss-jsf-api_2.1_spec-2.1.19.1.Final-redhat-1.jar:2.1.19.1.Final-redhat-1]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]

@chongma
Copy link
Collaborator

chongma commented Mar 26, 2018

i thought the BootsFacesWeb showcase imported its own Faces library dependencies in the pom.xml? depending on which profile you choose... also i just realised this bug is posted in the BootsFaces-OSP instead of BootsFacesWeb https://github.com/TheCoder4eu/BootsFacesWeb project?

@saravanan-kandaswamy
Copy link
Author

saravanan-kandaswamy commented Mar 26, 2018

BootsFaceWeb Project uses BootsFaces-OSP binaries for it to be executed, I can replicate the same using the Helloworld example with <b:image tag in it which has the JSF 2.1/2.0 dependency. The POM file i have modified with JSF 2.1 with that i ran into the above issue.

<dependency>
			<groupId>com.sun.faces</groupId>
			<artifactId>jsf-api</artifactId>
			<version>2.1.0</version>
			<scope>provided</scope>
		</dependency>
                  <dependency>
			<groupId>net.bootsfaces</groupId>
			<artifactId>bootsfaces</artifactId>
			<version>1.2.1-SNAPSHOT</version>
		</dependency>

Need to know if BootsFaces-OSP supports JSF 2.1/2.0.

@stephanrauh
Copy link
Collaborator

I've just looked it up: in theory, the method that's reported missing should be available since JSF 2.0.

@stephanrauh
Copy link
Collaborator

@chongma I think the issue shouldn't be moved to the BootsFacesWeb project. If it's a bug, it's not caused by the showcase but by the core library. As least that's what my gut feeling tells me.

@stephanrauh
Copy link
Collaborator

@saravanan-kandaswamy I believe you've already seen it, but just for the sake of completeness: did you eliminate the jsf-impl.jar and the jsf-api.jar from the pom.xml? Both libraries are provided by JBoss, so it's not a good idea to include a second copy with the class path.

@saravanan-kandaswamy
Copy link
Author

I havent removed those Jars from POM.xml. I have just reduced the version from 2.2 to 2.0. With that i have built the BootfacesWeb project and deployed. JBoss EAP 6.2 supports only JSF 2.0. Hence I am running into this error.

The real question is Bootfaces supports JSF 2.0/2.1?

@stephanrauh
Copy link
Collaborator

@TheCoder4eu Do we still support JSF 2.0? And what about JSF 2.1?

@chongma
Copy link
Collaborator

chongma commented Apr 6, 2018

i would say that if JSF 2.0 or 2.1 do not contain the function javax.faces.application.ResourceHandler.isResourceURL that the answer is no.

@stephanrauh
Copy link
Collaborator

It seems we've lost compatiblity to JSF 2.0 and 2.1 already in August 2015.

So I suggest giving up this compatibility officially in order to benefit from the new features of JSF 2.2.

stephanrauh added a commit to TheCoder4eu/BootsFacesWeb that referenced this issue Apr 15, 2018
…w JSF 2.2 is the oldest supported version of JSF)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants