0

Hi i got the same probelm as in here: Memory leak when redeploying application in Tomcat but with the difference that it is a mistake somehwere in my route, because when i got a simple from - to route, it works just fine. i use a camel war archetype tp create my route in a spring form like this:

<bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent"
    p:brokerURL="vm://localhost?create=false&amp;waitForStart=10000" />
    <bean id="OutputProcessor" class="camelpak2.OutputProcessor"/>
<bean id="OutputProcessor2" class="camelpak2.OutputProcessor2"/>

  <bean id="csvbindyDataformat"  class="org.apache.camel.dataformat.bindy.csv.BindyCsvDataFormat">
    <constructor-arg value="camelpak2.Poste.class.getPackage().getName()"/></bean>
        <bean id="Transform" class="camelpak2.Transform"/>

<bean id="jaxb2Marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
    <property name="classesToBeBound">
        <list>
            <value>camelpak2.Orders.class.getPackage().getName()</value>
        </list>
    </property>
    <property name="schema" value="/testing123/src/main/resources/camelpak2/Orders.java"/>
</bean>

<camel:camelContext>
    <camel:package>camelpack3.nothing</camel:package>
     <camel:route>
        <camel:from uri="file://mnt/orders?noop=true" />
        <camel:process ref="OutputProcessor2" />
        <camel:unmarshal ref="bindyDataformat"/>
        <camel:bean ref="Transform"/>
        <camel:marshal ref="jaxb2Marshaller"/>
        <camel:process ref="OutputProcessor" />
        <camel:to uri="file://mnt/test?noop=true" />
    </camel:route>
</camel:camelContext>

It's my first time with Spring and i tried to work with the apache site e.g.:http://camel.apache.org/bindy.html but this is clearly outdated since eclipse shows an error for dataformats... so i dont know if i did everything right. all the used classes are in the ressourcefolderand work in a java-camelroute...trying whats in the post (Memory leak when redeploying application in Tomcat) didnt work.. any ideas?

Community
  • 1
  • 1
KleineKiwi
  • 37
  • 10
  • I wonder if its JAXB, that causes Tomcat to report a leak. It has some static class cache. I think there was some static method you can call to clear that cache. – Claus Ibsen Sep 23 '15 at 13:20
  • What do you exactly mean with "when i got a simple from - to route, it works just fine"? If your simple route is like from(file://..).to(file://...) then I think the camel file component works with references on the file and it's simply not loaded into memory. The route you have posted needs the file in memory, so maybe you just have configured not enough heap on your tomcat server. – soilworker Sep 24 '15 at 07:21
  • camelpack3.nothing thats what i meant with a simple(easy) route – KleineKiwi Sep 25 '15 at 10:54

0 Answers0