John Ellis wrote:

> Vincenzo,
>
> The problem under the Sun JDK for Windows came when you loaded everything from the 
>bootclasspath
> (specified -Xbootclasspath/a:).  According to the documentation, "getClassLoader" 
>can return null
> if the class was part of the boot classpath.  Another way it could be part of the 
>bootclasspath (I
> am only guessing here) is if it is in the ext directory.  If you are doing either of 
>these things,
> try specifing it with the CLASSPATH env variable or the -cp on the command line.  
>Double check
> your ext directory ( All ext directories including the ones in jre and java home ) 
>for the jonas
> jar files and get them out of there.  Another option is to change the place in the 
>JOnAS code that
> is using getClassLoader and call ClassLoader.getSystemClassLoader() if the result of
> getClassLoader is null.

Hi John,
I'm getting very confused about this. I tell you what I did.
To check the Jonas problem of null Classloader I simply wrote a few lines like this:

public class TestCL(){
    public TestCL(){
        
System.out.println("this.getClass().getClassLoader()="+this.getClass.getClassLoader());
     }
    public static void main(String [] argv)
    {
         new TestCL();
    }
}

the result are

java TestCL        --> not null
java -Xbootclasspath/a:TestCL.class  --> null
(this seems right according to SUN docs)

as a service (with a nt service installer we wrote) --> null

note that as a service The classpath is passed to JNI_CreateJVM(...) function as:
-cp Test.class
so it should be equivalent to the command line switch (even tried putting in the 
CLASSPATH env var)

The same problem, I guess is in Jonas
In class  org.objectweb.jonas_ejb.deployment.api.DeploymentDesc

we have:
(line 219)

 ClassLoader cl = DeploymentDesc.class.getClassLoader()

which is passed to the singleton constructor.

Don't know how to solve the problem.

Thanks,
Vincenzo




>
>
> Hope that helps,
>
> John
>
> Vincenzo Marchese wrote:
>
> > Hi,
> >
> > I noticed your message on jonas-users ml about getClassLoader returning null in an 
>nt service.
> >
> > I have the same problem with Jonas 2.2  but I'm running a SUN JDK (1.3.0_01)
> >
> > Can you explain me how did you manage to solve the problem ?
> >
> > thanks in advance,
> >
> > Vincenzo
> >
> > -
> >
> >    Calvin: Can you make a living playing silly games?  His Dad: Actually, you
> > can be among the most overpaid people on the planet.
> > -----------------------------------------------------
> >  Vincenzo Marchese
> > [EMAIL PROTECTED]
> >   Artis.net S.r.l
> > Via D.Sansotta, 97
> > 00144 Roma
> > Tel.++39-6-52270097
> > Fax.++39-6-52272313

--

   A voice cackles in Calvin's radio:
   "Enemy fighters at two o'clock!"
   "Roger. What should I do until then?"
-----------------------------------------------------
 Vincenzo Marchese
[EMAIL PROTECTED]
  Artis.net S.r.l
Via D.Sansotta, 97
00144 Roma
Tel.++39-6-52270097
Fax.++39-6-52272313



----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".

Reply via email to