On 20/12/16 14:30, Andy Seaborne wrote:
That fix fixes things in jena-permissions - thanks.
Spoke too soon!
jena-permissions runs tests in a random order.
If MemGraphTest runs first, there were still problems.
I have pushed a JenaSystem.init() call to ARQ's GraphFactory and both
jobs are now OK; taht seemed to be the init route. I confess I don't
exactly know which route was causing bad initialization; there is a
lesson on the order classes get loaded when using JUnit runners in here
somewhere. (I've put an init in jena-permissions Facory as well, on
principle but that was not on teh code path for the tests)
Calls to JenaSystem.init should be cheap enough to put in class
initializers - the cost when initialized is a single read of a volatile
boolean. Once initialized, there are no "synchronized" costs.
Currently, the Jenkins jobs are working.
Andy
I've rebuilt and deployed our snapshot soi they are up-to-date as of
this morning.
The next mystery is while I can "mvn clean deploy" on my local machine,
on Jenkins org.apache.jena.jdbc.mem.connections.TestDatasetConnection
is giving failures.
They look like they could be initialization problems except it looks to
me like JenaSystem.init() has been called.
Oh - and the development test build worked yesterday after the fix.
The only thing I can think of ATM is to switch on the init tracing ...
that will make the build and the use of some artifacts verbose for a while.
Andy
-----------------
Error Message
Could not initialize class org.apache.jena.sparql.graph.NodeConst
Stacktrace
java.lang.NoClassDefFoundError: Could not initialize class
org.apache.jena.sparql.graph.NodeConst
-----------------
On 19/12/16 20:16, Claude Warren wrote:
Checked in a fix that seems to work and seems like it should be
correct. I
added
{code}
static {
JenaSystem.init();
}
{code}
to JenaTestBase.
Claude
On Mon, Dec 19, 2016 at 7:19 PM, Claude Warren <[email protected]> wrote:
Found the reason -- FDFS.subClassOf is null because RDFS is being
initialized.
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner at
localhost:40160
Thread [main] (Suspended)
owns: Object (id=48)
owns: Class<T> (org.apache.jena.system.JenaSystem) (id=16)
owns: Object (id=49)
owns: Object (id=50)
ModelCom.add(Resource, Property, RDFNode) line: 1190
AssemblerGroup$ExpandingAssemblerGroup.implementWith(Resource,
Assembler) line: 92
ConstAssembler.general() line: 137
AssemblerUtils.registerDataset(Resource, Assembler) line: 68
AssemblerUtils.init() line: 60
ARQ.init() line: 590
InitARQ.start() line: 29
JenaSystem.lambda$init$2(JenaSubsystemLifecycle) line: 119
282432134.accept(Object) line: not available
ArrayList<E>.forEach(Consumer<? super E>) line: 1249
JenaSystem.forEach(Consumer<JenaSubsystemLifecycle>,
Comparator<JenaSubsystemLifecycle>)
line: 194
JenaSystem.forEach(Consumer<JenaSubsystemLifecycle>) line: 171
JenaSystem.init() line: 117
NodeFactory.<clinit>() line: 32
ResourceImpl.fresh(String) line: 135
ResourceImpl.<init>(String) line: 85
ResourceFactory$Impl.createResource(String) line: 297
ResourceFactory.createResource(String) line: 92
RDFS.resource(String) line: 35
RDFS.<clinit>() line: 40
PrefixMapping.<clinit>() line: 219
GraphTestBase.tripleArray(String) line: 131
AbstractTestGraph.<clinit>() line: 291
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line:
not available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 62
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43
Method.invoke(Object, Object...) line: 498
SuiteMethod.testFromSuiteMethod(Class<?>) line: 35
SuiteMethod.<init>(Class<?>) line: 24
SuiteMethodBuilder.runnerForClass(Class<?>) line: 11
SuiteMethodBuilder(RunnerBuilder).safeRunnerForClass(Class<?>)
line: 59
AllDefaultPossibilitiesBuilder.runnerForClass(Class<?>) line:
26
AllDefaultPossibilitiesBuilder(RunnerBuilder).safeRunnerForClass(Class<?>)
line: 59
ClassRequest.getRunner() line: 33
JUnit4TestLoader.createUnfilteredTest(Class<?>, String[]) line:
84
JUnit4TestLoader.createTest(Class<?>, String, String[],
RemoteTestRunner) line: 70
JUnit4TestLoader.loadTests(Class[], String, String[],
RemoteTestRunner) line: 43
RemoteTestRunner.runTests(String[], String, TestExecution) line:
444
RemoteTestRunner.runTests(TestExecution) line: 678
RemoteTestRunner.run() line: 382
RemoteTestRunner.main(String[]) line: 192
Thread [ReaderThread] (Running)
On Mon, Dec 19, 2016 at 7:12 PM, Claude Warren <[email protected]> wrote:
I am not sure why but way down in the AQR.init() there is a call to
AssemblerGroup.implementWith( Resource type, Assembler a)
Which is coded as
{code}
@Override public AssemblerGroup implementWith( Resource type,
Assembler
a )
{
implementTypes.add( type, RDFS.subClassOf, JA.Object );
internal.implementWith( type, a );
return this;
}
{code}
The issue seems to be that at this point RDFS.subClassOf is null.
I'll keep looking but I wanted to post an update in case anyone had any
ideas.
Cluade
On Mon, Dec 19, 2016 at 5:30 PM, Claude Warren <[email protected]>
wrote:
Will look when I get home this evening
On Mon, Dec 19, 2016 at 1:06 PM, Andy Seaborne <[email protected]>
wrote:
The build is not working at the moment. I've fixed what I can
(jena-fuseki1) but jena-permissions is failing tests in ways I don't
understand.
The first failure is:
SecuredGraphListenerTest
initializationError(org.apache.jena.permissions.contract.graph.SecuredGraphListenerTest)
Time elapsed: 0.005 sec <<< ERROR!
java.lang.ExceptionInInitializerError
Caused by: java.lang.NullPointerException
and when I run that test in Eclipse on its own it does indeed fail
with
that error.
However, if I run the module locally it passes.
Maybe there is an order dependency that has been triggered by
unrelated
changes, maybe its something else. I'd appreciate some help in
solving
this.
Andy
--
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
--
I like: Like Like - The likeliest place on the web
<http://like-like.xenei.com>
LinkedIn: http://www.linkedin.com/in/claudewarren