0

I'm working on upgrading one of my applications from JSF 1.0 to 2.0. It runs on JBoss 4.0.3SP1 and I'm trying to make it run on WildFly 8.1 final. After some struggles, I was able to get the application compiled and deployed to WildFly but got this error, when accessing the .jsp file.

2015-07-09 07:40:08,600 ERROR [io.undertow.request] (default task-2) UT005022: Exception generating error page /errorpages/error.faces: org.apache.jasper.Jasper
Exception: JBWEB004113: **The absolute uri: http://java.sun.com/jsf/html cannot be resolved in either web.xml or the jar files deployed with this application** at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:53) [jastow-1.0.0.Final.jar:1.0.0.Final]
        at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:147) [jastow-1.0.0.Final.jar:1.0.0.Final]

I've read the following articles but still cannot fix the problem.

I also enabled org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL in web.xml and disabled "weld" in WildFly and I put the following libs/files in <EAR>/lib, <WAR>/WEB-INF/lib.

  • jsf-api.jar
  • jsf-impl.jar
  • jstl.jar
  • standard.jar
  • html_basic.tld, jsf_core.tld

And, for JSTL, I tried different URLs, like:

<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>

or

<%@ taglib uri="http://java.sun.com/jsp/jstl/html" prefix="h"%>

or put the URL into <html> instead of using <%@taglib>.

However, the problem cannot be resolved by the above steps.

Is there anyone had the same problem can share some experience? I'd like to see if there is a possibility I can run the JSF 1.0 code on WildFly?

Thanks in advance!

Community
  • 1
  • 1
  • I'd not waste time on it. Better spend time on getting your webapp to work on WF8 in its default trim without supplying any Java EE JARs via the webapp. JSF 2.2 is backwards compatible with JSPs in JSF 1.x style. It will in long term cost less time than trying to downgrade WF8 to use JSF 1.x. – BalusC Jul 09 '15 at 15:23
  • @BalusC: if I read correctly, they are also upgrading to 2.0... Which in turn is still downgrading WF 8 – Kukeltje Jul 09 '15 at 15:31
  • @Kukeltje: The title indeed conflicts the body. I just assumed it being carelessness and ignored the title. My comment is based on the body (OP actually attempted to ship JSF 1.x JARs along with webapp (and even JSTL JARs and a loose TLD file :X none of them all is necessary) ) – BalusC Jul 09 '15 at 15:32
  • @BalusC: from the body: _I'm working on upgrading one of my applications from JSF 1.0 to 2.0._ ;-) but you are right (as usual) – Kukeltje Jul 09 '15 at 15:34
  • Thanks for both of your reply. Originally, I planned to do as small steps to avoid the whole rewriting. My 1st step was to upgrade to Wildfly. However, since it doesn't ship with JSF 1.x capability, my application didn't run properly on Wildfly even after I fixed those compilation and packaging problems. – user2280292 Jul 09 '15 at 17:04
  • You've more chance in succeeding if you ask a question about specifically that problem which you generalized as "didn't run properly". – BalusC Jul 09 '15 at 17:22
  • @BalusC: I had to exclude "weld" in Wildfly and specified "org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL" to true in web.xml, so Wildfly can support JSF 1.x. Now, I'm stuck on this absolute URL error. The full error is: UT005022: Exception generating error page /errorpages/error.faces: org.apache.jasper.Jasper Exception: JBWEB004113: The absolute uri: http://java.sun.com/jsf/html cannot be resolved in either web.xml or the jar files deployed with this application. I suspect a classloading-related configuration caused this. Thanks again! – user2280292 Jul 09 '15 at 18:38
  • Sorry, I didn't mean that. Just without bundling any of those JARs in webapp. So, you got compilation errors? Which exactly? JSF 2.x API is fully backwards compatible with JSF 1.x API. – BalusC Jul 09 '15 at 19:40
  • I took out jsf*.jar, jstl.jar and jsp-api.jar and built the application but I got some errors during the deployment on Wildfly. One error is this: Caused by: java.lang.ClassNotFoundException: javax.faces.model.SelectItem from [ Module "deployment.poweronremotemaps.dev.ear.poremoteweb.war:main" from Service Module Loader] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java: 213) Thanks! – user2280292 Jul 09 '15 at 20:40
  • Strangely, I did find find SelectItem in the jsf-api in Wildfly. And, I was able to deploy and run a JSF 1.0 "hello world" application on Wildfly. I will go for your suggestion to start upgrading JSF. Thanks! – user2280292 Jul 09 '15 at 21:07

0 Answers0