kbss-cvut / jopa-examples Goto Github PK
View Code? Open in Web Editor NEWUsage examples for the JOPA framework.
License: GNU Lesser General Public License v3.0
Usage examples for the JOPA framework.
License: GNU Lesser General Public License v3.0
I am trying to run example 2 using the command:
mvn exec:java
I got the following exception
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java (default-cli) on project example-02: An exception occured while executing the Java class. Illegal characte
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java (default-cli) on project example-02: An ex
ception occured while executing the Java class. Illegal character in authority at index 7: file://C:\Users\user\IdeaProjects\jopa-examples\example02-jopa-owlapi\repository.owl
my requirement is to convert json-ld to graphql schema.if any body has a reference, please share with me. i will appreciate your help
Upon running mvn spring-boot:run
as advised in the subproject's README.md, Spring-Boot appears to start, then we get the error:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
at org.springframework.boot.logging.logback.LogbackLoggingSystem.getLoggerContext(LogbackLoggingSystem.java:304)
at org.springframework.boot.logging.logback.LogbackLoggingSystem.beforeInitialize(LogbackLoggingSystem.java:118)
at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationStartingEvent(LoggingApplicationListener.java:238)
at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:220)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:178)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:171)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:145)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:133)
at org.springframework.boot.context.event.EventPublishingRunListener.starting(EventPublishingRunListener.java:79)
at org.springframework.boot.SpringApplicationRunListeners.lambda$starting$0(SpringApplicationRunListeners.java:56)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:120)
at org.springframework.boot.SpringApplicationRunListeners.starting(SpringApplicationRunListeners.java:56)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:299)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1300)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1289)
at cz.cvut.kbss.jopa.jsonld.JsonLdDemo.main(JsonLdDemo.java:27)
Caused by: java.lang.ClassNotFoundException: org.slf4j.impl.StaticLoggerBinder
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
I have never had advice suggested in the the URL https://www.slf4j.org/codes.html#StaticLoggerBinder to help. i.e. to push forward to to slf4j-2.0.x
- rather, slf4j-1.3.x
still works.
Looking at the jsonld subproject's pom.xml, I see there are no explicit dependencies declared for either slf4j
or logback
, which means this project is at the mercy of whatever transitive versions of those that are brought in by the direct dependencies. The output of mvn -U -Dmaven.test.skip=true -Dverbose -DoutputFile=deps.txt dependency:tree
shows a lot of conflicting versions for slf4j
but the final "winner" is 1.7.36
even though most of the dependency's transitive slf4j
dependencies are trying for 2.0.6
or 2.0.7
, however after the resolution, version 1.7.36
wins.
I tried forcing slf4j-2.0.7
as suggested in https://www.slf4j.org/codes.html#StaticLoggerBinder but kept getting the same ClassNotFoundException: org.slf4j.impl.StaticLoggerBinder
- this was not new to me; I have run into this many times. My solution is to downgrade logback
to 1.2.x
from 1.3.x
.
Explicitly use versions for slf4j, using 1.7.32
and logback 1.2.11
.
It would be beneficial to also have a Gradle-based example. Currently, all the examples use Maven, but at least one should exist also with Gradle, so that users building with Gradle have a set-up sample to follow (especially w.r.t. AspectJ compilation).
Hi,
I am working with json-ld in android and I want to transform a Java class to a json-dl file, I try to create the ObjectMapper with the JsonLdModule
but I face a problem I do not understand problem, I know that there is not a problem with the definition of the class as the error comes from this code:
User u = new User("Paco");
ObjectMapper mapper = new ObjectMapper();
mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
JsonLdModule module = new JsonLdModule(); //ERROR in this
linemodule.configure(ConfigParam.SCAN_PACKAGE, "cz.cvut.kbss.jopa.jsonld");
mapper.registerModule(module);
I followed that: https://github.com/kbss-cvut/jopa-examples/blob/master/jsonld/src/main/java/cz/cvut/kbss/jopa/jsonld/config/RestConfig.java#L37
The code runs in a Thread inside to a Service.
This is the error:
E/AndroidRuntime: FATAL EXCEPTION: pool-1-thread-1
Process: myprocess, PID: 6355
java.lang.BootstrapMethodError: Exception from call site #177 bootstrap method
at cz.cvut.kbss.jsonld.common.BeanAnnotationProcessor.<clinit>(BeanAnnotationProcessor.java:31)
at cz.cvut.kbss.jsonld.common.BeanAnnotationProcessor.setPropertyAccessResolver(BeanAnnotationProcessor.java:45)
at cz.cvut.kbss.jsonld.jackson.serialization.JsonLdSerializerModifier.<init>(JsonLdSerializerModifier.java:32)
at cz.cvut.kbss.jsonld.jackson.JsonLdModule.init(JsonLdModule.java:38)
at cz.cvut.kbss.jsonld.jackson.JsonLdModule.<init>(JsonLdModule.java:33)
at com.client.Service.myService$2.run(myService.java:325)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.lang.ClassCastException: Bootstrap method returned null
at cz.cvut.kbss.jsonld.common.BeanAnnotationProcessor.<clinit>(BeanAnnotationProcessor.java:31)
at cz.cvut.kbss.jsonld.common.BeanAnnotationProcessor.setPropertyAccessResolver(BeanAnnotationProcessor.java:45)
at cz.cvut.kbss.jsonld.jackson.serialization.JsonLdSerializerModifier.<init>(JsonLdSerializerModifier.java:32)
at cz.cvut.kbss.jsonld.jackson.JsonLdModule.init(JsonLdModule.java:38)
at cz.cvut.kbss.jsonld.jackson.JsonLdModule.<init>(JsonLdModule.java:33)
at com.client.Service.myService$2.run(myService.java:325)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
Any ideas of the problem? and any sugestions of my code?
I try to do something similar to this example: https://github.com/kbss-cvut/jopa-examples/tree/master/jsonld
I am new to json -ld . dont know how to use json -ld with spring boot . in Get ,post,delete and put method. can you please add one example to new learner. i searched much on the web but did not get any help.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.