12 Replies Latest reply: Mar 29, 2011 1:03 AM by michael zhang RSS

JSF - Needs fixing

Tim Evers Master

Hi all,

I've been trying to get JSF unit running for a while now and it seems basically impossible. This is mainly because the documentation is extremely poor on how to get it running.

On the guide it states.


Here are the minimum jars you will need in your WEB-INF/lib.

* jboss-jsfunit-core-1.0-beta-1.jar
* aspectjrt-1.2.1.jar
* cactus-13-1.7.1.jar
* httpunit-1.6.1.jar
* junit-3.8.1.jar
* jtidy-4aug2000r7-dev.jar


This is so far from the truth and I have yet been able to get a single test to run because of jar dependencies which are NOT stated.

The most obvious of course is cargo...funny seeings as your own ant example has it.

But wait it only gets worse... once you do get a few of the missing jars in all I get are errors.

like this:

<error message="org.w3c.tidy.DOMDocumentImpl.getXmlStandalone()Z" type="org.apache.cactus.internal.client.ServletExceptionWrapper">
java.lang.AbstractMethodError: org.w3c.tidy.DOMDocumentImpl.getXmlStandalone()Z
 at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.setDocumentInfo(DOM2TO.java:373)
 at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:127)
 at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:94)
 at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:663)
 at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:709)
 at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:313)
 at org.jboss.jsfunit.facade.DOMUtil.convertToDomLevel2(DOMUtil.java:143)
 at org.jboss.jsfunit.facade.JSFClientSession.doWebRequest(JSFClientSession.java:189)
 at org.jboss.jsfunit.facade.JSFClientSession.doInitialRequest(JSFClientSession.java:122)
 at org.jboss.jsfunit.facade.JSFClientSession.<init>(JSFClientSession.java:75)
 at gekko.web.jsfunit.JSFUnitTest.testInitialPage(JSFUnitTest.java:24)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at org.apache.cactus.internal.AbstractCactusTestCase.runBareServer(AbstractCactusTestCase.java:153)
 at org.apache.cactus.internal.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.java:119)
 at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody0(AbstractWebTestController.java:93)
 at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody1$advice(AbstractWebTestController.java:217)
 at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest(AbstractWebTestController.java)
 at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody2(ServletTestRedirector.java:101)
 at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody3$advice(ServletTestRedirector.java:217)
 at org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector.java)
 at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody0(ServletTestRedirector.java:72)
 at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody1$advice(ServletTestRedirector.java:217)
 at org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.java)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
 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 org.jboss.jsfunit.framework.JSFUnitFilter.doFilter(JSFUnitFilter.java:123)
 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:233)
 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:102)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
 at java.lang.Thread.run(Thread.java:619)
</error>


Ok, so I search the forum and the only mention i see is upgrade to new version of jtidy... ok so i do that!

But now I just get
<error message="org.w3c.tidy.Tidy.setCharEncoding(I)V" type="org.apache.cactus.internal.client.ServletExceptionWrapper">
java.lang.NoSuchMethodError: org.w3c.tidy.Tidy.setCharEncoding(I)V
 at com.meterware.httpunit.parsing.JTidyHTMLParser.getParser(JTidyHTMLParser.java:74)
 at com.meterware.httpunit.parsing.JTidyHTMLParser.parse(JTidyHTMLParser.java:40)
 at com.meterware.httpunit.HTMLPage.parse(HTMLPage.java:255)
 at com.meterware.httpunit.WebResponse.getReceivedPage(WebResponse.java:1109)
 at com.meterware.httpunit.WebResponse.getFrames(WebResponse.java:1098)
 at com.meterware.httpunit.WebResponse.getFrameRequests(WebResponse.java:875)
 at com.meterware.httpunit.FrameHolder.updateFrames(FrameHolder.java:179)
 at com.meterware.httpunit.WebWindow.updateFrameContents(WebWindow.java:252)
 at com.meterware.httpunit.WebClient.updateFrameContents(WebClient.java:485)
 at com.meterware.httpunit.WebWindow.updateWindow(WebWindow.java:146)
 at com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java:130)
 at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:121)
 at com.meterware.httpunit.WebClient.getResponse(WebClient.java:113)
 at org.jboss.jsfunit.facade.JSFClientSession.doWebRequest(JSFClientSession.java:184)
 at org.jboss.jsfunit.facade.JSFClientSession.doInitialRequest(JSFClientSession.java:122)
 at org.jboss.jsfunit.facade.JSFClientSession.<init>(JSFClientSession.java:75)
 at gekko.web.jsfunit.JSFUnitTest.testInitialPage(JSFUnitTest.java:24)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at org.apache.cactus.internal.AbstractCactusTestCase.runBareServer(AbstractCactusTestCase.java:153)
 at org.apache.cactus.internal.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.java:119)
 at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody0(AbstractWebTestController.java:93)
 at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody1$advice(AbstractWebTestController.java:217)
 at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest(AbstractWebTestController.java)
 at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody2(ServletTestRedirector.java:101)
 at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody3$advice(ServletTestRedirector.java:217)
 at org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector.java)
 at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody0(ServletTestRedirector.java:72)
 at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody1$advice(ServletTestRedirector.java:217)
 at org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.java)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
 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 org.jboss.jsfunit.framework.JSFUnitFilter.doFilter(JSFUnitFilter.java:123)
 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:233)
 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:102)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.ru
n(JIoEndpoint.java:447)
 at java.lang.Thread.run(Thread.java:619)
</error>




Would it be at all possible to have a working example or at least some documentation that actually reflects what needs to go on?

Cause as it stands I just can't get jsfunit going


  • 1. Re: JSF - Needs fixing
    Stan Silvert Master

    Sorry you are having trouble. I'll take a closer look to make sure that the getting started guide reflects the current state of things. I don't know why you would need cargo unless you are deploying automatically during your build. You shouldn't need it if you are just running JSFUnit from the browser.

    There is a whole suite of examples that run from Maven. You can see how to run them from here:
    http://labs.jboss.com/jsfunit/building-jsfunit.html

    As for the JTidy problem, I haven't seen this myself and you are the first one to let me know if my suggestion helped or not. If you have a simple example that reproduces the problem, please attach it to this bug report:
    http://jira.jboss.com/jira/browse/JSFUNIT-65

    Regards,

    Stan

  • 2. Re: JSF - Needs fixing
    Dennis Byrne Newbie

    Can you post a directory listing of WEB-INF/lib ?

  • 3. Re: JSF - Needs fixing
    Tim Evers Master

    I'm attempting to use a maven build now to get my application working...

    So far I have this in my WEB-INF/lib directory

    
    antlr-2.7.6.jar
    aopalliance.jar
    asm-2.2.3.jar
    asm-commons-2.2.3.jar
    asm-util-2.2.3.jar
    aspectjrt-1.2.1.jar
    aspectjrt.jar
    aspectjweaver.jar
    cactus-13-1.7.1.jar
    cactus-ant-13-1.7.1.jar
    cargo-0.5.jar
    cglib-nodep-2.1_3.jar
    commons-beanutils-1.7.0.jar
    commons-codec-1.3.jar
    commons-collections-3.2.jar
    commons-digester-1.8.jar
    commons-discovery-0.4.jar
    commons-el-1.0.jar
    commons-httpclient-2.0.2.jar
    commons-lang-2.3.jar
    commons-logging-1.1.jar
    dom4j-1.6.1.jar
    edbc.jar
    ehcache-1.2.3.jar
    ejb3-persistence.jar
    el-impl-1.0.jar
    gekko-services.jar
    hibernate-annotations.jar
    hibernate-commons-annotations.jar
    hibernate-entitymanager.jar
    hibernate-validator.jar
    hibernate3.jar
    httpunit-1.6.2.jar
    iijdbc.jar
    itext.jar
    jasperreports-1.3.4.jar
    javassist.jar
    jboss-archive-browsing.jar
    jboss-el.jar
    jboss-jsfunit-ant-1.0-beta-2-SNAPSHOT.jar
    jboss-jsfunit-core-1.0-beta-2-SNAPSHOT.jar
    jboss-jsfunit-richfaces-1.0-beta-2-SNAPSHOT.jar
    jboss-seam-debug.jar
    jboss-seam-ui.jar
    jboss-seam.jar
    jdbc2_0-stdext.jar
    jhighlight-1.0.jar
    jsf-api.jar
    jsf-facelets-1.1.13.jar
    jsf-impl.jar
    jta.jar
    jtidy-4aug2000r7-dev.jar
    junit-3.8.1.jar
    log4j-1.2.14.jar
    nekohtml-0.9.5.jar
    proxool-0.9.0RC3.jar
    richfaces-api-3.1.1-GA.jar
    richfaces-impl-3.1.1-GA.jar
    richfaces-ui-3.1.1-GA.jar
    spring-aop.jar
    spring-beans.jar
    spring-context.jar
    spring-core.jar
    spring-jdbc.jar
    spring-orm.jar
    spring-tx.jar
    spring-web.jar
    ws-commons-util-1.0.2.jar
    xercesImpl-2.4.0.jar
    xmlrpc-client-3.1.jar
    xmlrpc-common-3.1.jar
    xmlrpc-server-3.1.jar
    


    but I'm still experiencing the following error.

    <error message="org.w3c.tidy.DOMDocumentImpl.getXmlStandalone()Z" type="org.apache.cactus.internal.client.ServletExceptionWrapper">
    java.lang.AbstractMethodError: org.w3c.tidy.DOMDocumentImpl.getXmlStandalone()Z
     at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.setDocumentInfo(DOM2TO.java:373)
     at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:127)
     at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:94)
     at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:663)
     at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:709)
     at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:313)
     at org.jboss.jsfunit.facade.DOMUtil.convertToDomLevel2(DOMUtil.java:143)
     at org.jboss.jsfunit.facade.JSFClientSession.updateInternalState(JSFClientSession.java:195)
     at org.jboss.jsfunit.facade.JSFClientSession.doWebRequest(JSFClientSession.java:185)
     at org.jboss.jsfunit.facade.JSFClientSession.doInitialRequest(JSFClientSession.java:122)
     at org.jboss.jsfunit.facade.JSFClientSession.<init>(JSFClientSession.java:75)
     at gekko.web.jsfunit.JSFUnitTest.testInitialPage(JSFUnitTest.java:24)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at org.apache.cactus.internal.AbstractCactusTestCase.runBareServer(AbstractCactusTestCase.java:153)
     at org.apache.cactus.internal.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.java:119)
     at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody0(AbstractWebTestController.java:93)
     at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody1$advice(AbstractWebTestController.java:217)
     at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest(AbstractWebTestController.java)
     at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody2(ServletTestRedirector.java:101)
     at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody3$advice(ServletTestRedirector.java:217)
     at org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector.java)
     at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody0(ServletTestRedirector.java:72)
     at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody1$advice(ServletTestRedirector.java:217)
     at org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.java)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
     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 org.jboss.jsfunit.framework.JSFUnitFilter.doFilter(JSFUnitFilter.java:123)
     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:233)
     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:102)
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
     at java.lang.Thread.run(Thread.java:619)
    </error>
    


    I'll keep trying to figure this out but.... I'm not making much progress

  • 5. Re: JSF - Needs fixing
    Tim Evers Master

    Ok....With some help of a colleague I have made progress...

    It seems as though you need to have xalan-2.4.1.jar on your classpath for jsfunit to run.

    Maybe the doco should be updated to show this. As even running the maven examples do not work in tomcat.

  • 6. Re: JSF - Needs fixing
    Tim Evers Master

    well, doing the above step made the examples work....but now i'm getting this when i try it in my own application.

    *sigh*

    java.lang.RuntimeException: javax.xml.transform.TransformerException: org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces.
     at org.jboss.jsfunit.facade.JSFClientSession.updateInternalState(JSFClientSession.java:199)
     at org.jboss.jsfunit.facade.JSFClientSession.doWebRequest(JSFClientSession.java:185)
     at org.jboss.jsfunit.facade.JSFClientSession.doInitialRequest(JSFClientSession.java:122)
     at org.jboss.jsfunit.facade.JSFClientSession.<init>(JSFClientSession.java:75)
     at gekko.web.jsfunit.JSFUnitTest.testInitialPage(JSFUnitTest.java:24)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at org.apache.cactus.internal.AbstractCactusTestCase.runBareServer(AbstractCactusTestCase.java:153)
     at org.apache.cactus.internal.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.java:119)
     at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody0(AbstractWebTestController.java:93)
     at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody1$advice(AbstractWebTestController.java:217)
     at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest(AbstractWebTestController.java)
     at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody2(ServletTestRedirector.java:101)
     at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody3$advice(ServletTestRedirector.java:217)
     at org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector.java)
     at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody0(ServletTestRedirector.java:72)
     at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody1$advice(ServletTestRedirector.java:217)
     at org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.java)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
     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 org.jboss.jsfunit.framework.JSFUnitFilter.doFilter(JSFUnitFilter.java:123)
     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:233)
     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:102)
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
     at java.lang.Thread.run(Thread.java:619)
    Caused by: javax.xml.transform.TransformerException: org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces.
     at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:336)
     at org.jboss.jsfunit.facade.DOMUtil.convertToDomLevel2(DOMUtil.java:143)
     at org.jboss.jsfunit.facade.JSFClientSession.updateInternalState(JSFClientSession.java:195)
     ... 38 more
    Caused by: org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces.
     at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:351)
     at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1020)
     at org.apache.xml.utils.TreeWalker.startNode(TreeWalker.java:379)
     at org.apache.xml.utils.TreeWalker.traverse(TreeWalker.java:191)
     at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:325)
     ... 40 more
    


    any ideas?

  • 7. Re: JSF - Needs fixing
    Stan Silvert Master

    Which JDK are you using? I have found that Sun's JDK 1.5 and 1.6 both use Xalan 2.6. Can you try with Xalan 2.6?

    Stan

  • 8. Re: JSF - Needs fixing
    Manfred Maelzer Newbie

    I had similar troubles running jsfunit with tomcat 4.1 (the jdk that tomcat referenced was java 1.6 however).

    It told me I had missing xalan classes. These would have had to be set in the endorsed folder.

    What also helped was just setting the tomcat4.1 to use the java 1.4 SDK. No more error messages since.

    Anyhow, if you still get error messages with putting the newest xalan libs to the libs folder, try to use them in the endorsed folder. This may help.

  • 9. Re: JSF - Needs fixing
    Stan Silvert Master

    Your wish is my command. I've created a wiki page where you can download a WAR based on the "Getting Started Guide".

    The six jars listed really are the minimum required, but it depends on your container. If your container does not bundle JSF then you will need a few more than those.

    Here is the new wiki page: http://wiki.jboss.org/wiki/GettingStartedGuide

    Stan

  • 10. Re: JSF - Needs fixing
    Tim Evers Master

    Thanks for your help stan.

    Your comment about Xalan 2.6 actually proved to be the real issue.

    I upgraded to Xalan 2.7 and everything seems to work the way it should now I think! At least....my initial test ran with succes :D YAY!

    So maybe on the wiki you could make a note that if your using tomcat6 and running JDK 1.6 you need to include the xalan >= version 2.6 into your lib directory. (It doesn't have to be in endorsed just in your lib)

    Now....just another quick question.

    I have the following test (just learning how to use it)

    public class JSFUnitTest extends org.apache.cactus.ServletTestCase {
    
     public static Test suite()
     {
     return new TestSuite( JSFUnitTest.class );
     }
    
     public void testInitialPage() throws IOException, SAXException
     {
     // Send an HTTP request for the initial page
     JSFClientSession client = new JSFClientSession("/web/index.jsf");
    
     // A JSFServerSession gives you access to JSF state
     JSFServerSession server = new JSFServerSession(client);
    
     // Test navigation to initial viewID
     assertEquals("/web/index.xhtml", server.getCurrentViewID());
    
     }
    }
    


    Why is it that I navigate to /web/index.jsf that I have to assert that my view is /web/index.xhtml.

    Why can't I assert that my view is the jsf page?

    If this is just how it works so be it.....but just seems a tad weird :)

  • 11. Re: JSF - Needs fixing
    Stan Silvert Master

    Thanks for the suggestion. I'll post a note about Xalan somewhere that people can see it.

    Would you mind posting new questions as a separate thread? It's a good question and I think others are more likely to see it and benefit from it if it is in a new thread.

    Stan

  • 12. Re: JSF - Needs fixing
    michael zhang Newbie

    It's Httpunit and jtidy compatible issue. jitdy has remove the method setCharEncoding(String encoding) and add setInputEncoding() and setOutputEncoding()

     

    see the following URL

    https://sourceforge.net/tracker/?func=detail&aid=2880636&group_id=6550&atid=106550#