jmx OutOfMemory problems with java5
Peter Neubauer
peter at neubauer.se
Thu Mar 10 18:17:13 EST 2005
Mmmh,
seems that the Handler.openCOnnection is called - investigating further in
createArtifact ...
/peter
On Thursday 10 March 2005 22:02, Peter Neubauer wrote:
> Hi,
> tried to see what's going wrong with Raffaels JMX stuff, loading a war as
> an artifact into a Jetty server with:
>
> httpServer = new Server();
> for ( int i = 0; i < listen.length; i++ ) {
> httpServer.addListener(listen[i]);
> }
> httpServer.addWebApplication("/",
> "artifact:war:jmx-html/jmx-html#1.3!/");
> httpServer.start();
>
> The application fails with:
>
> peter at localhost:~/lab/jmx$metro-debug
> artifact:block:dpml/jmx/dpml-jmx-test#SNAPSHOT
> Starting Transit SNAPSHOT.
> ==========================
> Platform: Linux
> Java Home: /opt/sun-jdk-1.5.0.01
> Transit Home:
> Security policy: /home/peter/.dpml/share/bin/security.policy
> JVM Options: -Xdebug
> -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=y
> Transit
> Classpath:
> /home/peter/.dpml/data/cache/dpml/transit/jars/dpml-transit-main-SNAPSHOT.j
>ar:/home/peter/.dpml/prefs/transit/lib Transit Arguments: -load
> artifact:plugin:dpml/metro/tools/dpml-metro-main#SNAPSHOT
> artifact:block:dpml/jmx/dpml-jmx-test#SNAPSHOT
>
> Listening for transport dt_socket at address: 8000
> [INFO ] (jmx.mx4j): Starting HTTP server
> Mar 10, 2005 9:57:31 PM org.mortbay.http.HttpServer doStart
> INFO: Version Jetty/5.1.x
> [ERROR ] (dpml): Unable to establish the metro system.
> ---- exception report
> ----------------------------------------------------------
> Unable to establish the metro system.
> Exception: net.dpml.composition.provider.CompositionException
> Message: Cannot deploy application.
> ---- cause
> ---------------------------------------------------------------------
> Exception: net.dpml.activation.LifecycleException
> Message: Unable to create a new component instance in appliance [/jmx/mx4j]
> due to a component deployment failure.
> ---- cause
> ---------------------------------------------------------------------
> Exception: java.lang.OutOfMemoryError
> Message: Java heap space
> ---------------------------------------------------------------------------
>-----
>
>
> Debugging, I tracked down the problem to the checkConenction method in
> Jetties org.mortbay.util.URLResource.java:
>
> protected synchronized boolean checkConnection()
> {
> if (_connection==null)
> {
> try{
> _connection=_url.openConnection(); //<---------here,
> //_url = artifact:war:jmx-html/jmx-html#1.3!/
> }
> catch(IOException e)
> {
> LogSupport.ignore(log,e);
> }
> }
> return _connection!=null;
> }
>
> So, question is - why is this failing? The URL has been instantiated
> earlier with
> URL url=null;
> try
> {
> // Try to format as a URL?
> url = new URL(resource);
> }
>
>
> Is this transit not working or something else? Does the URL need to be
> created with the Handler? Or is Transit not registering the URL handler by
> default?
>
> /peter
> _______________________________________________
> dev-dpml mailing list
> dev-dpml at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/dev-dpml
More information about the dev-dpml
mailing list