Good Morning Luis-

1)
I fed your WSDL into validator located here 
http://www.mgateway.com/scripts/mgwms32.dll?MGWLPN=EXTC&wlapp=wsdlValidator&eXtcCalledFrom=MGateway
so ..the good news is that the definition for companyInfo looks valid

2)
ClassLoader delegation-
Straight from the doc at
http://docs.sun.com/app/docs/doc/819-2556/6n4rap8qm?a=view

"Servlet specification recommends that the Web Classloader look in the local 
class loader before delegating to its parent. To make the Web Classloader 
follow the delegation model in the Servlet specification, set delegate="false" 
in the class-loader element of the sun-web.xml file. It's safe to do this only 
for a web module that does not interact with any other modules."
"The default value is delegate="true", which causes the Web Classloader to 
delegate in the same manner as the other classloaders. Use delegate="true" for 
a web application that accesses EJB components or that acts as a web service 
client or endpoint. For details about sun-web.xml, see The sun-web.xml File."

from the doc if your webapp is standalone set delegate = false
If it's accessing EJB components or is a webservice client and or endpoint 
delegate = true
I defer to the sun application server site for accuracy on configuration and 
installation details

3)
JNI:
I *assume* you are attempting to build and configure your own mod_jk worker?
http://tomcat.apache.org/connectors-doc/install/apache2.html
This is system related stuff which assumes you are backing up your current 
installation beforehand
and using Platform specific utilities (cl/gcc/iSeries) to essentially make your 
platform-specific binaries
The important point here is to use the platform specific 
install/configuration/compile scripts which are blesses by the platform's 
vendor-

HTH,
M-

*********************************************************************
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 
  To: Raju Balugu 
  Cc: Tomcat Users List 
  Sent: Monday, July 24, 2006 5:18 AM
  Subject: Re: java.lang.LinkageError: Class soap/xsd/CompanyInfo violates 
loader constraints



        Dear Raju and Martin,

  First of all, thanks a lot for the replies. I do appreciate it. I am 
including the WSDL so you can take a look if you have a chance. I will post it 
over the axis lists very soon. 

  Martin: 
  1) I don't think it is the WSDL, because as you could appreciate in the WSDL, 
it is defined. Also, if I have all the application inside 
webapps/axis/WEB-INF/classes, it works! But as soon as I take the class that 
load the JNI DLL to the common/classes or shared/classes directories, then I 
run into the trouble with the class loaders. First I noticed that the errors 
were due to classes I did not copy to the common directory (CompanyInfo), so I 
did and the error changed to what LinkageError. 

  2) Regarding the class loading model. I understand why it is recommended, but 
is it possible to change it? The reason I ask is because I found on the web an 
email from a guy with the same exception, but using  J2EE and he said that by 
setting the delegation to true in the sun-web.xml file, the problem was 
solved!!!

  3) Could you let me know which libraries are you talking about? The 
bootstrap.jar file under the TOMCAT_HOME/bin directory?

  Raju:

  I am using the common/classes, after migrating from the shared/classes 
directory, thinking that might solve the problem, but no luck. Both of those 
directories are defined for the common and shared loader respectively in the 
catalina.properties directory. Let me just try to illustrate what I am trying 
to do:

  CRLImpl.java: Entry point, file generated by WSDL2Java (inside 
webapps/axis/WEB-INF/classes)

       void getCompany(CompanyInfoHolder company, StringHolder result) 
       {
             crl.nada(company, result);
       }

  jniCRLimpl.java: jni wrapper that will load the crl.DLL library (inside 
common/classes)

       void nada(CompanyInfoHolder company, StringHolder result) 
       {
            company.value = new soap.xsd.CompanyInfo(); // The problem comes 
here !!!
            ....
       }

  This exact same code, works if all is located under 
webapps/axis/WEB-INF/classes, but as the TOMCAT documentation lets me know, I 
have to take the jniCRLimpl.java to the shared or common directory to prevent 
TOMCAT from trying to load my DLL more than once.

     Thanks again and in advance for any pointer you all can give me,
     --Luis R.


  On 7/23/06, Raju Balugu <[EMAIL PROTECTED]> wrote:
    Hi ,

    How you are loading the outside(which are not there in classpath) jars and 
classes in tomcat? try to load the outside jar and class files from the 
catalina.properties(/conf).It may solve ur problem?please let me know server 
configuration too. 

    Regards
    Raju

     
    On 7/24/06, Luis Rivera < [EMAIL PROTECTED]> wrote: 
        Dear Martin Gainty,

      I have posted this issue on the axis (devs and users) lists, without any 
      luck. I really thought it was because it was a tomcat issue, so I am 
posting 
      it here. The only thing I have not posted is my WSDL, which I will do, in
      both places. But in case I still have your attention, please let me know 
if
      you or somebody who reads this know the answer to these questions? 

      Q1) Does this mean this is an axis isseu?

      Q2) Is there a way to change the class loading policy in Tomcat? (I know
      that delegation works under the servel model)

      Q3) Is it true that in Tomcat I need to place the classes that load JNI 
      libraries outside of the webapps directory? If not, then my problem is
      solved.

        Thanks in advance,
        --Luis R.

      On 7/23/06, Martin Gainty < [EMAIL PROTECTED] > wrote:
      >
      > Luis please post this email and your WSDL to axis-user@ws.apache.org
      > 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" < [EMAIL PROTECTED]>
      > To: < users@tomcat.apache.org>
      > Sent: Sunday, July 23, 2006 8:03 AM
      > Subject: java.lang.LinkageError : Class soap/xsd/CompanyInfo violates
      > loader constraints
      >
      >
      > >   HELP PLEASE, PLEASE PLEASE,
      > >
      > >   Any tomcat Guru knows what can cause this exception? I need to have
      > some
      > > classes either in shared or common, outside of the webapps directory.
      > This
      > > is causing my a great headache, and only by activating the loggin in 
the
      > > webapps directory I saw the trace you will see below. I solved all 
the 
      > > problems of the classloaders not finding the classes, but I don't know
      > how
      > > to solve this one.
      > >
      > > I read in another website that the problem might be the classloading 
      > > delegation, but I don't think Tomcat has a way to change the
      > classloading
      > > delegation model. Besides, I don't believe that would solve it, 
because
      > I
      > > don't think the problem is that it is not finding the classes, but 
      > something
      > > else ... what constraints and where are they set? I am not using a
      > Security
      > > Manager, so it is not about permissions in the catalina.policy file.
      > >
      > > Here is the full stack trace 
      > >
      > > 27782 [http-8095-Processor25] DEBUG org.apache.axis.enterprise  -
      > Mapping
      > > Exception to AxisFault^M
      > > java.lang.reflect.InvocationTargetException^M
      > >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method)^M
      > >        at sun.reflect.NativeMethodAccessorImpl.invoke(
      > > NativeMethodAccessorImpl.java:39)^M
      > >        at sun.reflect.DelegatingMethodAccessorImpl.invoke (
      > > DelegatingMethodAccessorImpl.java:25)^M
      > >        at java.lang.reflect.Method.invoke(Method.java:585)^M
      > >        at org.apache.axis.providers.java.RPCProvider.invokeMethod (
      > > RPCProvider.java:397)^M
      > >        at org.apache.axis.providers.java.RPCProvider.processMessage(
      > > RPCProvider.java:186)^M
      > >        at org.apache.axis.providers.java.JavaProvider.invoke(
      > > JavaProvider.java:323)^M
      > >        at org.apache.axis.strategies.InvocationStrategy.visit(
      > > InvocationStrategy.java:32)^M
      > >        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java 
:118)^M
      > >        at org.apache.axis.SimpleChain.invoke(SimpleChain.java :83)^M
      > >        at org.apache.axis.handlers.soap.SOAPService.invoke(
      > SOAPService.java
      > > :454)^M
      > >        at org.apache.axis.server.AxisServer.invoke(AxisServer.java
      > :281)^M
      > >        at org.apache.axis.transport.http.AxisServlet.doPost (
      > > AxisServlet.java:699)^M
      > >        at javax.servlet.http.HttpServlet.service 
(HttpServlet.java:709)^M
      > >        at org.apache.axis.transport.http.AxisServletBase.service(
      > > AxisServletBase.java:327)^M
      > >        at javax.servlet.http.HttpServlet.service (HttpServlet.java 
      > :802)^M
      > >        at
      > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
      > > ApplicationFilterChain.java:252)^M
      > >        at org.apache.catalina.core.ApplicationFilterChain.doFilter (
      > > ApplicationFilterChain.java :173)^M
      > >        at org.apache.catalina.core.StandardWrapperValve.invoke(
      > > StandardWrapperValve.java:213)^M
      > >        at org.apache.catalina.core.StandardContextValve.invoke (
      > > StandardContextValve.java:178)^M
      > >        at org.apache.catalina.core.StandardHostValve.invoke(
      > > StandardHostValve.java:126)^M
      > >        at org.apache.catalina.valves.ErrorReportValve.invoke (
      > > ErrorReportValve.java:105)^M
      > >        at org.apache.catalina.core.StandardEngineValve.invoke (
      > > StandardEngineValve.java:107)^M
      > >        at org.apache.catalina.connector.CoyoteAdapter.service (
      > > CoyoteAdapter.java:148)^M
      > >        at org.apache.coyote.http11.Http11Processor.process(
      > > Http11Processor.java:869)^M
      > >        at
      > >
      > 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection
 
      > > (Http11BaseProtocol.java:664)^M
      > >        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
      > > PoolTcpEndpoint.java:527)^M
      > >        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt 
(
      > > LeaderFollowerWorkerThread.java:80)^M
      > >        at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
      > > ThreadPool.java:684)^M
      > >        at java.lang.Thread.run ( Thread.java :595)^M
      > > Caused by: java.lang.LinkageError: Class soap/xsd/CompanyInfo violates
      > > loader constraints^M
      > >        at java.lang.ClassLoader.defineClass1(Native Method)^M
      > >        at java.lang.ClassLoader.defineClass (ClassLoader.java:620)^M
      > >        at java.security.SecureClassLoader.defineClass(
      > > SecureClassLoader.java:124)^M
      > >        at java.net.URLClassLoader.defineClass 
(URLClassLoader.java:260)^M
      > >        at java.net.URLClassLoader.access$100 
(URLClassLoader.java:56)^M
      > >        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)^M
      > >        at java.security.AccessController.doPrivileged (Native 
Method)^M
      > >        at java.net.URLClassLoader.findClass ( 
URLClassLoader.java:188)^M
      > >        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)^M
      > >        at java.lang.ClassLoader.loadClass (ClassLoader.java:251)^M
      > >        at java.lang.ClassLoader.loadClassInternal ( ClassLoader.java
      > :319)^M
      > >        at vsa.jniCRLimpl.nada(jniCRLimpl.java:100)^M
      > >        at soap.wsdl.CRLImpl.getCompany (CRLImpl.java:94)^M
      > >        at soap.wsdl.CRLSkeleton.getCompany(Unknown Source)^M
      > >        ... 30 more^M
      > >
      > > Thanks in advance,
      > > --Luis R.
      > >








------------------------------------------------------------------------------


  ---------------------------------------------------------------------
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to