Giter Club home page Giter Club logo

Comments (5)

ebremer avatar ebremer commented on May 27, 2024

It will work outside Netbean using Maven:
mvn exec:java -Dexec.mainClass="com.myworks.testprog"

but still returns null using the "java -jar" method.

from jena.

ebremer avatar ebremer commented on May 27, 2024

After some digging, I added:
ARQ.init();

and now the expected results print. I never had to do this before. I suppose something is different in this new JDK I am using.

from jena.

afs avatar afs commented on May 27, 2024

This could be because the combined jar does not include the service loader files:

https://jena.apache.org/documentation/notes/jena-repack.html

For each of the jena jars included, the repacking needs to include (concatenate into one file) the contents of all
META-INF/services/org.apache.jena.sys.JenaSubsystemLifecycle files in one file in the combined jar.

These are what drives Jena initialization using Java ServiceLoader. The JenaSubsystemLifecycle in Jena calls ARQ.init amongst other things.

from jena.

ebremer avatar ebremer commented on May 27, 2024

That did the trick. I was able to remove the ARQ.init() line after that. The weird is that I've used a shaded jar in this project for years with Jena without needing this change, so I'm not sure what changed, but it's an easy enough change. Thanks Andy!

from jena.

afs avatar afs commented on May 27, 2024

There was probably partial initialization - normally initialization happens when Jena is first touched by app code. An app can force it with JenaSystem.init(). There is still class initialization happening and ARQ.init can be triggered (or "was triggered") by other routes.

https://jena.apache.org/documentation/notes/system-initialization.html

including how to debug.

from jena.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.