You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Damian Steer (JIRA)" <ji...@apache.org> on 2012/11/27 14:31:58 UTC
[jira] [Closed] (JENA-356) Assembley loader does not work across
jars in Fuseki
[ https://issues.apache.org/jira/browse/JENA-356?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Damian Steer closed JENA-356.
-----------------------------
Resolution: Not A Problem
Assignee: Damian Steer
Perennial java gotcha. Even experienced java users get caught out by this:
{noformat}
java -jar ...
{noformat}
will ignore any supplied class path (via $CLASSPATH, -cp) except the one given by the jar itself.
Work around: include the fuseki jar on the classpath, call the main class directly.
P.S. I was bitten by this not that long ago :-)
> Assembley loader does not work across jars in Fuseki
> ----------------------------------------------------
>
> Key: JENA-356
> URL: https://issues.apache.org/jira/browse/JENA-356
> Project: Apache Jena
> Issue Type: Bug
> Components: Fuseki
> Affects Versions: Fuseki 0.2.5
> Reporter: Claude Warren
> Assignee: Damian Steer
>
> When attempting to load the d2rq assembler using the default fuseki-server.jar and a config.ttl file I get com.hp.hpl.jena.shared.JenaException: java.lang.ClassNotFoundException: de.fuberlin.wiwiss.d2rq.assembler.D2RQAssembler even though the jar is on the path. Moving the de/... and d2rq/... classes from the d2rq jar into the fuseki-server jar solves the problem.
> To recreate
> Download fuseki and d2rq.
> create a d2rq configuration that works.
> create a fuseki config.ttl that will load the d2rq configuration.
> in the fuseki directory execute
> java -Dlog4j.configuration=log4j.properties -Xmx1200M -cp $CLASSPATH:<d2rqdir>/* -jar fuseki-server.jar --update --config=config.ttl
> I think the issue is in the com.hp.hpl.jena.assembler.AssemblerHelp.loadClassNamedBy( Statement s ) method. I believe that
> try { return Class.forName( getString( s ) ); }
> should be replaced with
> try { return Class.forName( getString( s ), true, null ); }
> to use the bootstrap loader.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira