[jboss-user] [JBoss Tools] New message: "JBT Test Project and running integration tests problem"

Piotr Sobczyk do-not-reply at jboss.com
Thu Feb 11 07:32:33 EST 2010

User development,

A new message was posted in the thread "JBT Test Project and running integration tests problem":


Author  : Piotr Sobczyk
Profile : http://community.jboss.org/people/piotr.sobczyk

Has anybody succeed with running tests from test project generated by JBoss Tools while using RichFaces? I always end up with exception:
FAILED: testDisplayClients
    at java.lang.String.startsWith(Unknown Source)
    at java.lang.String.startsWith(Unknown Source)
    at org.ajax4jsf.webapp.WebXml.getFacesResourceKey(WebXml.java:189)
    at org.ajax4jsf.webapp.WebXml.getFacesResourceKey(WebXml.java:222)
    at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:139)
    at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:508)
    at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
    at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
    at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
    at org.jboss.seam.mock.AbstractSeamTest$Request.run(AbstractSeamTest.java:491)
    at pl.sobczyk.mitsubishi.crm.test.DisplayClientsTest.testDisplayClients(DisplayClientsTest.java:29)
... Removed 22 stack frames
As I said I'm using test project generated by JBT, with no modifications and TestNG plugin. I added very simple test case and test suite descriptor named testng.xml to test-src source folder. I'm running test like in this official seam tutorial: http://docs.jboss.com/seam/latest/reference/en-US/html/gettingstartedwithjbosstools.htmlby clicking right mouse button on testng.xml -> RunAs -> TestNG. Everything seems to work fine, every seam component is propetly loaded to Embedded JBoss container but when it seems that test is finnaly running above exception occurs.
I tried to debug it and noticed very strange things:
public String getFacesResourceKey(HttpServletRequest request) {
String resourcePath = request.getRequestURI().substring(
return getFacesResourceKey(resourcePath);

Last line of above code invokes method getFacesResourceKey that throws exception 
(there is null object passed to startsWith method).

When this method is invoked than: 

Obviously I have no user in my test named gavin and there is no page /mypoject/page.xhtml in my project. 
It seems like some example test is launching along with mine but I can't find out why and from where.

I really don't know whether that issue is realated to Seam or JBoss Tools, I tried to ask about it on Seam forum
and so did several other people but I never found correct answer. Here are topics:


I didn't yet try to launch my tests from ant task, before that I would have to create full ant build script to
my project and up to now using JBT Builder to build project was just enough for me.


To reply to this message visit the message page: http://community.jboss.org/message/525742#525742

More information about the jboss-user mailing list