1 Reply Latest reply on Jul 13, 2012 4:31 PM by Darrin Thompson

    Adding Existing JBoss Modules to My App

    Darrin Thompson Newbie

      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?