Note that there are some explanatory texts on larger screens.

plurals
  1. POI can't get FTP to work using Spring Integration
    primarykey
    data
    text
    <p>I am trying to setup my application to receive files using Spring Integration (version 2.2.0.RELEASE). When I start Tomcat (where application is deployed), I get the following error message. Anyone has an idea why?</p> <pre><code>SEVERE: Error configuring application listener of class com.xxxx.aaa.web.mvc.context.CccccContextListener java.lang.NoClassDefFoundError: com/xxxx/bbb/application/core/exception/unchecked/InvalidFormatException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) at java.lang.Class.getConstructor0(Class.java:2699) at java.lang.Class.newInstance0(Class.java:326) at java.lang.Class.newInstance(Class.java:308) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4079) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:785) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445) at org.apache.catalina.core.StandardService.start(StandardService.java:519) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:581) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Caused by: java.lang.ClassNotFoundException: com.xxxx.bbb.application.core.exception.unchecked.InvalidFormatException at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1645) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491) ... 20 more </code></pre> <p>I believe the error message above is a red herring. Before adding the spring integration dependency to the pom file and having the ftp config file, Tomcat was starting successfully.</p> <p>I use Java6 and Tomcat6. My FTP config file is:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:int="http://www.springframework.org/schema/integration" xmlns:int-ftp="http://www.springframework.org/schema/integration/ftp" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration-2.2.xsd http://www.springframework.org/schema/integration/ftp http://www.springframework.org/schema/integration/ftp/spring-integration-ftp-2.2.xsd"&gt; &lt;int:channel id="ftpChannel"&gt; &lt;int:queue/&gt; &lt;/int:channel&gt; &lt;bean id="ftpClientFactory" class="org.springframework.integration.ftp.session.DefaultFtpSessionFactory"&gt; &lt;property name="host" value="localhost" /&gt; &lt;property name="port" value="21" /&gt; &lt;property name="username" value="user" /&gt; &lt;property name="password" value="password" /&gt; &lt;/bean&gt; &lt;int-ftp:inbound-channel-adapter id="ftpInbound" channel="ftpChannel" filename-pattern="*.csv" session-factory="ftpClientFactory" auto-create-local-directory="true" delete-remote-files="true" remote-directory="/" local-directory="C:/folder/IN"&gt; &lt;int:poller fixed-rate="1000" max-messages-per-poll="15"/&gt; &lt;/int-ftp:inbound-channel-adapter&gt; &lt;/beans&gt; </code></pre> <p>I added dependency in the pom file as follows :</p> <pre><code>&lt;dependency&gt; &lt;groupId&gt;org.springframework.integration&lt;/groupId&gt; &lt;artifactId&gt;spring-integration-ftp&lt;/artifactId&gt; &lt;version&gt;2.2.0.RELEASE&lt;/version&gt; &lt;/dependency&gt; </code></pre> <p></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload