[jboss-user] [Beginner's Corner] - Adding Existing JBoss Modules to My App

Darrin Thompson do-not-reply at jboss.com
Sat Jul 7 12:01:08 EDT 2012


Darrin Thompson [https://community.jboss.org/people/darrint] created the discussion

"Adding Existing JBoss Modules to My App"

To view the discussion, visit: https://community.jboss.org/message/746776#746776

--------------------------------------------------------------
I'm trying to port some code I wrote. The purpose of this code is to call out to the rottentomatoes.com api and process the results.

What I have: Eclpise Indigo SP2 + JBoss Tools plugin.

I created a Java EE Web Project from the JBoss Central page. I added RestEASY and Guava to my pom under DependencyManagement. I made sure the versions I called for matched what was in my local JBoss AS7 install. I then added dependencies for both as provided. (Seems like there should be a complete bom for AS7.1.1 or whatever I'm running, but I couldn't find that. Am I doing even this right?)

Then I made a copy of the arquillian test that comes with the sample and I altered it to call my code. I removed the test datasource from the @Deployment method as my code does not require it.

I can run my new JUnit test and my code gets deployed and run. However, once I get to the meat of my code, one of the classes fails to load with:

Caused by: java.lang.ClassNotFoundException: com.google.common.base.Predicate from [Module "deployment.test.war:main" from Service Module Loader]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

So that seems reasonable. I haven't written any kind of deployment info telling JBoss to include it's guava module in my classpath. However, Google isn't helping.

1. What do I do to my app to indicate that I want more modules available on my classpath?
2. Is there something in JBoss Tools to expedite this?

Thanks.

--
Darrin
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/746776#746776]

Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120707/188026f0/attachment.html 


More information about the jboss-user mailing list