axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roberto Belardo <roberto.bela...@email.it>
Subject Re: Where to put Amazon Stub classes
Date Wed, 19 Jul 2006 08:26:23 GMT
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" <luiggiil@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 <roberto.belardo@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 <roberto.belardo@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" 
>>>>>>> <backslash451@yahoo.it>
>>>>>>> To: <axis-user@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


Mime
View raw message