question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Version

4.6.1

Question

I use Maven to compile the source code and no error, but run FusekiMainCmd error, related information is as follows.

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/jena/ext/com/google/common/cache/RemovalNotification
	at org.apache.jena.atlas.lib.cache.CacheGuava.<init>(CacheGuava.java:41)
	at org.apache.jena.atlas.lib.CacheFactory.createCache(CacheFactory.java:31)
	at org.apache.jena.enhanced.EnhGraph.<init>(EnhGraph.java:41)
	at org.apache.jena.rdf.model.impl.ModelCom.<init>(ModelCom.java:76)
	at org.apache.jena.rdf.model.impl.ModelCom.<init>(ModelCom.java:73)
	at org.apache.jena.rdf.model.ModelFactory.createDefaultModel(ModelFactory.java:91)
	at org.apache.jena.vocabulary.DC_11.<clinit>(DC_11.java:29)
	at org.apache.jena.shared.PrefixMapping.<clinit>(PrefixMapping.java:221)
	at org.apache.jena.sparql.ARQConstants.<clinit>(ARQConstants.java:114)
	at org.apache.jena.query.ARQ.init(ARQ.java:627)
	at org.apache.jena.sparql.system.InitARQ.start(InitARQ.java:29)
	at org.apache.jena.base.module.Subsystem.lambda$initialize$2(Subsystem.java:117)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
	at org.apache.jena.base.module.Subsystem.forEach(Subsystem.java:193)
	at org.apache.jena.base.module.Subsystem.forEach(Subsystem.java:169)
	at org.apache.jena.base.module.Subsystem.initialize(Subsystem.java:115)
	at org.apache.jena.sys.JenaSystem.init(JenaSystem.java:88)
	at arq.cmdline.CmdARQ.<clinit>(CmdARQ.java:30)
	at org.apache.jena.fuseki.main.cmds.FusekiMainCmd.main(FusekiMainCmd.java:47)

My environment is

mvn 3.8.6, jdk 11-16

I tried to search for “org/apache/jena/ext/com/google/common/cache/RemovalNotification” in idea and only found import in AsyncClaimingCacheImplGuava, I can confirm that it was loaded properly

image

Can you help me determine what the problem is

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
LorenzBuehmanncommented, Sep 17, 2022

With IntelliJ IDE you can just disable the jena-shaded-guava module and it will use the dependency from public Maven repo.

2reactions
afscommented, Sep 15, 2022

Sorry it’s not working cleanly first time.

As well as excluding jena-shaded-guava as @kinow now notes, close or don’t import, the top level project. It ends up with two routes to everything which can confuse IDEs.

Which IDE do you use? We can expand the build instructions for the next person who encounters these issues.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fuseki : Main Server - Apache Jena
Fuseki main is a packaging of Fuseki as a triple store without a UI for administration. Fuseki can be run in the background...
Read more >
org.apache.jena.fuseki.main.cmds.FusekiMainCmd Maven / Gradle ...
FusekiMainCmd maven / gradle build tool code. The class is part of the package ➦ Group: org.apache.jena ➦ Artifact: jena-fuseki-main ➦ Version: 3.13.1....
Read more >
[GitHub] [jena] afs commented on issue #1528: FusekiMainCMD
[GitHub] [jena] afs commented on issue #1528: FusekiMainCMD · GitBox Sun, 11 Sep 2022 01:32:55 -0700. afs commented on issue #1528: URL: ...
Read more >
org.apache.jena.fuseki.main.cmds.FusekiMain.run java code ...
FusekiMainCmd.main(...) /** * Build and run, a server based on command line syntax. This operation does not * return. See {@link FusekiMain#build} to...
Read more >
How to fix custom function class not registered in apache jena ...
FusekiMainCmd. – AndyS. Jun 13 at 12:40. hi @AndyS, what would be root of class files in src/main/java/arq/examples/filter/classify.java ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found