0

We use maven in house for building the Spring 3.0.X application, so, I've added all the Tibco related jars to the /server/<Profile>/lib folder, in the maven pom.xml file i've added the following change

<dependency>
    <groupId>com.tibco</groupId>
    <artifactId>tibjms</artifactId>
    <scope>provided</scope>
    <version>4.4.1v2</version>
</dependency>

Deployed the war file into jboss 5.1/server/<Profile>/deploy folder.

I get the following error in the deployments, I restarted the server several times, still the spring app is unable to load the classes from the /lib folder of the profile.

Spring jms config.xml

    <?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jms="http://www.springframework.org/schema/jms"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
    http://www.springframework.org/schema/jms http://www.springframework.org/schema/jms/spring-jms-3.0.xsd">

    <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
        <property name="environment">
            <props>
                <prop key="java.naming.factory.initial">
                    initialFactory
                </prop>
                <prop key="java.naming.provider.url">
                    url
                </prop>
            </props>
        </property>
    </bean>

    <bean id="queueConnectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean">
        <property name="jndiTemplate" ref="jndiTemplate" />
        <property name="jndiName"
            value="queueConn" />
    </bean>


    <bean id="listener"
        class="class">
    </bean>

    <jms:listener-container connection-factory="queueConnectionFactory"
        acknowledge="transacted" concurrency="5">
        <jms:listener destination="Outbound.Queue"
            ref="listener" />
    </jms:listener-container>

</beans>

Update: I enabled the jboss class loading, the tibjms classes are being loaded into the memory when I checked the boot.log file. Dont understand why the spring is unable to load the classes from the /lib.

Zeus
  • 6,386
  • 6
  • 54
  • 89
  • why is the `scope` `provided`? Is the jar already present in jboss lib? – sidgate Oct 17 '16 at 23:51
  • I'm confused as to why your fiddling with the jars the way you are. If you put provided as the scope, that tells maven when it builds your war to not bother getting them from the repo as the jboss/tomcat whatever already has them. So it seems to me that at the moment your issue is whatever is serving your application. Can you find those jars anywhere inside your app server? – nuzz Oct 18 '16 at 00:19
  • @nuzz Yes, I added the jars to the `/server//lib` folder. I'm doing that 'provided' scope because the jars are already available in the server lib folder. I'm expecting the jboss class loader to load the classes for me. – Zeus Oct 18 '16 at 15:17
  • @sidgate the jar is already provided in the lib folder of the jboss profile – Zeus Oct 18 '16 at 15:18
  • @nuzz I enabled the classloading logging using the setup http://stackoverflow.com/questions/6690000/enable-logging-for-jboss-class-loading the classloader seems to not load the jars on the server start up. Do you know if there is anything special I need to do in jboss to load the classes which are in the lib folder? – Zeus Oct 18 '16 at 15:25
  • Glad you got it working – nuzz Oct 19 '16 at 02:04

1 Answers1

0

The property file has "" around the class name. removed it, started working.

Zeus
  • 6,386
  • 6
  • 54
  • 89