You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Ear deployment fails on Wildfly 8.0.0 Final (Cassandra related) #547
This is a question rather than an issue.
The deployment fails, unless I change the code in PersistenceUnitMetadata like the diff mentions below.
Am I doing something wrong, or is this a defect in the metadata collection?
I was using the Cassandra quick start examples from the wiki to set up my configuration.
Here is my artifact structure:
.EAR
EJB.jar (declaring Kundera as a dependency)
webapp.WAR (calls the ejb
--- a/src/jpa-engine/core/src/main/java/com/impetus/kundera/metadata/model/PersistenceUnitMetadata.java
+++ b/src/jpa-engine/core/src/main/java/com/impetus/kundera/metadata/model/PersistenceUnitMetadata.java
@@ -485,7 +485,7 @@ public class PersistenceUnitMetadata implements PersistenceUnitInfo
if (!getExcludeUnlistedClasses())
{
- managedURL.add(getPersistenceUnitRootUrl());
+ //managedURL.add(getPersistenceUnitRootUrl());
}
return managedURL;
}
Just for the record, the persistence.xml declares class elements for the pu.
If more info is needed to reproduce just let me know.
EJB.jar depends on another jar file which contains the model entities.
webapp.WAR is a minimalistic JAX-RS endpoint. No static files (empty webapp directory), no web.xml, only a JAX-RS application subclass and a resource class for implementing the endpoint itself.
If the problem doesn't obvious from these, I'll quickly throw together a deployable example project to reproduce the problem, just let me know. (I cannot publish the actual project.)
Sample project sent.
The error I'm getting without the mentioned patch (Kundera 2.10 stable) is this:
Caused by: java.lang.IllegalArgumentException: kundera.client property is missing for persistence unit:cassandra_pu_cas_test
at com.impetus.kundera.configure.PersistenceUnitConfiguration.configure(PersistenceUnitConfiguration.java:136) [kundera-core.jar:]
at com.impetus.kundera.persistence.EntityManagerFactoryImpl.configurePersistenceUnit(EntityManagerFactoryImpl.java:656) [kundera-core.jar:]
at com.impetus.kundera.persistence.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:111) [kundera-core.jar:]
at com.impetus.kundera.KunderaPersistence.createContainerEntityManagerFactory(KunderaPersistence.java:63) [kundera-core.jar:]
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:318) [wildfly-jpa-8.0.0.Final.jar:8.0.0.Final]
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.access$1100(PersistenceUnitServiceImpl.java:67) [wildfly-jpa-8.0.0.Final.jar:8.0.0.Final]
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:167) [wildfly-jpa-8.0.0.Final.jar:8.0.0.Final]
... 8 more
I retested it with 2.11 and it still produces issues. (I used the very same test project I emailed you before, just changed the dependency version to 2.11)
The stack trace I get is pasted below. I'm not sure if it's just me not configuring something properly or some other issue with the same thing. Please let me know if I should reopen this or not.
15:21:06,698 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 64) MSC000001: Failed to start service jboss.persistenceunit."wildfly-ejb-in-ear-ear.ear/wildfly-ejb-in-ear-ejb.jar#cassandra_pu_cas_test": org.jboss.msc.service.StartException in service jboss.persistenceunit."wildfly-ejb-in-ear-ear.ear/wildfly-ejb-in-ear-ejb.jar#cassandra_pu_cas_test": com.impetus.kundera.classreading.ResourceReadingException: java.io.FileNotFoundException: /content/wildfly-ejb-in-ear-ear.ear/wildfly-ejb-in-ear-ejb.jar (No such file or directory)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:172) [wildfly-jpa-8.0.0.Final.jar:8.0.0.Final]
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:117) [wildfly-jpa-8.0.0.Final.jar:8.0.0.Final]
at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_45]
at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:474)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:182) [wildfly-jpa-8.0.0.Final.jar:8.0.0.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: com.impetus.kundera.classreading.ResourceReadingException: java.io.FileNotFoundException: /content/wildfly-ejb-in-ear-ear.ear/wildfly-ejb-in-ear-ejb.jar (No such file or directory)
at com.impetus.kundera.classreading.Reader.getResourceIterator(Reader.java:180) [kundera-core.jar:]
at com.impetus.kundera.configure.MetamodelConfiguration.loadEntityMetadata(MetamodelConfiguration.java:226) [kundera-core.jar:]
at com.impetus.kundera.configure.MetamodelConfiguration.configure(MetamodelConfiguration.java:112) [kundera-core.jar:]
at com.impetus.kundera.persistence.EntityManagerFactoryImpl.configure(EntityManagerFactoryImpl.java:154) [kundera-core.jar:]
at com.impetus.kundera.persistence.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:112) [kundera-core.jar:]
at com.impetus.kundera.KunderaPersistence.createContainerEntityManagerFactory(KunderaPersistence.java:63) [kundera-core.jar:]
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:318) [wildfly-jpa-8.0.0.Final.jar:8.0.0.Final]
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.access$1100(PersistenceUnitServiceImpl.java:67) [wildfly-jpa-8.0.0.Final.jar:8.0.0.Final]
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:167) [wildfly-jpa-8.0.0.Final.jar:8.0.0.Final]
... 8 more
Caused by: java.io.FileNotFoundException: /content/wildfly-ejb-in-ear-ear.ear/wildfly-ejb-in-ear-ejb.jar (No such file or directory)
at java.io.FileInputStream.open(Native Method) [rt.jar:1.7.0_45]
at java.io.FileInputStream.<init>(FileInputStream.java:146) [rt.jar:1.7.0_45]
at java.io.FileInputStream.<init>(FileInputStream.java:101) [rt.jar:1.7.0_45]
at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90) [rt.jar:1.7.0_45]
at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188) [rt.jar:1.7.0_45]
at java.net.URL.openStream(URL.java:1037) [rt.jar:1.7.0_45]
at com.impetus.kundera.classreading.Reader.getResourceIterator(Reader.java:154) [kundera-core.jar:]
... 16 more
15:21:06,705 ERROR [org.jboss.as.controller.management-operation] (XNIO-1 task-7) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "wildfly-ejb-in-ear-ear.ear")]) - failure description: {
"JBAS014671: Failed services" => {"jboss.persistenceunit.\"wildfly-ejb-in-ear-ear.ear/wildfly-ejb-in-ear-ejb.jar#cassandra_pu_cas_test\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"wildfly-ejb-in-ear-ear.ear/wildfly-ejb-in-ear-ejb.jar#cassandra_pu_cas_test\": com.impetus.kundera.classreading.ResourceReadingException: java.io.FileNotFoundException: /content/wildfly-ejb-in-ear-ear.ear/wildfly-ejb-in-ear-ejb.jar (No such file or directory)
Caused by: com.impetus.kundera.classreading.ResourceReadingException: java.io.FileNotFoundException: /content/wildfly-ejb-in-ear-ear.ear/wildfly-ejb-in-ear-ejb.jar (No such file or directory)
Caused by: java.io.FileNotFoundException: /content/wildfly-ejb-in-ear-ear.ear/wildfly-ejb-in-ear-ejb.jar (No such file or directory)"},
"JBAS014771: Services with missing/unavailable dependencies" => [
"jboss.deployment.subunit.\"wildfly-ejb-in-ear-ear.ear\".\"wildfly-ejb-in-ear-web.war\".weld.weldClassIntrospector is missing [jboss.deployment.subunit.\"wildfly-ejb-in-ear-ear.ear\".\"wildfly-ejb-in-ear-web.war\".beanmanager]",
"jboss.deployment.unit.\"wildfly-ejb-in-ear-ear.ear\".weld.weldClassIntrospector is missing [jboss.deployment.unit.\"wildfly-ejb-in-ear-ear.ear\".beanmanager]"
],
"JBAS014879: One or more services were unable to start due to one or more indirect dependencies not being available." => {
"Services that were unable to start:" => [
"jboss.deployment.subunit.\"wildfly-ejb-in-ear-ear.ear\".\"wildfly-ejb-in-ear-ejb.jar\".POST_MODULE",
"jboss.deployment.subunit.\"wildfly-ejb-in-ear-ear.ear\".\"wildfly-ejb-in-ear-web.war\".INSTALL",
"jboss.deployment.unit.\"wildfly-ejb-in-ear-ear.ear\".INSTALL"
],
"Services that may be the cause:" => [
"jboss.deployment.subunit.\"wildfly-ejb-in-ear-ear.ear\".\"wildfly-ejb-in-ear-web.war\".beanmanager",
"jboss.deployment.unit.\"wildfly-ejb-in-ear-ear.ear\".beanmanager",
"jboss.http-upgrade-registry.default",
"jboss.remoting.remotingConnectorInfoService.http-remoting-connector"
]
}
}
15:21:06,707 ERROR [org.jboss.as.server] (XNIO-1 task-7) JBAS015870: Deploy of deployment "wildfly-ejb-in-ear-ear.ear" was rolled back with the following failure message:
{
"JBAS014671: Failed services" => {"jboss.persistenceunit.\"wildfly-ejb-in-ear-ear.ear/wildfly-ejb-in-ear-ejb.jar#cassandra_pu_cas_test\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"wildfly-ejb-in-ear-ear.ear/wildfly-ejb-in-ear-ejb.jar#cassandra_pu_cas_test\": com.impetus.kundera.classreading.ResourceReadingException: java.io.FileNotFoundException: /content/wildfly-ejb-in-ear-ear.ear/wildfly-ejb-in-ear-ejb.jar (No such file or directory)
Caused by: com.impetus.kundera.classreading.ResourceReadingException: java.io.FileNotFoundException: /content/wildfly-ejb-in-ear-ear.ear/wildfly-ejb-in-ear-ejb.jar (No such file or directory)
Caused by: java.io.FileNotFoundException: /content/wildfly-ejb-in-ear-ear.ear/wildfly-ejb-in-ear-ejb.jar (No such file or directory)"},
"JBAS014771: Services with missing/unavailable dependencies" => [
"jboss.deployment.subunit.\"wildfly-ejb-in-ear-ear.ear\".\"wildfly-ejb-in-ear-web.war\".weld.weldClassIntrospector is missing [jboss.deployment.subunit.\"wildfly-ejb-in-ear-ear.ear\".\"wildfly-ejb-in-ear-web.war\".beanmanager]",
"jboss.deployment.unit.\"wildfly-ejb-in-ear-ear.ear\".weld.weldClassIntrospector is missing [jboss.deployment.unit.\"wildfly-ejb-in-ear-ear.ear\".beanmanager]"
],
"JBAS014879: One or more services were unable to start due to one or more indirect dependencies not being available." => {
"Services that were unable to start:" => [
"jboss.deployment.subunit.\"wildfly-ejb-in-ear-ear.ear\".\"wildfly-ejb-in-ear-ejb.jar\".POST_MODULE",
"jboss.deployment.subunit.\"wildfly-ejb-in-ear-ear.ear\".\"wildfly-ejb-in-ear-web.war\".INSTALL",
"jboss.deployment.unit.\"wildfly-ejb-in-ear-ear.ear\".INSTALL"
],
"Services that may be the cause:" => [
"jboss.deployment.subunit.\"wildfly-ejb-in-ear-ear.ear\".\"wildfly-ejb-in-ear-web.war\".beanmanager",
"jboss.deployment.unit.\"wildfly-ejb-in-ear-ear.ear\".beanmanager",
"jboss.http-upgrade-registry.default",
"jboss.remoting.remotingConnectorInfoService.http-remoting-connector"
]
}
}
Caused by: java.lang.IllegalArgumentException: kundera.client property is missing for persistence unit:cassandra_pu_cas_test
at com.impetus.kundera.configure.PersistenceUnitConfiguration.configure(PersistenceUnitConfiguration.java:136) [kundera-core.jar:]
at com.impetus.kundera.persistence.EntityManagerFactoryImpl.configurePersistenceUnit(EntityManagerFactoryImpl.java:656) [kundera-core.jar:]
at com.impetus.kundera.persistence.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:111) [kundera-core.jar:]
at com.impetus.kundera.KunderaPersistence.createContainerEntityManagerFactory(KunderaPersistence.java:63) [kundera-core.jar:]
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:318) [wildfly-jpa-8.0.0.Final.jar:8.0.0.Final]
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.access$1100(PersistenceUnitServiceImpl.java:67) [wildfly-jpa-8.0.0.Final.jar:8.0.0.Final]
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:167) [wildfly-jpa-8.0.0.Final.jar:8.0.0.Final]
... 8 more
Which is fixed on current trunk.
Recent error is bit different. Could you please try by adding
Activity
mevivs commentedon Mar 17, 2014
EJB.jar => Contains entity definitions or anything else?
webapp.WAR => structure and content?
Could you please share few more details around it?
-Vivek
petermetz commentedon Mar 17, 2014
EJB.jar depends on another jar file which contains the model entities.
webapp.WAR is a minimalistic JAX-RS endpoint. No static files (empty webapp directory), no web.xml, only a JAX-RS application subclass and a resource class for implementing the endpoint itself.
If the problem doesn't obvious from these, I'll quickly throw together a deployable example project to reproduce the problem, just let me know. (I cannot publish the actual project.)
mevivs commentedon Mar 17, 2014
please email sample project if possible. That would surely help to quickly resolve this. Also, What the error you getting?
petermetz commentedon Mar 19, 2014
Sample project sent.
The error I'm getting without the mentioned patch (Kundera 2.10 stable) is this:
mevivs commentedon Mar 19, 2014
Hi Peter,,
Looks like this issue has been reported earlier as well. A fix has been added for the same in current trunk. I will have a look on the project. Meantime you may refer https://github.com/impetus-opensource/Kundera/issues/526 and https://github.com/impetus-opensource/Kundera/issues/536 for reference
-Vivek
petermetz commentedon Mar 20, 2014
Ah okay. I'll just wait for 2.11 then. Thanks for the help!
mevivs commentedon Mar 20, 2014
@petermetz
Using Kundera for? It would be great help if you could spare few minutes to fill in for survey:
http://www.surveymonkey.com/s/BMB9PWG
petermetz commentedon Mar 20, 2014
I just did, hope it helps.
petermetz commentedon Apr 1, 2014
Hi Vivek,
I retested it with 2.11 and it still produces issues. (I used the very same test project I emailed you before, just changed the dependency version to 2.11)
The stack trace I get is pasted below. I'm not sure if it's just me not configuring something properly or some other issue with the same thing. Please let me know if I should reopen this or not.
mevivs commentedon Apr 1, 2014
Hi Peter,
Earlier error was
Which is fixed on current trunk.
Recent error is bit different. Could you please try by adding
in persistence.xml and see if it works.
Work to OSGify Kundera and deploy with jboss/CDI EJB container is under progress.
https://github.com/impetus-opensource/Kundera/issues/534
https://github.com/impetus-opensource/Kundera/pull/525
Thanks,
-Vivek
petermetz commentedon Apr 1, 2014
By adding the mentioned property the problem goes away indeed. Huge thanks for the help, very much appreciated!
Peter