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 2012/01/30 18:31:27 UTC

java.lang.NoSuchMethodError: org.openjena.atlas.lib.Bytes.toByteBuffer(Ljava/lang/CharSequence;Ljava/nio/ByteBuffer;)I

Hi,
this is similar to the problem I experienced last week (which I still have)...
... now, I see the same problem with Fuseki if I upgrade jena-arq and jena-core
dependencies.

cd /tmp
svn co https://svn.apache.org/repos/asf/incubator/jena/Jena2/Fuseki/trunk/ fuseki
cd fuseki

mvn test
Tests run: 63, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.761 sec

Happy!

Now, I want to use the latest ARQ SNAPSHOT with Fuseki... so, I changed the
pom.xml file:

svn diff
Index: pom.xml
===================================================================
--- pom.xml	(revision 1237803)
+++ pom.xml	(working copy)
@@ -61,8 +61,8 @@
     <assembly.soh.name>${this.root}</assembly.soh.name>
     <assembly.zip.name>${this.root}</assembly.zip.name>

-    <ver.jena>2.7.0-incubating</ver.jena>
-    <ver.arq>2.9.0-incubating</ver.arq>
+    <ver.jena>2.7.1-incubating-SNAPSHOT</ver.jena>
+    <ver.arq>2.9.1-incubating-SNAPSHOT</ver.arq>
     <ver.tdb>0.9.0-incubating-SNAPSHOT</ver.tdb>

     <ver.jetty>7.5.4.v20111024</ver.jetty>

mvn test
Tests run: 63, Failures: 0, Errors: 7, Skipped: 0, Time elapsed: 2.513 sec <<< FAILURE!

Tests in error:
  get_02(org.apache.jena.fuseki.http.TestDatasetGraphAccessorTDB): org.openjena.atlas.lib.Bytes.toByteBuffer(Ljava/lang/CharSequence;Ljava/nio/ByteBuffer;)I
  put_01(org.apache.jena.fuseki.http.TestDatasetGraphAccessorTDB): org.openjena.atlas.lib.Bytes.toByteBuffer(Ljava/lang/CharSequence;Ljava/nio/ByteBuffer;)I
  put_02(org.apache.jena.fuseki.http.TestDatasetGraphAccessorTDB): org.openjena.atlas.lib.Bytes.toByteBuffer(Ljava/lang/CharSequence;Ljava/nio/ByteBuffer;)I
  post_01(org.apache.jena.fuseki.http.TestDatasetGraphAccessorTDB): org.openjena.atlas.lib.Bytes.toByteBuffer(Ljava/lang/CharSequence;Ljava/nio/ByteBuffer;)I
  post_02(org.apache.jena.fuseki.http.TestDatasetGraphAccessorTDB): org.openjena.atlas.lib.Bytes.toByteBuffer(Ljava/lang/CharSequence;Ljava/nio/ByteBuffer;)I
  delete_01(org.apache.jena.fuseki.http.TestDatasetGraphAccessorTDB): org.openjena.atlas.lib.Bytes.toByteBuffer(Ljava/lang/CharSequence;Ljava/nio/ByteBuffer;)I
  delete_02(org.apache.jena.fuseki.http.TestDatasetGraphAccessorTDB): org.openjena.atlas.lib.Bytes.toByteBuffer(Ljava/lang/CharSequence;Ljava/nio/ByteBuffer;)I

I don't understand this, Bytes.toByteBuffer is there.

mvn -version
Apache Maven 3.0.3 (r1075438; 2011-02-28 17:31:09+0000)
Maven home: /opt/maven
Java version: 1.6.0_26, vendor: Sun Microsystems Inc.
Java home: /opt/jdk1.6.0_26/jre
Default locale: en_GB, platform encoding: UTF-8
OS name: "linux", version: "2.6.31-23-generic", arch: "amd64", family: "unix"

java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)

Thanks,
Paolo

Re: java.lang.NoSuchMethodError: org.openjena.atlas.lib.Bytes.toByteBuffer(Ljava/lang/CharSequence;Ljava/nio/ByteBuffer;)I

Posted by Paolo Castagna <ca...@googlemail.com>.
Andy Seaborne wrote:
> More trivial: the return type had changed.  Changed back.

Thank you Andy... it was in front of my eyes all the time, but I didn't see it!
Sorry about that, now everything is fine: thanks.

Paolo

Re: java.lang.NoSuchMethodError: org.openjena.atlas.lib.Bytes.toByteBuffer(Ljava/lang/CharSequence;Ljava/nio/ByteBuffer;)I

Posted by Andy Seaborne <an...@apache.org>.
More trivial: the return type had changed.  Changed back.

	Andy



On 30/01/12 20:25, Andy Seaborne wrote:
> Fuseki will be released using ARQ 2.7.0.
>
> I don't know completely understand why the signature has changed - it
> did change when we (Damian and I) were looking slowness due to the
> charset encoder pool. This adds a same-name, different static maybe
> that's why.
>
> Andy
>
> On 30/01/12 18:33, Paolo Castagna wrote:
>> I've just tried with another machine, this time using a VM...
>>
>> mvn -version
>> Apache Maven 3.0.3 (r1075438; 2011-02-28 17:31:09+0000)
>> Maven home: /opt/maven
>> Java version: 1.7.0_02, vendor: Oracle Corporation
>> Java home: /opt/jdk1.7.0_02/jre
>> Default locale: en_GB, platform encoding: UTF-8
>> OS name: "linux", version: "3.0.0-14-generic", arch: "amd64", family:
>> "unix"
>>
>> java -version
>> java version "1.7.0_02"
>> Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
>> Java HotSpot(TM) 64-Bit Server VM (build 22.0-b10, mixed mode)
>>
>> I checked out Fuseki, no changes: all tests pass.
>>
>> If I increase jena-core and jena-arq dependencies (using the snapshots)
>> I get the 7 errors described in my initial message.
>>
>> svn diff
>> Index: pom.xml
>> ===================================================================
>> --- pom.xml (revision 1237838)
>> +++ pom.xml (working copy)
>> @@ -61,8 +61,8 @@
>> <assembly.soh.name>${this.root}</assembly.soh.name>
>> <assembly.zip.name>${this.root}</assembly.zip.name>
>>
>> -<ver.jena>2.7.0-incubating</ver.jena>
>> -<ver.arq>2.9.0-incubating</ver.arq>
>> +<ver.jena>2.7.1-incubating-SNAPSHOT</ver.jena>
>> +<ver.arq>2.9.1-incubating-SNAPSHOT</ver.arq>
>> <ver.tdb>0.9.0-incubating-SNAPSHOT</ver.tdb>
>>
>> <ver.jetty>7.5.4.v20111024</ver.jetty>
>>
>>
>> mvn dependency:tree
>> [...]
>> [INFO] org.apache.jena:jena-fuseki:jar:0.2.1-incubating-SNAPSHOT
>> [INFO] +- org.apache.jena:jena-arq:jar:2.9.1-incubating-SNAPSHOT:compile
>> [INFO] | +- commons-codec:commons-codec:jar:1.5:compile
>> [INFO] | \- org.apache.httpcomponents:httpcore:jar:4.1.3:compile
>> [INFO] +- org.apache.jena:jena-core:jar:2.7.1-incubating-SNAPSHOT:compile
>> [INFO] | \-
>> org.apache.jena:jena-iri:jar:0.9.1-incubating-SNAPSHOT:compile
>> [INFO] +- org.apache.jena:jena-tdb:jar:0.9.0-incubating-SNAPSHOT:compile
>> [INFO] +- junit:junit:jar:4.9:test
>> [INFO] | \- org.hamcrest:hamcrest-core:jar:1.1:test
>> [INFO] +- org.apache.httpcomponents:httpclient:jar:4.1.2:compile
>> [INFO] +- commons-fileupload:commons-fileupload:jar:1.2.2:compile
>> [INFO] +- org.eclipse.jetty:jetty-server:jar:7.5.4.v20111024:compile
>> [INFO] | +- javax.servlet:servlet-api:jar:2.5:compile
>> [INFO] | +-
>> org.eclipse.jetty:jetty-continuation:jar:7.5.4.v20111024:compile
>> [INFO] | \- org.eclipse.jetty:jetty-http:jar:7.5.4.v20111024:compile
>> [INFO] | \- org.eclipse.jetty:jetty-io:jar:7.5.4.v20111024:compile
>> [INFO] +- org.eclipse.jetty:jetty-servlet:jar:7.5.4.v20111024:compile
>> [INFO] | \- org.eclipse.jetty:jetty-security:jar:7.5.4.v20111024:compile
>> [INFO] +- org.eclipse.jetty:jetty-jsp-2.1:jar:7.5.4.v20111024: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.5.4.v20111024:compile
>> [INFO] | \- org.eclipse.jetty:jetty-xml:jar:7.5.4.v20111024:compile
>> [INFO] | \- org.eclipse.jetty:jetty-util:jar:7.5.4.v20111024:compile
>> [INFO] +- org.slf4j:slf4j-api:jar:1.6.4:compile
>> [INFO] +- org.slf4j:slf4j-log4j12:jar:1.6.4:compile
>> [INFO] +- org.slf4j:jcl-over-slf4j:jar:1.6.4:compile
>> [INFO] +- log4j:log4j:jar:1.2.16:compile
>> [INFO] +- com.ibm.icu:icu4j:jar:3.4.4:compile
>> [INFO] \- xerces:xercesImpl:jar:2.10.0:compile
>> [INFO] \- xml-apis:xml-apis:jar:1.4.01:compile
>>
>>
>> Paolo
>


Re: java.lang.NoSuchMethodError: org.openjena.atlas.lib.Bytes.toByteBuffer(Ljava/lang/CharSequence;Ljava/nio/ByteBuffer;)I

Posted by Andy Seaborne <an...@apache.org>.
Fuseki will be released using ARQ 2.7.0.

I don't know completely understand why the signature has changed - it 
did change when we (Damian and I) were looking slowness due to the 
charset encoder pool. This adds a same-name, different static maybe 
that's why.

	Andy

On 30/01/12 18:33, Paolo Castagna wrote:
> I've just tried with another machine, this time using a VM...
>
> mvn -version
> Apache Maven 3.0.3 (r1075438; 2011-02-28 17:31:09+0000)
> Maven home: /opt/maven
> Java version: 1.7.0_02, vendor: Oracle Corporation
> Java home: /opt/jdk1.7.0_02/jre
> Default locale: en_GB, platform encoding: UTF-8
> OS name: "linux", version: "3.0.0-14-generic", arch: "amd64", family: "unix"
>
> java -version
> java version "1.7.0_02"
> Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
> Java HotSpot(TM) 64-Bit Server VM (build 22.0-b10, mixed mode)
>
> I checked out Fuseki, no changes: all tests pass.
>
> If I increase jena-core and jena-arq dependencies (using the snapshots)
> I get the 7 errors described in my initial message.
>
> svn diff
> Index: pom.xml
> ===================================================================
> --- pom.xml    (revision 1237838)
> +++ pom.xml    (working copy)
> @@ -61,8 +61,8 @@
>       <assembly.soh.name>${this.root}</assembly.soh.name>
>       <assembly.zip.name>${this.root}</assembly.zip.name>
>
> -<ver.jena>2.7.0-incubating</ver.jena>
> -<ver.arq>2.9.0-incubating</ver.arq>
> +<ver.jena>2.7.1-incubating-SNAPSHOT</ver.jena>
> +<ver.arq>2.9.1-incubating-SNAPSHOT</ver.arq>
>       <ver.tdb>0.9.0-incubating-SNAPSHOT</ver.tdb>
>
>       <ver.jetty>7.5.4.v20111024</ver.jetty>
>
>
> mvn dependency:tree
> [...]
> [INFO] org.apache.jena:jena-fuseki:jar:0.2.1-incubating-SNAPSHOT
> [INFO] +- org.apache.jena:jena-arq:jar:2.9.1-incubating-SNAPSHOT:compile
> [INFO] |  +- commons-codec:commons-codec:jar:1.5:compile
> [INFO] |  \- org.apache.httpcomponents:httpcore:jar:4.1.3:compile
> [INFO] +- org.apache.jena:jena-core:jar:2.7.1-incubating-SNAPSHOT:compile
> [INFO] |  \- org.apache.jena:jena-iri:jar:0.9.1-incubating-SNAPSHOT:compile
> [INFO] +- org.apache.jena:jena-tdb:jar:0.9.0-incubating-SNAPSHOT:compile
> [INFO] +- junit:junit:jar:4.9:test
> [INFO] |  \- org.hamcrest:hamcrest-core:jar:1.1:test
> [INFO] +- org.apache.httpcomponents:httpclient:jar:4.1.2:compile
> [INFO] +- commons-fileupload:commons-fileupload:jar:1.2.2:compile
> [INFO] +- org.eclipse.jetty:jetty-server:jar:7.5.4.v20111024:compile
> [INFO] |  +- javax.servlet:servlet-api:jar:2.5:compile
> [INFO] |  +- org.eclipse.jetty:jetty-continuation:jar:7.5.4.v20111024:compile
> [INFO] |  \- org.eclipse.jetty:jetty-http:jar:7.5.4.v20111024:compile
> [INFO] |     \- org.eclipse.jetty:jetty-io:jar:7.5.4.v20111024:compile
> [INFO] +- org.eclipse.jetty:jetty-servlet:jar:7.5.4.v20111024:compile
> [INFO] |  \- org.eclipse.jetty:jetty-security:jar:7.5.4.v20111024:compile
> [INFO] +- org.eclipse.jetty:jetty-jsp-2.1:jar:7.5.4.v20111024: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.5.4.v20111024:compile
> [INFO] |  \- org.eclipse.jetty:jetty-xml:jar:7.5.4.v20111024:compile
> [INFO] |     \- org.eclipse.jetty:jetty-util:jar:7.5.4.v20111024:compile
> [INFO] +- org.slf4j:slf4j-api:jar:1.6.4:compile
> [INFO] +- org.slf4j:slf4j-log4j12:jar:1.6.4:compile
> [INFO] +- org.slf4j:jcl-over-slf4j:jar:1.6.4:compile
> [INFO] +- log4j:log4j:jar:1.2.16:compile
> [INFO] +- com.ibm.icu:icu4j:jar:3.4.4:compile
> [INFO] \- xerces:xercesImpl:jar:2.10.0:compile
> [INFO]    \- xml-apis:xml-apis:jar:1.4.01:compile
>
>
> Paolo


Re: java.lang.NoSuchMethodError: org.openjena.atlas.lib.Bytes.toByteBuffer(Ljava/lang/CharSequence;Ljava/nio/ByteBuffer;)I

Posted by Paolo Castagna <ca...@googlemail.com>.
I've just tried with another machine, this time using a VM...

mvn -version
Apache Maven 3.0.3 (r1075438; 2011-02-28 17:31:09+0000)
Maven home: /opt/maven
Java version: 1.7.0_02, vendor: Oracle Corporation
Java home: /opt/jdk1.7.0_02/jre
Default locale: en_GB, platform encoding: UTF-8
OS name: "linux", version: "3.0.0-14-generic", arch: "amd64", family: "unix"

java -version
java version "1.7.0_02"
Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
Java HotSpot(TM) 64-Bit Server VM (build 22.0-b10, mixed mode)

I checked out Fuseki, no changes: all tests pass.

If I increase jena-core and jena-arq dependencies (using the snapshots)
I get the 7 errors described in my initial message.

svn diff
Index: pom.xml
===================================================================
--- pom.xml    (revision 1237838)
+++ pom.xml    (working copy)
@@ -61,8 +61,8 @@
     <assembly.soh.name>${this.root}</assembly.soh.name>
     <assembly.zip.name>${this.root}</assembly.zip.name>

-    <ver.jena>2.7.0-incubating</ver.jena>
-    <ver.arq>2.9.0-incubating</ver.arq>
+    <ver.jena>2.7.1-incubating-SNAPSHOT</ver.jena>
+    <ver.arq>2.9.1-incubating-SNAPSHOT</ver.arq>
     <ver.tdb>0.9.0-incubating-SNAPSHOT</ver.tdb>

     <ver.jetty>7.5.4.v20111024</ver.jetty>


mvn dependency:tree
[...]
[INFO] org.apache.jena:jena-fuseki:jar:0.2.1-incubating-SNAPSHOT
[INFO] +- org.apache.jena:jena-arq:jar:2.9.1-incubating-SNAPSHOT:compile
[INFO] |  +- commons-codec:commons-codec:jar:1.5:compile
[INFO] |  \- org.apache.httpcomponents:httpcore:jar:4.1.3:compile
[INFO] +- org.apache.jena:jena-core:jar:2.7.1-incubating-SNAPSHOT:compile
[INFO] |  \- org.apache.jena:jena-iri:jar:0.9.1-incubating-SNAPSHOT:compile
[INFO] +- org.apache.jena:jena-tdb:jar:0.9.0-incubating-SNAPSHOT:compile
[INFO] +- junit:junit:jar:4.9:test
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.1:test
[INFO] +- org.apache.httpcomponents:httpclient:jar:4.1.2:compile
[INFO] +- commons-fileupload:commons-fileupload:jar:1.2.2:compile
[INFO] +- org.eclipse.jetty:jetty-server:jar:7.5.4.v20111024:compile
[INFO] |  +- javax.servlet:servlet-api:jar:2.5:compile
[INFO] |  +- org.eclipse.jetty:jetty-continuation:jar:7.5.4.v20111024:compile
[INFO] |  \- org.eclipse.jetty:jetty-http:jar:7.5.4.v20111024:compile
[INFO] |     \- org.eclipse.jetty:jetty-io:jar:7.5.4.v20111024:compile
[INFO] +- org.eclipse.jetty:jetty-servlet:jar:7.5.4.v20111024:compile
[INFO] |  \- org.eclipse.jetty:jetty-security:jar:7.5.4.v20111024:compile
[INFO] +- org.eclipse.jetty:jetty-jsp-2.1:jar:7.5.4.v20111024: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.5.4.v20111024:compile
[INFO] |  \- org.eclipse.jetty:jetty-xml:jar:7.5.4.v20111024:compile
[INFO] |     \- org.eclipse.jetty:jetty-util:jar:7.5.4.v20111024:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.6.4:compile
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.6.4:compile
[INFO] +- org.slf4j:jcl-over-slf4j:jar:1.6.4:compile
[INFO] +- log4j:log4j:jar:1.2.16:compile
[INFO] +- com.ibm.icu:icu4j:jar:3.4.4:compile
[INFO] \- xerces:xercesImpl:jar:2.10.0:compile
[INFO]    \- xml-apis:xml-apis:jar:1.4.01:compile


Paolo