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






Reply via email to