Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 9005 invoked from network); 19 Jul 2006 21:30:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 19 Jul 2006 21:30:14 -0000 Received: (qmail 69417 invoked by uid 500); 19 Jul 2006 21:30:00 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 69392 invoked by uid 500); 19 Jul 2006 21:30:00 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 69381 invoked by uid 99); 19 Jul 2006 21:30:00 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Jul 2006 14:30:00 -0700 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_10_20,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of luiggiilca@gmail.com designates 64.233.182.188 as permitted sender) Received: from [64.233.182.188] (HELO nf-out-0910.google.com) (64.233.182.188) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Jul 2006 14:29:59 -0700 Received: by nf-out-0910.google.com with SMTP id x4so381538nfb for ; Wed, 19 Jul 2006 14:29:37 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:references; b=cK8hfROFWKeOZKvhPQVXleNfPTMAum0lhqvU+C5ZhTL+28cew9Zm49lFc3bAw2Iltv5Twvvfnb9Ib/wCZFAQ7AHfGShXpoPiRCL7e6n7izZBasIVBeH0ef7/UMikMLI/prSaKiMSWMhVOgJQavxwI5lOHqgoxNqevC+OeK8U/OE= Received: by 10.48.242.9 with SMTP id p9mr2078514nfh; Wed, 19 Jul 2006 14:29:37 -0700 (PDT) Received: by 10.49.37.12 with HTTP; Wed, 19 Jul 2006 14:29:37 -0700 (PDT) Message-ID: Date: Wed, 19 Jul 2006 14:29:37 -0700 From: "Luis Rivera" Reply-To: luiggiIL@ieee.org To: "Propes, Barry L" Subject: Re: Tomcat 5.5/Axis 1.4 java.lang.reflect.InvocationTargetException Cc: "Tomcat Users List" In-Reply-To: <3A55348B50FD2A40AAA40ABA16C6B6D607F294D6@EXNJMB23.nam.nsroot.net> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_26218_23044522.1153344577596" References: <3A55348B50FD2A40AAA40ABA16C6B6D607F294D6@EXNJMB23.nam.nsroot.net> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_26218_23044522.1153344577596 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Barry and Tomcat/users/devs, I am hoping an axis/tomcat/dev/user 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. 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 write the questions here, in case a reader don't want to go through the whole explanation below them. Q1) 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? Q2) How do I turn on Logging at the debug level in Tomcat, or any kind of meaningful logging to figure out what is happening? Q3) Is there a way to enable remote debugging using Eclipse? ... I read that it is possible, but is there any configuration in Tomcat I need to change and does it include setting a port for it? 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(); } I would appreciate any kind of hint, Thanks in advance, --Luis R. On 7/18/06, Propes, Barry L wrote: > > none of the logs mention it? > I realize Tomcat does seem a bit bereft of info in the logs sometime. > Would it have been a case where it printed to the system console instead? > Mine does that sometimes, instead of (or in addition to) the log(s) and I > troubleshoot it that way. > > -----Original Message----- > From: Luis Rivera [mailto:luiggiilca@gmail.com] > Sent: Tuesday, July 18, 2006 5:00 PM > To: Tomcat Users List > Subject: Re: Tomcat 5.5/Axis 1.4 > java.lang.reflect.InvocationTargetException > > > Hi Shankar, > > Thanks a lot. I found my problem. It turned out not to be a Classloader > problem, but a NullPointer (THANKS TO TIM FOR THE HINT :) ) 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) Dropping the axis.jar in the WEB-INF/lib as you pointed out. > > 2) Stubs/Skeletons and all that had nothing to do with the JNI in > axis/WEB-INF/classes > > 3) The classes for the JNI interface/loading the jni library under > shared/classes > > I think if I 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 :|. > It's like driving blind right now :|. > > Anybody knows how to debug remotely axis/tomcat apps? > > --Luis R. > > On 7/18/06, Shankar Unni wrote: > > > > Luis Rivera wrote: > > > > > I have a web service which will JNI to access the application, which > > > according to the documentation should be placed in the shared/classes > > > directory. I did so and I got a dreaded > > > java.lang.reflect.InvocationTargetException, which I believe is a > class > > > loader problem. > > > > You need to put the Axis jar in the WEB-INF/lib of your webapp. It > > wasn't clear in the original message whether you'd done it like this. > > > > That's because the common classloader is the *parent* of your webapp's > > classloader, and thus can't see any classes that are in your webapp. So > > you can't put the Axis library there. > > > > Note: only axis.jar itself really needs to go into the webapp's > > WEB-INF/lib. The rest of the Axis jars (saaj.jar, etc.) can go into > > common/lib, if you have many webapps in the same Tomcat instance that > > use Axis. > > > > > > --------------------------------------------------------------------- > > To start a new topic, e-mail: users@tomcat.apache.org > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > > For additional commands, e-mail: users-help@tomcat.apache.org > > > > > ------=_Part_26218_23044522.1153344577596--