Camel route on Wildfly Swarm trying to load h2 database when it shouldn't

141 Views Asked by At

I have a Camel route running on Wildfly Swarm (2017.8.1) that connects to a SQL Server database using JTDS driver. However when I try and run it, it tries to load the h2 database module. I'm not using h2.

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="
          http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
          http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">


    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="location">
            <value>app.properties</value>
        </property>
    </bean>

    <bean id="coreDS" class="org.apache.commons.dbcp.BasicDataSource">
        <property name="driverClassName" value="net.sourceforge.jtds.jdbc.Driver"/>
        <property name="url" value="${db.core.uri}"/>
        <property name="username" value="${db.core.user}"/>
        <property name="password" value="${db.core.password}"/>
    </bean>

    <bean id="sql" class="org.apache.camel.component.sql.SqlComponent">
        <property name="dataSource" ref="coreDS"/>
    </bean>

    <camelContext xmlns="http://camel.apache.org/schema/spring">
        <propertyPlaceholder id="placeholder" location="classpath:app.properties"/>
        <route id="retrieveZipFile">
            <from uri="{{ftp.silica.uri}}"/>
            <log message="checking for files"/>
            <to uri="file://Data/temp/zip"/>
            <to uri="sql:insert into dbo.Source_In(date, sourceInSystemId, filename) values (getdate(), 1, 'test');dataSource=coreDS"/>
        </route>


    </camelContext>

</beans>

Error:

Caused by: org.jboss.modules.ModuleLoadError: com.h2database.h2:main
        at org.jboss.modules.ModuleLoadException.toError(ModuleLoadException.java:74)
        at org.jboss.modules.Module.getPathsUnchecked(Module.java:1435)
        at org.jboss.modules.Module.loadModuleClass(Module.java:601)
        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

Why is the h2 module required? I've tried adding it to my POM bt it still fails.

0

There are 0 best solutions below