NoClassDefFoundException when integrating Apache Jena into Web Application project
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
I've been looking for two days to integrate Apache Jena in a Web Application that uses PrimeFaces (open source framework for JavaServerFaces). The project is built using Apache Maven and deployed locally in "operating mode: standalone" to WildFly 12 application server.
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>it</groupId>
<artifactId>Test2</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<!-- Servlet -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency>
<!-- JSF -->
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.2.15</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.2.15</version>
</dependency>
<!-- PrimeFaces -->
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>6.1</version>
</dependency>
<!-- Jena -->
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>jena-arq</artifactId>
<version>3.9.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
version="4.0">
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
</web-app>
I have created an IndexView
backing Bean with an init
method, annotated with @PostConstruct
. Everything works fine without calling Jena API.
On adding to init
method this simple line
OntModel model = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM);
these exception are thrown:
javax.servlet.ServletException
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:671)
...
Caused by: java.lang.ExceptionInInitializerError
at org.apache.jena.ontology.OntModelSpec.<clinit>(OntModelSpec.java:49)
at IndexView.init(IndexView.java:32)
...
Caused by: java.nio.file.InvalidPathException: Illegal char <:> at index 4: file:location-mapping.rdf
...
javax.servlet.ServletException: Could not initialize class org.apache.jena.ontology.OntModelSpec
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:671)
...
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.apache.jena.ontology.OntModelSpec
at IndexView.init(IndexView.java:32)
location-mapping.rdf
file is included in jena-core dependency (included in jena-arq dependency)- All dependencies are included in classpath and in the generated war (I can see them under the lib folder in the generated artifact).
I cannot figure out how to make it work.
maven wildfly jena
|
show 3 more comments
I've been looking for two days to integrate Apache Jena in a Web Application that uses PrimeFaces (open source framework for JavaServerFaces). The project is built using Apache Maven and deployed locally in "operating mode: standalone" to WildFly 12 application server.
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>it</groupId>
<artifactId>Test2</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<!-- Servlet -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency>
<!-- JSF -->
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.2.15</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.2.15</version>
</dependency>
<!-- PrimeFaces -->
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>6.1</version>
</dependency>
<!-- Jena -->
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>jena-arq</artifactId>
<version>3.9.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
version="4.0">
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
</web-app>
I have created an IndexView
backing Bean with an init
method, annotated with @PostConstruct
. Everything works fine without calling Jena API.
On adding to init
method this simple line
OntModel model = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM);
these exception are thrown:
javax.servlet.ServletException
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:671)
...
Caused by: java.lang.ExceptionInInitializerError
at org.apache.jena.ontology.OntModelSpec.<clinit>(OntModelSpec.java:49)
at IndexView.init(IndexView.java:32)
...
Caused by: java.nio.file.InvalidPathException: Illegal char <:> at index 4: file:location-mapping.rdf
...
javax.servlet.ServletException: Could not initialize class org.apache.jena.ontology.OntModelSpec
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:671)
...
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.apache.jena.ontology.OntModelSpec
at IndexView.init(IndexView.java:32)
location-mapping.rdf
file is included in jena-core dependency (included in jena-arq dependency)- All dependencies are included in classpath and in the generated war (I can see them under the lib folder in the generated artifact).
I cannot figure out how to make it work.
maven wildfly jena
Hi, how is this PrimeFaces related (other than you using it) Does creating a new small webapp without PrimeFaces make it work?. And your usage of Maven is wrong, you should (almost) never include the jsf or any java-ee api jar with another scope than 'provided'.
– Kukeltje
Jan 4 at 14:53
I've just removed the PrimeFaces dependency and add<scope>provided<scope>
to Servlet and JSF dependencies. The error is exactly the same.
– AGL
Jan 4 at 15:01
Great, it is at least an improvement and shows it is not PF related. And I assume there is more info in the full stacktrace server side. This looks like the info in the screen on the browser and it looks like the constructor of a class cannot be executed. Most likely 100% jena related. Did you post the full error in a search engine?
– Kukeltje
Jan 4 at 15:02
Yes I've posted it. It seems that the war doesn't contains Jena dependencies (but these are contained underout -> artifact -> my_war_exploded -> WEB-INF -> lib
. I've read a lot of questions and answers here like that one link or link but nothing works. I'm using IntelliJ Ultimate as IDE.
– AGL
Jan 4 at 15:52
So try to fix that. Effectively not a jsf related thing (nor wildfly), but more likely a maven related issue
– Kukeltje
Jan 4 at 16:11
|
show 3 more comments
I've been looking for two days to integrate Apache Jena in a Web Application that uses PrimeFaces (open source framework for JavaServerFaces). The project is built using Apache Maven and deployed locally in "operating mode: standalone" to WildFly 12 application server.
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>it</groupId>
<artifactId>Test2</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<!-- Servlet -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency>
<!-- JSF -->
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.2.15</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.2.15</version>
</dependency>
<!-- PrimeFaces -->
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>6.1</version>
</dependency>
<!-- Jena -->
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>jena-arq</artifactId>
<version>3.9.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
version="4.0">
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
</web-app>
I have created an IndexView
backing Bean with an init
method, annotated with @PostConstruct
. Everything works fine without calling Jena API.
On adding to init
method this simple line
OntModel model = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM);
these exception are thrown:
javax.servlet.ServletException
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:671)
...
Caused by: java.lang.ExceptionInInitializerError
at org.apache.jena.ontology.OntModelSpec.<clinit>(OntModelSpec.java:49)
at IndexView.init(IndexView.java:32)
...
Caused by: java.nio.file.InvalidPathException: Illegal char <:> at index 4: file:location-mapping.rdf
...
javax.servlet.ServletException: Could not initialize class org.apache.jena.ontology.OntModelSpec
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:671)
...
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.apache.jena.ontology.OntModelSpec
at IndexView.init(IndexView.java:32)
location-mapping.rdf
file is included in jena-core dependency (included in jena-arq dependency)- All dependencies are included in classpath and in the generated war (I can see them under the lib folder in the generated artifact).
I cannot figure out how to make it work.
maven wildfly jena
I've been looking for two days to integrate Apache Jena in a Web Application that uses PrimeFaces (open source framework for JavaServerFaces). The project is built using Apache Maven and deployed locally in "operating mode: standalone" to WildFly 12 application server.
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>it</groupId>
<artifactId>Test2</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<!-- Servlet -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency>
<!-- JSF -->
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.2.15</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.2.15</version>
</dependency>
<!-- PrimeFaces -->
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>6.1</version>
</dependency>
<!-- Jena -->
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>jena-arq</artifactId>
<version>3.9.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
version="4.0">
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
</web-app>
I have created an IndexView
backing Bean with an init
method, annotated with @PostConstruct
. Everything works fine without calling Jena API.
On adding to init
method this simple line
OntModel model = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM);
these exception are thrown:
javax.servlet.ServletException
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:671)
...
Caused by: java.lang.ExceptionInInitializerError
at org.apache.jena.ontology.OntModelSpec.<clinit>(OntModelSpec.java:49)
at IndexView.init(IndexView.java:32)
...
Caused by: java.nio.file.InvalidPathException: Illegal char <:> at index 4: file:location-mapping.rdf
...
javax.servlet.ServletException: Could not initialize class org.apache.jena.ontology.OntModelSpec
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:671)
...
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.apache.jena.ontology.OntModelSpec
at IndexView.init(IndexView.java:32)
location-mapping.rdf
file is included in jena-core dependency (included in jena-arq dependency)- All dependencies are included in classpath and in the generated war (I can see them under the lib folder in the generated artifact).
I cannot figure out how to make it work.
maven wildfly jena
maven wildfly jena
edited Jan 4 at 16:16
Kukeltje
9,37041439
9,37041439
asked Jan 4 at 14:45
AGLAGL
11
11
Hi, how is this PrimeFaces related (other than you using it) Does creating a new small webapp without PrimeFaces make it work?. And your usage of Maven is wrong, you should (almost) never include the jsf or any java-ee api jar with another scope than 'provided'.
– Kukeltje
Jan 4 at 14:53
I've just removed the PrimeFaces dependency and add<scope>provided<scope>
to Servlet and JSF dependencies. The error is exactly the same.
– AGL
Jan 4 at 15:01
Great, it is at least an improvement and shows it is not PF related. And I assume there is more info in the full stacktrace server side. This looks like the info in the screen on the browser and it looks like the constructor of a class cannot be executed. Most likely 100% jena related. Did you post the full error in a search engine?
– Kukeltje
Jan 4 at 15:02
Yes I've posted it. It seems that the war doesn't contains Jena dependencies (but these are contained underout -> artifact -> my_war_exploded -> WEB-INF -> lib
. I've read a lot of questions and answers here like that one link or link but nothing works. I'm using IntelliJ Ultimate as IDE.
– AGL
Jan 4 at 15:52
So try to fix that. Effectively not a jsf related thing (nor wildfly), but more likely a maven related issue
– Kukeltje
Jan 4 at 16:11
|
show 3 more comments
Hi, how is this PrimeFaces related (other than you using it) Does creating a new small webapp without PrimeFaces make it work?. And your usage of Maven is wrong, you should (almost) never include the jsf or any java-ee api jar with another scope than 'provided'.
– Kukeltje
Jan 4 at 14:53
I've just removed the PrimeFaces dependency and add<scope>provided<scope>
to Servlet and JSF dependencies. The error is exactly the same.
– AGL
Jan 4 at 15:01
Great, it is at least an improvement and shows it is not PF related. And I assume there is more info in the full stacktrace server side. This looks like the info in the screen on the browser and it looks like the constructor of a class cannot be executed. Most likely 100% jena related. Did you post the full error in a search engine?
– Kukeltje
Jan 4 at 15:02
Yes I've posted it. It seems that the war doesn't contains Jena dependencies (but these are contained underout -> artifact -> my_war_exploded -> WEB-INF -> lib
. I've read a lot of questions and answers here like that one link or link but nothing works. I'm using IntelliJ Ultimate as IDE.
– AGL
Jan 4 at 15:52
So try to fix that. Effectively not a jsf related thing (nor wildfly), but more likely a maven related issue
– Kukeltje
Jan 4 at 16:11
Hi, how is this PrimeFaces related (other than you using it) Does creating a new small webapp without PrimeFaces make it work?. And your usage of Maven is wrong, you should (almost) never include the jsf or any java-ee api jar with another scope than 'provided'.
– Kukeltje
Jan 4 at 14:53
Hi, how is this PrimeFaces related (other than you using it) Does creating a new small webapp without PrimeFaces make it work?. And your usage of Maven is wrong, you should (almost) never include the jsf or any java-ee api jar with another scope than 'provided'.
– Kukeltje
Jan 4 at 14:53
I've just removed the PrimeFaces dependency and add
<scope>provided<scope>
to Servlet and JSF dependencies. The error is exactly the same.– AGL
Jan 4 at 15:01
I've just removed the PrimeFaces dependency and add
<scope>provided<scope>
to Servlet and JSF dependencies. The error is exactly the same.– AGL
Jan 4 at 15:01
Great, it is at least an improvement and shows it is not PF related. And I assume there is more info in the full stacktrace server side. This looks like the info in the screen on the browser and it looks like the constructor of a class cannot be executed. Most likely 100% jena related. Did you post the full error in a search engine?
– Kukeltje
Jan 4 at 15:02
Great, it is at least an improvement and shows it is not PF related. And I assume there is more info in the full stacktrace server side. This looks like the info in the screen on the browser and it looks like the constructor of a class cannot be executed. Most likely 100% jena related. Did you post the full error in a search engine?
– Kukeltje
Jan 4 at 15:02
Yes I've posted it. It seems that the war doesn't contains Jena dependencies (but these are contained under
out -> artifact -> my_war_exploded -> WEB-INF -> lib
. I've read a lot of questions and answers here like that one link or link but nothing works. I'm using IntelliJ Ultimate as IDE.– AGL
Jan 4 at 15:52
Yes I've posted it. It seems that the war doesn't contains Jena dependencies (but these are contained under
out -> artifact -> my_war_exploded -> WEB-INF -> lib
. I've read a lot of questions and answers here like that one link or link but nothing works. I'm using IntelliJ Ultimate as IDE.– AGL
Jan 4 at 15:52
So try to fix that. Effectively not a jsf related thing (nor wildfly), but more likely a maven related issue
– Kukeltje
Jan 4 at 16:11
So try to fix that. Effectively not a jsf related thing (nor wildfly), but more likely a maven related issue
– Kukeltje
Jan 4 at 16:11
|
show 3 more comments
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54041151%2fnoclassdeffoundexception-when-integrating-apache-jena-into-web-application-proje%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54041151%2fnoclassdeffoundexception-when-integrating-apache-jena-into-web-application-proje%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Hi, how is this PrimeFaces related (other than you using it) Does creating a new small webapp without PrimeFaces make it work?. And your usage of Maven is wrong, you should (almost) never include the jsf or any java-ee api jar with another scope than 'provided'.
– Kukeltje
Jan 4 at 14:53
I've just removed the PrimeFaces dependency and add
<scope>provided<scope>
to Servlet and JSF dependencies. The error is exactly the same.– AGL
Jan 4 at 15:01
Great, it is at least an improvement and shows it is not PF related. And I assume there is more info in the full stacktrace server side. This looks like the info in the screen on the browser and it looks like the constructor of a class cannot be executed. Most likely 100% jena related. Did you post the full error in a search engine?
– Kukeltje
Jan 4 at 15:02
Yes I've posted it. It seems that the war doesn't contains Jena dependencies (but these are contained under
out -> artifact -> my_war_exploded -> WEB-INF -> lib
. I've read a lot of questions and answers here like that one link or link but nothing works. I'm using IntelliJ Ultimate as IDE.– AGL
Jan 4 at 15:52
So try to fix that. Effectively not a jsf related thing (nor wildfly), but more likely a maven related issue
– Kukeltje
Jan 4 at 16:11