maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Boden (JIRA)" <>
Subject [jira] Commented: (MSUREFIRE-115) Classloading problem for getting a resource
Date Fri, 02 Jun 2006 14:11:44 GMT
    [ ] 

David Boden commented on MSUREFIRE-115:

I have exactly the same problem running tests for which use Apache DBCP version 1.2.1 (latest).
The tests can't see the *.jocl configuration files.

I've followed it through with my debugger. The Thread context classpath gets set with the
the test resources directory. However, Apache DBCP doesn't use the Thread context classpath
to look for the .jocl files. Instead, it calls:

>> org.apache.commons.dbcp.PoolingDriver line 371 >> in = getClass().getResourceAsStream(String.valueOf(name) + ".jocl");

I think we need that workaround to add classes onto the surefire boot classpath.

> Classloading problem for getting a resource
> -------------------------------------------
>          Key: MSUREFIRE-115
>          URL:
>      Project: Maven 2.x Surefire Plugin
>         Type: Bug

>     Versions: 2.1.3, 2.2
>  Environment: Maven 2.0.4
> Windows XP
>     Reporter: Wim Deblauwe
>     Priority: Blocker
>  Attachments:,
> We are using Betwixt and some of our unit tests fail when run using
> surefire, but run fine in IntelliJ or Maven 1. Betwixt looks for
> descriptors with the name of the class + .betwixt to control how
> something is written out in XML. It uses the construct:
> myClass.getResource() to find the .betwixt file.
> E.g. com.mycomp.MyClass -> com/mycomp/MyClass.betwixt
> We have a betwixt file for the java.util.Date class. However, betwixt
> seems to be unable to pick it up when using surefire. I have created a
> small test that shows the problem and have attached it.
> I tried with version 2.2 using different configurations (never, once, pertest) and with
version 2.1.3 (default configuration)

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message