You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Roberto Belardo <ba...@yahoo.it> on 2006/07/17 12:07:53 UTC

Where to put Amazon Stub classes

Hi all,
i have big problem. I'm trying to develop a web service that will do simply
a search using amazon ws, and i want acces my service from a java client. So
i put my web service jar in AXIS-HOME/WEB-INF/lib directory. But here come
the problems:
Where i have to put Amazon stub classes obtained from the amazon wsdl file?
In order to compile my java files for my web service, i create a jar with
those stub files and putted it in the windows classpath. But it seems to me
that Axis cannot see them because every time i try to acces the web service
i got a java.lang.reflect.InvocationTargetException from Axis but i can use
ut if i simply remove the amazon code. If i put that jar with the amazon
stub in the AXIS-HOME/WEB-INF/lib directory Axis cannot start.I get an error
404.
Thanks in advance,
Roberto 
-- 
View this message in context: http://www.nabble.com/Where-to-put-Amazon-Stub-classes-tf1953881.html#a5358366
Sent from the Axis - User forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Where to put Amazon Stub classes

Posted by Roberto Belardo <ro...@email.it>.
Uhm... perhaps you find something.
Here is my first lines of the web service:

*<wsdl:definitions targetNamespace="urn:mywebservice">*
<wsdl:message name="myHelloResponse">
<wsdl:part name="myHelloReturn" type="soapenc:string"/>
</wsdl:message>
<wsdl:message name="mySearchRequest">
<wsdl:part name="in0" type="soapenc:string"/>
</wsdl:message>
<wsdl:message name="myHelloRequest">
</wsdl:message>
<wsdl:message name="mySearchResponse">
<wsdl:part name="mySearchReturn" type="soapenc:string"/>
</wsdl:message>
<wsdl:portType name="MywebserviceInterface">
<wsdl:operation name="myHello">
<wsdl:input name="myHelloRequest" message="impl:myHelloRequest"/>
<wsdl:output name="myHelloResponse" message="impl:myHelloResponse"/>
</wsdl:operation>
<wsdl:operation name="mySearch" parameterOrder="in0">
<wsdl:input name="mySearchRequest" message="impl:mySearchRequest"/>
<wsdl:output name="mySearchResponse" message="impl:mySearchResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="mywebserviceSoapBinding" 
type="impl:MywebserviceInterface">
<wsdlsoap:binding style="rpc" 
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="myHello">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="myHelloRequest">
<wsdlsoap:body use="encoded" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="urn:mywebservice"/>
</wsdl:input>
<wsdl:output name="myHelloResponse">
<wsdlsoap:body use="encoded" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="urn:mywebservice"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="mySearch">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="mySearchRequest">
<wsdlsoap:body use="encoded" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="urn:mywebservice"/>
</wsdl:input>
<wsdl:output name="mySearchResponse">
<wsdlsoap:body use="encoded" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="urn:mywebservice"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="MywebserviceInterfaceService">
<wsdl:port name="mywebservice" binding="impl:mywebserviceSoapBinding">
<wsdlsoap:address location="http://giove:8080/axis/services/mywebservice"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

Is it what you said? To package everything i followed a tutorial using 
this script:

java org.apache.axis.wsdl.Java2WSDL -o myws.wsdl 
-l"http://localhost:8080/axis/services/mywebservice" -n urn:mywebservice 
-p"mywebservice" urn:mywebservice mywebservice.MywebserviceInterface
java org.apache.axis.wsdl.WSDL2Java -o . -d Session -s -p 
mywebservice.ws myws.wsdl

Now, my problem is: where i have to put those stupid Amazon stub 
classes? In the windows classpath in order to compile the source code. 
That is sure. But where else?
Roberto



Martin Gainty ha scritto:
> *Sounds* as if there is a unresolved packaging AND /OR namespace problem
> Can you confirm any namespace assignment(s) to CompanyHolder in the service provided WSDL?
>
> For example you may have a construct such as this as this at the top of your WSDL  
> wsdl:definitions targetNamespace="http://webservices" 
> thus any attempt to resolve via wsdl:binding or defining soap:body for client Request and or Server response would need to be prefaced with 
> webservices AND
> package specification in java files would need to specify 'webservices' as in 
> package webservices;
>
> Does this make sense to you?
> Martin --
> *********************************************************************
> This email message and any files transmitted with it contain confidential
> information intended only for the person(s) to whom this email message is
> addressed.  If you have received this email message in error, please notify
> the sender immediately by telephone or email and destroy the original
> message without making a copy.  Thank you.
>
>
>
> ----- Original Message ----- 
> From: "Luis Rivera" <lu...@hotmail.com>
> To: <ax...@ws.apache.org>
> Sent: Tuesday, July 18, 2006 7:18 AM
> Subject: Re: Where to put Amazon Stub classes
>
>
>   
>>   Roberto,
>>
>> I have not solved the problem, but managed to understand that the problem 
>> does is not where I drop the classes that will make the JNi calls. Dropping 
>> them inthe share directory results in the 
>> java.lang.reflect.InvocationTargetException at the Client side.
>>
>> 1) To be clear, the call to th e JNi wrapper (dropped in the share/classes 
>> directoy) is something like this:
>>
>> public void getCompany(CompanyHolder company, StringHolder result) {...}
>>
>> Making this call from the Stub implementation (dropped in 
>> axis/WEB-INF/classes directory) result in the mentioned exception. The 
>> clases ComapnyHolder is visible to both classes, and tthey are in 
>> axis/WEB-INF/classes and axis/WEB-INF/classes.
>>
>> 2) For the sake of testing, I created a new method without parameters
>>
>> public Stirng getCompany();
>>
>> and made the call just like in 1, and IT WORKED ... not Exception at the 
>> client side.
>>
>> 3) So, the problem seems to me is not wher eI drop the implementation 
>> classes, but the classes with all the types and hodlers generated with 
>> wsdl2Java, and it doesn't seem to be the shared/classes directory, because 
>> that classloader finds it correctly.
>>
>> It seems that there is another classloader in the middle, between the one 
>> for shared and the one for my WebApp that needs to know where to get these 
>> classes from, but where? ... I tried common and server.... no luck !!!
>>
>>   HELP PLEASE !!!
>>   Thanks in advance,
>>   --Luis R.
>>
>>     
>>> From: Roberto Belardo <ro...@email.it>
>>> Reply-To: axis-user@ws.apache.org
>>> To: axis-user@ws.apache.org
>>> Subject: Re: Where to put Amazon Stub classes
>>> Date: Tue, 18 Jul 2006 10:36:40 +0200
>>>
>>> Those are all the experiments i did to solve this damned problem:
>>>
>>>    * Put the Amazon stub classes in a jar in the classpath of windows:
>>>      The source code of the web service will compile, and you will be
>>>      able to correctly deploy it. But when you will try to acces it
>>>      from a client, the first try to call AWSserviceLocator( ) will
>>>      cause the exception.
>>>    * Put the Amazon stub classes in a jar in the
>>>      TOMCAT/webapps/AXIS/WEB-INF/lib directory: Axis will not start.
>>>      You will get a 404 error, and i don't know why.
>>>    * Put the Amazon stub classes in the
>>>      TOMCAT/webapps/AXIS/WEB-INF/classes directory: Nothing change from
>>>      the first point.
>>>    * Put the Amazon stub classes in the TOMCAT/shared/lib directory: :
>>>      Nothing change from the first point.
>>>    * Put the Amazon stub classes in the same jar of the web service i
>>>      try to deploy and use: I put this jar containing Amazon stub
>>>      package, my ws sources, my ws stub classes in
>>>      TOMCAT/webapps/AXIS/WEB-INF/lib directory. I can deploy it but
>>>      nothing change from the first point.
>>>
>>> I really finish my ideas to solve this problem. Is it possible that no one 
>>> had never try to use Amazon in Axis? I wrote on Amazon forum, Nabble Axis 
>>> forum, Java forum but with no succes.
>>> I hope we find the solution :-(
>>> Roberto.
>>>
>>> Luis Rivera ha scritto:
>>>       
>>>> Roberto,
>>>>
>>>> I don't know the answer, but I am having the same problem. Same exception 
>>>> but with a slightly different setup. I have a class which will use a JNI 
>>>> library, which according to the documentation should be place in the 
>>>> shared/classes directory. So I did and I get the dreaded 
>>>> java.lang.reflect.InvocationTargetException, which I believe is a class 
>>>> loader problem. However, I have tried to solve this placing it in the 
>>>> common/classes, server/classes and I get the same result.
>>>>
>>>> I have searched the web for solutions, some people say that it is a 
>>>> classpath problem, but nobody seems to let you know where exactly you set 
>>>> this so that the correct class loader finds the class (assuming I am right 
>>>> and it is a classloader problem).
>>>>
>>>> Any of these AXIS gurus have had a similar setup/problem and have a 
>>>> solution at hand?
>>>>
>>>> Thanks in advance,
>>>> --Luis R.
>>>>
>>>>
>>>>         
>>>>> From: Roberto Belardo <ro...@email.it>
>>>>> Reply-To: axis-user@ws.apache.org
>>>>> To: axis-user@ws.apache.org
>>>>> Subject: Re: Where to put Amazon Stub classes
>>>>> Date: Mon, 17 Jul 2006 14:58:15 +0200
>>>>>
>>>>> But if i put those stub files in a jar under the WEB-INF/lib Axis cannot 
>>>>> start.
>>>>> My question begin: Can i invoke a web service on axis that will invoke 
>>>>> with some stubs the service of amazon? If yes, why i'm still getting this 
>>>>> exception?
>>>>>
>>>>> Martin Gainty ha scritto:
>>>>>           
>>>>>> Buon Giorno Roberto-
>>>>>>
>>>>>> place jars in %TOMCAT_HOME%/webapps/axis/WEB-INF/lib
>>>>>>
>>>>>> OR
>>>>>>
>>>>>> place class files in %TOMCAT_HOME%/webapps/axis/WEB-INF/classes
>>>>>>
>>>>>> Molte Grazie,
>>>>>> Martin --
>>>>>> *********************************************************************
>>>>>> This email message and any files transmitted with it contain 
>>>>>> confidential
>>>>>> information intended only for the person(s) to whom this email message 
>>>>>> is
>>>>>> addressed. If you have received this email message in error, please 
>>>>>> notify
>>>>>> the sender immediately by telephone or email and destroy the original
>>>>>> message without making a copy. Thank you.
>>>>>>
>>>>>>
>>>>>>
>>>>>> ----- Original Message ----- From: "Roberto Belardo" 
>>>>>> <ba...@yahoo.it>
>>>>>> To: <ax...@ws.apache.org>
>>>>>> Sent: Monday, July 17, 2006 6:07 AM
>>>>>> Subject: Where to put Amazon Stub classes
>>>>>>
>>>>>>
>>>>>>
>>>>>>             
>>>>>>> Hi all,
>>>>>>> i have big problem. I'm trying to develop a web service that will do 
>>>>>>> simply
>>>>>>> a search using amazon ws, and i want acces my service from a java 
>>>>>>> client. So
>>>>>>> i put my web service jar in AXIS-HOME/WEB-INF/lib directory. But here 
>>>>>>> come
>>>>>>> the problems:
>>>>>>> Where i have to put Amazon stub classes obtained from the amazon wsdl 
>>>>>>> file?
>>>>>>> In order to compile my java files for my web service, i create a jar 
>>>>>>> with
>>>>>>> those stub files and putted it in the windows classpath. But it seems 
>>>>>>> to me
>>>>>>> that Axis cannot see them because every time i try to acces the web 
>>>>>>> service
>>>>>>> i got a java.lang.reflect.InvocationTargetException from Axis but i can 
>>>>>>> use
>>>>>>> ut if i simply remove the amazon code. If i put that jar with the 
>>>>>>> amazon
>>>>>>> stub in the AXIS-HOME/WEB-INF/lib directory Axis cannot start.I get an 
>>>>>>> error
>>>>>>> 404.
>>>>>>> Thanks in advance,
>>>>>>> Roberto --
>>>>>>> View this message in context: 
>>>>>>> http://www.nabble.com/Where-to-put-Amazon-Stub-classes-tf1953881.html#a5358366
>>>>>>>
>>>>>>> Sent from the Axis - User forum at Nabble.com.
>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>>>>>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>>>>>>
>>>>>>> "wè®f³���z4� 
>>>>>>> ÷�>]xç�Ž�"­7�>T.z� >>>>>>÷�sm§ÿð�f èw}¢t===
>>>>>>>               
>>>>> --
>>>>> --- This is a digital signature and it is not a part of the message ---
>>>>> Per non lottare ci saranno sempre moltissimi pretesti in ogni epoca e in 
>>>>> ogni circostanza, ma mai, senza lotta, si potr�  avere la libert� .
>>>>> Fidel Castro (introduzione a "Che Guevara, Diario in Bolivia")
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Email.it, the professional e-mail, gratis per te: http://www.email.it/f
>>>>>
>>>>> Sponsor:
>>>>> Corso base ASP Gratis - Video con trucchi e segreti per imparare a creare 
>>>>> il tuo Sito Web Dinamico con la tecnologia ASP
>>>>> Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=5146&d=17-7
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>>>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>>>>
>>>>>           
>>>> _________________________________________________________________
>>>> Express yourself instantly with MSN Messenger! Download today - it's FREE! 
>>>> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>>>
>>>>
>>>> __________ Informazione NOD32 1.1454 (20060321) __________
>>>>
>>>> Questo messaggio è stato controllato dal Sistema Antivirus NOD32
>>>> http://www.nod32.it
>>>>
>>>>
>>>>
>>>>         
>>> --
>>> --- This is a digital signature and it is not a part of the message ---
>>> Per non lottare ci saranno sempre moltissimi pretesti in ogni epoca e in 
>>> ogni circostanza, ma mai, senza lotta, si potr�  avere la libert� .
>>> Fidel Castro (introduzione a "Che Guevara, Diario in Bolivia")
>>>
>>>
>>>
>>> --
>>> Email.it, the professional e-mail, gratis per te: http://www.email.it/f
>>>
>>> Sponsor:
>>> Refill srl dal 1993, il compatibile per stampante di qualit. 5000 prodotti 
>>> in pronta consegna, consegna in 24h, assistenza telefonica da tecnici 
>>> specializzati
>>> Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=5192&d=18-7
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>>
>>>       
>> _________________________________________________________________
>> FREE pop-up blocking with the new MSN Toolbar - get it now! 
>> http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>> "w�f����4���]x獴ӭ7�T.z�h��,j"��Z��(���V��֥J+-zf��د���4���m����	�w}�t===

-- 
--- This is a digital signature and it is not a part of the message ---
Per non lottare ci saranno sempre moltissimi pretesti in ogni epoca e in ogni circostanza, ma mai, senza lotta, si potr� avere la libert�.
Fidel Castro (introduzione a "Che Guevara, Diario in Bolivia")

 
 
 --
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 
 Sponsor:
 Crea il tuo sito web dinamico con PHP e MySQL - VideoCorso professionale direttamente nel tuo computer. Trucchi e segreti
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=5142&d=18-7

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Where to put Amazon Stub classes

Posted by Martin Gainty <mg...@hotmail.com>.
*Sounds* as if there is a unresolved packaging AND /OR namespace problem
Can you confirm any namespace assignment(s) to CompanyHolder in the service provided WSDL?

For example you may have a construct such as this as this at the top of your WSDL  
wsdl:definitions targetNamespace="http://webservices" 
thus any attempt to resolve via wsdl:binding or defining soap:body for client Request and or Server response would need to be prefaced with 
webservices AND
package specification in java files would need to specify 'webservices' as in 
package webservices;

Does this make sense to you?
Martin --
*********************************************************************
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



----- Original Message ----- 
From: "Luis Rivera" <lu...@hotmail.com>
To: <ax...@ws.apache.org>
Sent: Tuesday, July 18, 2006 7:18 AM
Subject: Re: Where to put Amazon Stub classes


> 
>   Roberto,
> 
> I have not solved the problem, but managed to understand that the problem 
> does is not where I drop the classes that will make the JNi calls. Dropping 
> them inthe share directory results in the 
> java.lang.reflect.InvocationTargetException at the Client side.
> 
> 1) To be clear, the call to th e JNi wrapper (dropped in the share/classes 
> directoy) is something like this:
> 
> public void getCompany(CompanyHolder company, StringHolder result) {...}
> 
> Making this call from the Stub implementation (dropped in 
> axis/WEB-INF/classes directory) result in the mentioned exception. The 
> clases ComapnyHolder is visible to both classes, and tthey are in 
> axis/WEB-INF/classes and axis/WEB-INF/classes.
> 
> 2) For the sake of testing, I created a new method without parameters
> 
> public Stirng getCompany();
> 
> and made the call just like in 1, and IT WORKED ... not Exception at the 
> client side.
> 
> 3) So, the problem seems to me is not wher eI drop the implementation 
> classes, but the classes with all the types and hodlers generated with 
> wsdl2Java, and it doesn't seem to be the shared/classes directory, because 
> that classloader finds it correctly.
> 
> It seems that there is another classloader in the middle, between the one 
> for shared and the one for my WebApp that needs to know where to get these 
> classes from, but where? ... I tried common and server.... no luck !!!
> 
>   HELP PLEASE !!!
>   Thanks in advance,
>   --Luis R.
> 
>>From: Roberto Belardo <ro...@email.it>
>>Reply-To: axis-user@ws.apache.org
>>To: axis-user@ws.apache.org
>>Subject: Re: Where to put Amazon Stub classes
>>Date: Tue, 18 Jul 2006 10:36:40 +0200
>>
>>Those are all the experiments i did to solve this damned problem:
>>
>>    * Put the Amazon stub classes in a jar in the classpath of windows:
>>      The source code of the web service will compile, and you will be
>>      able to correctly deploy it. But when you will try to acces it
>>      from a client, the first try to call AWSserviceLocator( ) will
>>      cause the exception.
>>    * Put the Amazon stub classes in a jar in the
>>      TOMCAT/webapps/AXIS/WEB-INF/lib directory: Axis will not start.
>>      You will get a 404 error, and i don't know why.
>>    * Put the Amazon stub classes in the
>>      TOMCAT/webapps/AXIS/WEB-INF/classes directory: Nothing change from
>>      the first point.
>>    * Put the Amazon stub classes in the TOMCAT/shared/lib directory: :
>>      Nothing change from the first point.
>>    * Put the Amazon stub classes in the same jar of the web service i
>>      try to deploy and use: I put this jar containing Amazon stub
>>      package, my ws sources, my ws stub classes in
>>      TOMCAT/webapps/AXIS/WEB-INF/lib directory. I can deploy it but
>>      nothing change from the first point.
>>
>>I really finish my ideas to solve this problem. Is it possible that no one 
>>had never try to use Amazon in Axis? I wrote on Amazon forum, Nabble Axis 
>>forum, Java forum but with no succes.
>>I hope we find the solution :-(
>>Roberto.
>>
>>Luis Rivera ha scritto:
>>>
>>>Roberto,
>>>
>>>I don't know the answer, but I am having the same problem. Same exception 
>>>but with a slightly different setup. I have a class which will use a JNI 
>>>library, which according to the documentation should be place in the 
>>>shared/classes directory. So I did and I get the dreaded 
>>>java.lang.reflect.InvocationTargetException, which I believe is a class 
>>>loader problem. However, I have tried to solve this placing it in the 
>>>common/classes, server/classes and I get the same result.
>>>
>>>I have searched the web for solutions, some people say that it is a 
>>>classpath problem, but nobody seems to let you know where exactly you set 
>>>this so that the correct class loader finds the class (assuming I am right 
>>>and it is a classloader problem).
>>>
>>>Any of these AXIS gurus have had a similar setup/problem and have a 
>>>solution at hand?
>>>
>>>Thanks in advance,
>>>--Luis R.
>>>
>>>
>>>>From: Roberto Belardo <ro...@email.it>
>>>>Reply-To: axis-user@ws.apache.org
>>>>To: axis-user@ws.apache.org
>>>>Subject: Re: Where to put Amazon Stub classes
>>>>Date: Mon, 17 Jul 2006 14:58:15 +0200
>>>>
>>>>But if i put those stub files in a jar under the WEB-INF/lib Axis cannot 
>>>>start.
>>>>My question begin: Can i invoke a web service on axis that will invoke 
>>>>with some stubs the service of amazon? If yes, why i'm still getting this 
>>>>exception?
>>>>
>>>>Martin Gainty ha scritto:
>>>>>Buon Giorno Roberto-
>>>>>
>>>>>place jars in %TOMCAT_HOME%/webapps/axis/WEB-INF/lib
>>>>>
>>>>>OR
>>>>>
>>>>>place class files in %TOMCAT_HOME%/webapps/axis/WEB-INF/classes
>>>>>
>>>>>Molte Grazie,
>>>>>Martin --
>>>>>*********************************************************************
>>>>>This email message and any files transmitted with it contain 
>>>>>confidential
>>>>>information intended only for the person(s) to whom this email message 
>>>>>is
>>>>>addressed. If you have received this email message in error, please 
>>>>>notify
>>>>>the sender immediately by telephone or email and destroy the original
>>>>>message without making a copy. Thank you.
>>>>>
>>>>>
>>>>>
>>>>>----- Original Message ----- From: "Roberto Belardo" 
>>>>><ba...@yahoo.it>
>>>>>To: <ax...@ws.apache.org>
>>>>>Sent: Monday, July 17, 2006 6:07 AM
>>>>>Subject: Where to put Amazon Stub classes
>>>>>
>>>>>
>>>>>
>>>>>>Hi all,
>>>>>>i have big problem. I'm trying to develop a web service that will do 
>>>>>>simply
>>>>>>a search using amazon ws, and i want acces my service from a java 
>>>>>>client. So
>>>>>>i put my web service jar in AXIS-HOME/WEB-INF/lib directory. But here 
>>>>>>come
>>>>>>the problems:
>>>>>>Where i have to put Amazon stub classes obtained from the amazon wsdl 
>>>>>>file?
>>>>>>In order to compile my java files for my web service, i create a jar 
>>>>>>with
>>>>>>those stub files and putted it in the windows classpath. But it seems 
>>>>>>to me
>>>>>>that Axis cannot see them because every time i try to acces the web 
>>>>>>service
>>>>>>i got a java.lang.reflect.InvocationTargetException from Axis but i can 
>>>>>>use
>>>>>>ut if i simply remove the amazon code. If i put that jar with the 
>>>>>>amazon
>>>>>>stub in the AXIS-HOME/WEB-INF/lib directory Axis cannot start.I get an 
>>>>>>error
>>>>>>404.
>>>>>>Thanks in advance,
>>>>>>Roberto --
>>>>>>View this message in context: 
>>>>>>http://www.nabble.com/Where-to-put-Amazon-Stub-classes-tf1953881.html#a5358366
>>>>>>
>>>>>>Sent from the Axis - User forum at Nabble.com.
>>>>>>
>>>>>>
>>>>>>---------------------------------------------------------------------
>>>>>>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>>>>>For additional commands, e-mail: axis-user-help@ws.apache.org
>>>>>>
>>>>>>"wè®f³��Ãz4à 
>>>>>>÷Ã>]x�Ã"­7Ã>T.zà >>>>>>÷Ãsm§ÿðÃf èw}¢t===
>>>>
>>>>--
>>>>--- This is a digital signature and it is not a part of the message ---
>>>>Per non lottare ci saranno sempre moltissimi pretesti in ogni epoca e in 
>>>>ogni circostanza, ma mai, senza lotta, si potrà avere la libertà .
>>>>Fidel Castro (introduzione a "Che Guevara, Diario in Bolivia")
>>>>
>>>>
>>>>
>>>>--
>>>>Email.it, the professional e-mail, gratis per te: http://www.email.it/f
>>>>
>>>>Sponsor:
>>>>Corso base ASP Gratis - Video con trucchi e segreti per imparare a creare 
>>>>il tuo Sito Web Dinamico con la tecnologia ASP
>>>>Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=5146&d=17-7
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>>>For additional commands, e-mail: axis-user-help@ws.apache.org
>>>>
>>>
>>>_________________________________________________________________
>>>Express yourself instantly with MSN Messenger! Download today - it's FREE! 
>>>http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>>For additional commands, e-mail: axis-user-help@ws.apache.org
>>>
>>>
>>>__________ Informazione NOD32 1.1454 (20060321) __________
>>>
>>>Questo messaggio è stato controllato dal Sistema Antivirus NOD32
>>>http://www.nod32.it
>>>
>>>
>>>
>>
>>--
>>--- This is a digital signature and it is not a part of the message ---
>>Per non lottare ci saranno sempre moltissimi pretesti in ogni epoca e in 
>>ogni circostanza, ma mai, senza lotta, si potrà avere la libertà .
>>Fidel Castro (introduzione a "Che Guevara, Diario in Bolivia")
>>
>>
>>
>>--
>>Email.it, the professional e-mail, gratis per te: http://www.email.it/f
>>
>>Sponsor:
>>Refill srl dal 1993, il compatibile per stampante di qualit. 5000 prodotti 
>>in pronta consegna, consegna in 24h, assistenza telefonica da tecnici 
>>specializzati
>>Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=5192&d=18-7
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>For additional commands, e-mail: axis-user-help@ws.apache.org
>>
> 
> _________________________________________________________________
> FREE pop-up blocking with the new MSN Toolbar - get it now! 
> http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
>

Re: Where to put Amazon Stub classes

Posted by Luis Rivera <lu...@hotmail.com>.

   Dear Axis/Devs/User,

Is there any sould around here that could have had a similar problem 
deploying an axix/tomcat application that will use a JNI to access the 
server application? As you can see, it seems that either nobody knows how to 
do this, or is so stupid that nobody things I won't be able to figure it 
out. But so far, I have not had luck or brain to figure it out :(

  Any kind of help will be greatly appreciated,
   -Luis R.

>From: "Luis Rivera" <lu...@hotmail.com>
>Reply-To: axis-dev@ws.apache.org
>To: axis-dev@ws.apache.org
>Subject: Re: Where to put Amazon Stub classes
>Date: Wed, 19 Jul 2006 14:26:30 -0700
>
>
>  Roberto, axis-users, axis devs,
>
>
>Sorry for the cross posting, but we had not had much luck in the users's 
>list, so I am hoping an axis/dev will have a good advise. I am sure more 
>than one user has needed to use axis/tomcat and a JNI interface, so I am 
>sure this has been done.
>
>Roberto, it was a false alarm. The problem is still there. Nice to see you 
>found the solutions to your, but mine is a little more complicated because 
>I need classes in the shared context and classes in the webapps context, 
>which cause serialization/desearialization problems when making calls among 
>classes between the two contexts.
>
>I found the log that has the stdout, which was showing a couple of 
>exceptions, which I solved by placing the appropriate jar files in the 
>right place. However, the problem didn't go away, there is something in the 
>Tomcat servlet or axis (I don't know) that is handling an exception in the 
>server side, because I have a try {} catch () {} where the problem ocurrs 
>and I don't catch anything, but the exception is returned to the client. 
>Now not even an exception is thrown to the stdout or staderr files.
>
>The problems comes when in the shared/classes files I access the parameters 
>that use the classes generated by the WSDL2java tool. Those classes are in 
>both
>
>TOMCAT_HOME/shared/classes
>
>and
>
>TOMCAT_HOME/webapps/axis/WEB-INF/classes
>
>I also dropped the axis jar files in
>
>TOMCAT_HOME/shared/lib
>TOMCAT_HOME/webapp/WEB-INF/lib
>TOMCAT_HOME/webapp/axis/WEB-INF/lib
>
>but I still have a problem. At this point it would be nice to at leasts see 
>the DEBUG output from Tomcat, but I am not sure how to do that or if it is 
>something related to axis. To make this more explicit, this example works:
>
>class CRLStub
>
>...
>
>public void getCompay(CompanyHolder company, StringHolder result)
>throws java.rmi.RemoteException
>{
>    company.value = new soap.xsd.CompanyInfo();
>    company.value.setCompany("Something");
>
>    result.value = "ok";
>}
>
>Now, if I try to do the following, there is no error, but obviously, the 
>result is not the same
>
>class CRLStub
>
>...
>
>public void getCompay(CompanyInfoHolder company, StringHolder result)
>throws java.rmi.RemoteException
>{
>    jnInSharedContext.getCompany(company, result);
>}
>
>class JNIcrlInSharedContext
>
>  ...
>
>public void getCompany(CompanyInfoHolder company, StringHolder result)
>{
>   /// No problem as long as I don't access neither company or result
>}
>
>But if I do this, then I receive the 
>java.lang.reflect.InvocationTargetException at the client side, even if I 
>try to catch the exception with a try {} catch () {} pair.
>
>public void getCompany(CompanyInfoHolder company, StringHolder result)
>{
>    company.value = new soap.xsd.CompanyInfo();
>}
>
>As long as I do not referece the classes, which I believe means the classes 
>are not loaded, then there is not problem. When they are accessed, then it 
>fails. The classes are in both common, shared and webapps, where else I am 
>supposed to place them?
>
>I would appreciate any kind of hint,
>Thanks in advance,
>--Luis R.
>
>
>>From: Roberto Belardo <ro...@email.it>
>>Reply-To: axis-user@ws.apache.org
>>To: axis-user@ws.apache.org
>>Subject: Re: Where to put Amazon Stub classes
>>Date: Wed, 19 Jul 2006 10:26:23 +0200
>>
>>Hi Luis,
>>this is a beautiful morning. I don't know how but i solve everything. This 
>>morning the first thing i did was another experiment to better understand 
>>what was happening. So i rebuild Amazon stub classes with the axis tool:
>>    java org.apache.axis.wsdl.WSDL2Java -v -W -p myamazonservice 
>>http://webservices.amazon.com/AWSECommerceService/2006-06-07/AWSECommerceService.wsdl
>>Then i put a System.out.println("TEST") inside the code of 
>>AWSECommerceServiceLocator.java constructor to see if Axis reach that 
>>point. I never saw that string printed out, but after the deploy of 
>>everything, and after including those stub classes in the same jar of my 
>>web service putted in TOMCAT/webapps/AXIS/WEB-INF/lib directory, 
>>everything works fine!
>>I really don't know how but i escape from this labyrinth!
>>I hope you find your way out from yours.
>>Thanks to all,
>>Roberto.
>>
>>Ps: If anyone understand what's happened to me (why now everything works, 
>>he can tell me whenever he wants)
>>
>>Roberto Belardo ha scritto:
>>>How do you find that the problem is that? I really don't know how to 
>>>advance from this InvocationTargetException...
>>>
>>>Luis Rivera ha scritto:
>>>>
>>>>
>>>>Roberto,
>>>>
>>>>I found my problem. It turned out not to be a Classloader problem, but a 
>>>>NullPointer problem in the server, which I had not found because I don't 
>>>>know how to debug my application in Tomcat and there is no single log in 
>>>>the Tomcat directory that can give me a clue of what's happening.
>>>>
>>>>Anyway, the configuration worked as I had it initially:
>>>>
>>>>1) Stubs/Skeletons and all that had nothing to do with the JNI in 
>>>>axis/WEB-INF/classes
>>>>
>>>>2) The classes for the JNI interface/loading the jni library under 
>>>>shared/classes
>>>>
>>>>I think if we can find a way to debug our application in the server, we 
>>>>could get better light on what is happening and solve problems a lot 
>>>>quicker :|.
>>>>
>>>>Anybody knows how to debug remotely axis/tomcat apps?
>>>>
>>>>--Luis R.
>>>>
>>>>>From: "Luis Rivera" <lu...@hotmail.com>
>>>>>Reply-To: axis-user@ws.apache.org
>>>>>To: axis-user@ws.apache.org
>>>>>Subject: Re: Where to put Amazon Stub classes
>>>>>Date: Tue, 18 Jul 2006 04:18:43 -0700
>>>>>
>>>>>
>>>>>Roberto,
>>>>>
>>>>>I have not solved the problem, but managed to understand that the 
>>>>>problem does is not where I drop the classes that will make the JNi 
>>>>>calls. Dropping them inthe share directory results in the 
>>>>>java.lang.reflect.InvocationTargetException at the Client side.
>>>>>
>>>>>1) To be clear, the call to th e JNi wrapper (dropped in the 
>>>>>share/classes directoy) is something like this:
>>>>>
>>>>>public void getCompany(CompanyHolder company, StringHolder result) 
>>>>>{...}
>>>>>
>>>>>Making this call from the Stub implementation (dropped in 
>>>>>axis/WEB-INF/classes directory) result in the mentioned exception. The 
>>>>>clases ComapnyHolder is visible to both classes, and tthey are in 
>>>>>axis/WEB-INF/classes and axis/WEB-INF/classes.
>>>>>
>>>>>2) For the sake of testing, I created a new method without parameters
>>>>>
>>>>>public Stirng getCompany();
>>>>>
>>>>>and made the call just like in 1, and IT WORKED ... not Exception at 
>>>>>the client side.
>>>>>
>>>>>3) So, the problem seems to me is not wher eI drop the implementation 
>>>>>classes, but the classes with all the types and hodlers generated with 
>>>>>wsdl2Java, and it doesn't seem to be the shared/classes directory, 
>>>>>because that classloader finds it correctly.
>>>>>
>>>>>It seems that there is another classloader in the middle, between the 
>>>>>one for shared and the one for my WebApp that needs to know where to 
>>>>>get these classes from, but where? ... I tried common and server.... no 
>>>>>luck !!!
>>>>>
>>>>>HELP PLEASE !!!
>>>>>Thanks in advance,
>>>>>--Luis R.
>>>>>
>>>>>>From: Roberto Belardo <ro...@email.it>
>>>>>>Reply-To: axis-user@ws.apache.org
>>>>>>To: axis-user@ws.apache.org
>>>>>>Subject: Re: Where to put Amazon Stub classes
>>>>>>Date: Tue, 18 Jul 2006 10:36:40 +0200
>>>>>>
>>>>>>Those are all the experiments i did to solve this damned problem:
>>>>>>
>>>>>>* Put the Amazon stub classes in a jar in the classpath of windows:
>>>>>>The source code of the web service will compile, and you will be
>>>>>>able to correctly deploy it. But when you will try to acces it
>>>>>>from a client, the first try to call AWSserviceLocator( ) will
>>>>>>cause the exception.
>>>>>>* Put the Amazon stub classes in a jar in the
>>>>>>TOMCAT/webapps/AXIS/WEB-INF/lib directory: Axis will not start.
>>>>>>You will get a 404 error, and i don't know why.
>>>>>>* Put the Amazon stub classes in the
>>>>>>TOMCAT/webapps/AXIS/WEB-INF/classes directory: Nothing change from
>>>>>>the first point.
>>>>>>* Put the Amazon stub classes in the TOMCAT/shared/lib directory: :
>>>>>>Nothing change from the first point.
>>>>>>* Put the Amazon stub classes in the same jar of the web service i
>>>>>>try to deploy and use: I put this jar containing Amazon stub
>>>>>>package, my ws sources, my ws stub classes in
>>>>>>TOMCAT/webapps/AXIS/WEB-INF/lib directory. I can deploy it but
>>>>>>nothing change from the first point.
>>>>>>
>>>>>>I really finish my ideas to solve this problem. Is it possible that no 
>>>>>>one had never try to use Amazon in Axis? I wrote on Amazon forum, 
>>>>>>Nabble Axis forum, Java forum but with no succes.
>>>>>>I hope we find the solution :-(
>>>>>>Roberto.
>>>>>>
>>>>>>Luis Rivera ha scritto:
>>>>>>>
>>>>>>>Roberto,
>>>>>>>
>>>>>>>I don't know the answer, but I am having the same problem. Same 
>>>>>>>exception but with a slightly different setup. I have a class which 
>>>>>>>will use a JNI library, which according to the documentation should 
>>>>>>>be place in the shared/classes directory. So I did and I get the 
>>>>>>>dreaded java.lang.reflect.InvocationTargetException, which I believe 
>>>>>>>is a class loader problem. However, I have tried to solve this 
>>>>>>>placing it in the common/classes, server/classes and I get the same 
>>>>>>>result.
>>>>>>>
>>>>>>>I have searched the web for solutions, some people say that it is a 
>>>>>>>classpath problem, but nobody seems to let you know where exactly you 
>>>>>>>set this so that the correct class loader finds the class (assuming I 
>>>>>>>am right and it is a classloader problem).
>>>>>>>
>>>>>>>Any of these AXIS gurus have had a similar setup/problem and have a 
>>>>>>>solution at hand?
>>>>>>>
>>>>>>>Thanks in advance,
>>>>>>>--Luis R.
>>>>>>>
>>>>>>>
>>>>>>>>From: Roberto Belardo <ro...@email.it>
>>>>>>>>Reply-To: axis-user@ws.apache.org
>>>>>>>>To: axis-user@ws.apache.org
>>>>>>>>Subject: Re: Where to put Amazon Stub classes
>>>>>>>>Date: Mon, 17 Jul 2006 14:58:15 +0200
>>>>>>>>
>>>>>>>>But if i put those stub files in a jar under the WEB-INF/lib Axis 
>>>>>>>>cannot start.
>>>>>>>>My question begin: Can i invoke a web service on axis that will 
>>>>>>>>invoke with some stubs the service of amazon? If yes, why i'm still 
>>>>>>>>getting this exception?
>>>>>>>>
>>>>>>>>Martin Gainty ha scritto:
>>>>>>>>>Buon Giorno Roberto-
>>>>>>>>>
>>>>>>>>>place jars in %TOMCAT_HOME%/webapps/axis/WEB-INF/lib
>>>>>>>>>
>>>>>>>>>OR
>>>>>>>>>
>>>>>>>>>place class files in %TOMCAT_HOME%/webapps/axis/WEB-INF/classes
>>>>>>>>>
>>>>>>>>>Molte Grazie,
>>>>>>>>>Martin --
>>>>>>>>>*********************************************************************
>>>>>>>>>
>>>>>>>>>This email message and any files transmitted with it contain 
>>>>>>>>>confidential
>>>>>>>>>information intended only for the person(s) to whom this email 
>>>>>>>>>message is
>>>>>>>>>addressed. If you have received this email message in error, please 
>>>>>>>>>notify
>>>>>>>>>the sender immediately by telephone or email and destroy the 
>>>>>>>>>original
>>>>>>>>>message without making a copy. Thank you.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>----- Original Message ----- From: "Roberto Belardo" 
>>>>>>>>><ba...@yahoo.it>
>>>>>>>>>To: <ax...@ws.apache.org>
>>>>>>>>>Sent: Monday, July 17, 2006 6:07 AM
>>>>>>>>>Subject: Where to put Amazon Stub classes
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>>Hi all,
>>>>>>>>>>i have big problem. I'm trying to develop a web service that will 
>>>>>>>>>>do simply
>>>>>>>>>>a search using amazon ws, and i want acces my service from a java 
>>>>>>>>>>client. So
>>>>>>>>>>i put my web service jar in AXIS-HOME/WEB-INF/lib directory. But 
>>>>>>>>>>here come
>>>>>>>>>>the problems:
>>>>>>>>>>Where i have to put Amazon stub classes obtained from the amazon 
>>>>>>>>>>wsdl file?
>>>>>>>>>>In order to compile my java files for my web service, i create a 
>>>>>>>>>>jar with
>>>>>>>>>>those stub files and putted it in the windows classpath. But it 
>>>>>>>>>>seems to me
>>>>>>>>>>that Axis cannot see them because every time i try to acces the 
>>>>>>>>>>web service
>>>>>>>>>>i got a java.lang.reflect.InvocationTargetException from Axis but 
>>>>>>>>>>i can use
>>>>>>>>>>ut if i simply remove the amazon code. If i put that jar with the 
>>>>>>>>>>amazon
>>>>>>>>>>stub in the AXIS-HOME/WEB-INF/lib directory Axis cannot start.I 
>>>>>>>>>>get an error
>>>>>>>>>>404.
>>>>>>>>>>Thanks in advance,
>>>>>>>>>>Roberto --
>>>>>>>>>>View this message in context: 
>>>>>>>>>>http://www.nabble.com/Where-to-put-Amazon-Stub-classes-tf1953881.html#a5358366
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>Sent from the Axis - User forum at Nabble.com.
>>
>>
>>--
>>Email.it, the professional e-mail, gratis per te: http://www.email.it/f
>>
>>Sponsor:
>>Refill s.r.l. - Tutto per la tua stampante a prezzi incredibili: su 
>>cartucce, toner, inchiostri, carta speciale risparmi fino al 90%!
>>Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=5189&d=19-7
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>
>_________________________________________________________________
>Don’t just search. Find. Check out the new MSN Search! 
>http://search.msn.click-url.com/go/onm00200636ave/direct/01/
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
>For additional commands, e-mail: axis-dev-help@ws.apache.org
>

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: Where to put Amazon Stub classes

Posted by Luis Rivera <lu...@hotmail.com>.
  Roberto, axis-users, axis devs,


Sorry for the cross posting, but we had not had much luck in the users's 
list, so I am hoping an axis/dev will have a good advise. I am sure more 
than one user has needed to use axis/tomcat and a JNI interface, so I am 
sure this has been done.

Roberto, it was a false alarm. The problem is still there. Nice to see you 
found the solutions to your, but mine is a little more complicated because I 
need classes in the shared context and classes in the webapps context, which 
cause serialization/desearialization problems when making calls among 
classes between the two contexts.

I found the log that has the stdout, which was showing a couple of 
exceptions, which I solved by placing the appropriate jar files in the right 
place. However, the problem didn't go away, there is something in the Tomcat 
servlet or axis (I don't know) that is handling an exception in the server 
side, because I have a try {} catch () {} where the problem ocurrs and I 
don't catch anything, but the exception is returned to the client. Now not 
even an exception is thrown to the stdout or staderr files.

The problems comes when in the shared/classes files I access the parameters 
that use the classes generated by the WSDL2java tool. Those classes are in 
both

TOMCAT_HOME/shared/classes

and

TOMCAT_HOME/webapps/axis/WEB-INF/classes

I also dropped the axis jar files in

TOMCAT_HOME/shared/lib
TOMCAT_HOME/webapp/WEB-INF/lib
TOMCAT_HOME/webapp/axis/WEB-INF/lib

but I still have a problem. At this point it would be nice to at leasts see 
the DEBUG output from Tomcat, but I am not sure how to do that or if it is 
something related to axis. To make this more explicit, this example works:

class CRLStub

...

public void getCompay(CompanyHolder company, StringHolder result)
throws java.rmi.RemoteException
{
    company.value = new soap.xsd.CompanyInfo();
    company.value.setCompany("Something");

    result.value = "ok";
}

Now, if I try to do the following, there is no error, but obviously, the 
result is not the same

class CRLStub

...

public void getCompay(CompanyInfoHolder company, StringHolder result)
throws java.rmi.RemoteException
{
    jnInSharedContext.getCompany(company, result);
}

class JNIcrlInSharedContext

  ...

public void getCompany(CompanyInfoHolder company, StringHolder result)
{
   /// No problem as long as I don't access neither company or result
}

But if I do this, then I receive the 
java.lang.reflect.InvocationTargetException at the client side, even if I 
try to catch the exception with a try {} catch () {} pair.

public void getCompany(CompanyInfoHolder company, StringHolder result)
{
    company.value = new soap.xsd.CompanyInfo();
}

As long as I do not referece the classes, which I believe means the classes 
are not loaded, then there is not problem. When they are accessed, then it 
fails. The classes are in both common, shared and webapps, where else I am 
supposed to place them?

I would appreciate any kind of hint,
Thanks in advance,
--Luis R.


>From: Roberto Belardo <ro...@email.it>
>Reply-To: axis-user@ws.apache.org
>To: axis-user@ws.apache.org
>Subject: Re: Where to put Amazon Stub classes
>Date: Wed, 19 Jul 2006 10:26:23 +0200
>
>Hi Luis,
>this is a beautiful morning. I don't know how but i solve everything. This 
>morning the first thing i did was another experiment to better understand 
>what was happening. So i rebuild Amazon stub classes with the axis tool:
>    java org.apache.axis.wsdl.WSDL2Java -v -W -p myamazonservice 
>http://webservices.amazon.com/AWSECommerceService/2006-06-07/AWSECommerceService.wsdl
>Then i put a System.out.println("TEST") inside the code of 
>AWSECommerceServiceLocator.java constructor to see if Axis reach that 
>point. I never saw that string printed out, but after the deploy of 
>everything, and after including those stub classes in the same jar of my 
>web service putted in TOMCAT/webapps/AXIS/WEB-INF/lib directory, everything 
>works fine!
>I really don't know how but i escape from this labyrinth!
>I hope you find your way out from yours.
>Thanks to all,
>Roberto.
>
>Ps: If anyone understand what's happened to me (why now everything works, 
>he can tell me whenever he wants)
>
>Roberto Belardo ha scritto:
>>How do you find that the problem is that? I really don't know how to 
>>advance from this InvocationTargetException...
>>
>>Luis Rivera ha scritto:
>>>
>>>
>>>Roberto,
>>>
>>>I found my problem. It turned out not to be a Classloader problem, but a 
>>>NullPointer problem in the server, which I had not found because I don't 
>>>know how to debug my application in Tomcat and there is no single log in 
>>>the Tomcat directory that can give me a clue of what's happening.
>>>
>>>Anyway, the configuration worked as I had it initially:
>>>
>>>1) Stubs/Skeletons and all that had nothing to do with the JNI in 
>>>axis/WEB-INF/classes
>>>
>>>2) The classes for the JNI interface/loading the jni library under 
>>>shared/classes
>>>
>>>I think if we can find a way to debug our application in the server, we 
>>>could get better light on what is happening and solve problems a lot 
>>>quicker :|.
>>>
>>>Anybody knows how to debug remotely axis/tomcat apps?
>>>
>>>--Luis R.
>>>
>>>>From: "Luis Rivera" <lu...@hotmail.com>
>>>>Reply-To: axis-user@ws.apache.org
>>>>To: axis-user@ws.apache.org
>>>>Subject: Re: Where to put Amazon Stub classes
>>>>Date: Tue, 18 Jul 2006 04:18:43 -0700
>>>>
>>>>
>>>>Roberto,
>>>>
>>>>I have not solved the problem, but managed to understand that the 
>>>>problem does is not where I drop the classes that will make the JNi 
>>>>calls. Dropping them inthe share directory results in the 
>>>>java.lang.reflect.InvocationTargetException at the Client side.
>>>>
>>>>1) To be clear, the call to th e JNi wrapper (dropped in the 
>>>>share/classes directoy) is something like this:
>>>>
>>>>public void getCompany(CompanyHolder company, StringHolder result) {...}
>>>>
>>>>Making this call from the Stub implementation (dropped in 
>>>>axis/WEB-INF/classes directory) result in the mentioned exception. The 
>>>>clases ComapnyHolder is visible to both classes, and tthey are in 
>>>>axis/WEB-INF/classes and axis/WEB-INF/classes.
>>>>
>>>>2) For the sake of testing, I created a new method without parameters
>>>>
>>>>public Stirng getCompany();
>>>>
>>>>and made the call just like in 1, and IT WORKED ... not Exception at the 
>>>>client side.
>>>>
>>>>3) So, the problem seems to me is not wher eI drop the implementation 
>>>>classes, but the classes with all the types and hodlers generated with 
>>>>wsdl2Java, and it doesn't seem to be the shared/classes directory, 
>>>>because that classloader finds it correctly.
>>>>
>>>>It seems that there is another classloader in the middle, between the 
>>>>one for shared and the one for my WebApp that needs to know where to get 
>>>>these classes from, but where? ... I tried common and server.... no luck 
>>>>!!!
>>>>
>>>>HELP PLEASE !!!
>>>>Thanks in advance,
>>>>--Luis R.
>>>>
>>>>>From: Roberto Belardo <ro...@email.it>
>>>>>Reply-To: axis-user@ws.apache.org
>>>>>To: axis-user@ws.apache.org
>>>>>Subject: Re: Where to put Amazon Stub classes
>>>>>Date: Tue, 18 Jul 2006 10:36:40 +0200
>>>>>
>>>>>Those are all the experiments i did to solve this damned problem:
>>>>>
>>>>>* Put the Amazon stub classes in a jar in the classpath of windows:
>>>>>The source code of the web service will compile, and you will be
>>>>>able to correctly deploy it. But when you will try to acces it
>>>>>from a client, the first try to call AWSserviceLocator( ) will
>>>>>cause the exception.
>>>>>* Put the Amazon stub classes in a jar in the
>>>>>TOMCAT/webapps/AXIS/WEB-INF/lib directory: Axis will not start.
>>>>>You will get a 404 error, and i don't know why.
>>>>>* Put the Amazon stub classes in the
>>>>>TOMCAT/webapps/AXIS/WEB-INF/classes directory: Nothing change from
>>>>>the first point.
>>>>>* Put the Amazon stub classes in the TOMCAT/shared/lib directory: :
>>>>>Nothing change from the first point.
>>>>>* Put the Amazon stub classes in the same jar of the web service i
>>>>>try to deploy and use: I put this jar containing Amazon stub
>>>>>package, my ws sources, my ws stub classes in
>>>>>TOMCAT/webapps/AXIS/WEB-INF/lib directory. I can deploy it but
>>>>>nothing change from the first point.
>>>>>
>>>>>I really finish my ideas to solve this problem. Is it possible that no 
>>>>>one had never try to use Amazon in Axis? I wrote on Amazon forum, 
>>>>>Nabble Axis forum, Java forum but with no succes.
>>>>>I hope we find the solution :-(
>>>>>Roberto.
>>>>>
>>>>>Luis Rivera ha scritto:
>>>>>>
>>>>>>Roberto,
>>>>>>
>>>>>>I don't know the answer, but I am having the same problem. Same 
>>>>>>exception but with a slightly different setup. I have a class which 
>>>>>>will use a JNI library, which according to the documentation should be 
>>>>>>place in the shared/classes directory. So I did and I get the dreaded 
>>>>>>java.lang.reflect.InvocationTargetException, which I believe is a 
>>>>>>class loader problem. However, I have tried to solve this placing it 
>>>>>>in the common/classes, server/classes and I get the same result.
>>>>>>
>>>>>>I have searched the web for solutions, some people say that it is a 
>>>>>>classpath problem, but nobody seems to let you know where exactly you 
>>>>>>set this so that the correct class loader finds the class (assuming I 
>>>>>>am right and it is a classloader problem).
>>>>>>
>>>>>>Any of these AXIS gurus have had a similar setup/problem and have a 
>>>>>>solution at hand?
>>>>>>
>>>>>>Thanks in advance,
>>>>>>--Luis R.
>>>>>>
>>>>>>
>>>>>>>From: Roberto Belardo <ro...@email.it>
>>>>>>>Reply-To: axis-user@ws.apache.org
>>>>>>>To: axis-user@ws.apache.org
>>>>>>>Subject: Re: Where to put Amazon Stub classes
>>>>>>>Date: Mon, 17 Jul 2006 14:58:15 +0200
>>>>>>>
>>>>>>>But if i put those stub files in a jar under the WEB-INF/lib Axis 
>>>>>>>cannot start.
>>>>>>>My question begin: Can i invoke a web service on axis that will 
>>>>>>>invoke with some stubs the service of amazon? If yes, why i'm still 
>>>>>>>getting this exception?
>>>>>>>
>>>>>>>Martin Gainty ha scritto:
>>>>>>>>Buon Giorno Roberto-
>>>>>>>>
>>>>>>>>place jars in %TOMCAT_HOME%/webapps/axis/WEB-INF/lib
>>>>>>>>
>>>>>>>>OR
>>>>>>>>
>>>>>>>>place class files in %TOMCAT_HOME%/webapps/axis/WEB-INF/classes
>>>>>>>>
>>>>>>>>Molte Grazie,
>>>>>>>>Martin --
>>>>>>>>*********************************************************************
>>>>>>>>
>>>>>>>>This email message and any files transmitted with it contain 
>>>>>>>>confidential
>>>>>>>>information intended only for the person(s) to whom this email 
>>>>>>>>message is
>>>>>>>>addressed. If you have received this email message in error, please 
>>>>>>>>notify
>>>>>>>>the sender immediately by telephone or email and destroy the 
>>>>>>>>original
>>>>>>>>message without making a copy. Thank you.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>----- Original Message ----- From: "Roberto Belardo" 
>>>>>>>><ba...@yahoo.it>
>>>>>>>>To: <ax...@ws.apache.org>
>>>>>>>>Sent: Monday, July 17, 2006 6:07 AM
>>>>>>>>Subject: Where to put Amazon Stub classes
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>>Hi all,
>>>>>>>>>i have big problem. I'm trying to develop a web service that will 
>>>>>>>>>do simply
>>>>>>>>>a search using amazon ws, and i want acces my service from a java 
>>>>>>>>>client. So
>>>>>>>>>i put my web service jar in AXIS-HOME/WEB-INF/lib directory. But 
>>>>>>>>>here come
>>>>>>>>>the problems:
>>>>>>>>>Where i have to put Amazon stub classes obtained from the amazon 
>>>>>>>>>wsdl file?
>>>>>>>>>In order to compile my java files for my web service, i create a 
>>>>>>>>>jar with
>>>>>>>>>those stub files and putted it in the windows classpath. But it 
>>>>>>>>>seems to me
>>>>>>>>>that Axis cannot see them because every time i try to acces the web 
>>>>>>>>>service
>>>>>>>>>i got a java.lang.reflect.InvocationTargetException from Axis but i 
>>>>>>>>>can use
>>>>>>>>>ut if i simply remove the amazon code. If i put that jar with the 
>>>>>>>>>amazon
>>>>>>>>>stub in the AXIS-HOME/WEB-INF/lib directory Axis cannot start.I get 
>>>>>>>>>an error
>>>>>>>>>404.
>>>>>>>>>Thanks in advance,
>>>>>>>>>Roberto --
>>>>>>>>>View this message in context: 
>>>>>>>>>http://www.nabble.com/Where-to-put-Amazon-Stub-classes-tf1953881.html#a5358366
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>Sent from the Axis - User forum at Nabble.com.
>
>
>--
>Email.it, the professional e-mail, gratis per te: http://www.email.it/f
>
>Sponsor:
>Refill s.r.l. - Tutto per la tua stampante a prezzi incredibili: su 
>cartucce, toner, inchiostri, carta speciale risparmi fino al 90%!
>Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=5189&d=19-7
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>For additional commands, e-mail: axis-user-help@ws.apache.org
>

_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: Where to put Amazon Stub classes

Posted by Roberto Belardo <ro...@email.it>.
Hi Luis,
this is a beautiful morning. I don't know how but i solve everything. 
This morning the first thing i did was another experiment to better 
understand what was happening. So i rebuild Amazon stub classes with the 
axis tool:
    java org.apache.axis.wsdl.WSDL2Java -v -W -p myamazonservice 
http://webservices.amazon.com/AWSECommerceService/2006-06-07/AWSECommerceService.wsdl
Then i put a System.out.println("TEST") inside the code of 
AWSECommerceServiceLocator.java constructor to see if Axis reach that 
point. I never saw that string printed out, but after the deploy of 
everything, and after including those stub classes in the same jar of my 
web service putted in TOMCAT/webapps/AXIS/WEB-INF/lib directory, 
everything works fine!
I really don't know how but i escape from this labyrinth!
I hope you find your way out from yours.
Thanks to all,
Roberto.

Ps: If anyone understand what's happened to me (why now everything 
works, he can tell me whenever he wants)

Roberto Belardo ha scritto:
> How do you find that the problem is that? I really don't know how to 
> advance from this InvocationTargetException...
>
> Luis Rivera ha scritto:
>>
>>
>> Roberto,
>>
>> I found my problem. It turned out not to be a Classloader problem, 
>> but a NullPointer problem in the server, which I had not found 
>> because I don't know how to debug my application in Tomcat and there 
>> is no single log in the Tomcat directory that can give me a clue of 
>> what's happening.
>>
>> Anyway, the configuration worked as I had it initially:
>>
>> 1) Stubs/Skeletons and all that had nothing to do with the JNI in 
>> axis/WEB-INF/classes
>>
>> 2) The classes for the JNI interface/loading the jni library under 
>> shared/classes
>>
>> I think if we can find a way to debug our application in the server, 
>> we could get better light on what is happening and solve problems a 
>> lot quicker :|.
>>
>> Anybody knows how to debug remotely axis/tomcat apps?
>>
>> --Luis R.
>>
>>> From: "Luis Rivera" <lu...@hotmail.com>
>>> Reply-To: axis-user@ws.apache.org
>>> To: axis-user@ws.apache.org
>>> Subject: Re: Where to put Amazon Stub classes
>>> Date: Tue, 18 Jul 2006 04:18:43 -0700
>>>
>>>
>>> Roberto,
>>>
>>> I have not solved the problem, but managed to understand that the 
>>> problem does is not where I drop the classes that will make the JNi 
>>> calls. Dropping them inthe share directory results in the 
>>> java.lang.reflect.InvocationTargetException at the Client side.
>>>
>>> 1) To be clear, the call to th e JNi wrapper (dropped in the 
>>> share/classes directoy) is something like this:
>>>
>>> public void getCompany(CompanyHolder company, StringHolder result) 
>>> {...}
>>>
>>> Making this call from the Stub implementation (dropped in 
>>> axis/WEB-INF/classes directory) result in the mentioned exception. 
>>> The clases ComapnyHolder is visible to both classes, and tthey are 
>>> in axis/WEB-INF/classes and axis/WEB-INF/classes.
>>>
>>> 2) For the sake of testing, I created a new method without parameters
>>>
>>> public Stirng getCompany();
>>>
>>> and made the call just like in 1, and IT WORKED ... not Exception at 
>>> the client side.
>>>
>>> 3) So, the problem seems to me is not wher eI drop the 
>>> implementation classes, but the classes with all the types and 
>>> hodlers generated with wsdl2Java, and it doesn't seem to be the 
>>> shared/classes directory, because that classloader finds it correctly.
>>>
>>> It seems that there is another classloader in the middle, between 
>>> the one for shared and the one for my WebApp that needs to know 
>>> where to get these classes from, but where? ... I tried common and 
>>> server.... no luck !!!
>>>
>>> HELP PLEASE !!!
>>> Thanks in advance,
>>> --Luis R.
>>>
>>>> From: Roberto Belardo <ro...@email.it>
>>>> Reply-To: axis-user@ws.apache.org
>>>> To: axis-user@ws.apache.org
>>>> Subject: Re: Where to put Amazon Stub classes
>>>> Date: Tue, 18 Jul 2006 10:36:40 +0200
>>>>
>>>> Those are all the experiments i did to solve this damned problem:
>>>>
>>>> * Put the Amazon stub classes in a jar in the classpath of windows:
>>>> The source code of the web service will compile, and you will be
>>>> able to correctly deploy it. But when you will try to acces it
>>>> from a client, the first try to call AWSserviceLocator( ) will
>>>> cause the exception.
>>>> * Put the Amazon stub classes in a jar in the
>>>> TOMCAT/webapps/AXIS/WEB-INF/lib directory: Axis will not start.
>>>> You will get a 404 error, and i don't know why.
>>>> * Put the Amazon stub classes in the
>>>> TOMCAT/webapps/AXIS/WEB-INF/classes directory: Nothing change from
>>>> the first point.
>>>> * Put the Amazon stub classes in the TOMCAT/shared/lib directory: :
>>>> Nothing change from the first point.
>>>> * Put the Amazon stub classes in the same jar of the web service i
>>>> try to deploy and use: I put this jar containing Amazon stub
>>>> package, my ws sources, my ws stub classes in
>>>> TOMCAT/webapps/AXIS/WEB-INF/lib directory. I can deploy it but
>>>> nothing change from the first point.
>>>>
>>>> I really finish my ideas to solve this problem. Is it possible that 
>>>> no one had never try to use Amazon in Axis? I wrote on Amazon 
>>>> forum, Nabble Axis forum, Java forum but with no succes.
>>>> I hope we find the solution :-(
>>>> Roberto.
>>>>
>>>> Luis Rivera ha scritto:
>>>>>
>>>>> Roberto,
>>>>>
>>>>> I don't know the answer, but I am having the same problem. Same 
>>>>> exception but with a slightly different setup. I have a class 
>>>>> which will use a JNI library, which according to the documentation 
>>>>> should be place in the shared/classes directory. So I did and I 
>>>>> get the dreaded java.lang.reflect.InvocationTargetException, which 
>>>>> I believe is a class loader problem. However, I have tried to 
>>>>> solve this placing it in the common/classes, server/classes and I 
>>>>> get the same result.
>>>>>
>>>>> I have searched the web for solutions, some people say that it is 
>>>>> a classpath problem, but nobody seems to let you know where 
>>>>> exactly you set this so that the correct class loader finds the 
>>>>> class (assuming I am right and it is a classloader problem).
>>>>>
>>>>> Any of these AXIS gurus have had a similar setup/problem and have 
>>>>> a solution at hand?
>>>>>
>>>>> Thanks in advance,
>>>>> --Luis R.
>>>>>
>>>>>
>>>>>> From: Roberto Belardo <ro...@email.it>
>>>>>> Reply-To: axis-user@ws.apache.org
>>>>>> To: axis-user@ws.apache.org
>>>>>> Subject: Re: Where to put Amazon Stub classes
>>>>>> Date: Mon, 17 Jul 2006 14:58:15 +0200
>>>>>>
>>>>>> But if i put those stub files in a jar under the WEB-INF/lib Axis 
>>>>>> cannot start.
>>>>>> My question begin: Can i invoke a web service on axis that will 
>>>>>> invoke with some stubs the service of amazon? If yes, why i'm 
>>>>>> still getting this exception?
>>>>>>
>>>>>> Martin Gainty ha scritto:
>>>>>>> Buon Giorno Roberto-
>>>>>>>
>>>>>>> place jars in %TOMCAT_HOME%/webapps/axis/WEB-INF/lib
>>>>>>>
>>>>>>> OR
>>>>>>>
>>>>>>> place class files in %TOMCAT_HOME%/webapps/axis/WEB-INF/classes
>>>>>>>
>>>>>>> Molte Grazie,
>>>>>>> Martin --
>>>>>>> ********************************************************************* 
>>>>>>>
>>>>>>> This email message and any files transmitted with it contain 
>>>>>>> confidential
>>>>>>> information intended only for the person(s) to whom this email 
>>>>>>> message is
>>>>>>> addressed. If you have received this email message in error, 
>>>>>>> please notify
>>>>>>> the sender immediately by telephone or email and destroy the 
>>>>>>> original
>>>>>>> message without making a copy. Thank you.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ----- Original Message ----- From: "Roberto Belardo" 
>>>>>>> <ba...@yahoo.it>
>>>>>>> To: <ax...@ws.apache.org>
>>>>>>> Sent: Monday, July 17, 2006 6:07 AM
>>>>>>> Subject: Where to put Amazon Stub classes
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> Hi all,
>>>>>>>> i have big problem. I'm trying to develop a web service that 
>>>>>>>> will do simply
>>>>>>>> a search using amazon ws, and i want acces my service from a 
>>>>>>>> java client. So
>>>>>>>> i put my web service jar in AXIS-HOME/WEB-INF/lib directory. 
>>>>>>>> But here come
>>>>>>>> the problems:
>>>>>>>> Where i have to put Amazon stub classes obtained from the 
>>>>>>>> amazon wsdl file?
>>>>>>>> In order to compile my java files for my web service, i create 
>>>>>>>> a jar with
>>>>>>>> those stub files and putted it in the windows classpath. But it 
>>>>>>>> seems to me
>>>>>>>> that Axis cannot see them because every time i try to acces the 
>>>>>>>> web service
>>>>>>>> i got a java.lang.reflect.InvocationTargetException from Axis 
>>>>>>>> but i can use
>>>>>>>> ut if i simply remove the amazon code. If i put that jar with 
>>>>>>>> the amazon
>>>>>>>> stub in the AXIS-HOME/WEB-INF/lib directory Axis cannot start.I 
>>>>>>>> get an error
>>>>>>>> 404.
>>>>>>>> Thanks in advance,
>>>>>>>> Roberto --
>>>>>>>> View this message in context: 
>>>>>>>> http://www.nabble.com/Where-to-put-Amazon-Stub-classes-tf1953881.html#a5358366 
>>>>>>>>
>>>>>>>>
>>>>>>>> Sent from the Axis - User forum at Nabble.com.
 
 
 --
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 
 Sponsor:
 Refill s.r.l. - Tutto per la tua stampante a prezzi incredibili: su cartucce, toner, inchiostri, carta speciale risparmi fino al 90%!
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=5189&d=19-7

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Where to put Amazon Stub classes

Posted by Luis Rivera <lu...@hotmail.com>.
   Roberto, axis-users, axis devs,


Sorry for the cross posting, but we had not had much luck in the users's 
list, so I am hoping an axis/dev will have a good advise. I am sure more 
than one user has needed to use axis/tomcat and a JNI interface, so I am 
sure this has been done.

Roberto, it was a false alarm. The problem is still there. Nice to see you 
found the solutions to your, but mine is a little more complicated because I 
need classes in the shared context and classes in the webapps context, which 
cause serialization/desearialization problems when making calls among 
classes between the two contexts.

I found the log that has the stdout, which was showing a couple of 
exceptions, which I solved by placing the appropriate jar files in the right 
place. However, the problem didn't go away, there is something in the Tomcat 
servlet or axis (I don't know) that is handling an exception in the server 
side, because I have a try {} catch () {} where the problem ocurrs and I 
don't catch anything, but the exception is returned to the client. Now not 
even an exception is thrown to the stdout or staderr files.

The problems comes when in the shared/classes files I access the parameters 
that use the classes generated by the WSDL2java tool. Those classes are in 
both

TOMCAT_HOME/shared/classes

and

TOMCAT_HOME/webapps/axis/WEB-INF/classes

I also dropped the axis jar files in

TOMCAT_HOME/shared/lib
TOMCAT_HOME/webapp/WEB-INF/lib
TOMCAT_HOME/webapp/axis/WEB-INF/lib

but I still have a problem. At this point it would be nice to at leasts see 
the DEBUG output from Tomcat, but I am not sure how to do that or if it is 
something related to axis. To make this more explicit, this example works:

class CRLStub

...

public void getCompay(CompanyHolder company, StringHolder result)
throws java.rmi.RemoteException
{
     company.value = new soap.xsd.CompanyInfo();
     company.value.setCompany("Something");

     result.value = "ok";
}

Now, if I try to do the following, there is no error, but obviously, the 
result is not the same

class CRLStub

...

public void getCompay(CompanyInfoHolder company, StringHolder result)
throws java.rmi.RemoteException
{
     jnInSharedContext.getCompany(company, result);
}

class JNIcrlInSharedContext

   ...

public void getCompany(CompanyInfoHolder company, StringHolder result)
{
    /// No problem as long as I don't access neither company or result
}

But if I do this, then I receive the 
java.lang.reflect.InvocationTargetException at the client side, even if I 
try to catch the exception with a try {} catch () {} pair.

public void getCompany(CompanyInfoHolder company, StringHolder result)
{
     company.value = new soap.xsd.CompanyInfo();
}

As long as I do not referece the classes, which I believe means the classes 
are not loaded, then there is not problem. When they are accessed, then it 
fails. The classes are in both common, shared and webapps, where else I am 
supposed to place them?

I would appreciate any kind of hint,
Thanks in advance,
--Luis R.

>From: Roberto Belardo <ro...@email.it>
>Reply-To: axis-user@ws.apache.org
>To: axis-user@ws.apache.org
>Subject: Re: Where to put Amazon Stub classes
>Date: Wed, 19 Jul 2006 09:55:27 +0200
>
>How do you find that the problem is that? I really don't know how to 
>advance from this InvocationTargetException...
>
>Luis Rivera ha scritto:
>>
>>
>>Roberto,
>>
>>I found my problem. It turned out not to be a Classloader problem, but a 
>>NullPointer problem in the server, which I had not found because I don't 
>>know how to debug my application in Tomcat and there is no single log in 
>>the Tomcat directory that can give me a clue of what's happening.
>>
>>Anyway, the configuration worked as I had it initially:
>>
>>1) Stubs/Skeletons and all that had nothing to do with the JNI in 
>>axis/WEB-INF/classes
>>
>>2) The classes for the JNI interface/loading the jni library under 
>>shared/classes
>>
>>I think if we can find a way to debug our application in the server, we 
>>could get better light on what is happening and solve problems a lot 
>>quicker :|.
>>
>>Anybody knows how to debug remotely axis/tomcat apps?
>>
>>--Luis R.
>>
>>>From: "Luis Rivera" <lu...@hotmail.com>
>>>Reply-To: axis-user@ws.apache.org
>>>To: axis-user@ws.apache.org
>>>Subject: Re: Where to put Amazon Stub classes
>>>Date: Tue, 18 Jul 2006 04:18:43 -0700
>>>
>>>
>>>Roberto,
>>>
>>>I have not solved the problem, but managed to understand that the problem 
>>>does is not where I drop the classes that will make the JNi calls. 
>>>Dropping them inthe share directory results in the 
>>>java.lang.reflect.InvocationTargetException at the Client side.
>>>
>>>1) To be clear, the call to th e JNi wrapper (dropped in the 
>>>share/classes directoy) is something like this:
>>>
>>>public void getCompany(CompanyHolder company, StringHolder result) {...}
>>>
>>>Making this call from the Stub implementation (dropped in 
>>>axis/WEB-INF/classes directory) result in the mentioned exception. The 
>>>clases ComapnyHolder is visible to both classes, and tthey are in 
>>>axis/WEB-INF/classes and axis/WEB-INF/classes.
>>>
>>>2) For the sake of testing, I created a new method without parameters
>>>
>>>public Stirng getCompany();
>>>
>>>and made the call just like in 1, and IT WORKED ... not Exception at the 
>>>client side.
>>>
>>>3) So, the problem seems to me is not wher eI drop the implementation 
>>>classes, but the classes with all the types and hodlers generated with 
>>>wsdl2Java, and it doesn't seem to be the shared/classes directory, 
>>>because that classloader finds it correctly.
>>>
>>>It seems that there is another classloader in the middle, between the one 
>>>for shared and the one for my WebApp that needs to know where to get 
>>>these classes from, but where? ... I tried common and server.... no luck 
>>>!!!
>>>
>>>HELP PLEASE !!!
>>>Thanks in advance,
>>>--Luis R.
>>>
>>>>From: Roberto Belardo <ro...@email.it>
>>>>Reply-To: axis-user@ws.apache.org
>>>>To: axis-user@ws.apache.org
>>>>Subject: Re: Where to put Amazon Stub classes
>>>>Date: Tue, 18 Jul 2006 10:36:40 +0200
>>>>
>>>>Those are all the experiments i did to solve this damned problem:
>>>>
>>>>* Put the Amazon stub classes in a jar in the classpath of windows:
>>>>The source code of the web service will compile, and you will be
>>>>able to correctly deploy it. But when you will try to acces it
>>>>from a client, the first try to call AWSserviceLocator( ) will
>>>>cause the exception.
>>>>* Put the Amazon stub classes in a jar in the
>>>>TOMCAT/webapps/AXIS/WEB-INF/lib directory: Axis will not start.
>>>>You will get a 404 error, and i don't know why.
>>>>* Put the Amazon stub classes in the
>>>>TOMCAT/webapps/AXIS/WEB-INF/classes directory: Nothing change from
>>>>the first point.
>>>>* Put the Amazon stub classes in the TOMCAT/shared/lib directory: :
>>>>Nothing change from the first point.
>>>>* Put the Amazon stub classes in the same jar of the web service i
>>>>try to deploy and use: I put this jar containing Amazon stub
>>>>package, my ws sources, my ws stub classes in
>>>>TOMCAT/webapps/AXIS/WEB-INF/lib directory. I can deploy it but
>>>>nothing change from the first point.
>>>>
>>>>I really finish my ideas to solve this problem. Is it possible that no 
>>>>one had never try to use Amazon in Axis? I wrote on Amazon forum, Nabble 
>>>>Axis forum, Java forum but with no succes.
>>>>I hope we find the solution :-(
>>>>Roberto.
>>>>
>>>>Luis Rivera ha scritto:
>>>>>
>>>>>Roberto,
>>>>>
>>>>>I don't know the answer, but I am having the same problem. Same 
>>>>>exception but with a slightly different setup. I have a class which 
>>>>>will use a JNI library, which according to the documentation should be 
>>>>>place in the shared/classes directory. So I did and I get the dreaded 
>>>>>java.lang.reflect.InvocationTargetException, which I believe is a class 
>>>>>loader problem. However, I have tried to solve this placing it in the 
>>>>>common/classes, server/classes and I get the same result.
>>>>>
>>>>>I have searched the web for solutions, some people say that it is a 
>>>>>classpath problem, but nobody seems to let you know where exactly you 
>>>>>set this so that the correct class loader finds the class (assuming I 
>>>>>am right and it is a classloader problem).
>>>>>
>>>>>Any of these AXIS gurus have had a similar setup/problem and have a 
>>>>>solution at hand?
>>>>>
>>>>>Thanks in advance,
>>>>>--Luis R.
>>>>>
>>>>>
>>>>>>From: Roberto Belardo <ro...@email.it>
>>>>>>Reply-To: axis-user@ws.apache.org
>>>>>>To: axis-user@ws.apache.org
>>>>>>Subject: Re: Where to put Amazon Stub classes
>>>>>>Date: Mon, 17 Jul 2006 14:58:15 +0200
>>>>>>
>>>>>>But if i put those stub files in a jar under the WEB-INF/lib Axis 
>>>>>>cannot start.
>>>>>>My question begin: Can i invoke a web service on axis that will invoke 
>>>>>>with some stubs the service of amazon? If yes, why i'm still getting 
>>>>>>this exception?
>>>>>>
>>>>>>Martin Gainty ha scritto:
>>>>>>>Buon Giorno Roberto-
>>>>>>>
>>>>>>>place jars in %TOMCAT_HOME%/webapps/axis/WEB-INF/lib
>>>>>>>
>>>>>>>OR
>>>>>>>
>>>>>>>place class files in %TOMCAT_HOME%/webapps/axis/WEB-INF/classes
>>>>>>>
>>>>>>>Molte Grazie,
>>>>>>>Martin --
>>>>>>>*********************************************************************
>>>>>>>
>>>>>>>This email message and any files transmitted with it contain 
>>>>>>>confidential
>>>>>>>information intended only for the person(s) to whom this email 
>>>>>>>message is
>>>>>>>addressed. If you have received this email message in error, please 
>>>>>>>notify
>>>>>>>the sender immediately by telephone or email and destroy the original
>>>>>>>message without making a copy. Thank you.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>----- Original Message ----- From: "Roberto Belardo" 
>>>>>>><ba...@yahoo.it>
>>>>>>>To: <ax...@ws.apache.org>
>>>>>>>Sent: Monday, July 17, 2006 6:07 AM
>>>>>>>Subject: Where to put Amazon Stub classes
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>Hi all,
>>>>>>>>i have big problem. I'm trying to develop a web service that will do 
>>>>>>>>simply
>>>>>>>>a search using amazon ws, and i want acces my service from a java 
>>>>>>>>client. So
>>>>>>>>i put my web service jar in AXIS-HOME/WEB-INF/lib directory. But 
>>>>>>>>here come
>>>>>>>>the problems:
>>>>>>>>Where i have to put Amazon stub classes obtained from the amazon 
>>>>>>>>wsdl file?
>>>>>>>>In order to compile my java files for my web service, i create a jar 
>>>>>>>>with
>>>>>>>>those stub files and putted it in the windows classpath. But it 
>>>>>>>>seems to me
>>>>>>>>that Axis cannot see them because every time i try to acces the web 
>>>>>>>>service
>>>>>>>>i got a java.lang.reflect.InvocationTargetException from Axis but i 
>>>>>>>>can use
>>>>>>>>ut if i simply remove the amazon code. If i put that jar with the 
>>>>>>>>amazon
>>>>>>>>stub in the AXIS-HOME/WEB-INF/lib directory Axis cannot start.I get 
>>>>>>>>an error
>>>>>>>>404.
>>>>>>>>Thanks in advance,
>>>>>>>>Roberto --
>>>>>>>>View this message in context: 
>>>>>>>>http://www.nabble.com/Where-to-put-Amazon-Stub-classes-tf1953881.html#a5358366
>>>>>>>>
>>>>>>>>
>>>>>>>>Sent from the Axis - User forum at Nabble.com.
>>>>>>>>
>>>>>>>>
>>>>>>>>---------------------------------------------------------------------
>>>>>>>>
>>>>>>>>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>>>>>>>For additional commands, e-mail: axis-user-help@ws.apache.org
>>>>>>>>
>>>>>>>>"wÚ®f³ᅵᅵ�4à 
>>>>>>>>÷�]xçᅵŜ�­7�T.z�hᅵë,j"¢�Z¶ᅵ(ᅵ�ÚᅵV­¡�¥J+-zfᅵᅵ�¯ᅵ»¬4à 
>>>>>>>>÷�m§ÿð� Úw}¢t===
>>>>>>
>>>>>>--
>>>>>>--- This is a digital signature and it is not a part of the message 
>>>>>>---
>>>>>>Per non lottare ci saranno sempre moltissimi pretesti in ogni epoca e 
>>>>>>in ogni circostanza, ma mai, senza lotta, si potrà avere la libertà 
>>>>>>.
>>>>>>Fidel Castro (introduzione a "Che Guevara, Diario in Bolivia")
>>>>>>
>>>>>>
>>>>>>
>>>>>>--
>>>>>>Email.it, the professional e-mail, gratis per te: 
>>>>>>http://www.email.it/f
>>>>>>
>>>>>>Sponsor:
>>>>>>Corso base ASP Gratis - Video con trucchi e segreti per imparare a 
>>>>>>creare il tuo Sito Web Dinamico con la tecnologia ASP
>>>>>>Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=5146&d=17-7
>>>>>>
>>>>>>---------------------------------------------------------------------
>>>>>>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>>>>>For additional commands, e-mail: axis-user-help@ws.apache.org
>>>>>>
>>>>>
>>>>>_________________________________________________________________
>>>>>Express yourself instantly with MSN Messenger! Download today - it's 
>>>>>FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>>>>>
>>>>>
>>>>>---------------------------------------------------------------------
>>>>>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>>>>For additional commands, e-mail: axis-user-help@ws.apache.org
>>>>>
>>>>>
>>>>>__________ Informazione NOD32 1.1454 (20060321) __________
>>>>>
>>>>>Questo messaggio Ãť stato controllato dal Sistema Antivirus NOD32
>>>>>http://www.nod32.it
>>>>>
>>>>>
>>>>>
>>>>
>>>>--
>>>>--- This is a digital signature and it is not a part of the message ---
>>>>Per non lottare ci saranno sempre moltissimi pretesti in ogni epoca e in 
>>>>ogni circostanza, ma mai, senza lotta, si potrà avere la libertà .
>>>>Fidel Castro (introduzione a "Che Guevara, Diario in Bolivia")
>>>>
>>>>
>>>>
>>>>--
>>>>Email.it, the professional e-mail, gratis per te: http://www.email.it/f
>>>>
>>>>Sponsor:
>>>>Refill srl dal 1993, il compatibile per stampante di qualit. 5000 
>>>>prodotti in pronta consegna, consegna in 24h, assistenza telefonica da 
>>>>tecnici specializzati
>>>>Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=5192&d=18-7
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>>>For additional commands, e-mail: axis-user-help@ws.apache.org
>>>>
>>>
>>>_________________________________________________________________
>>>FREE pop-up blocking with the new MSN Toolbar ďż˝ get it now! 
>>>http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>>For additional commands, e-mail: axis-user-help@ws.apache.org
>>>
>>
>>_________________________________________________________________
>>Don�t just search. Find. Check out the new MSN Search! 
>>http://search.msn.click-url.com/go/onm00200636ave/direct/01/
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>>__________ Informazione NOD32 1.1454 (20060321) __________
>>
>>Questo messaggio è stato controllato dal Sistema Antivirus NOD32
>>http://www.nod32.it
>>
>>
>>
>
>--
>--- This is a digital signature and it is not a part of the message ---
>Per non lottare ci saranno sempre moltissimi pretesti in ogni epoca e in 
>ogni circostanza, ma mai, senza lotta, si potrĂ  avere la libertĂ .
>Fidel Castro (introduzione a "Che Guevara, Diario in Bolivia")
>
>
>
>--
>Email.it, the professional e-mail, gratis per te: http://www.email.it/f
>
>Sponsor:
>Refill srl il paradiso della tua stampante - cartucce e toner compatibili, 
>inchiostri e accessori per la ricarica, carta speciale. Tutto a prezzi 
>scontatissimi!
>Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=5187&d=19-7
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>For additional commands, e-mail: axis-user-help@ws.apache.org
>

_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Where to put Amazon Stub classes

Posted by Roberto Belardo <ro...@email.it>.
How do you find that the problem is that? I really don't know how to 
advance from this InvocationTargetException...

Luis Rivera ha scritto:
>
>
> Roberto,
>
> I found my problem. It turned out not to be a Classloader problem, but 
> a NullPointer problem in the server, which I had not found because I 
> don't know how to debug my application in Tomcat and there is no 
> single log in the Tomcat directory that can give me a clue of what's 
> happening.
>
> Anyway, the configuration worked as I had it initially:
>
> 1) Stubs/Skeletons and all that had nothing to do with the JNI in 
> axis/WEB-INF/classes
>
> 2) The classes for the JNI interface/loading the jni library under 
> shared/classes
>
> I think if we can find a way to debug our application in the server, 
> we could get better light on what is happening and solve problems a 
> lot quicker :|.
>
> Anybody knows how to debug remotely axis/tomcat apps?
>
> --Luis R.
>
>> From: "Luis Rivera" <lu...@hotmail.com>
>> Reply-To: axis-user@ws.apache.org
>> To: axis-user@ws.apache.org
>> Subject: Re: Where to put Amazon Stub classes
>> Date: Tue, 18 Jul 2006 04:18:43 -0700
>>
>>
>> Roberto,
>>
>> I have not solved the problem, but managed to understand that the 
>> problem does is not where I drop the classes that will make the JNi 
>> calls. Dropping them inthe share directory results in the 
>> java.lang.reflect.InvocationTargetException at the Client side.
>>
>> 1) To be clear, the call to th e JNi wrapper (dropped in the 
>> share/classes directoy) is something like this:
>>
>> public void getCompany(CompanyHolder company, StringHolder result) {...}
>>
>> Making this call from the Stub implementation (dropped in 
>> axis/WEB-INF/classes directory) result in the mentioned exception. 
>> The clases ComapnyHolder is visible to both classes, and tthey are in 
>> axis/WEB-INF/classes and axis/WEB-INF/classes.
>>
>> 2) For the sake of testing, I created a new method without parameters
>>
>> public Stirng getCompany();
>>
>> and made the call just like in 1, and IT WORKED ... not Exception at 
>> the client side.
>>
>> 3) So, the problem seems to me is not wher eI drop the implementation 
>> classes, but the classes with all the types and hodlers generated 
>> with wsdl2Java, and it doesn't seem to be the shared/classes 
>> directory, because that classloader finds it correctly.
>>
>> It seems that there is another classloader in the middle, between the 
>> one for shared and the one for my WebApp that needs to know where to 
>> get these classes from, but where? ... I tried common and server.... 
>> no luck !!!
>>
>> HELP PLEASE !!!
>> Thanks in advance,
>> --Luis R.
>>
>>> From: Roberto Belardo <ro...@email.it>
>>> Reply-To: axis-user@ws.apache.org
>>> To: axis-user@ws.apache.org
>>> Subject: Re: Where to put Amazon Stub classes
>>> Date: Tue, 18 Jul 2006 10:36:40 +0200
>>>
>>> Those are all the experiments i did to solve this damned problem:
>>>
>>> * Put the Amazon stub classes in a jar in the classpath of windows:
>>> The source code of the web service will compile, and you will be
>>> able to correctly deploy it. But when you will try to acces it
>>> from a client, the first try to call AWSserviceLocator( ) will
>>> cause the exception.
>>> * Put the Amazon stub classes in a jar in the
>>> TOMCAT/webapps/AXIS/WEB-INF/lib directory: Axis will not start.
>>> You will get a 404 error, and i don't know why.
>>> * Put the Amazon stub classes in the
>>> TOMCAT/webapps/AXIS/WEB-INF/classes directory: Nothing change from
>>> the first point.
>>> * Put the Amazon stub classes in the TOMCAT/shared/lib directory: :
>>> Nothing change from the first point.
>>> * Put the Amazon stub classes in the same jar of the web service i
>>> try to deploy and use: I put this jar containing Amazon stub
>>> package, my ws sources, my ws stub classes in
>>> TOMCAT/webapps/AXIS/WEB-INF/lib directory. I can deploy it but
>>> nothing change from the first point.
>>>
>>> I really finish my ideas to solve this problem. Is it possible that 
>>> no one had never try to use Amazon in Axis? I wrote on Amazon forum, 
>>> Nabble Axis forum, Java forum but with no succes.
>>> I hope we find the solution :-(
>>> Roberto.
>>>
>>> Luis Rivera ha scritto:
>>>>
>>>> Roberto,
>>>>
>>>> I don't know the answer, but I am having the same problem. Same 
>>>> exception but with a slightly different setup. I have a class which 
>>>> will use a JNI library, which according to the documentation should 
>>>> be place in the shared/classes directory. So I did and I get the 
>>>> dreaded java.lang.reflect.InvocationTargetException, which I 
>>>> believe is a class loader problem. However, I have tried to solve 
>>>> this placing it in the common/classes, server/classes and I get the 
>>>> same result.
>>>>
>>>> I have searched the web for solutions, some people say that it is a 
>>>> classpath problem, but nobody seems to let you know where exactly 
>>>> you set this so that the correct class loader finds the class 
>>>> (assuming I am right and it is a classloader problem).
>>>>
>>>> Any of these AXIS gurus have had a similar setup/problem and have a 
>>>> solution at hand?
>>>>
>>>> Thanks in advance,
>>>> --Luis R.
>>>>
>>>>
>>>>> From: Roberto Belardo <ro...@email.it>
>>>>> Reply-To: axis-user@ws.apache.org
>>>>> To: axis-user@ws.apache.org
>>>>> Subject: Re: Where to put Amazon Stub classes
>>>>> Date: Mon, 17 Jul 2006 14:58:15 +0200
>>>>>
>>>>> But if i put those stub files in a jar under the WEB-INF/lib Axis 
>>>>> cannot start.
>>>>> My question begin: Can i invoke a web service on axis that will 
>>>>> invoke with some stubs the service of amazon? If yes, why i'm 
>>>>> still getting this exception?
>>>>>
>>>>> Martin Gainty ha scritto:
>>>>>> Buon Giorno Roberto-
>>>>>>
>>>>>> place jars in %TOMCAT_HOME%/webapps/axis/WEB-INF/lib
>>>>>>
>>>>>> OR
>>>>>>
>>>>>> place class files in %TOMCAT_HOME%/webapps/axis/WEB-INF/classes
>>>>>>
>>>>>> Molte Grazie,
>>>>>> Martin --
>>>>>> ********************************************************************* 
>>>>>>
>>>>>> This email message and any files transmitted with it contain 
>>>>>> confidential
>>>>>> information intended only for the person(s) to whom this email 
>>>>>> message is
>>>>>> addressed. If you have received this email message in error, 
>>>>>> please notify
>>>>>> the sender immediately by telephone or email and destroy the 
>>>>>> original
>>>>>> message without making a copy. Thank you.
>>>>>>
>>>>>>
>>>>>>
>>>>>> ----- Original Message ----- From: "Roberto Belardo" 
>>>>>> <ba...@yahoo.it>
>>>>>> To: <ax...@ws.apache.org>
>>>>>> Sent: Monday, July 17, 2006 6:07 AM
>>>>>> Subject: Where to put Amazon Stub classes
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Hi all,
>>>>>>> i have big problem. I'm trying to develop a web service that 
>>>>>>> will do simply
>>>>>>> a search using amazon ws, and i want acces my service from a 
>>>>>>> java client. So
>>>>>>> i put my web service jar in AXIS-HOME/WEB-INF/lib directory. But 
>>>>>>> here come
>>>>>>> the problems:
>>>>>>> Where i have to put Amazon stub classes obtained from the amazon 
>>>>>>> wsdl file?
>>>>>>> In order to compile my java files for my web service, i create a 
>>>>>>> jar with
>>>>>>> those stub files and putted it in the windows classpath. But it 
>>>>>>> seems to me
>>>>>>> that Axis cannot see them because every time i try to acces the 
>>>>>>> web service
>>>>>>> i got a java.lang.reflect.InvocationTargetException from Axis 
>>>>>>> but i can use
>>>>>>> ut if i simply remove the amazon code. If i put that jar with 
>>>>>>> the amazon
>>>>>>> stub in the AXIS-HOME/WEB-INF/lib directory Axis cannot start.I 
>>>>>>> get an error
>>>>>>> 404.
>>>>>>> Thanks in advance,
>>>>>>> Roberto --
>>>>>>> View this message in context: 
>>>>>>> http://www.nabble.com/Where-to-put-Amazon-Stub-classes-tf1953881.html#a5358366 
>>>>>>>
>>>>>>>
>>>>>>> Sent from the Axis - User forum at Nabble.com.
>>>>>>>
>>>>>>>
>>>>>>> --------------------------------------------------------------------- 
>>>>>>>
>>>>>>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>>>>>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>>>>>>
>>>>>>> "wÚ®f³ᅵᅵ�4à 
>>>>>>> ÷�]xçᅵŜ�­7�T.z�hᅵë,j"¢�Z¶ᅵ(ᅵ�ÚᅵV­¡�¥J+-zfᅵᅵ�¯ᅵ»¬4à 
>>>>>>> ÷�m§ÿð� Úw}¢t===
>>>>>
>>>>> -- 
>>>>> --- This is a digital signature and it is not a part of the 
>>>>> message ---
>>>>> Per non lottare ci saranno sempre moltissimi pretesti in ogni 
>>>>> epoca e in ogni circostanza, ma mai, senza lotta, si potrà avere 
>>>>> la libertà .
>>>>> Fidel Castro (introduzione a "Che Guevara, Diario in Bolivia")
>>>>>
>>>>>
>>>>>
>>>>> -- 
>>>>> Email.it, the professional e-mail, gratis per te: 
>>>>> http://www.email.it/f
>>>>>
>>>>> Sponsor:
>>>>> Corso base ASP Gratis - Video con trucchi e segreti per imparare a 
>>>>> creare il tuo Sito Web Dinamico con la tecnologia ASP
>>>>> Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=5146&d=17-7
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>>>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>>>>
>>>>
>>>> _________________________________________________________________
>>>> Express yourself instantly with MSN Messenger! Download today - 
>>>> it's FREE! 
>>>> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>>>
>>>>
>>>> __________ Informazione NOD32 1.1454 (20060321) __________
>>>>
>>>> Questo messaggio Ú stato controllato dal Sistema Antivirus NOD32
>>>> http://www.nod32.it
>>>>
>>>>
>>>>
>>>
>>> -- 
>>> --- This is a digital signature and it is not a part of the message ---
>>> Per non lottare ci saranno sempre moltissimi pretesti in ogni epoca 
>>> e in ogni circostanza, ma mai, senza lotta, si potrà avere la libertà .
>>> Fidel Castro (introduzione a "Che Guevara, Diario in Bolivia")
>>>
>>>
>>>
>>> -- 
>>> Email.it, the professional e-mail, gratis per te: http://www.email.it/f
>>>
>>> Sponsor:
>>> Refill srl dal 1993, il compatibile per stampante di qualit. 5000 
>>> prodotti in pronta consegna, consegna in 24h, assistenza telefonica 
>>> da tecnici specializzati
>>> Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=5192&d=18-7
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>>
>>
>> _________________________________________________________________
>> FREE pop-up blocking with the new MSN Toolbar � get it now! 
>> http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>
> _________________________________________________________________
> Don�t just search. Find. Check out the new MSN Search! 
> http://search.msn.click-url.com/go/onm00200636ave/direct/01/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
> __________ Informazione NOD32 1.1454 (20060321) __________
>
> Questo messaggio è stato controllato dal Sistema Antivirus NOD32
> http://www.nod32.it
>
>
>

-- 
--- This is a digital signature and it is not a part of the message ---
Per non lottare ci saranno sempre moltissimi pretesti in ogni epoca e in ogni circostanza, ma mai, senza lotta, si potrà avere la libertà.
Fidel Castro (introduzione a "Che Guevara, Diario in Bolivia")

 
 
 --
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 
 Sponsor:
 Refill srl il paradiso della tua stampante - cartucce e toner compatibili, inchiostri e accessori per la ricarica, carta speciale. Tutto a prezzi scontatissimi!
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=5187&d=19-7

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Where to put Amazon Stub classes

Posted by Luis Rivera <lu...@hotmail.com>.

    Roberto,

I found my problem. It turned out not to be a Classloader problem, but a 
NullPointer problem in the server, which I had not found because I don't 
know how to debug my application in Tomcat and there is no single log in the 
Tomcat directory that can give me a clue of what's happening.

Anyway, the configuration worked as I had it initially:

1) Stubs/Skeletons and all that had nothing to do with the JNI in 
axis/WEB-INF/classes

2) The classes for the JNI interface/loading the jni library under 
shared/classes

I think if we can find a way to debug our application in the server, we 
could get better light on what is happening and solve problems a lot quicker 
:|.

Anybody knows how to debug remotely axis/tomcat apps?

   --Luis R.

>From: "Luis Rivera" <lu...@hotmail.com>
>Reply-To: axis-user@ws.apache.org
>To: axis-user@ws.apache.org
>Subject: Re: Where to put Amazon Stub classes
>Date: Tue, 18 Jul 2006 04:18:43 -0700
>
>
>   Roberto,
>
>I have not solved the problem, but managed to understand that the problem 
>does is not where I drop the classes that will make the JNi calls. Dropping 
>them inthe share directory results in the 
>java.lang.reflect.InvocationTargetException at the Client side.
>
>1) To be clear, the call to th e JNi wrapper (dropped in the share/classes 
>directoy) is something like this:
>
>public void getCompany(CompanyHolder company, StringHolder result) {...}
>
>Making this call from the Stub implementation (dropped in 
>axis/WEB-INF/classes directory) result in the mentioned exception. The 
>clases ComapnyHolder is visible to both classes, and tthey are in 
>axis/WEB-INF/classes and axis/WEB-INF/classes.
>
>2) For the sake of testing, I created a new method without parameters
>
>public Stirng getCompany();
>
>and made the call just like in 1, and IT WORKED ... not Exception at the 
>client side.
>
>3) So, the problem seems to me is not wher eI drop the implementation 
>classes, but the classes with all the types and hodlers generated with 
>wsdl2Java, and it doesn't seem to be the shared/classes directory, because 
>that classloader finds it correctly.
>
>It seems that there is another classloader in the middle, between the one 
>for shared and the one for my WebApp that needs to know where to get these 
>classes from, but where? ... I tried common and server.... no luck !!!
>
>   HELP PLEASE !!!
>   Thanks in advance,
>   --Luis R.
>
>>From: Roberto Belardo <ro...@email.it>
>>Reply-To: axis-user@ws.apache.org
>>To: axis-user@ws.apache.org
>>Subject: Re: Where to put Amazon Stub classes
>>Date: Tue, 18 Jul 2006 10:36:40 +0200
>>
>>Those are all the experiments i did to solve this damned problem:
>>
>>    * Put the Amazon stub classes in a jar in the classpath of windows:
>>      The source code of the web service will compile, and you will be
>>      able to correctly deploy it. But when you will try to acces it
>>      from a client, the first try to call AWSserviceLocator( ) will
>>      cause the exception.
>>    * Put the Amazon stub classes in a jar in the
>>      TOMCAT/webapps/AXIS/WEB-INF/lib directory: Axis will not start.
>>      You will get a 404 error, and i don't know why.
>>    * Put the Amazon stub classes in the
>>      TOMCAT/webapps/AXIS/WEB-INF/classes directory: Nothing change from
>>      the first point.
>>    * Put the Amazon stub classes in the TOMCAT/shared/lib directory: :
>>      Nothing change from the first point.
>>    * Put the Amazon stub classes in the same jar of the web service i
>>      try to deploy and use: I put this jar containing Amazon stub
>>      package, my ws sources, my ws stub classes in
>>      TOMCAT/webapps/AXIS/WEB-INF/lib directory. I can deploy it but
>>      nothing change from the first point.
>>
>>I really finish my ideas to solve this problem. Is it possible that no one 
>>had never try to use Amazon in Axis? I wrote on Amazon forum, Nabble Axis 
>>forum, Java forum but with no succes.
>>I hope we find the solution :-(
>>Roberto.
>>
>>Luis Rivera ha scritto:
>>>
>>>Roberto,
>>>
>>>I don't know the answer, but I am having the same problem. Same exception 
>>>but with a slightly different setup. I have a class which will use a JNI 
>>>library, which according to the documentation should be place in the 
>>>shared/classes directory. So I did and I get the dreaded 
>>>java.lang.reflect.InvocationTargetException, which I believe is a class 
>>>loader problem. However, I have tried to solve this placing it in the 
>>>common/classes, server/classes and I get the same result.
>>>
>>>I have searched the web for solutions, some people say that it is a 
>>>classpath problem, but nobody seems to let you know where exactly you set 
>>>this so that the correct class loader finds the class (assuming I am 
>>>right and it is a classloader problem).
>>>
>>>Any of these AXIS gurus have had a similar setup/problem and have a 
>>>solution at hand?
>>>
>>>Thanks in advance,
>>>--Luis R.
>>>
>>>
>>>>From: Roberto Belardo <ro...@email.it>
>>>>Reply-To: axis-user@ws.apache.org
>>>>To: axis-user@ws.apache.org
>>>>Subject: Re: Where to put Amazon Stub classes
>>>>Date: Mon, 17 Jul 2006 14:58:15 +0200
>>>>
>>>>But if i put those stub files in a jar under the WEB-INF/lib Axis cannot 
>>>>start.
>>>>My question begin: Can i invoke a web service on axis that will invoke 
>>>>with some stubs the service of amazon? If yes, why i'm still getting 
>>>>this exception?
>>>>
>>>>Martin Gainty ha scritto:
>>>>>Buon Giorno Roberto-
>>>>>
>>>>>place jars in %TOMCAT_HOME%/webapps/axis/WEB-INF/lib
>>>>>
>>>>>OR
>>>>>
>>>>>place class files in %TOMCAT_HOME%/webapps/axis/WEB-INF/classes
>>>>>
>>>>>Molte Grazie,
>>>>>Martin --
>>>>>*********************************************************************
>>>>>This email message and any files transmitted with it contain 
>>>>>confidential
>>>>>information intended only for the person(s) to whom this email message 
>>>>>is
>>>>>addressed. If you have received this email message in error, please 
>>>>>notify
>>>>>the sender immediately by telephone or email and destroy the original
>>>>>message without making a copy. Thank you.
>>>>>
>>>>>
>>>>>
>>>>>----- Original Message ----- From: "Roberto Belardo" 
>>>>><ba...@yahoo.it>
>>>>>To: <ax...@ws.apache.org>
>>>>>Sent: Monday, July 17, 2006 6:07 AM
>>>>>Subject: Where to put Amazon Stub classes
>>>>>
>>>>>
>>>>>
>>>>>>Hi all,
>>>>>>i have big problem. I'm trying to develop a web service that will do 
>>>>>>simply
>>>>>>a search using amazon ws, and i want acces my service from a java 
>>>>>>client. So
>>>>>>i put my web service jar in AXIS-HOME/WEB-INF/lib directory. But here 
>>>>>>come
>>>>>>the problems:
>>>>>>Where i have to put Amazon stub classes obtained from the amazon wsdl 
>>>>>>file?
>>>>>>In order to compile my java files for my web service, i create a jar 
>>>>>>with
>>>>>>those stub files and putted it in the windows classpath. But it seems 
>>>>>>to me
>>>>>>that Axis cannot see them because every time i try to acces the web 
>>>>>>service
>>>>>>i got a java.lang.reflect.InvocationTargetException from Axis but i 
>>>>>>can use
>>>>>>ut if i simply remove the amazon code. If i put that jar with the 
>>>>>>amazon
>>>>>>stub in the AXIS-HOME/WEB-INF/lib directory Axis cannot start.I get an 
>>>>>>error
>>>>>>404.
>>>>>>Thanks in advance,
>>>>>>Roberto --
>>>>>>View this message in context: 
>>>>>>http://www.nabble.com/Where-to-put-Amazon-Stub-classes-tf1953881.html#a5358366
>>>>>>
>>>>>>Sent from the Axis - User forum at Nabble.com.
>>>>>>
>>>>>>
>>>>>>---------------------------------------------------------------------
>>>>>>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>>>>>For additional commands, e-mail: axis-user-help@ws.apache.org
>>>>>>
>>>>>>"wè®f³��Þ4à 
>>>>>>÷Û]xç�ŽÓ­7ÛT.zËh�ë,j"¢ËZ¶�(�Úè�V­¡Ö¥J+-zf��د�»¬4à 
>>>>>>÷Úm§ÿðà èw}¢t===
>>>>
>>>>--
>>>>--- This is a digital signature and it is not a part of the message ---
>>>>Per non lottare ci saranno sempre moltissimi pretesti in ogni epoca e in 
>>>>ogni circostanza, ma mai, senza lotta, si potrĂ  avere la libertĂ .
>>>>Fidel Castro (introduzione a "Che Guevara, Diario in Bolivia")
>>>>
>>>>
>>>>
>>>>--
>>>>Email.it, the professional e-mail, gratis per te: http://www.email.it/f
>>>>
>>>>Sponsor:
>>>>Corso base ASP Gratis - Video con trucchi e segreti per imparare a 
>>>>creare il tuo Sito Web Dinamico con la tecnologia ASP
>>>>Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=5146&d=17-7
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>>>For additional commands, e-mail: axis-user-help@ws.apache.org
>>>>
>>>
>>>_________________________________________________________________
>>>Express yourself instantly with MSN Messenger! Download today - it's 
>>>FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>>For additional commands, e-mail: axis-user-help@ws.apache.org
>>>
>>>
>>>__________ Informazione NOD32 1.1454 (20060321) __________
>>>
>>>Questo messaggio è stato controllato dal Sistema Antivirus NOD32
>>>http://www.nod32.it
>>>
>>>
>>>
>>
>>--
>>--- This is a digital signature and it is not a part of the message ---
>>Per non lottare ci saranno sempre moltissimi pretesti in ogni epoca e in 
>>ogni circostanza, ma mai, senza lotta, si potrĂ  avere la libertĂ .
>>Fidel Castro (introduzione a "Che Guevara, Diario in Bolivia")
>>
>>
>>
>>--
>>Email.it, the professional e-mail, gratis per te: http://www.email.it/f
>>
>>Sponsor:
>>Refill srl dal 1993, il compatibile per stampante di qualit. 5000 prodotti 
>>in pronta consegna, consegna in 24h, assistenza telefonica da tecnici 
>>specializzati
>>Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=5192&d=18-7
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>
>_________________________________________________________________
>FREE pop-up blocking with the new MSN Toolbar – get it now! 
>http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>For additional commands, e-mail: axis-user-help@ws.apache.org
>

_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Where to put Amazon Stub classes

Posted by Luis Rivera <lu...@hotmail.com>.
   Roberto,

I have not solved the problem, but managed to understand that the problem 
does is not where I drop the classes that will make the JNi calls. Dropping 
them inthe share directory results in the 
java.lang.reflect.InvocationTargetException at the Client side.

1) To be clear, the call to th e JNi wrapper (dropped in the share/classes 
directoy) is something like this:

public void getCompany(CompanyHolder company, StringHolder result) {...}

Making this call from the Stub implementation (dropped in 
axis/WEB-INF/classes directory) result in the mentioned exception. The 
clases ComapnyHolder is visible to both classes, and tthey are in 
axis/WEB-INF/classes and axis/WEB-INF/classes.

2) For the sake of testing, I created a new method without parameters

public Stirng getCompany();

and made the call just like in 1, and IT WORKED ... not Exception at the 
client side.

3) So, the problem seems to me is not wher eI drop the implementation 
classes, but the classes with all the types and hodlers generated with 
wsdl2Java, and it doesn't seem to be the shared/classes directory, because 
that classloader finds it correctly.

It seems that there is another classloader in the middle, between the one 
for shared and the one for my WebApp that needs to know where to get these 
classes from, but where? ... I tried common and server.... no luck !!!

   HELP PLEASE !!!
   Thanks in advance,
   --Luis R.

>From: Roberto Belardo <ro...@email.it>
>Reply-To: axis-user@ws.apache.org
>To: axis-user@ws.apache.org
>Subject: Re: Where to put Amazon Stub classes
>Date: Tue, 18 Jul 2006 10:36:40 +0200
>
>Those are all the experiments i did to solve this damned problem:
>
>    * Put the Amazon stub classes in a jar in the classpath of windows:
>      The source code of the web service will compile, and you will be
>      able to correctly deploy it. But when you will try to acces it
>      from a client, the first try to call AWSserviceLocator( ) will
>      cause the exception.
>    * Put the Amazon stub classes in a jar in the
>      TOMCAT/webapps/AXIS/WEB-INF/lib directory: Axis will not start.
>      You will get a 404 error, and i don't know why.
>    * Put the Amazon stub classes in the
>      TOMCAT/webapps/AXIS/WEB-INF/classes directory: Nothing change from
>      the first point.
>    * Put the Amazon stub classes in the TOMCAT/shared/lib directory: :
>      Nothing change from the first point.
>    * Put the Amazon stub classes in the same jar of the web service i
>      try to deploy and use: I put this jar containing Amazon stub
>      package, my ws sources, my ws stub classes in
>      TOMCAT/webapps/AXIS/WEB-INF/lib directory. I can deploy it but
>      nothing change from the first point.
>
>I really finish my ideas to solve this problem. Is it possible that no one 
>had never try to use Amazon in Axis? I wrote on Amazon forum, Nabble Axis 
>forum, Java forum but with no succes.
>I hope we find the solution :-(
>Roberto.
>
>Luis Rivera ha scritto:
>>
>>Roberto,
>>
>>I don't know the answer, but I am having the same problem. Same exception 
>>but with a slightly different setup. I have a class which will use a JNI 
>>library, which according to the documentation should be place in the 
>>shared/classes directory. So I did and I get the dreaded 
>>java.lang.reflect.InvocationTargetException, which I believe is a class 
>>loader problem. However, I have tried to solve this placing it in the 
>>common/classes, server/classes and I get the same result.
>>
>>I have searched the web for solutions, some people say that it is a 
>>classpath problem, but nobody seems to let you know where exactly you set 
>>this so that the correct class loader finds the class (assuming I am right 
>>and it is a classloader problem).
>>
>>Any of these AXIS gurus have had a similar setup/problem and have a 
>>solution at hand?
>>
>>Thanks in advance,
>>--Luis R.
>>
>>
>>>From: Roberto Belardo <ro...@email.it>
>>>Reply-To: axis-user@ws.apache.org
>>>To: axis-user@ws.apache.org
>>>Subject: Re: Where to put Amazon Stub classes
>>>Date: Mon, 17 Jul 2006 14:58:15 +0200
>>>
>>>But if i put those stub files in a jar under the WEB-INF/lib Axis cannot 
>>>start.
>>>My question begin: Can i invoke a web service on axis that will invoke 
>>>with some stubs the service of amazon? If yes, why i'm still getting this 
>>>exception?
>>>
>>>Martin Gainty ha scritto:
>>>>Buon Giorno Roberto-
>>>>
>>>>place jars in %TOMCAT_HOME%/webapps/axis/WEB-INF/lib
>>>>
>>>>OR
>>>>
>>>>place class files in %TOMCAT_HOME%/webapps/axis/WEB-INF/classes
>>>>
>>>>Molte Grazie,
>>>>Martin --
>>>>*********************************************************************
>>>>This email message and any files transmitted with it contain 
>>>>confidential
>>>>information intended only for the person(s) to whom this email message 
>>>>is
>>>>addressed. If you have received this email message in error, please 
>>>>notify
>>>>the sender immediately by telephone or email and destroy the original
>>>>message without making a copy. Thank you.
>>>>
>>>>
>>>>
>>>>----- Original Message ----- From: "Roberto Belardo" 
>>>><ba...@yahoo.it>
>>>>To: <ax...@ws.apache.org>
>>>>Sent: Monday, July 17, 2006 6:07 AM
>>>>Subject: Where to put Amazon Stub classes
>>>>
>>>>
>>>>
>>>>>Hi all,
>>>>>i have big problem. I'm trying to develop a web service that will do 
>>>>>simply
>>>>>a search using amazon ws, and i want acces my service from a java 
>>>>>client. So
>>>>>i put my web service jar in AXIS-HOME/WEB-INF/lib directory. But here 
>>>>>come
>>>>>the problems:
>>>>>Where i have to put Amazon stub classes obtained from the amazon wsdl 
>>>>>file?
>>>>>In order to compile my java files for my web service, i create a jar 
>>>>>with
>>>>>those stub files and putted it in the windows classpath. But it seems 
>>>>>to me
>>>>>that Axis cannot see them because every time i try to acces the web 
>>>>>service
>>>>>i got a java.lang.reflect.InvocationTargetException from Axis but i can 
>>>>>use
>>>>>ut if i simply remove the amazon code. If i put that jar with the 
>>>>>amazon
>>>>>stub in the AXIS-HOME/WEB-INF/lib directory Axis cannot start.I get an 
>>>>>error
>>>>>404.
>>>>>Thanks in advance,
>>>>>Roberto --
>>>>>View this message in context: 
>>>>>http://www.nabble.com/Where-to-put-Amazon-Stub-classes-tf1953881.html#a5358366
>>>>>
>>>>>Sent from the Axis - User forum at Nabble.com.
>>>>>
>>>>>
>>>>>---------------------------------------------------------------------
>>>>>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>>>>For additional commands, e-mail: axis-user-help@ws.apache.org
>>>>>
>>>>>"wè®f³��Þ4à 
>>>>>÷Û]xç�ŽÓ­7ÛT.zËh�ë,j"¢ËZ¶�(�Úè�V­¡Ö¥J+-zf��د�»¬4à 
>>>>>÷Úm§ÿðà èw}¢t===
>>>
>>>--
>>>--- This is a digital signature and it is not a part of the message ---
>>>Per non lottare ci saranno sempre moltissimi pretesti in ogni epoca e in 
>>>ogni circostanza, ma mai, senza lotta, si potrĂ  avere la libertĂ .
>>>Fidel Castro (introduzione a "Che Guevara, Diario in Bolivia")
>>>
>>>
>>>
>>>--
>>>Email.it, the professional e-mail, gratis per te: http://www.email.it/f
>>>
>>>Sponsor:
>>>Corso base ASP Gratis - Video con trucchi e segreti per imparare a creare 
>>>il tuo Sito Web Dinamico con la tecnologia ASP
>>>Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=5146&d=17-7
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>>For additional commands, e-mail: axis-user-help@ws.apache.org
>>>
>>
>>_________________________________________________________________
>>Express yourself instantly with MSN Messenger! Download today - it's FREE! 
>>http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>>__________ Informazione NOD32 1.1454 (20060321) __________
>>
>>Questo messaggio è stato controllato dal Sistema Antivirus NOD32
>>http://www.nod32.it
>>
>>
>>
>
>--
>--- This is a digital signature and it is not a part of the message ---
>Per non lottare ci saranno sempre moltissimi pretesti in ogni epoca e in 
>ogni circostanza, ma mai, senza lotta, si potrĂ  avere la libertĂ .
>Fidel Castro (introduzione a "Che Guevara, Diario in Bolivia")
>
>
>
>--
>Email.it, the professional e-mail, gratis per te: http://www.email.it/f
>
>Sponsor:
>Refill srl dal 1993, il compatibile per stampante di qualit. 5000 prodotti 
>in pronta consegna, consegna in 24h, assistenza telefonica da tecnici 
>specializzati
>Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=5192&d=18-7
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>For additional commands, e-mail: axis-user-help@ws.apache.org
>

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar – get it now! 
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Where to put Amazon Stub classes

Posted by Roberto Belardo <ro...@email.it>.
Those are all the experiments i did to solve this damned problem:

    * Put the Amazon stub classes in a jar in the classpath of windows:
      The source code of the web service will compile, and you will be
      able to correctly deploy it. But when you will try to acces it
      from a client, the first try to call AWSserviceLocator( ) will
      cause the exception.
    * Put the Amazon stub classes in a jar in the
      TOMCAT/webapps/AXIS/WEB-INF/lib directory: Axis will not start.
      You will get a 404 error, and i don't know why.
    * Put the Amazon stub classes in the
      TOMCAT/webapps/AXIS/WEB-INF/classes directory: Nothing change from
      the first point.
    * Put the Amazon stub classes in the TOMCAT/shared/lib directory: :
      Nothing change from the first point.
    * Put the Amazon stub classes in the same jar of the web service i
      try to deploy and use: I put this jar containing Amazon stub
      package, my ws sources, my ws stub classes in
      TOMCAT/webapps/AXIS/WEB-INF/lib directory. I can deploy it but
      nothing change from the first point.

I really finish my ideas to solve this problem. Is it possible that no 
one had never try to use Amazon in Axis? I wrote on Amazon forum, Nabble 
Axis forum, Java forum but with no succes.
I hope we find the solution :-(
Roberto.

Luis Rivera ha scritto:
>
> Roberto,
>
> I don't know the answer, but I am having the same problem. Same 
> exception but with a slightly different setup. I have a class which 
> will use a JNI library, which according to the documentation should be 
> place in the shared/classes directory. So I did and I get the dreaded 
> java.lang.reflect.InvocationTargetException, which I believe is a 
> class loader problem. However, I have tried to solve this placing it 
> in the common/classes, server/classes and I get the same result.
>
> I have searched the web for solutions, some people say that it is a 
> classpath problem, but nobody seems to let you know where exactly you 
> set this so that the correct class loader finds the class (assuming I 
> am right and it is a classloader problem).
>
> Any of these AXIS gurus have had a similar setup/problem and have a 
> solution at hand?
>
> Thanks in advance,
> --Luis R.
>
>
>> From: Roberto Belardo <ro...@email.it>
>> Reply-To: axis-user@ws.apache.org
>> To: axis-user@ws.apache.org
>> Subject: Re: Where to put Amazon Stub classes
>> Date: Mon, 17 Jul 2006 14:58:15 +0200
>>
>> But if i put those stub files in a jar under the WEB-INF/lib Axis 
>> cannot start.
>> My question begin: Can i invoke a web service on axis that will 
>> invoke with some stubs the service of amazon? If yes, why i'm still 
>> getting this exception?
>>
>> Martin Gainty ha scritto:
>>> Buon Giorno Roberto-
>>>
>>> place jars in %TOMCAT_HOME%/webapps/axis/WEB-INF/lib
>>>
>>> OR
>>>
>>> place class files in %TOMCAT_HOME%/webapps/axis/WEB-INF/classes
>>>
>>> Molte Grazie,
>>> Martin --
>>> *********************************************************************
>>> This email message and any files transmitted with it contain 
>>> confidential
>>> information intended only for the person(s) to whom this email 
>>> message is
>>> addressed. If you have received this email message in error, please 
>>> notify
>>> the sender immediately by telephone or email and destroy the original
>>> message without making a copy. Thank you.
>>>
>>>
>>>
>>> ----- Original Message ----- From: "Roberto Belardo" 
>>> <ba...@yahoo.it>
>>> To: <ax...@ws.apache.org>
>>> Sent: Monday, July 17, 2006 6:07 AM
>>> Subject: Where to put Amazon Stub classes
>>>
>>>
>>>
>>>> Hi all,
>>>> i have big problem. I'm trying to develop a web service that will 
>>>> do simply
>>>> a search using amazon ws, and i want acces my service from a java 
>>>> client. So
>>>> i put my web service jar in AXIS-HOME/WEB-INF/lib directory. But 
>>>> here come
>>>> the problems:
>>>> Where i have to put Amazon stub classes obtained from the amazon 
>>>> wsdl file?
>>>> In order to compile my java files for my web service, i create a 
>>>> jar with
>>>> those stub files and putted it in the windows classpath. But it 
>>>> seems to me
>>>> that Axis cannot see them because every time i try to acces the web 
>>>> service
>>>> i got a java.lang.reflect.InvocationTargetException from Axis but i 
>>>> can use
>>>> ut if i simply remove the amazon code. If i put that jar with the 
>>>> amazon
>>>> stub in the AXIS-HOME/WEB-INF/lib directory Axis cannot start.I get 
>>>> an error
>>>> 404.
>>>> Thanks in advance,
>>>> Roberto --
>>>> View this message in context: 
>>>> http://www.nabble.com/Where-to-put-Amazon-Stub-classes-tf1953881.html#a5358366 
>>>>
>>>> Sent from the Axis - User forum at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>>>
>>>> "wè®f³��Þ4à÷Û]xç�ŽÓ­7ÛT.zËh�ë,j"¢ËZ¶�(�Úè�V­¡Ö¥J+-zf��د�»¬4à÷Úm§ÿðà 
>>>> èw}¢t===
>>
>> -- 
>> --- This is a digital signature and it is not a part of the message ---
>> Per non lottare ci saranno sempre moltissimi pretesti in ogni epoca e 
>> in ogni circostanza, ma mai, senza lotta, si potrà avere la libertà.
>> Fidel Castro (introduzione a "Che Guevara, Diario in Bolivia")
>>
>>
>>
>> -- 
>> Email.it, the professional e-mail, gratis per te: http://www.email.it/f
>>
>> Sponsor:
>> Corso base ASP Gratis - Video con trucchi e segreti per imparare a 
>> creare il tuo Sito Web Dinamico con la tecnologia ASP
>> Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=5146&d=17-7
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today - it's 
> FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
> __________ Informazione NOD32 1.1454 (20060321) __________
>
> Questo messaggio è stato controllato dal Sistema Antivirus NOD32
> http://www.nod32.it
>
>
>

-- 
--- This is a digital signature and it is not a part of the message ---
Per non lottare ci saranno sempre moltissimi pretesti in ogni epoca e in ogni circostanza, ma mai, senza lotta, si potrà avere la libertà.
Fidel Castro (introduzione a "Che Guevara, Diario in Bolivia")

 
 
 --
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 
 Sponsor:
 Refill srl dal 1993, il compatibile per stampante di qualit�. 5000 prodotti in pronta consegna, consegna in 24h, assistenza telefonica da tecnici specializzati
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=5192&d=18-7

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Where to put Amazon Stub classes

Posted by Luis Rivera <lu...@hotmail.com>.
    Roberto,

I don't know the answer, but I am having the same problem. Same exception 
but with a slightly different setup. I have a class which will use a JNI 
library, which according to the documentation should be place in the 
shared/classes directory. So I did and I get the dreaded 
java.lang.reflect.InvocationTargetException, which I believe is a class 
loader problem. However, I have tried to solve this placing it in the 
common/classes, server/classes and I get the same result.

I have searched the web for solutions, some people say that it is a 
classpath problem, but nobody seems to let you know where exactly you set 
this so that the correct class loader finds the class (assuming I am right 
and it is a classloader problem).

Any of these AXIS gurus have had a similar setup/problem and have a solution 
at hand?

Thanks in advance,
--Luis R.


>From: Roberto Belardo <ro...@email.it>
>Reply-To: axis-user@ws.apache.org
>To: axis-user@ws.apache.org
>Subject: Re: Where to put Amazon Stub classes
>Date: Mon, 17 Jul 2006 14:58:15 +0200
>
>But if i put those stub files in a jar under the WEB-INF/lib Axis cannot 
>start.
>My question begin: Can i invoke a web service on axis that will invoke with 
>some stubs the service of amazon? If yes, why i'm still getting this 
>exception?
>
>Martin Gainty ha scritto:
>>Buon Giorno Roberto-
>>
>>place jars in %TOMCAT_HOME%/webapps/axis/WEB-INF/lib
>>
>>OR
>>
>>place class files in %TOMCAT_HOME%/webapps/axis/WEB-INF/classes
>>
>>Molte Grazie,
>>Martin --
>>*********************************************************************
>>This email message and any files transmitted with it contain confidential
>>information intended only for the person(s) to whom this email message is
>>addressed.  If you have received this email message in error, please 
>>notify
>>the sender immediately by telephone or email and destroy the original
>>message without making a copy.  Thank you.
>>
>>
>>
>>----- Original Message ----- From: "Roberto Belardo" 
>><ba...@yahoo.it>
>>To: <ax...@ws.apache.org>
>>Sent: Monday, July 17, 2006 6:07 AM
>>Subject: Where to put Amazon Stub classes
>>
>>
>>
>>>Hi all,
>>>i have big problem. I'm trying to develop a web service that will do 
>>>simply
>>>a search using amazon ws, and i want acces my service from a java client. 
>>>So
>>>i put my web service jar in AXIS-HOME/WEB-INF/lib directory. But here 
>>>come
>>>the problems:
>>>Where i have to put Amazon stub classes obtained from the amazon wsdl 
>>>file?
>>>In order to compile my java files for my web service, i create a jar with
>>>those stub files and putted it in the windows classpath. But it seems to 
>>>me
>>>that Axis cannot see them because every time i try to acces the web 
>>>service
>>>i got a java.lang.reflect.InvocationTargetException from Axis but i can 
>>>use
>>>ut if i simply remove the amazon code. If i put that jar with the amazon
>>>stub in the AXIS-HOME/WEB-INF/lib directory Axis cannot start.I get an 
>>>error
>>>404.
>>>Thanks in advance,
>>>Roberto --
>>>View this message in context: 
>>>http://www.nabble.com/Where-to-put-Amazon-Stub-classes-tf1953881.html#a5358366
>>>Sent from the Axis - User forum at Nabble.com.
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>>For additional commands, e-mail: axis-user-help@ws.apache.org
>>>
>>>"wčŽfłŠ‰Ţ4ŕ÷Ű]x獴ӭ7ŰT.zËh™ë,j"˘ËZś‡(žÚč–V­ĄÖĽJ+-zf€žŘŻŠťŹ4ŕ÷Úm§˙đĂ	čw}˘t===
>
>--
>--- This is a digital signature and it is not a part of the message ---
>Per non lottare ci saranno sempre moltissimi pretesti in ogni epoca e in 
>ogni circostanza, ma mai, senza lotta, si potrŕ avere la libertŕ.
>Fidel Castro (introduzione a "Che Guevara, Diario in Bolivia")
>
>
>
>--
>Email.it, the professional e-mail, gratis per te: http://www.email.it/f
>
>Sponsor:
>Corso base ASP Gratis - Video con trucchi e segreti per imparare a creare 
>il tuo Sito Web Dinamico con la tecnologia ASP
>Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=5146&d=17-7
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>For additional commands, e-mail: axis-user-help@ws.apache.org
>

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Where to put Amazon Stub classes

Posted by Roberto Belardo <ro...@email.it>.
But if i put those stub files in a jar under the WEB-INF/lib Axis cannot 
start.
My question begin: Can i invoke a web service on axis that will invoke 
with some stubs the service of amazon? If yes, why i'm still getting 
this exception?

Martin Gainty ha scritto:
> Buon Giorno Roberto-
>
> place jars in %TOMCAT_HOME%/webapps/axis/WEB-INF/lib
>
> OR 
>
> place class files in %TOMCAT_HOME%/webapps/axis/WEB-INF/classes
>
> Molte Grazie,
> Martin --
> *********************************************************************
> This email message and any files transmitted with it contain confidential
> information intended only for the person(s) to whom this email message is
> addressed.  If you have received this email message in error, please notify
> the sender immediately by telephone or email and destroy the original
> message without making a copy.  Thank you.
>
>
>
> ----- Original Message ----- 
> From: "Roberto Belardo" <ba...@yahoo.it>
> To: <ax...@ws.apache.org>
> Sent: Monday, July 17, 2006 6:07 AM
> Subject: Where to put Amazon Stub classes
>
>
>   
>> Hi all,
>> i have big problem. I'm trying to develop a web service that will do simply
>> a search using amazon ws, and i want acces my service from a java client. So
>> i put my web service jar in AXIS-HOME/WEB-INF/lib directory. But here come
>> the problems:
>> Where i have to put Amazon stub classes obtained from the amazon wsdl file?
>> In order to compile my java files for my web service, i create a jar with
>> those stub files and putted it in the windows classpath. But it seems to me
>> that Axis cannot see them because every time i try to acces the web service
>> i got a java.lang.reflect.InvocationTargetException from Axis but i can use
>> ut if i simply remove the amazon code. If i put that jar with the amazon
>> stub in the AXIS-HOME/WEB-INF/lib directory Axis cannot start.I get an error
>> 404.
>> Thanks in advance,
>> Roberto 
>> -- 
>> View this message in context: http://www.nabble.com/Where-to-put-Amazon-Stub-classes-tf1953881.html#a5358366
>> Sent from the Axis - User forum at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>> "w�f����4���]x獴ӭ7�T.z�h��,j"��Z��(���V��֥J+-zf��د���4���m����	�w}�t===

-- 
--- This is a digital signature and it is not a part of the message ---
Per non lottare ci saranno sempre moltissimi pretesti in ogni epoca e in ogni circostanza, ma mai, senza lotta, si potr� avere la libert�.
Fidel Castro (introduzione a "Che Guevara, Diario in Bolivia")

 
 
 --
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 
 Sponsor:
 Corso base ASP Gratis - Video con trucchi e segreti per imparare a creare il tuo Sito Web Dinamico con la tecnologia ASP
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=5146&d=17-7

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Where to put Amazon Stub classes

Posted by Martin Gainty <mg...@hotmail.com>.
Buon Giorno Roberto-

place jars in %TOMCAT_HOME%/webapps/axis/WEB-INF/lib

OR 

place class files in %TOMCAT_HOME%/webapps/axis/WEB-INF/classes

Molte Grazie,
Martin --
*********************************************************************
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



----- Original Message ----- 
From: "Roberto Belardo" <ba...@yahoo.it>
To: <ax...@ws.apache.org>
Sent: Monday, July 17, 2006 6:07 AM
Subject: Where to put Amazon Stub classes


> 
> Hi all,
> i have big problem. I'm trying to develop a web service that will do simply
> a search using amazon ws, and i want acces my service from a java client. So
> i put my web service jar in AXIS-HOME/WEB-INF/lib directory. But here come
> the problems:
> Where i have to put Amazon stub classes obtained from the amazon wsdl file?
> In order to compile my java files for my web service, i create a jar with
> those stub files and putted it in the windows classpath. But it seems to me
> that Axis cannot see them because every time i try to acces the web service
> i got a java.lang.reflect.InvocationTargetException from Axis but i can use
> ut if i simply remove the amazon code. If i put that jar with the amazon
> stub in the AXIS-HOME/WEB-INF/lib directory Axis cannot start.I get an error
> 404.
> Thanks in advance,
> Roberto 
> -- 
> View this message in context: http://www.nabble.com/Where-to-put-Amazon-Stub-classes-tf1953881.html#a5358366
> Sent from the Axis - User forum at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
>