3 Replies Latest reply: May 2, 2012 5:23 PM by Van Halbert RSS

Trying to use HotRod Client on AS5

Van Halbert Apprentice

Has anyone used the HotRod client in an AS 5 server, calling Infinispan deployed in AS7?

 

I've tried using the .ear deployment to isolate the jars, but still with no success with the following issue:

 

Caused by: java.lang.NoSuchMethodError: org.jboss.logging.Logger.getMessageLogger(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Object;

          at org.infinispan.client.hotrod.logging.LogFactory.getLog(LogFactory.java:37)

          at org.infinispan.client.hotrod.RemoteCacheManager.<clinit>(RemoteCacheManager.java:154)

 

 

I'm sure its probably something I'm not doing in configuring the .ear, but I'm not sure at the moment. 

 

The application.xml is:

 

<application>

          <display-name>Infinispan</display-name>

            <module>

            <connector>connector-infinispan-7-7-1.rar</connector>

            </module>

          <module>

                    <java>lib/connector-infinispan-7.7.1.jar</java>

          </module>      

          <module>

                    <java>lib/commons-pool-1.5.6.jar</java>

          </module>     

          <module>

                    <java>lib/infinispan-client-hotrod-5.1.2.FINAL.jar</java>

          </module> 

          <module>

                    <java>lib/infinispan-core-5.1.2.FINAL.jar</java>

          </module>     

          <module>

                    <java>lib/jboss-logging-3.1.0.CR2.jar</java>

          </module>     

          <module>

                    <java>lib/jboss-marshalling-1.3.6.GA.jar</java>

          </module> 

          <module>

                    <java>lib/jboss-marshalling-river-1.3.6.GA.jar</java>

          </module> 

          <module>

                    <java>lib/jgroups-3.0.6.Final.jar</java>

          </module>         

</application>

 

At this time, its not an option to use AS7 for this application.

 

Any suggestions or should I just give up on this one?    

  • 1. Re: Trying to use HotRod Client on AS5
    Galder Zamarreño Master

    Seems like classloading isolation in that EAR is not set correctly, otherwise it wouldn't find a different JBoss Logging jar. Check the AS5 docu further.

  • 2. Re: Trying to use HotRod Client on AS5
    James Perkins Master

    It's using the wrong version of JBoss Logging. I think you need at least JBoss Logging 3.x to get the Logger.getMessageLogger().

  • 3. Re: Trying to use HotRod Client on AS5
    Van Halbert Apprentice

    It was a combination of both.   To resolved the classloading by updating the jboss-app.xml and specifying the following:

     

    <jboss-app>

       <loader-repository>

            org.resource.adapter:archive=infinispan.ear

         <loader-repository-config>

         java2ParentDelegation=false

         </loader-repository-config>

      </loader-repository>

       <module>

            <service>infinispan-ds.xml</service>

        </module>

    </jboss-app>

     

     

    Also, I didn't have all the jboss logging related jar's (i.e., jboss-logging-3.1.0.CR2 AND jboss-logmanager-1.2.2.GA-redhat-1.jar).