Unable to deploy lightblue on wildfly

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Unable to deploy lightblue on wildfly

jewzaam
Administrator
Originally in https://github.com/lightblue-platform/lightblue/issues/51 which I will close after posting it here..

Naveen:
Was writing up docs on how to deploy to wildfly and hit a few issues that I was able to solve easily. But now I'm getting this error:

Caused by: java.lang.ClassNotFoundException: javax.json.JsonArray from [Module "org.jboss.resteasy.resteasy-json-p-provider:main" from local module loader @38beb94 (finder: local module finder @7175bfc (roots: /usr/share/wildfly/modules,/usr/share/wildfly/modules/system/layers/base))]

Kinda giving up for now. If anybody has any ideas please let me know what I can try. Didn't want to spend much time on it right now. Suspect something isn't setup in the modules, EAP6 provides this in a different way I guess.

Luan:
The JAX-RS should be loaded implicitly, but try to make it explicitly declaring the Resteasy module as dependency on the jboss-deployment-structure.xml . Another problem that might occur is the real root cause is not logged, so you could try to stat wildfly using "-Dorg.jboss.as.logging.per-deployment=false"

Naveen:
In wildfly 8 there is a module javax.json.api that is a dependency for resteasy-json-p-provider but nothing like that in eap6. I see this as first stack trace:

13:37:21,877 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.module.service."deployment.rest-metadata-0.1-SNAPSHOT.war".main: org.jboss.msc.service.StartException in service jboss.module.service."deployment.rest-metadata-0.1-SNAPSHOT.war".main: JBAS018759: Failed to load module: deployment.rest-metadata-0.1-SNAPSHOT.war:main
        at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:91) [wildfly-server-8.1.0.Final.jar:8.1.0.Final]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc.jar:1.2.2.Final]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc.jar:1.2.2.Final]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_60]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_60]
        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_60]
Caused by: org.jboss.modules.ModuleLoadException: Error loading module from /usr/share/wildfly/modules/system/layers/base/org/jboss/resteasy/resteasy-json-p-provider/main/module.xml
        at org.jboss.modules.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:155) [jboss-modules.jar:1.3.3.Final]
        at org.jboss.modules.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:132) [jboss-modules.jar:1.3.3.Final]
        at org.jboss.modules.LocalModuleFinder$1.run(LocalModuleFinder.java:154) [jboss-modules.jar:1.3.3.Final]
        at org.jboss.modules.LocalModuleFinder$1.run(LocalModuleFinder.java:148) [jboss-modules.jar:1.3.3.Final]
        at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_60]
        at org.jboss.modules.LocalModuleFinder.findModule(LocalModuleFinder.java:148) [jboss-modules.jar:1.3.3.Final]
        at org.jboss.modules.ModuleLoader.findModule(ModuleLoader.java:455) [jboss-modules.jar:1.3.3.Final]
        at org.jboss.modules.ModuleLoader.loadModuleLocal(ModuleLoader.java:358) [jboss-modules.jar:1.3.3.Final]
        at org.jboss.modules.ModuleLoader.preloadModule(ModuleLoader.java:305) [jboss-modules.jar:1.3.3.Final]
        at org.jboss.modules.ModuleLoader.preloadExportedModule(ModuleLoader.java:316) [jboss-modules.jar:1.3.3.Final]
        at org.jboss.modules.ModuleLoader.preloadModule(ModuleLoader.java:329) [jboss-modules.jar:1.3.3.Final]
        at org.jboss.as.server.moduleservice.ServiceModuleLoader.preloadModule(ServiceModuleLoader.java:150) [wildfly-server-8.1.0.Final.jar:8.1.0.Final]
        at org.jboss.modules.Module.addPaths(Module.java:1036) [jboss-modules.jar:1.3.3.Final]
        at org.jboss.modules.Module.link(Module.java:1406) [jboss-modules.jar:1.3.3.Final]
        at org.jboss.modules.Module.relinkIfNecessary(Module.java:1434) [jboss-modules.jar:1.3.3.Final]
        at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:242) [jboss-modules.jar:1.3.3.Final]
        at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:70) [wildfly-server-8.1.0.Final.jar:8.1.0.Final]
        ... 5 more
Caused by: org.jboss.modules.xml.XmlPullParserException: Invalid/mismatched module name (expected system.layers.base.org.jboss.resteasy.resteasy-json-p-provider:main) (position: START_TAG seen ...ss:module:1.3" name="org.jboss.resteasy.resteasy-json-p-provider">... @25:89) 
        at org.jboss.modules.ModuleXmlParser.invalidModuleName(ModuleXmlParser.java:192) [jboss-modules.jar:1.3.3.Final]
        at org.jboss.modules.ModuleXmlParser.parseModuleContents(ModuleXmlParser.java:370) [jboss-modules.jar:1.3.3.Final]
        at org.jboss.modules.ModuleXmlParser.parseDocument(ModuleXmlParser.java:219) [jboss-modules.jar:1.3.3.Final]
        at org.jboss.modules.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:153) [jboss-modules.jar:1.3.3.Final]
        ... 21 more

Naveen:
Caused by: org.jboss.modules.xml.XmlPullParserException: Invalid/mismatched module name (expected system.layers.base.org.jboss.resteasy.resteasy-json-p-provider:main) (position: START_TAG seen ...ss:module:1.3" name="org.jboss.resteasy.resteasy-json-p-provider">... @25:89)

That's the root cause but from what I can tell in the module it's configured correctly. I'm running the latest wildfly available in fedora 20 repos. From that exception (and looking at source) it looks like it doesn't like the name of the module. But as far as I can tell it's setup correctly.

With comments removed for space:

# cat /usr/share/wildfly/modules/system/layers/base/org/jboss/resteasy/resteasy-json-p-provider/main/module.xml
<?xml version="1.0" encoding="UTF-8"?>

<module xmlns="urn:jboss:module:1.3" name="org.jboss.resteasy.resteasy-json-p-provider">

    <resources>
        <resource-root path="resteasy-json-p-provider.jar"/>
        <resource-root path="resteasy-json-p-provider-jandex.jar"/>
    </resources>

    <dependencies>
        <module name="javax.api"/>
        <module name="javax.json.api"/>
        <module name="javax.enterprise.api"/>
        <module name="javax.ws.rs.api"/>
        <module name="org.jboss.resteasy.resteasy-jaxrs"/>
    </dependencies>
</module>

Naveen:
Note, had to add a symlink to resteasy-json-p-provider-jandex.jar to fix earlier startup issue. I'm documenting it in lightblue-docs.

Luan:
I think the namespace is wrong, try to change to urn:jboss:module:1.1

Naveen:
Tried updating to 1.1 and it still fails.

Steps to reproduce, from the root of lightblue code:

mvn clean install -P wildfly
sudo yum install -y wildfly mongodb mongodb-server
sudo rm -f /usr/share/wildfly/modules/system/layers/base/org/jboss/marshalling/river/main/jboss-marshalling-river.jar
sudo ln -s /usr/share/java/jboss-marshalling/jboss-marshalling-river.jar /usr/share/wildfly/modules/system/layers/base/org/jboss/marshalling/river/main/jboss-marshalling-river.jar
sudo ln -s /usr/share/java/resteasy/resteasy-json-p-provider-jandex.jar /usr/share/wildfly/modules/system/layers/base/org/jboss/resteasy/resteasy-json-p-provider/main/resteasy-json-p-provider-jandex.jar
sudo service wildfly start
sudo service mongod start
sudo mkdir -p /usr/share/wildfly/modules/com/redhat/lightblue/main
sudo cp lightblue-rest/etc/mongo/* /usr/share/wildfly/modules/com/redhat/lightblue/main
sudo yum install `find -name lightblue*.rpm`
Reply | Threaded
Open this post in threaded view
|

Re: Unable to deploy lightblue on wildfly

lcestari
Something that I was thinking to test this is using vagrant+virtualbox, so we could have a identical VM to take a look and solve this issue (I mean, due some people might install wildfly using a different approach or version)

Also, the vangrant could be helpful for windows users that want to collaborate (sorry if I'm not following the thread content but as I cited the above line could help in the wildfly case, I thought it worth to mention a more abstract case which is kind of related (someone using windows can collaborate)).

What do you think guys?
Reply | Threaded
Open this post in threaded view
|

Re: Unable to deploy lightblue on wildfly

jewzaam
Administrator
Making lightblue more accessible is the goal with trying wildfly, so if vagrant and/or virtualbox helps then I'm for it.  My thought with trying wildfly was that not everybody will have access to eap bits, which is what we're targeting and working with.


On Thu, Aug 14, 2014 at 10:21 AM, lcestari [via lightblue-users] <[hidden email]> wrote:
Something that I was thinking to test this is using vagrant+virtualbox, so we could have a identical VM to take a look and solve this issue (I mean, due some people might install wildfly using a different approach or version)

Also, the vangrant could be helpful for windows users that want to collaborate (sorry if I'm not following the thread content but as I cited the above line could help in the wildfly case, I thought it worth to mention a more abstract case which is kind of related (someone using windows can collaborate)).

What do you think guys?


If you reply to this email, your message will be added to the discussion below:
http://lightblue-users.1011140.n3.nabble.com/Unable-to-deploy-lightblue-on-wildfly-tp4p5.html
To start a new topic under lightblue-users, email [hidden email]
To unsubscribe from lightblue-users, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Unable to deploy lightblue on wildfly

lcestari
I totally agree and think it is a very nice approach. I would also say that making it work with wildfly might help us to use some new features (if we are looking forward for a specific wildfly feature not on EAP yet or a Java EE 7 feature) (it can also help to prepare for changes on the platform itself).

Kind Regards
Luan Cestari | Senior Software Applications Engineer
IT Shared Services
M: +55 11 99602-7887
<img src="http://images.engage.redhat.com/eloquaimages/clients/RedHat/{a8aabf3a-4467-4e37-9bc5-48b1d7b494a2}_LATAM_RedHat.jpg" alt="Red Hat" border="0" data-mce-src="http://images.engage.redhat.com/eloquaimages/clients/RedHat/{a8aabf3a-4467-4e37-9bc5-48b1d7b494a2}_LATAM_RedHat.jpg" data-mce-style="font-family: Arial; font-size: 13px;" style="font-family: Arial; font-size: 13px;">
Better technology. Faster innovation. Powered by community collaboration. 
See how it works at www.redhat.com
 




From: "jewzaam [via lightblue-users]" <[hidden email]>
To: "lcestari" <[hidden email]>
Sent: Friday, August 15, 2014 11:20:30 AM
Subject: Re: Unable to deploy lightblue on wildfly

Making lightblue more accessible is the goal with trying wildfly, so if vagrant and/or virtualbox helps then I'm for it.  My thought with trying wildfly was that not everybody will have access to eap bits, which is what we're targeting and working with.


On Thu, Aug 14, 2014 at 10:21 AM, lcestari [via lightblue-users] <[hidden email]> wrote:
Something that I was thinking to test this is using vagrant+virtualbox, so we could have a identical VM to take a look and solve this issue (I mean, due some people might install wildfly using a different approach or version)

Also, the vangrant could be helpful for windows users that want to collaborate (sorry if I'm not following the thread content but as I cited the above line could help in the wildfly case, I thought it worth to mention a more abstract case which is kind of related (someone using windows can collaborate)).

What do you think guys?


If you reply to this email, your message will be added to the discussion below:
http://lightblue-users.1011140.n3.nabble.com/Unable-to-deploy-lightblue-on-wildfly-tp4p5.html
To start a new topic under lightblue-users, email [hidden email]
To unsubscribe from lightblue-users, click here.
NAML




If you reply to this email, your message will be added to the discussion below:
http://lightblue-users.1011140.n3.nabble.com/Unable-to-deploy-lightblue-on-wildfly-tp4p6.html
To start a new topic under lightblue-users, email [hidden email]
To unsubscribe from lightblue-users, click here.
NAML