- 
        1. Netbeans, JSFUnit & Glassfish 3.0.1 doesn't workdimarzio Jan 31, 2011 6:02 AM (in response to dimarzio)Forget to provide an important information: I use maven 3 to manage my dependencies. When I remove all JSFUnit dependencies from my pom it works pretty fine... 
- 
        2. Re: Netbeans, JSFUnit & Glassfish 3.0.1 doesn't workdimarzio Jan 31, 2011 7:29 AM (in response to dimarzio)I just tried it with the demo example hellojsfJEE5. Well I can deploy it and I can start it. But when I try to execute the tests I get 500 Internal Server Error... com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException: 500 Internal Server Error for http://localhost:8080/hellojsfJEE5/index.facesThe demo example for JBoss 6 shows me the same exeptions. But the good news: some tests are passed! I mean I can see something like Expected A but was B. But the most tests are fail: 5 00 Internal Server Error
- 
        3. Netbeans, JSFUnit & Glassfish 3.0.1 doesn't workssilvert Jan 31, 2011 8:30 AM (in response to dimarzio)Dmitriy Neretin wrote: com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException: 500 Internal Server Error for http://localhost:8080/hellojsfJEE5/index.facesA 500 Internal Server Error means that there was an error executing the application and you need to look at the server's log to find the problem. What does the server log say? Stan 
- 
        4. Re: Netbeans, JSFUnit & Glassfish 3.0.1 doesn't workdimarzio Jan 31, 2011 9:29 AM (in response to ssilvert)Thank you for the feedback! So, after I tried to start the example .war on the AS 6 the log file is saying: 2011-01-31 15:05:10,745 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/hellojsfJBoss5].[Faces Servlet]] (http-127.0.0.1-8080-3) Servlet.service() for servlet Faces Servlet threw exception: java.lang.UnsupportedOperationException at javax.faces.context.ExternalContext.getResponseOutputWriter(ExternalContext.java:1223) [:2.0.3-] at com.sun.faces.application.view.JspViewHandlingStrategy.renderView(JspViewHandlingStrategy.java:202) [:2.0.3-] at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:127) [:2.0.3-] at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:117) [:2.0.3-] ... And this for each JSFUnit Test. I get actually the same exception if I try to start the glassfish war 
- 
        5. Re: Netbeans, JSFUnit & Glassfish 3.0.1 doesn't workssilvert Jan 31, 2011 9:40 AM (in response to dimarzio)Can you attach the WAR? Stan 
- 
        6. Re: Netbeans, JSFUnit & Glassfish 3.0.1 doesn't workdimarzio Jan 31, 2011 9:47 AM (in response to ssilvert)Stan Silvert schrieb: Can you attach the WAR? Stan These are the WAR examples from this page http://community.jboss.org/servlet/JiveServlet/download/9819-33-6172/hellojsfJEE5.war http://community.jboss.org/servlet/JiveServlet/download/9819-33-6173/hellojsfJBoss5.war That's it why I am so wondering... 
- 
        7. Re: Netbeans, JSFUnit & Glassfish 3.0.1 doesn't workdimarzio Jan 31, 2011 10:49 AM (in response to dimarzio)Oh my G-O-D It was working all the time! The Problem was, that the application URL was changed! At the beginning it was simply: localhost:8080/myjsfapp and after I added the jsfunit libraries it changed to localhost:8080/myjsfapp/index.jsfunit and if I want rich the jsfunit console I should enter localhost:8080/myjsfapp/jsfunit/index.jsfunit How I found it out? I just deployed my application into the AS 6 and clicked Launch... And it showed me the right URL What did I do wrong? Can somebody explain me? But what I still don't understand, why the example WAR's from this page doesn't work? The tests I wrote for my application are failed too Any ideas? 
- 
        8. Re: Netbeans, JSFUnit & Glassfish 3.0.1 doesn't workssilvert Jan 31, 2011 11:10 AM (in response to dimarzio)Here is what I found out about the example app. I think there is a bug here, but I have found a workaround. Those particular WARs your referenced were written to run against JSF 1.2. So in JBoss AS6, you will need to include this in your web.xml: <context-param> <param-name>org.jboss.jbossfaces.JSF_CONFIG_NAME</param-name> <param-value>Mojarra-1.2</param-value> </context-param> That will run the app under Mojarra 1.2 and get rid of your UnsupportedOperationExceptions. Also, you will need to make sure your web.xml uses the web-app 3.0 xsd: <web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"> I don't yet know why this is the case, but you need to do that for JSP-based JSF apps. Otherwise, it won't bind JSF/JSP components to the managed beans. Stan 
- 
        9. Re: Netbeans, JSFUnit & Glassfish 3.0.1 doesn't workssilvert Jan 31, 2011 11:22 AM (in response to dimarzio)Dmitriy Neretin wrote: Oh my G-O-D It was working all the time! The Problem was, that the application URL was changed! At the beginning it was simply: localhost:8080/myjsfapp and after I added the jsfunit libraries it changed to localhost:8080/myjsfapp/index.jsfunit and if I want rich the jsfunit console I should enter localhost:8080/myjsfapp/jsfunit/index.jsfunit How I found it out? I just deployed my application into the AS 6 and clicked Launch... And it showed me the right URL What did I do wrong? Can somebody explain me? That's very strange. It shouldn't change the extension mapped to the FacesServlet. That's a bug. 
- 
        10. Re: Netbeans, JSFUnit & Glassfish 3.0.1 doesn't workdimarzio Jan 31, 2011 11:42 AM (in response to ssilvert)Stan Silvert schrieb: That's very strange. It shouldn't change the extension mapped to the FacesServlet. That's a bug. I don't really figure out why and how it was happend That's why I would propose you make an new entry in the Jira You are right, I use JSF 2.0 with facelets (Mojara 2.0.2 with component library primefaces RC 2.0.2). And a very big thanks to you ! 
- 
        11. Re: Netbeans, JSFUnit & Glassfish 3.0.1 doesn't workdimarzio Jan 31, 2011 11:41 AM (in response to dimarzio)Last news: tests runs And the last question: is it possible to disable javascript when I check my facelets pages? jQuery failures dont't interest me 
- 
        12. Re: Netbeans, JSFUnit & Glassfish 3.0.1 doesn't workssilvert Jan 31, 2011 11:52 AM (in response to dimarzio)Sounds like you might want to do this: jsfSession.getWebClient().setJavaScriptEnabled(false); or jsfSession.getWebClient().setThrowExceptionOnScriptError(false); See http://htmlunit.sourceforge.net/apidocs/com/gargoylesoftware/htmlunit/WebClient.html Stan 
- 
        13. Re: Netbeans, JSFUnit & Glassfish 3.0.1 doesn't workdimarzio Feb 2, 2011 7:12 AM (in response to ssilvert)Strange, it didn't work... My start page contains following tag: h:outputScript library="js" name="jquery-1.4.4.min.js" If I left it uncommented JSFUnit performs the js check. 
 
    