Help on Getting Started Guide #3: FTP, SOAP

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

Help on Getting Started Guide #3: FTP, SOAP

Mathieu Le Breton
Administrator
This post was updated on .
Any question about the day-3 tutorial?
Post it here!

This thread might be empty for some time. But if you are here, it's because we can help.
Please start writing now. We will be happy to help.

I want to receive the Petals Starting Guide (for free)
Petals Link
Reply | Threaded
Open this post in threaded view
|

Re: Petals Starting Guide - day 3 (FTP, SOAP)

ngounou
Hi,
I have a memory error in the day 3 tutorial.
I use tomcat 7.
In the web console, i get the following error after submit:

java.lang.OutOfMemoryError: PermGen space
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
java.lang.ClassLoader.defineClass(ClassLoader.java:616)
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2818)
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1148)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1643)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
org.ow2.easywsdl.wsdl.api.abstractElmt.AbstractBindingParamImpl.extractBindingProtocol(AbstractBindingParamImpl.java:177)
org.ow2.easywsdl.wsdl.impl.wsdl11.BindingInputImpl.<init>(BindingInputImpl.java:67)
org.ow2.easywsdl.wsdl.impl.wsdl11.BindingOperationImpl.<init>(BindingOperationImpl.java:80)
org.ow2.easywsdl.wsdl.impl.wsdl11.BindingImpl.<init>(BindingImpl.java:74)
org.ow2.easywsdl.wsdl.impl.wsdl11.DescriptionImpl.<init>(DescriptionImpl.java:206)
org.ow2.easywsdl.wsdl.impl.wsdl11.WSDLReaderImpl.read(WSDLReaderImpl.java:180)
org.ow2.easywsdl.wsdl.impl.generic.WSDLReaderImpl.read(WSDLReaderImpl.java:161)
org.ow2.easywsdl.wsdl.impl.generic.WSDLReaderImpl.read(WSDLReaderImpl.java:137)
org.ow2.easywsdl.wsdl.impl.generic.WSDLReaderImpl.read(WSDLReaderImpl.java:103)
org.ow2.easywsdl.extensions.wsdl4complexwsdl.impl.inout.WSDL4ComplexWsdlReaderImpl.read(WSDL4ComplexWsdlReaderImpl.java:151)
org.ow2.easywsdl.extensions.wsdl4complexwsdl.impl.inout.WSDL4ComplexWsdlReaderImpl.read(WSDL4ComplexWsdlReaderImpl.java:222)
org.ow2.petals.tools.webconsole.util.GeneralHelper.readWSDL(GeneralHelper.java:247)
org.ow2.petals.tools.webconsole.uibeans.RMIInjectorUIBean.loadOperations(RMIInjectorUIBean.java:366)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.ow2.opensuit.cel.impl.tree.impl.ast.AstInvocation.invoke(AstInvocation.java:146)
org.ow2.opensuit.cel.impl.tree.impl.ast.AstMethod.invoke(AstMethod.java:136)
org.ow2.opensuit.cel.impl.tree.impl.ast.AstEval.invoke(AstEval.java:59)
org.ow2.opensuit.core.expression.ExpressionUtils.invokeExpression(ExpressionUtils.java:119)
org.ow2.opensuit.xml.base.binding.Expression.invoke(Expression.java:147)
org.ow2.opensuit.xml.base.html.form.field.SingleChoiceField.preRender(SingleChoiceField.java:135)
org.ow2.opensuit.xml.base.html.form.BaseForm.preRender(BaseForm.java:123)

Can you tell me how to solve this matter?

kam.ngounou@gmail.com
Reply | Threaded
Open this post in threaded view
|

Re: Petals Starting Guide - day 3 (FTP, SOAP)

Vincent Zurczak
Hi,

You run out of memory. Did the problem occur again after a new restart?
Apart increasing the memory settings for Tomcat, I don't see any other solution.
« Petals M.D. »
Reply | Threaded
Open this post in threaded view
|

Re: Petals Starting Guide - day 3 (FTP, SOAP)

ngounou
It seem to be a compatibility matter between petals and tomcat 7.
I have changed tomcat 7 with tomcat 6.0.32 and the same code works well!
Reply | Threaded
Open this post in threaded view
|

Re: Help on Getting Started Guide #3: FTP, SOAP

theirman
In reply to this post by Mathieu Le Breton
Hello,

  I tried yesterday and this morning the third step. No problem to put a file on my FTP server, but an error occured each time i tried to put a file on my SFTP server.

  My request :
<tns:put xmlns:tns="http://petals.ow2.org/components/sftp/version-1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="tns:putRequestFormat"> 
  <tns:body xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string">/home/theirman/public-files/readme.txt</tns:body> 
  <tns:filename xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string">readme.txt</tns:filename> 
</tns:put>
  The response :
Configuration error : Missing configuration element : server
javax.jbi.messaging.MessagingException: Configuration error : Missing configuration element : server    at org.ow2.petals.bc.sftp.listeners.JBIListener.onJBIMessage(JBIListener.java:98)    at org.ow2.petals.component.framework.process.MessageExchangeProcessor.processInOptionalOutAsProvider(MessageExchangeProcessor.java:519)    at org.ow2.petals.component.framework.process.MessageExchangeProcessor.processAsProvider(MessageExchangeProcessor.java:374)    at org.ow2.petals.component.framework.process.MessageExchangeProcessor.process(MessageExchangeProcessor.java:234)    at org.ow2.petals.component.framework.process.MessageExchangeProcessor.run(MessageExchangeProcessor.java:177)    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:619)
I don't understand why the server is missing. I give it in the configuration file. (see below the jbi.xml of the BC-SFTP)
<?xml version="1.0" encoding="UTF-8"?>

<jbi:jbi version="1.0"
        xmlns:generatedNs="http://petals.ow2.org/components/sftp/version-1"
        xmlns:jbi="http://java.sun.com/xml/ns/jbi"
        xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-5"
        xmlns:sftp="http://petals.ow2.org/components/sftp/version-1"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       
       
        <jbi:services binding-component="true">
       
               
                <jbi:provides
                        interface-name="generatedNs:SftpInterface"
                        service-name="generatedNs:GinFizSFTP"
                        endpoint-name="GinFizSFTPEndpoint">
       
                       
                        <petalsCDK:timeout>30000</petalsCDK:timeout>
                        <petalsCDK:validate-wsdl>true</petalsCDK:validate-wsdl>
                        <petalsCDK:forward-security-subject>false</petalsCDK:forward-security-subject>
                        <petalsCDK:forward-message-properties>false</petalsCDK:forward-message-properties>
                        <petalsCDK:forward-attachments>false</petalsCDK:forward-attachments>
                        <petalsCDK:wsdl>SftpService.wsdl</petalsCDK:wsdl>
               
                               
                        <sftp:host>192.168.1.100</sftp:host>
                        <sftp:port>22</sftp:port>
                        <sftp:user>theirman</sftp:user>
                        <sftp:password>mypasswd</sftp:password>
                        <sftp:folder>/home/theirman/</sftp:folder>
                        <sftp:overwrite>false</sftp:overwrite>                       
                </jbi:provides>
        </jbi:services>
</jbi:jbi>

Cordialement,
TH
Reply | Threaded
Open this post in threaded view
|

Re: Help on Getting Started Guide #3: FTP, SOAP

Vincent Zurczak
Hi,

I guess you are using the version 1.2 of the studio.
There is a little bug with the SFTP component. The "host" parameter should be in fact "server". This is the cause of your error.
« Petals M.D. »
Reply | Threaded
Open this post in threaded view
|

Re: Help on Getting Started Guide #3: FTP, SOAP

theirman
Thanks for the answer Vincent.

Concretely, in the jbi.xml, i must replace :
<sftp:host>192.168.1.100</sftp:host>
par :
<sftp:server>192.168.1.100</sftp:server>
That's it ?
Reply | Threaded
Open this post in threaded view
|

Re: Help on Getting Started Guide #3: FTP, SOAP

Vincent Zurczak
Yes, that's it. :)
« Petals M.D. »
Reply | Threaded
Open this post in threaded view
|

Re: Help on Getting Started Guide #3: FTP, SOAP

theirman
theirman@shunsui:~$ ll public-files/
total 12
drwxrwxrwx  2 theirman groupn 4096 2012-01-26 15:44 .
drwxr-xr-x 10 theirman groupn 4096 2012-01-26 15:45 ..
-rw-r--r--  1 theirman groupn   76 2012-01-26 15:44 readme.txt
It works !!!
Thanks a lot Vincent :)
Have a good day !!
Reply | Threaded
Open this post in threaded view
|

Getting Started Guide #3: FTP-> testing is not working with the ESB 1.3.1

petaleRose
In reply to this post by Mathieu Le Breton
Good morning Mr. Breton,

i'm trying to set the server on the webconsole for a ftp test with a paket "sa-FTP-FtpTutorial-provide.zip" generated and deployed succesfully with petals ESB 1.3.1.

The end point is : edpt-FC2B7D8D995
Interface :{http://petals.ow2.org/components/ftp/version-3}FtpInterface
service : {http://petals.ow2.org/components/ftp/version-3}FtpTutorial
operation: {http://petals.ow2.org/components/ftp/version-3}dir
Content: <tns:dir xmlns:tns="http://petals.ow2.org/components/ftp/version-3" />
MEP: InOut
SUBMIT.

I get this error:  
An internal error occured. Your request didn't complete.
java.lang.IllegalStateException: zip file closed

    java.util.zip.ZipFile.ensureOpen(ZipFile.java:415)
    java.util.zip.ZipFile.getEntry(ZipFile.java:160)
    java.util.jar.JarFile.getEntry(JarFile.java:208)
    java.util.jar.JarFile.getJarEntry(JarFile.java:191)
    sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:757)
    sun.misc.URLClassPath.getResource(URLClassPath.java:169)
    java.net.URLClassLoader$1.run(URLClassLoader.java:194)
    java.security.AccessController.doPrivileged(Native Method)
    java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    org.ow2.petals.system.classloader.ComponentClassLoader.loadClass(ComponentClassLoader.java:129)
    java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    org.objectweb.petals.tools.rmi.server.remote.implementations.RemoteDeliveryChannelImpl.createExchangeFactory(RemoteDeliveryChannelImpl.java:223)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:597)
    sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:303)
    sun.rmi.transport.Transport$1.run(Transport.java:159)
    java.security.AccessController.doPrivileged(Native Method)
    sun.rmi.transport.Transport.serviceCall(Transport.java:155)
    sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
    sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
    sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
    java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    java.lang.Thread.run(Thread.java:662)
    sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
    sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
    sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
    org.objectweb.petals.tools.rmi.server.remote.implementations.RemoteDeliveryChannelImpl_Stub.createExchangeFactory(Unknown Source)
    org.ow2.petals.tools.webconsole.services.rmiinjector.RmiInjectorServiceImpl.createMessageExchange(RmiInjectorServiceImpl.java:397)
    org.ow2.petals.tools.webconsole.services.rmiinjector.RmiInjectorServiceImpl.sendSynch(RmiInjectorServiceImpl.java:179)
    org.ow2.petals.tools.webconsole.services.rmiinjector.RmiInjectorServiceImpl.injectMessage(RmiInjectorServiceImpl.java:156)
    org.ow2.petals.tools.webconsole.business.RMIInjectorBBean.send(RMIInjectorBBean.java:110)
    org.ow2.petals.tools.webconsole.uibeans.RMIInjectorUIBean.send(RMIInjectorUIBean.java:482)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:597)
    org.ow2.opensuit.cel.impl.tree.impl.ast.AstInvocation.invoke(AstInvocation.java:146)
    org.ow2.opensuit.cel.impl.tree.impl.ast.AstMethod.invoke(AstMethod.java:136)
    org.ow2.opensuit.cel.impl.tree.impl.ast.AstEval.invoke(AstEval.java:59)
    org.ow2.opensuit.core.expression.ExpressionUtils.invokeExpression(ExpressionUtils.java:119)
    org.ow2.opensuit.xml.base.binding.Expression.invoke(Expression.java:147)
    org.ow2.opensuit.xml.base.action.DoAndForward.invoke(DoAndForward.java:141)
    org.ow2.opensuit.xml.base.html.form.EditForm.submit(EditForm.java:152)
    sun.reflect.GeneratedMethodAccessor105.invoke(Unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:597)
    org.ow2.opensuit.xml.base.Application.service(Application.java:514)
    org.ow2.opensuit.core.impl.j2ee.OpenSuitServlet.service(OpenSuitServlet.java:155)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
    org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
    org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1805)
    java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    java.lang.Thread.run(Thread.java:662)


Can you please tell me where i made mistake...?
Reply | Threaded
Open this post in threaded view
|

Re: Getting Started Guide #3: FTP-> testing is not working with the ESB 1.3.1

Vincent Zurczak
Hi,

Mathieu is on holidays.
Did you install the Petals RMI component? It is required so that the web console can interact with the ESB.
« Petals M.D. »
Reply | Threaded
Open this post in threaded view
|

Re: Getting Started Guide #3: FTP-> testing is not working with the ESB 1.3.1

marco123
This post has NOT been accepted by the mailing list yet.
Hello,

Got a problem with the RMI Component, too.
I'm using:
- Petals 4.1
- rmi component 1.1.2 snapshot (same error with the rmi component 1.1.1)
- webconsole 2.0.5
- Tomcat 7

When I try to Test the FTP Example from the Tutorial via the Webconsole (build in Petals Studio 1.3.3 ) I got the error:"RMI component unreachable, check if petals-se-rmi is installed and started on Server: localhost with JMXPort: 7700 associated. "

RMI is running and enabled in the manage connection form.

Done the same under Petals 3.1 with no problems... .

Thanks for your answers!
Reply | Threaded
Open this post in threaded view
|

Re: Getting Started Guide #3: FTP-> testing is not working with the ESB 1.3.1

Vincent Zurczak
This post has NOT been accepted by the mailing list yet.
Hi,

From memories, it is explicitely said in the tutorial which versions must be used. Petals 4.1 is not mentioned.

The tutorial does not completely work with Petals 4. And this is due to a partial incompatibility between the ESB and the previous web console. Some work is in progress about this. :)
« Petals M.D. »
Reply | Threaded
Open this post in threaded view
|

Re: Help on Getting Started Guide #3: FTP, SOAP

gdebarros
This post has NOT been accepted by the mailing list yet.
In reply to this post by Mathieu Le Breton
Hello,

I'm in the middle of the 5 day lessons (lesson #3 today) but today, I don't manage to download files (BC-FTP v3.3.1, but also all files) whereas last week till yesterday, I had no problems for downloads. Is there a problem on http://download.petalslink.com ?

Thanks a lot.

Guillaume
Reply | Threaded
Open this post in threaded view
|

Re: Help on Getting Started Guide #3: FTP, SOAP

Victor Noël
Administrator
Hi,

I think you are relying on a very old document refering to old pages :)

Components have been available from Maven central for some time now, for example for the FTP BC 3.3.1, you can find it there:
http://search.maven.org/#search|gav|1|g%3A%22org.ow2.petals%22%20AND%20a%3A%22petals-bc-ftp%22

Download the zip one, it is the JBI artefact.