We PUT file on some SFTP server and then run spring batch.when spring batch run below steps were executed.
pick file from FTP location
process the file.
delete file.
we are facing below exception while spring batch performing above steps.
ERROR org.springframework.integration.handler.LoggingHandler: 140 - org.springframework.integration.MessagingException: Problem occurred while synchronizing remote to local directory
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer.synchronizeToLocalDirectory(AbstractInboundFileSynchronizer.java:189)
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizingMessageSource.receive(AbstractInboundFileSynchronizingMessageSource.java:162)
at org.springframework.integration.endpoint.SourcePollingChannelAdapter.receiveMessage(SourcePollingChannelAdapter.java:111)
at org.springframework.integration.endpoint.AbstractPollingEndpoint.doPoll(AbstractPollingEndpoint.java:184)
at org.springframework.integration.endpoint.AbstractPollingEndpoint.access$000(AbstractPollingEndpoint.java:51)
at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:143)
at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:141)
at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller$1.run(AbstractPollingEndpoint.java:273)
at org.springframework.integration.util.ErrorHandlingTaskExecutor$1.run(ErrorHandlingTaskExecutor.java:52)
at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:48)
at org.springframework.integration.util.ErrorHandlingTaskExecutor.execute(ErrorHandlingTaskExecutor.java:49)
at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller.run(AbstractPollingEndpoint.java:268)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53)
at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.springframework.integration.MessagingException: Failed to execute on session
at org.springframework.integration.file.remote.RemoteFileTemplate.execute(RemoteFileTemplate.java:306)
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer.synchronizeToLocalDirectory(AbstractInboundFileSynchronizer.java:163)
... 21 more
Caused by: org.springframework.core.NestedIOException: Failed to remove file: 2: Specified file path is invalid.
at org.springframework.integration.sftp.session.SftpSession.remove(SftpSession.java:83)
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer.copyFileToLocalDirectory(AbstractInboundFileSynchronizer.java:230)
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer.access$100(AbstractInboundFileSynchronizer.java:59)
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer$1.doInSession(AbstractInboundFileSynchronizer.java:172)
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer$1.doInSession(AbstractInboundFileSynchronizer.java:163)
at org.springframework.integration.file.remote.RemoteFileTemplate.execute(RemoteFileTemplate.java:297)
... 22 more
Perhaps a security issue - maybe you don't have delete permissions.
The exact same path is used for the fetch and when deleting (if configured to delete the remote file after retrieval). Clearly the fetch worked ok because we're now in the delete phase.
You should consult the server logs.
Related
I have some troubles with deployment project configuration in PhpStorm7.0 (I have the same problem in IDE WebStrom)
When I trying to connect through ftp - everything fine.
But if choice sftp - I have this error:
Test SFTP Connection
Connection to 'echuvelev.ihc.ru'
Java.lang.ArrayIndexOutOfBoundsException
Logs:
2014-08-19 14:06:29,038 [ 73753] WARN - loyment.ui.WebServerConfigForm - Could not connect to SFTP server at "sftp://echuvelev.ihc.ru/".
org.apache.commons.vfs2.FileSystemException: Could not connect to SFTP server at "sftp://echuvelev.ihc.ru/".
at org.apache.commons.vfs2.provider.sftp.SftpFileProvider.doCreateFileSystem(SftpFileProvider.java:108)
at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.getFileSystem(AbstractOriginatingFileProvider.java:102)
at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:80)
at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:64)
at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:698)
at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:624)
at com.jetbrains.plugins.webDeployment.connections.RemoteConnectionPool.createConnection(RemoteConnectionPool.java:139)
at com.jetbrains.plugins.webDeployment.connections.RemoteConnectionManager.openConnection(RemoteConnectionManager.java:103)
at com.jetbrains.plugins.webDeployment.PublishUtils$1$1.run(PublishUtils.java:115)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:420)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:695)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:150)
Caused by: org.apache.commons.vfs2.FileSystemException: Error during processing known-hosts file "/Users/echuvelev/.ssh/known_hosts".
at org.apache.commons.vfs2.provider.sftp.SftpClientFactory.createConnection(SftpClientFactory.java:126)
at org.apache.commons.vfs2.provider.sftp.SftpFileProvider.doCreateFileSystem(SftpFileProvider.java:97)
... 16 more
Caused by: com.jcraft.jsch.JSchException: java.lang.ArrayIndexOutOfBoundsException: 403
at com.jcraft.jsch.KnownHosts.setKnownHosts(KnownHosts.java:235)
at com.jcraft.jsch.KnownHosts.setKnownHosts(KnownHosts.java:60)
at com.jcraft.jsch.JSch.setKnownHosts(JSch.java:299)
at org.apache.commons.vfs2.provider.sftp.SftpClientFactory.createConnection(SftpClientFactory.java:122)
... 17 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 403
at com.jcraft.jsch.Util.fromBase64(Util.java:53)
at com.jcraft.jsch.KnownHosts.setKnownHosts(KnownHosts.java:221)
... 20 more
I tried reinstall all IDE (with removing cache, setting in Library dir), but it doesn't help me.
Any ideas?
p.s ssh work fine with this server in console, i have this problem only in IDE, and only with sftp protocol.
I found solution in this ticket youtrack.jetbrains.com/issue/WI-12925#comment=27-580440
It's the same problem with known_hosts file.
Solution:
Try to backup and remove .ssh/known_hosts file, and recreate it adding hosts when needed.
I am trying to run a mapreduce program in eclipse using cloudera hadoop maven dependencies in the pom.xml in Windows 7. While using 2.0.0-cdh4.0.0 dependency version in pom.xml, program is working smoothly but when I change the version to 2.0.0-cdh4.6.0, it is throwing following warning message.
WARN fs.LocalDirAllocator$AllocatorPerContext: Failed to create
/tmp/hadoop-Abhijeet/mapred/local/file:/tmp/hadoop-Abhijeet/mapred/local/localRunner/Abhijeet/job_local83327001_0001/attempt_local83327001_0001_m_000001_0
(Please note that the pattern of file path is unusual(file:/ in between the path))
and eventually it is throwing an exception which is following,
java.lang.Exception: java.lang.IllegalArgumentException: n must be positive
at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:401)
Caused by: java.lang.IllegalArgumentException: n must be positive
at java.util.Random.nextInt(Random.java:250)
at org.apache.hadoop.fs.LocalDirAllocator$AllocatorPerContext.confChanged(LocalDirAllocator.java:305)
at org.apache.hadoop.fs.LocalDirAllocator$AllocatorPerContext.getLocalPathForWrite(LocalDirAllocator.java:344)
at org.apache.hadoop.fs.LocalDirAllocator.getLocalPathForWrite(LocalDirAllocator.java:150)
at org.apache.hadoop.fs.LocalDirAllocator.getLocalPathForWrite(LocalDirAllocator.java:131)
at org.apache.hadoop.mapred.MROutputFiles.getSpillFileForWrite(MROutputFiles.java:146)
at org.apache.hadoop.mapred.MapTask$MapOutputBuffer.sortAndSpill(MapTask.java:1558)
at org.apache.hadoop.mapred.MapTask$MapOutputBuffer.flush(MapTask.java:1452)
at org.apache.hadoop.mapred.MapTask$NewOutputCollector.close(MapTask.java:693)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:761)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:338)
at org.apache.hadoop.mapred.LocalJobRunner$Job$MapTaskRunnable.run(LocalJobRunner.java:233)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
The program also works for 2.2.0 version. I have to use the 2.0.0-cdh4.6.0 version. What can be the possible fix for my situation ?
When I attempt to connect to my web service, which is running on the local machine, I get the following exception:
java.lang.ExceptionInInitializerError
at com.sun.xml.internal.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:254)
at com.sun.xml.internal.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:82)
at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Fiber.java:587)
at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Fiber.java:546)
at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Fiber.java:531)
at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Fiber.java:428)
at com.sun.xml.internal.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:232)
at com.sun.xml.internal.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:460)
at com.sun.xml.internal.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:233)
at com.sun.xml.internal.ws.transport.http.server.WSHttpHandler.handleExchange(WSHttpHandler.java:95)
at com.sun.xml.internal.ws.transport.http.server.WSHttpHandler.handle(WSHttpHandler.java:80)
at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:65)
at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:65)
at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:68)
at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:557)
at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:65)
at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:529)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.ClassCastException: com.sun.xml.bind.v2.runtime.JAXBContextImpl cannot be cast to com.sun.xml.internal.bind.api.JAXBRIContext
at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.<clinit>(SOAPFaultBuilder.java:533)
... 20 more
All the information I've read suggests that this is caused by a conflict between different versions of JAXB. However, it doesn't seem that this is case for me. In the /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext folder I have jaxb-api.jar and jaxb-impl.jar. It doesn't seem that either of these appear more than once. Under "Referenced libraries" in the project, it doesn't seem like any other JAXB stuff is in there.
What am I missing?
EDIT: Here's a list of referenced libraries:
I'm trying configure docsplit on a debian machine. After installing all of the dependencies I tried running a simple conversion form the command line to make sure it was working. I keep getting the following error with jodconverter:
Exception in thread "main" org.artofsolving.jodconverter.office.OfficeException: failed to start and connect
at org.artofsolving.jodconverter.office.ManagedOfficeProcess.startAndWait(ManagedOfficeProcess.java:64)
at org.artofsolving.jodconverter.office.PooledOfficeManager.start(PooledOfficeManager.java:101)
at org.artofsolving.jodconverter.office.ProcessPoolOfficeManager.start(ProcessPoolOfficeManager.java:62)
at org.artofsolving.jodconverter.cli.Convert.main(Convert.java:112)
Caused by: java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError: method java.util.regex.Pattern.quote wit signature (Ljava.lang.String;)Ljava.lang.String; was not found.
at java.util.concurrent.FutureTask$Sync.innerGet(libgcj.so.90)
at java.util.concurrent.FutureTask.get(libgcj.so.90)
at org.artofsolving.jodconverter.office.ManagedOfficeProcess.startAndWait(ManagedOfficeProcess.java:62)
...3 more
Caused by: java.lang.NoSuchMethodError: method java.util.regex.Pattern.quote with signature (Ljava.lang.String;)Ljava.lan.String; was not found.
at org.artofsolving.jodconverter.process.LinuxProcessManager.findPid(LinuxProcessManager.java:51)
at org.artofsolving.jodconverter.office.OfficeProcess.start(OfficeProcess.java:65)
at org.artofsolving.jodconverter.office.OfficeProcess.start(OfficeProcess.java:60)
at org.artofsolving.jodconverter.office.ManagedOfficeProcess.doStartProcessAndConnect(ManagedOfficeProcess.java:119)
at org.artofsolving.jodconverter.office.ManagedOfficeProcess.access$000(ManagedOfficeProcess.java:31)
at org.artofsolving.jodconverter.office.ManagedOfficeProcess$1.run(ManagedOfficeProcess.java:58)
at java.util.concurrent.Executors$RunnableAdapter.call(libgcj.so.90)
at java.util.concurrent.FutureTask$Sync.innerRun(libgcj.so.90)
at java.util.concurrent.FutureTask.run(libgcj.so.90)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(libgcj.so.90)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(libgcj.so.90)
at java.lang.Thread.run(libgcj.so.90)
I've tried starting openoffice in headless mode with hte following
/usr/bin/soffice -headless -accept="socket,host=127.0.0.1,port=2002;urp"
EDIT:
I solved the above issue by removing my current OpenOffice installation and grabbing the most up to date packages from download.openoffice.org
I was sucessful in converting nd odt file to a pdf using the jodconverter jar that came with the docsplit gem, as follows:
java -jar /usr/lib/ruby/gems/1.8/gems/docsplit-0.6.3/vendor/jodconverter/jodconverter-core-3.0-beta-4.jar test.odt test.pdf
Unfortunately I'm still having an issue with docsplit. If I try to extract images from the odt file using docsplit at the command line as so:
docsplit images test.odt --format jpg
I get the following error from jodconverter:
Exception in thread "main" org.artofsolving.jodconverter.office.OfficeException: could not load document: test.odt
at org.artofsolving.jodconverter.AbstractConversionTask.loadDocument(AbstractConversionTask.java:92)
at org.artofsolving.jodconverter.AbstractConversionTask.execute(AbstractConversionTask.java:59)
at org.artofsolving.jodconverter.office.PooledOfficeManager$2.run(PooledOfficeManager.java:80)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: com.sun.star.lang.IllegalArgumentException: URL seems to be an unsupported one.
at com.sun.star.lib.uno.environments.remote.Job.remoteUnoRequestRaisedException(Job.java:177)
at com.sun.star.lib.uno.environments.remote.Job.execute(Job.java:143)
at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:335)
at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:304)
at com.sun.star.lib.uno.environments.remote.JavaThreadPool.enter(JavaThreadPool.java:91)
at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:639)
at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.request(ProxyFactory.java:151)
at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.invoke(ProxyFactory.java:133)
at $Proxy4.loadComponentFromURL(Unknown Source)
at org.artofsolving.jodconverter.AbstractConversionTask.loadDocument(AbstractConversionTask.java:90)
... 8 more
Any input would be appreciated.
-Thanks
The entire issue has been solved. I had originally installed jsut the openoffice.org meta package and the openoffice.org-headless package. I later noticed that the openoffice.org meta package did not install the individual components such as writer, calc, etc. After installing each of these packages I was able to run conversions using the docsplit command.
I got this page:
HTTP Status 404 -
type Status report
message
description The requested resource () is not available.
Apache Tomcat/7.0.11
This is what appeared on console:
SEVERE: Exception starting filter StripesFilter
I followed this diligently, what could I have forgot? http://www.stripesframework.org/display/stripes/Quick+Start+Guide
I'm using Tomcat 7.0, Java 1.6.0_24, using Dynamic Web Project under Eclipse, this is my Eclipse version:
Eclipse Java EE IDE for Web Developers.
Version: Helios Service Release 1
Build id: 20100917-0705
If it has a bearing, I'm using Mac OS X
Detailed error message:
SEVERE: Exception starting filter StripesFilter
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at net.sourceforge.stripes.util.Log.getInstance(Log.java:43)
at net.sourceforge.stripes.controller.StripesFilter.<clinit>(StripesFilter.java:57)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:119)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:252)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:372)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:98)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4542)
at org.apache.catalina.core.StandardContext$2.call(StandardContext.java:5220)
at org.apache.catalina.core.StandardContext$2.call(StandardContext.java:5215)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Copy commons-logging.jar to your /WEB-INF/lib dir
Regarding to your link:
For deploying and running Stripes you
will also need to copy the following
library files supplied with Stripes
into your classpath:
* commons-logging.jar (1.1)
Usually issues like this are caused by either an incorrect web.xml file, or by a required JAR file not being on the classpath.
If you check Tomcat's log directory (should be under CATALINA_HOME/logs) you should find some log files named '<hostname>.<date>.log' (for instance, "localhost.2011-03-18.log"). In the current log file you will likely be able to find a stacktrace that will provide a lot more detail about the exact cause of the error.