You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by Paolo Castagna <ca...@googlemail.com> on 2011/10/11 22:57:50 UTC

Do we have a problem with org.apache.jena:jena-tdb:jar:0.9.0-incubating-SNAPSHOT?

Hi,
while I was helping Jérôme on jena-users mailing list investigating his
problem with LARQ SNAPSHOTs, I found another strange problem.

Here is what I do:

cd /tmp
svn co https://svn.apache.org/repos/asf/incubator/jena/Jena2/Fuseki/trunk/ fuseki
cd /tmp/fuseki
wget https://issues.apache.org/jira/secure/attachment/12498659/JENA-63_Fuseki_r1176980.patch
patch -p0 < JENA-63_Fuseki_r1176980.patch
mvn clean package

The dependencies are now... mvn depedency:tree:

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Fuseki
[INFO]    task-segment: [dependency:tree]
[INFO] ------------------------------------------------------------------------
[INFO] [dependency:tree {execution: default-cli}]
[INFO] org.openjena:fuseki:jar:0.2.1-SNAPSHOT
[INFO] +- org.apache.jena:jena-arq:jar:2.8.9-incubating-SNAPSHOT:compile
[INFO] |  +- org.codehaus.woodstox:wstx-asl:jar:3.2.9:compile
[INFO] |  |  \- stax:stax-api:jar:1.0.1:compile
[INFO] |  +- org.apache.httpcomponents:httpcore:jar:4.1.2:compile
[INFO] |  +- com.hp.hpl.jena:iri:jar:0.8:compile
[INFO] |  +- com.ibm.icu:icu4j:jar:3.4.4:compile
[INFO] |  \- xerces:xercesImpl:jar:2.7.1:compile
[INFO] +- org.apache.jena:jena-larq:jar:0.2.2-incubating-SNAPSHOT:compile
[INFO] |  \- org.apache.lucene:lucene-core:jar:3.1.0:compile
[INFO] +- org.apache.jena:jena-arq:jar:tests:2.8.9-incubating-SNAPSHOT:test
[INFO] +- com.hp.hpl.jena:jena:jar:2.6.4:compile
[INFO] +- com.hp.hpl.jena:jena:jar:tests:2.6.4:test
[INFO] +- org.apache.jena:jena-tdb:jar:0.9.0-incubating-SNAPSHOT:compile
[INFO] +- junit:junit:jar:4.8.2:compile
[INFO] +- org.apache.httpcomponents:httpclient:jar:4.1.2:compile
[INFO] +- commons-fileupload:commons-fileupload:jar:1.2.2:compile
[INFO] +- commons-codec:commons-codec:jar:1.5:compile
[INFO] +- org.eclipse.jetty:jetty-server:jar:7.2.1.v20101111:compile
[INFO] |  +- javax.servlet:servlet-api:jar:2.5:compile
[INFO] |  +- org.eclipse.jetty:jetty-continuation:jar:7.2.1.v20101111:compile
[INFO] |  \- org.eclipse.jetty:jetty-http:jar:7.2.1.v20101111:compile
[INFO] |     \- org.eclipse.jetty:jetty-io:jar:7.2.1.v20101111:compile
[INFO] +- org.eclipse.jetty:jetty-servlet:jar:7.2.1.v20101111:compile
[INFO] |  \- org.eclipse.jetty:jetty-security:jar:7.2.1.v20101111:compile
[INFO] +- org.eclipse.jetty:jetty-jsp-2.1:jar:7.2.1.v20101111:compile
[INFO] +- org.mortbay.jetty:jsp-2.1-glassfish:jar:2.1.v20100127:compile
[INFO] |  +- org.eclipse.jdt.core.compiler:ecj:jar:3.5.1:compile
[INFO] |  +- org.mortbay.jetty:jsp-api-2.1-glassfish:jar:2.1.v20100127:compile
[INFO] |  \- ant:ant:jar:1.6.5:compile
[INFO] +- org.eclipse.jetty:jetty-webapp:jar:7.2.1.v20101111:compile
[INFO] |  \- org.eclipse.jetty:jetty-xml:jar:7.2.1.v20101111:compile
[INFO] |     \- org.eclipse.jetty:jetty-util:jar:7.2.1.v20101111:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.6.1:compile
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.6.1:compile
[INFO] +- org.slf4j:jcl-over-slf4j:jar:1.6.1:compile
[INFO] \- log4j:log4j:jar:1.2.16:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Tue Oct 11 21:48:05 BST 2011
[INFO] Final Memory: 24M/338M
[INFO] ------------------------------------------------------------------------


In particular notice: org.apache.jena:jena-tdb:jar:0.9.0-incubating-SNAPSHOT.

Now, I used to load data using tdbloader available in Fuseki.

cd /tmp/fuseki
java -cp target/fuseki-0.2.1-SNAPSHOT-sys.jar tdb.tdbloader --loc=/tmp/tdb books.ttl
-- Start triples data phase
** Load empty triples table
Load: books.ttl -- 2011/10/11 21:34:16 BST
-- Finish triples data phase
17 triples loaded in 0.03 seconds [Rate: 500.00 per second]
-- Start triples index phase
** Index SPO->POS: 17 slots indexed in 0.00 seconds [Rate: 17,000.00 per second]
** Index SPO->OSP: 17 slots indexed in 0.00 seconds [Rate: 17,000.00 per second]
-- Finish triples index phase
** 17 triples indexed in 0.00 seconds [Rate: 4,250.00 per second]
-- Finish triples load
** Completed: 17 triples loaded in 0.04 seconds [Rate: 395.35 per second]

Now, if I run tdbdump I get an exception:

java -cp target/fuseki-0.2.1-SNAPSHOT-sys.jar tdb.tdbdump --loc=/tmp/tdb

Exception in thread "main" java.lang.UnsupportedOperationException: subject cannot be null
	at com.hp.hpl.jena.graph.Triple.<init>(Triple.java:28)
	at com.hp.hpl.jena.tdb.lib.TupleLib.triple(TupleLib.java:123)
	at com.hp.hpl.jena.tdb.lib.TupleLib.triple(TupleLib.java:115)
	at com.hp.hpl.jena.tdb.lib.TupleLib.access$000(TupleLib.java:44)
	at com.hp.hpl.jena.tdb.lib.TupleLib$3.convert(TupleLib.java:76)
	at com.hp.hpl.jena.tdb.lib.TupleLib$3.convert(TupleLib.java:72)
	at org.openjena.atlas.iterator.Iter$4.next(Iter.java:279)
	at org.openjena.atlas.iterator.Iter$4.next(Iter.java:279)
	at org.openjena.atlas.iterator.Iter.next(Iter.java:744)
	at org.openjena.atlas.iterator.IteratorCons.next(IteratorCons.java:86)
	at org.openjena.atlas.iterator.Iter.sendToSink(Iter.java:496)
	at org.openjena.riot.out.NQuadsWriter.write(NQuadsWriter.java:41)
	at org.openjena.riot.RiotWriter.writeNQuads(RiotWriter.java:38)
	at tdb.tdbdump.exec(tdbdump.java:50)
	at arq.cmdline.CmdMain.mainMethod(CmdMain.java:97)
	at arq.cmdline.CmdMain.mainRun(CmdMain.java:59)
	at arq.cmdline.CmdMain.mainRun(CmdMain.java:46)
	at tdb.tdbdump.main(tdbdump.java:32)


Am I doing something wrong?

Paolo

Re: Do we have a problem with org.apache.jena:jena-tdb:jar:0.9.0-incubating-SNAPSHOT?

Posted by Paolo Castagna <ca...@googlemail.com>.

Paolo Castagna wrote:
> Hi Andy
> 
> Andy Seaborne wrote:
>> On 11/10/11 21:57, Paolo Castagna wrote:
>>> Hi,
>>> while I was helping Jérôme on jena-users mailing list investigating his
>>> problem with LARQ SNAPSHOTs, I found another strange problem.
>>>
>>> Here is what I do:
>> ....
>>
>>> java -cp target/fuseki-0.2.1-SNAPSHOT-sys.jar tdb.tdbdump --loc=/tmp/tdb
>>>
>>> Exception in thread "main" java.lang.UnsupportedOperationException:
>>> subject cannot be null
>>>     at com.hp.hpl.jena.graph.Triple.<init>(Triple.java:28)
>> Something is out of date:
>> 1/ It's fixed (it's a different manifestation of JENA-9?)
> 
> I don't think it's a manifestation of JENA-9
> https://issues.apache.org/jira/browse/JENA-9
> 
> Did you mean JENA-91?
> https://issues.apache.org/jira/browse/JENA-91
> Probably.
> 
> I saw the problem using org.apache.jena:jena-tdb:jar:0.9.0-incubating-SNAPSHOT.
> So, we should just publish a new 0.9.0-incubating-SNAPSHOT. I'll try that.

Done.

That fixed the problem. So, a fix of a bug was committed to SVN,
but the SNAPSHOT was old and it did not contain the fix.

Adding a new job to Jenkins to avoid this in the future.

Paolo

> 
>> 2/ Even if not, that's not the error message:
>>
>> NodecSSE.decode has:
>>  try {
>>     Node n = t.asNode() ;
>>     if ( n == null ) throw new TDBException("Not a node: "+str) ;
>>     return n ;
>> } catch (RiotException ex)
>> {
>>   throw new TDBException("Bad string for node: "+str) ;
>> }
>>
>> so a recent change means null is trapped early.
> 
> (confused).
> 
>> Maybe the builds are behind the codebase (I thought I'd updated
>> everything) - so timestamp checking might reveal something.
> 
> We are in a transition phase (and we have two SNAPSHOTs for each module).
> When we will have just one SNAPSHOT per module, things will be better.
> Moreover, we can (and I think we should) set up nightly builds in Jenkins
> to publish a new SNAPSHOT each night (it's extremely easy to do that using
> the Apache Maven snapshot repository). I might just go ahead and do that.
> I can create parallel -nightly job just for this: publishing SNAPSHOTs on
> the Apache Maven snapshot repository. Not the old style.
> 
> This way, as soon as we fix a bug... it gets rolled out in a new SNAPSHOT
> automatically.
> 
>> (can't check now - using offline email)
> 
> Thanks for your reply.
> 
> Paolo
> 
>>     Andy

Re: Do we have a problem with org.apache.jena:jena-tdb:jar:0.9.0-incubating-SNAPSHOT?

Posted by Paolo Castagna <ca...@googlemail.com>.
Hi Andy

Andy Seaborne wrote:
> On 11/10/11 21:57, Paolo Castagna wrote:
>> Hi,
>> while I was helping Jérôme on jena-users mailing list investigating his
>> problem with LARQ SNAPSHOTs, I found another strange problem.
>>
>> Here is what I do:
> ....
> 
>> java -cp target/fuseki-0.2.1-SNAPSHOT-sys.jar tdb.tdbdump --loc=/tmp/tdb
>>
>> Exception in thread "main" java.lang.UnsupportedOperationException:
>> subject cannot be null
>>     at com.hp.hpl.jena.graph.Triple.<init>(Triple.java:28)
> 
> Something is out of date:
> 1/ It's fixed (it's a different manifestation of JENA-9?)

I don't think it's a manifestation of JENA-9
https://issues.apache.org/jira/browse/JENA-9

Did you mean JENA-91?
https://issues.apache.org/jira/browse/JENA-91
Probably.

I saw the problem using org.apache.jena:jena-tdb:jar:0.9.0-incubating-SNAPSHOT.
So, we should just publish a new 0.9.0-incubating-SNAPSHOT. I'll try that.

> 2/ Even if not, that's not the error message:
> 
> NodecSSE.decode has:
>  try {
>     Node n = t.asNode() ;
>     if ( n == null ) throw new TDBException("Not a node: "+str) ;
>     return n ;
> } catch (RiotException ex)
> {
>   throw new TDBException("Bad string for node: "+str) ;
> }
> 
> so a recent change means null is trapped early.

(confused).

> Maybe the builds are behind the codebase (I thought I'd updated
> everything) - so timestamp checking might reveal something.

We are in a transition phase (and we have two SNAPSHOTs for each module).
When we will have just one SNAPSHOT per module, things will be better.
Moreover, we can (and I think we should) set up nightly builds in Jenkins
to publish a new SNAPSHOT each night (it's extremely easy to do that using
the Apache Maven snapshot repository). I might just go ahead and do that.
I can create parallel -nightly job just for this: publishing SNAPSHOTs on
the Apache Maven snapshot repository. Not the old style.

This way, as soon as we fix a bug... it gets rolled out in a new SNAPSHOT
automatically.

> 
> (can't check now - using offline email)

Thanks for your reply.

Paolo

> 
>     Andy

Re: Do we have a problem with org.apache.jena:jena-tdb:jar:0.9.0-incubating-SNAPSHOT?

Posted by Andy Seaborne <an...@apache.org>.
On 11/10/11 21:57, Paolo Castagna wrote:
> Hi,
> while I was helping Jérôme on jena-users mailing list investigating his
> problem with LARQ SNAPSHOTs, I found another strange problem.
>
> Here is what I do:
....

> java -cp target/fuseki-0.2.1-SNAPSHOT-sys.jar tdb.tdbdump --loc=/tmp/tdb
>
> Exception in thread "main" java.lang.UnsupportedOperationException: subject cannot be null
> 	at com.hp.hpl.jena.graph.Triple.<init>(Triple.java:28)

Something is out of date:
1/ It's fixed (it's a different manifestation of JENA-9?)
2/ Even if not, that's not the error message:

NodecSSE.decode has:
  try {
     Node n = t.asNode() ;
     if ( n == null ) throw new TDBException("Not a node: "+str) ;
     return n ;
} catch (RiotException ex)
{
   throw new TDBException("Bad string for node: "+str) ;
}

so a recent change means null is trapped early.

Maybe the builds are behind the codebase (I thought I'd updated 
everything) - so timestamp checking might reveal something.

(can't check now - using offline email)

	Andy