I ran "mvn clean install -Pdev" from the jena root

I then ran "mvn clean install -Pdev" in the jena-tdb2 directory as that was
the step  that failed with the errors noted above.

I then created the script to build outside of maven

Script is:

=== start of script

CP=home/claude/.m2/repository/org/apache/jena/jena-dboe-trans-data/3.10.0-SNAPSHOT/jena-dboe-trans-data-3.10.0-SNAPSHOT.jar:/home/claude/.m2/repository/org/apache/jena/jena-dboe-transaction/3.10.0-SNAPSHOT/jena-dboe-transaction-3.10.0-SNAPSHOT.jar:/home/claude/.m2/repository/org/apache/jena/jena-dboe-base/3.10.0-SNAPSHOT/jena-dboe-base-3.10.0-SNAPSHOT.jar:/home/claude/.m2/repository/org/apache/jena/jena-arq/3.10.0-SNAPSHOT/jena-arq-3.10.0-SNAPSHOT.jar:/home/claude/.m2/repository/org/apache/jena/jena-dboe-index/3.10.0-SNAPSHOT/jena-dboe-index-3.10.0-SNAPSHOT.jar:/home/claude/.m2/repository/org/apache/jena/jena-core/3.10.0-SNAPSHOT/jena-core-3.10.0-SNAPSHOT-tests.jar:/home/claude/.m2/repository/org/apache/jena/jena-iri/3.10.0-SNAPSHOT/jena-iri-3.10.0-SNAPSHOT.jar:/home/claude/.m2/repository/commons-cli/commons-cli/1.4/commons-cli-1.4.jar:/home/claude/.m2/repository/commons-codec/commons-codec/1.11/commons-codec-1.11.jar:/home/claude/.m2/repository/org/apache/jena/jena-base/3.10.0-SNAPSHOT/jena-base-3.10.0-SNAPSHOT.jar:/home/claude/.m2/repository/org/apache/jena/jena-arq/3.10.0-SNAPSHOT/jena-arq-3.10.0-SNAPSHOT-tests.jar:/home/claude/.m2/repository/org/apache/jena/jena-core/3.10.0-SNAPSHOT/jena-core-3.10.0-SNAPSHOT.jar:/home/claude/.m2/repository/org/apache/jena/jena-shaded-guava/3.10.0-SNAPSHOT/jena-shaded-guava-3.10.0-SNAPSHOT.jar:/home/claude/.m2/repository/org/apache/httpcomponents/httpclient/4.5.5/httpclient-4.5.5.jar:/home/claude/.m2/repository/org/apache/httpcomponents/httpcore/4.4.9/httpcore-4.4.9.jar:/home/claude/.m2/repository/com/github/jsonld-java/jsonld-java/0.12.1/jsonld-java-0.12.1.jar:/home/claude/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.9.6/jackson-core-2.9.6.jar:/home/claude/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.9.6/jackson-databind-2.9.6.jar:/home/claude/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.9.0/jackson-annotations-2.9.0.jar:/home/claude/.m2/repository/org/apache/httpcomponents/httpclient-cache/4.5.5/httpclient-cache-4.5.5.jar:/home/claude/.m2/repository/org/apache/thrift/libthrift/0.10.0/libthrift-0.10.0.jar:/home/claude/.m2/repository/org/slf4j/jcl-over-slf4j/1.7.25/jcl-over-slf4j-1.7.25.jar:/home/claude/.m2/repository/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4.jar:/home/claude/.m2/repository/org/apache/jena/jena-base/3.10.0-SNAPSHOT/jena-base-3.10.0-SNAPSHOT-tests.jar:/home/claude/.m2/repository/org/apache/commons/commons-csv/1.5/commons-csv-1.5.jar:/home/claude/.m2/repository/commons-io/commons-io/2.6/commons-io-2.6.jar:/home/claude/.m2/repository/org/apache/commons/commons-compress/1.17/commons-compress-1.17.jar:/home/claude/.m2/repository/com/github/andrewoma/dexx/collection/0.7/collection-0.7.jar:/home/claude/.m2/repository/junit/junit/4.12/junit-4.12.jar:/home/claude/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:/home/claude/.m2/repository/org/slf4j/slf4j-log4j12/1.7.25/slf4j-log4j12-1.7.25.jar:/home/claude/.m2/repository/log4j/log4j/1.2.17/log4j-1.2.17.jar:/home/claude/.m2/repository/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar

CP=$CP:./target/classes:./target/test-classes

java -cp $CP org.junit.runner.JUnitCore
org.apache.jena.tdb2.assembler.TestTDBAssembler

=== end of script

system info:
uname -a
Linux claude-Satellite-A505 4.4.0-137-generic #163-Ubuntu SMP Mon Sep 24
13:14:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

ubuntu 16.04
memory 3.7 GB


On Sun, Oct 14, 2018 at 3:47 PM Andy Seaborne <a...@apache.org> wrote:

> Did yuo run the build from the top, from jena-db or just jena-tdb2?
>
> On 14/10/18 15:12, Claude Warren wrote:
> > In a little more detail,  I ran "mvn clean install -Pdev" and the build
> > failed.
> >
> > In jena-tdb2 directory the I ran "mvn dependency:build-classpath
> > -Dmdep.outputFile=cp.txt"
>
> Does cp.txt include the test classes mentioned?
>
>
> >
> > which generated a file with the classpath for the build.  I created a
> > script using that classpath as well as the target/classes and
> > target/test-classes directory to execute org.junit.runner.JUnitCore
> > org.apache.jena.tdb2.assembler.TestTDBAssembler
> >
> > My goal was to remove any maven issues and try to get to the simplest
> > possible execution.  But I got the same errors as with the mvn build.  I
> > can not figure out how the classpath gets modified so that the
> > jena-dboe-trans-data-3.10.0-SNAPSHOT.jar is not found.
> >
> > It makes no difference if I run the test with Eclipse running or not.
> > It makes no difference if I run the tests with Maven or not.
> >
> >
> >
> > On Sun, Oct 14, 2018 at 1:48 PM Andy Seaborne <a...@apache.org> wrote:
> >
> >> On 14/10/18 10:13, Claude Warren wrote:
> >>   > OK.  I have maven produce a classpath file for me so I know what
> >>   > classpath it is using.
> >>
> >> How are you running tests and your IDE?
> >> I use the mavenr nature of projects, not the old command line "generate
> >> .classpath" etc.
> >>
> >> For a new version, in Eclipse you must do Alt-F5 (Maven update) for
> >> everything; it is also good to do maven and also it is cleaner to do a
> >> maven build locally beforehand.  This puls down the non-java POMS which
> >> get out of step is the parent is not open in Eclipse.
> >>
> >> No producing .classpaths etc m2e does it automatically.
> >>
> >> On 14/10/18 10:13, Claude Warren wrote:
> >>   > So does the TDB2 system somehow build a new classpath?
> >>
> >> No.
> >>
> >>   > Does the test system create a new classpath?
> >>
> >> No.
> >>
> >>   > Is there some way the original classpath
> >>   > could have been modified before the test was called?
> >>
> >> I don't see how it could.
> >>
> >> "mvn clean install -Pdev" works for me locally.
> >>
> >>       Andy
> >>
> >>
> >>
> >>
> >> On 14/10/18 10:13, Claude Warren wrote:
> >>> OK.  I have maven produce a classpath file for me so I know what
> >> classpath
> >>> it is using.
> >>> I created a shell script to execute a single junit test outside of
> maven.
> >>> Using org.junit.runner.JUnitCore I am executing
> >>> org.apache.jena.tdb2.assembler.TestTDBAssembler
> >>>
> >>> I get:
> >>> .E.E.E.E.E.E.org.apache.jena.dboe.base.file.AlreadyLocked: Failed to
> get
> >> a
> >>> lock:
> >>>
> >>
> file='/home/claude/apache/jena/jena-db/jena-tdb2/target/tdb-testing/DB/tdb.lock':
> >>> Lock already held    at
> >>>
> >>
> org.apache.jena.dboe.base.file.ProcessFileLock.lockOperation(ProcessFileLock.java:187)
> >>>       at
> >>>
> >>
> org.apache.jena.dboe.base.file.ProcessFileLock.lockEx(ProcessFileLock.java:125)
> >>>       at
> >>>
> >>
> org.apache.jena.tdb2.sys.DatabaseConnection.buildForCache(DatabaseConnection.java:88)
> >>>       at
> >>>
> >>
> org.apache.jena.tdb2.sys.DatabaseConnection.lambda$0(DatabaseConnection.java:76)
> >>>       at
> >>>
> >>
> java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
> >>>       at
> >>>
> >>
> org.apache.jena.tdb2.sys.DatabaseConnection.make(DatabaseConnection.java:76)
> >>>       at
> >>>
> >>
> org.apache.jena.tdb2.sys.DatabaseConnection.connectCreate(DatabaseConnection.java:61)
> >>>       at
> >>>
> >>
> org.apache.jena.tdb2.sys.DatabaseConnection.connectCreate(DatabaseConnection.java:52)
> >>>       at
> >>> org.apache.jena.tdb2.DatabaseMgr.DB_ConnectCreate(DatabaseMgr.java:39)
> >>>       ....
> >>>
> >>> The tdb.lock file does not exists before or after the run so it does
> get
> >>> cleaned up.
> >>>
> >>> At the bottom of the above exception the output goes on with:
> >>>
> >>> E
> >>> Time: 1.254
> >>> There were 7 failures:
> >>> 1) createDatasetDirect(org.apache.jena.tdb2.assembler.TestTDBAssembler)
> >>> java.lang.NoClassDefFoundError:
> >>> org/apache/jena/dboe/trans/bplustree/BPlusTreeFactory
> >>>       at
> >>>
> org.apache.jena.tdb2.setup.TDBBuilder.buildRangeIndex(TDBBuilder.java:89)
> >>>       at
> >>>
> >>
> org.apache.jena.tdb2.setup.TDBBuilder.buildBaseNodeTable(TDBBuilder.java:97)
> >>>       at
> >>>
> >>
> org.apache.jena.tdb2.setup.AbstractTDBBuilder.buildNodeTable(AbstractTDBBuilder.java:219)
> >>>       at
> >>>
> >>
> org.apache.jena.tdb2.setup.AbstractTDBBuilder.build$(AbstractTDBBuilder.java:94)
> >>>       at
> org.apache.jena.tdb2.setup.TDBBuilder.build(TDBBuilder.java:65)
> >>>       at
> >>> org.apache.jena.tdb2.sys.StoreConnection.make(StoreConnection.java:93)
> >>>       at
> >>>
> >>
> org.apache.jena.tdb2.sys.StoreConnection.connectCreate(StoreConnection.java:61)
> >>>       at
> >>>
> >>
> org.apache.jena.tdb2.sys.StoreConnection.connectCreate(StoreConnection.java:52)
> >>>       at
> >>>
> >>
> org.apache.jena.tdb2.sys.DatabaseOps.createSwitchable(DatabaseOps.java:99)
> >>>       at
> org.apache.jena.tdb2.sys.DatabaseOps.create(DatabaseOps.java:78)
> >>>       at
> >>>
> >>
> org.apache.jena.tdb2.sys.DatabaseConnection.buildForCache(DatabaseConnection.java:90)
> >>>       at
> >>>
> >>
> org.apache.jena.tdb2.sys.DatabaseConnection.lambda$0(DatabaseConnection.java:76)
> >>>       at
> >>>
> >>
> java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
> >>>       at
> >>>
> >>
> org.apache.jena.tdb2.sys.DatabaseConnection.make(DatabaseConnection.java:76)
> >>>       at
> >>>
> >>
> org.apache.jena.tdb2.sys.DatabaseConnection.connectCreate(DatabaseConnection.java:61)
> >>>       at
> >>>
> >>
> org.apache.jena.tdb2.sys.DatabaseConnection.connectCreate(DatabaseConnection.java:52)
> >>>       at
> >>> org.apache.jena.tdb2.DatabaseMgr.DB_ConnectCreate(DatabaseMgr.java:39)
> >>>       at
> >>>
> org.apache.jena.tdb2.DatabaseMgr.connectDatasetGraph(DatabaseMgr.java:44)
> >>>       at
> >>>
> >>
> org.apache.jena.tdb2.assembler.DatasetAssemblerTDB.make(DatasetAssemblerTDB.java:59)
> >>>       at
> >>>
> >>
> org.apache.jena.tdb2.assembler.DatasetAssemblerTDB.createDataset(DatasetAssemblerTDB.java:50)
> >>>       at
> >>>
> >>
> org.apache.jena.sparql.core.assembler.DatasetAssembler.open(DatasetAssembler.java:43)
> >>>       at
> >>>
> >>
> org.apache.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.openBySpecificType(AssemblerGroup.java:157)
> >>>       at
> >>>
> >>
> org.apache.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.open(AssemblerGroup.java:144)
> >>>       at
> >>>
> >>
> org.apache.jena.assembler.assemblers.AssemblerGroup$ExpandingAssemblerGroup.open(AssemblerGroup.java:93)
> >>>       at
> >>>
> >>
> org.apache.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:39)
> >>>       at
> >>>
> >>
> org.apache.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:35)
> >>>       at
> >>>
> >>
> org.apache.jena.sparql.core.assembler.AssemblerUtils.build(AssemblerUtils.java:126)
> >>>       at
> >>>
> >>
> org.apache.jena.tdb2.assembler.TestTDBAssembler.createTest(TestTDBAssembler.java:76)
> >>>       at
> >>>
> >>
> org.apache.jena.tdb2.assembler.TestTDBAssembler.createDatasetDirect(TestTDBAssembler.java:67)
> >>>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >>>       at
> >>>
> >>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> >>>       at
> >>>
> >>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >>>       at java.lang.reflect.Method.invoke(Method.java:498)
> >>>       at
> >>>
> >>
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> >>>       at
> >>>
> >>
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> >>>       at
> >>>
> >>
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> >>>       at
> >>>
> >>
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> >>>       at
> >>>
> >>
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
> >>>       at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
> >>>       at
> >>>
> >>
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
> >>>       at
> >>>
> >>
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
> >>>       at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> >>>       at
> org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> >>>       at
> org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> >>>       at
> org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> >>>       at
> org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> >>>       at
> >>>
> >>
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
> >>>       at
> >>>
> >>
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
> >>>       at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> >>>       at org.junit.runners.Suite.runChild(Suite.java:128)
> >>>       at org.junit.runners.Suite.runChild(Suite.java:27)
> >>>       at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> >>>       at
> org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> >>>       at
> org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> >>>       at
> org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> >>>       at
> org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> >>>       at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> >>>       at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
> >>>       at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
> >>>       at org.junit.runner.JUnitCore.runMain(JUnitCore.java:77)
> >>>       at org.junit.runner.JUnitCore.main(JUnitCore.java:36)
> >>> Caused by: java.lang.ClassNotFoundException:
> >>> org.apache.jena.dboe.trans.bplustree.BPlusTreeFactory
> >>>       at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
> >>>       at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> >>>       at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
> >>>       at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> >>>       ... 61 more
> >>>
> >>>
> >>> errors 1 through 6 are the NoClassDefFoundErrors  all missing
> >>> BPlusTreeFactory while error 7 is the existence of the lock file.  I
> >>> suspect the first reporting of the error simply shows the last error
> and
> >>> then lists all the errors.
> >>>
> >>> I have checked and the jar with BPlusTreeFactory
> >>> (jena-dboe-trans-data-3.10.0-SNAPSHOT.jar) is on the classpath and does
> >>> contain the BPlusTreeFactory.
> >>>
> >>> So does the TDB2 system somehow build a new classpath?  Does the test
> >>> system create a new classpath?  Is there some way the original
> classpath
> >>> could have been modified before the test was called?
> >>>
> >>> Any assistance is appreciated.
> >>> Claude
> >>>
> >>>
> >>>
> >>> On Sat, Oct 13, 2018 at 8:52 PM Claude Warren <cla...@xenei.com>
> wrote:
> >>>
> >>>> I shut down Eclipse. No joy.
> >>>>
> >>>> On Sat, Oct 13, 2018 at 8:03 PM Andy Seaborne <a...@apache.org>
> wrote:
> >>>>
> >>>>> Do you have Eclipse running as well?
> >>>>>
> >>>>> I have found that sometimes, Eclipse notices changes due "mvn clean"
> >>>>> then Eclipse and mvn compete to build things.  Generally, leaving the
> >>>>> Eclipse UI alone is OK (not perfect).
> >>>>>
> >>>>>        Andy
> >>>>>
> >>>>> On 13/10/18 17:45, Claude Warren wrote:
> >>>>>> When I execute
> >>>>>>
> >>>>>> mvn clean install -Pdev
> >>>>>>
> >>>>>> I get errors in TDB2 build along the line of:
> >>>>>>
> >>>>>> TEST-org.apache.jena.tdb2.sys.TestDatabaseOps.xml:    <error
> >>>>> message="Could
> >>>>>> not initialize class org.apache.jena.tdb2.sys.SystemTDB"
> >>>>>>
> type="java.lang.NoClassDefFoundError">java.lang.NoClassDefFoundError:
> >>>>> Could
> >>>>>> not initialize class org.apache.jena.tdb2.sys.SystemTDB
> >>>>>>
> >>>>>> The list of classes not found seems to be:
> >>>>>>
> >>>>>> org.apache.jena.tdb2.assembler.TestTDBAssembler"
> >>>>>> org.apache.jena.tdb2.ConfigTest"
> >>>>>> org.apache.jena.tdb2.loader.AbstractTestLoader"
> >>>>>> org.apache.jena.tdb2.setup.StoreParamsConst"
> >>>>>> org.apache.jena.tdb2.setup.TestStoreParamsChoose"
> >>>>>> org.apache.jena.tdb2.setup.TestStoreParamsCreate"
> >>>>>> org.apache.jena.tdb2.solver.TestStats"
> >>>>>> org.apache.jena.tdb2.store.NodeId"
> >>>>>> org.apache.jena.tdb2.store.nodetable.TestNodeTableStored"
> >>>>>> org.apache.jena.tdb2.store.nodetable.TestNodeTableStoredBase"
> >>>>>> org.apache.jena.tdb2.sys.SystemTDB"
> >>>>>> org.apache.jena.tdb2.TDB2"
> >>>>>>
> >>>>>> (The above was extracted using grep NoClassDefFound * | cut -d' '
> >> -f10 |
> >>>>>> sort | uniq)
> >>>>>>
> >>>>>> java -version
> >>>>>> openjdk version "1.8.0_181"
> >>>>>> OpenJDK Runtime Environment (build
> >>>>> 1.8.0_181-8u181-b13-0ubuntu0.16.04.1-b13)
> >>>>>> OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)
> >>>>>>
> >>>>>> any ideas what might be wrong?
> >>>>>>
> >>>>>>
> >>>>>> Any ideas what
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>
> >>>>
> >>>>
> >>>> --
> >>>> I like: Like Like - The likeliest place on the web
> >>>> <http://like-like.xenei.com>
> >>>> LinkedIn: http://www.linkedin.com/in/claudewarren
> >>>>
> >>>
> >>>
> >>
> >
> >
>


-- 
I like: Like Like - The likeliest place on the web
<http://like-like.xenei.com>
LinkedIn: http://www.linkedin.com/in/claudewarren

Reply via email to