Hi Rickard,
It seems that the IDE world is not up-to-date afa dynamic classloading
and debugging is concerned. I think there needs to be a way to start the
container in a static - 'development' mode, whether this means having a flag
to 'stop' dynamic class loading or not, I'm not sure.... thoughts?
In another container that I am familiar with, they have the ability to
run the Container(s) in a separate process from the rest of the system ( e.g
webservice/naming service etc) This makes starting and restarting the actual
container during run/debug cycles much more efficient. Can you give some
suggestions on the best way to do this with jBoss.
regards,
-Rob
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Rickard �berg
Sent: Sunday, August 06, 2000 2:31 AM
To: jBoss Developer
Subject: Re: [jBoss-Dev]
java.lang.ClassCastException:sun.misc.Launcher$AppClassLoader
Hi!
Rob Castaneda wrote:
> I have a solution for this annoying bug. Perhaps someone ( ?Rickard) maybe
> able to give a better explanation.
>
> It seems that when we start jBoss inside an IDE - i.e. JBuilder or
NetBeans
> etc. we get this message "java.lang.ClassCastException:
> sun.misc.Launcher$AppClassLoader". I have submitted a diff of what I
changed
> to get this to work, in a nutshell - both changes are in
> org.jboss.util.ClassPathExtension.java:
>
> 1) get the ClassLoader from the currentThread() - this gets rid of the
> ClassCastException, but uncovers 2)a NullPointerException, which is fixed
by
> doing a simple null check.
>
> Diff is below. 14 hour flights give you plenty of time to debug :-)
The basic reason for this bug is (AFAICT) that the classes have been
added to the classpath prior to launching jBoss. This is wrong since
they should be loaded dynamically by the server. It may work now, minus
some of these exceptions, but in the future when dynamic code updating
is added it will lead to major breakage.
I would suggest that you run the server as intended instead, i.e. with
none of the jBoss classes on the system/app classpath.
/Rickard
--
Rickard �berg
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com