Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for latest eXist-db and Jena #7

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

adamretter
Copy link
Contributor

All tests now pass too ;-)

This removes the previous Ant build, as you can no longer build eXist-db with Ant.

@joewiz
Copy link

joewiz commented Jun 24, 2020

@adamretter Awesome! Does it require Java 8, by chance? Using OpenJDK 11 (Liberica), I got this error when building using the directions in your revised README:

javadoc: error - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.

The full block:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  31.600 s
[INFO] Finished at: 2020-06-24T11:19:38-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.2.0:jar (attach-javadocs) on project exist-sparql: MavenReportException: Error while generating Javadoc: 
[ERROR] Exit code: 1 - javadoc: error - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] 
[ERROR] Command line was: /Library/Java/JavaVirtualMachines/liberica-jdk-11-full.jdk/Contents/Home/bin/javadoc @options @packages
[ERROR] 
[ERROR] Refer to the generated Javadoc files in '/Users/joe/workspace/exist-sparql/target/apidocs' dir.

@adamretter
Copy link
Contributor Author

@joewiz It sounds like the javadoc in the project may not be compatible with Java 11. Some aspects of Javadoc have changed (been made stricter) with each release of Java.

I can also confirm that the javadoc is generated correctly on Java 8. I would suggest for now you build the module with Java 8, it will still run on Java 11.

I haven't modified the original Javadoc and I am afraid I don't have time to fix the Javadoc right now for Java 11. I am happy for anyone else to send a second PR which does though :-)

@joewiz
Copy link

joewiz commented Jun 25, 2020

@adamretter Thanks! I can confirm that the PR builds under Java 8.

Copy link

@joewiz joewiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, the sample query in the README raises errors I reported in https://github.com/ljo/exist-sparql/pull/1/files, but running the revised sample query https://github.com/ljo/exist-sparql/blob/3dbc7cf70f4e9bd2f45df9a76fd8730988d22249/README.md returns no results, instead of the expected results.


3. upload the xar file found in `target/` into eXist-db using the dashboard

4. enable the Index module in conf.xml, by adding one module declaration under "indexer/modules":
4. enable the Index module in `$EXIST_HOME/conf.xml`, by adding one module declaration under "indexer/modules":
```xml
<module id="rdf-index" class="org.exist.indexing.rdf.TDBRDFIndex"/>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After installing the xar, making this change to conf.xml, and restarting eXist 5.3.0-SNAPSHOT, I get this error in exist.log:

2020-06-25 12:09:04,712 [global.launcher.startJetty] ERROR (JettyStart.java [run]:216) - configuration error: element 'module' requires an attribute 'uri' 
org.exist.util.DatabaseConfigurationException: element 'module' requires an attribute 'uri'
	at org.exist.util.Configuration.loadModuleClasses(Configuration.java:433) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
	at org.exist.util.Configuration.configureXQuery(Configuration.java:390) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
	at org.exist.util.Configuration.<init>(Configuration.java:275) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
	at org.exist.util.SingleInstanceConfiguration.<init>(SingleInstanceConfiguration.java:56) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
	at org.exist.util.SingleInstanceConfiguration.<init>(SingleInstanceConfiguration.java:52) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
	at org.exist.jetty.JettyStart.run(JettyStart.java:199) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
	at org.exist.launcher.Launcher.lambda$4(Launcher.java:188) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
	at java.lang.Thread.run(Thread.java:834) [?:?]

Changing the <module> element to:

<module uri="http://exist-db.org/xquery/sparql" class="org.exist.indexing.rdf.TDBRDFIndex"/>

... allows eXist to start up without error.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joewiz there are two module lines - the first is an index module, and the second is a xquery module. It sounds like you may have placed the index module in the xquery module part of conf.xml.

@wsalesky
Copy link

@adamretter I just tried to build this (running: mvn clean compile package -e ) and ran into the following error:

INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  2.211 s
[INFO] Finished at: 2020-07-10T14:53:42-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project exist-sparql: Could not resolve dependencies for project org.exist-db.xquery.apps:exist-sparql:jar:0.1.0-SNAPSHOT: Failed to collect dependencies at org.exist-db:exist-core:jar:5.2.0 -> org.exist-db.thirdparty.com.thaiopensource:jing:jar:20151127: Failed to read artifact descriptor for org.exist-db.thirdparty.com.thaiopensource:jing:jar:20151127: Could not transfer artifact org.exist-db.thirdparty.com.thaiopensource:jing:pom:20151127 from/to exist-db (http://repo.evolvedbinary.com/repository/exist-db/): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project exist-sparql: Could not resolve dependencies for project org.exist-db.xquery.apps:exist-sparql:jar:0.1.0-SNAPSHOT: Failed to collect dependencies at org.exist-db:exist-core:jar:5.2.0 -> org.exist-db.thirdparty.com.thaiopensource:jing:jar:20151127
    at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies (LifecycleDependencyResolver.java:269)
    at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies (LifecycleDependencyResolver.java:147)
    at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved (MojoExecutor.java:248)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:202)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
    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:497)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)

Thoughts? I would love to use this in our upcoming re-release of the Srophe application.
Thanks!

@adamretter
Copy link
Contributor Author

@wsalesky you might need to add http://repo.evolvedbinary.com/repository/exist-db/ to your repositories list until 5.3.0 is updated and this is updated for that.

However I did find some problems with this... Maybe it would be good to have a watch of my recent Markup UK webinar

@wsalesky
Copy link

@adamretter Thanks I will take a look at the webinar.

@adamretter
Copy link
Contributor Author

@ljo Will this ever be merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants