incubator-jena-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paolo Castagna (Commented) (JIRA)" <>
Subject [jira] [Commented] (JENA-36) can be a surprise
Date Fri, 04 Nov 2011 10:21:00 GMT


Paolo Castagna commented on JENA-36:

> Maybe running the APR syntax error tests needs the log4j setup programmatically changed
to not emit any messages. 

ARP tests are these:

        super("ARP") ;
        addTest( com.hp.hpl.jena.rdf.arp.TestARPMain.suite());
        addTest( com.hp.hpl.jena.rdf.arp.MoreTests.suite());
        addTest( com.hp.hpl.jena.rdf.arp.states.TestARPStates.suite());
        addTest( com.hp.hpl.jena.rdf.arp.URITests.suite());
        addTest( com.hp.hpl.jena.rdf.arp.TaintingTests.suite());
        addTest( com.hp.hpl.jena.rdf.arp.SAX2RDFTest.suite());
        addTest( com.hp.hpl.jena.rdf.arp.StAX2ModelTest.suite());

Here is how I am trying to approach this issue and try to remove the errors we see when running

 public class SAX2RDFTest extends TestCase {
 	protected static Logger logger = LoggerFactory.getLogger( testReaderInterface.class );
+	static {
+		RDFDefaultErrorHandler.silent = true; // JENA-36
+	}
 public class StAX2ModelTest extends TestCase {
    protected static Logger logger = LoggerFactory.getLogger(testReaderInterface.class);
+	static {
+		RDFDefaultErrorHandler.silent = true; // JENA-36
+	}

In the .classpath (this is so that when you run tests in Eclipse the src/test/resources/
file is used):

+  <classpathentry kind="src" path="src/test/resources" excluding="**/*.java"/>

I commented/uncommented the test suites, one at the time to find out which suite was logging
Now I am at a point where:

 1. if I comment MoreTests.suite() I do *not* see ERRORs logged.
 2. if I comment all the test suites but MoreTests.suite() I do *not* see ERRORs logged.

Therefore, there must be some interaction between tests (which isn't good).
Also, RDFDefaultErrorHandler.silent = true isn't a great thing to do, but I have no better
> can be a surprise
> ----------------------------------
>                 Key: JENA-36
>                 URL:
>             Project: Jena
>          Issue Type: Bug
>            Reporter: Benson Margulies
>            Assignee: Paolo Castagna
>            Priority: Minor
> The jena jar, and perhaps others, has a on behalf of the commands. A
little classpath confusion can end up with this at the head of the line of an app that is
incorporating the jar.
> It would be more better, if you ask me, for the commands to use the -D for log4j to ask
for a different file name, and leave *that* in the jar.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message