Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 64197 invoked from network); 15 Sep 2006 22:20:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Sep 2006 22:20:40 -0000 Received: (qmail 82257 invoked by uid 500); 15 Sep 2006 22:20:38 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 81916 invoked by uid 500); 15 Sep 2006 22:20:37 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 81905 invoked by uid 99); 15 Sep 2006 22:20:37 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Sep 2006 15:20:37 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of sppatel@gmail.com designates 66.249.82.233 as permitted sender) Received: from [66.249.82.233] (HELO wx-out-0506.google.com) (66.249.82.233) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Sep 2006 15:20:27 -0700 Received: by wx-out-0506.google.com with SMTP id i27so3251783wxd for ; Fri, 15 Sep 2006 15:19:09 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:mime-version:in-reply-to:references:content-type:message-id:from:subject:date:to:x-mailer:sender; b=kGEn4QCJrjsBa1eohmIIXe0y+C+YHrwQlxPXH3Mapzy9229WG16Vp6tUkUijfH5F8f2od+iTINzwhM8aKsCS/zbM+L29RYuhJGE1g4vvWUpcRYIhpYIgHY5csgffTUAH+fvEwhQVj6R+Vl/JiePpLCIp+YNjAt6gtckXy8FGQ0k= Received: by 10.70.44.5 with SMTP id r5mr15471570wxr; Fri, 15 Sep 2006 15:19:08 -0700 (PDT) Received: from ?192.168.1.2? ( [71.77.17.157]) by mx.gmail.com with ESMTP id i37sm17200677wxd.2006.09.15.15.19.07; Fri, 15 Sep 2006 15:19:07 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v752.2) In-Reply-To: <786cce40609150444g4f31738ag7150030de629cfec@mail.gmail.com> References: <786cce40609150444g4f31738ag7150030de629cfec@mail.gmail.com> Content-Type: multipart/alternative; boundary=Apple-Mail-20--337074485 Message-Id: <040DD8A5-F49D-4F7F-9541-F0055D85E68A@gmail.com> From: Sachin Patel Subject: Re: Geronimo App Server embbed in eclipse RCP Date: Fri, 15 Sep 2006 18:19:11 -0400 To: dev@geronimo.apache.org X-Mailer: Apple Mail (2.752.2) Sender: Sachin Patel X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --Apple-Mail-20--337074485 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed My guess is that the failure is due to not being able to locate a =20 dependency from the repository when starting a configuration. And so IIUC the server as-is this is not currently possible due to =20 the way the dependencies of a configuration are located as the =20 location of the repository is relative to the base install location =20 and the base install location I think is obtained from the startup-=20 jar. But you may be able to trick it by setting the =20 org.apache.geronimo.home.dir system property as long as your plugin =20 is in expanded and not a packaged form as the baseDirectory is =20 expected to be a java.io.File directory. On Sep 15, 2006, at 7:44 AM, J=E9r=F4me GODARD wrote: > Hello all, > > I am trying to embed Little-G (geronimo 1.1) in an eclipse RCP =20 > application. I want to run it in the same JVM as plugins in =20 > eclipse. To easily deploy this feature, I created an eclipse plugin =20= > that contains all the geronimo repositories (lib, var...). > Having a look at the way tomcat is embedded in the =20 > org.eclipse.tomcat plugin, I manage to launch geronimo but it stops =20= > at 14% because of a NoClassDefFoundException while > instanciating the first GBean. To avoid to use the =20 > BundleResourceHandler of eclipse when it tries to open jars, I made =20= > a test using a dedicated ClassLoader (JarFileClassLoader from =20 > geronimo). > > Do you know a way to embed geronimo in eclipse using the same JVM. > > Thanks you for your help. > > Following the test code used to launch geronimo in the eclipse =20 > plugin (It calls the Daemon main method). > > > URL[] urls =3D new URL[21]; > urls[0] =3D resolveURL("/bin/server.jar"); > urls[1] =3D resolveURL("/lib/geronimo-=20 > qname_1.1_spec-1.0.1.jar"); > urls[2] =3D resolveURL("/lib/geronimo- common-1.1.jar"); > urls[3] =3D resolveURL("/lib/geronimo-kernel-1.1.jar"); > urls[4] =3D resolveURL("/lib/geronimo-system-1.1.jar"); > urls[5] =3D resolveURL("/lib/geronimo- util-1.1.jar"); > urls[6] =3D resolveURL("/lib/cglib-nodep-2.1_3.jar"); > urls[7] =3D resolveURL("/lib/concurrent-1.3.4.jar"); > urls[8] =3D resolveURL("/lib/commons-cli-1.0.jar "); > urls[9] =3D resolveURL("/lib/commons-logging-1.0.4.jar"); > urls[10] =3D resolveURL("/lib/log4j-1.2.8.jar"); > urls[11] =3D resolveURL("/lib/mx4j-3.0.1.jar"); > urls[12] =3D resolveURL("/lib/mx4j-remote-3.0.1.jar"); > urls[13] =3D resolveURL("/lib/endorsed/xercesImpl-2.6.2.jar"); > urls[14] =3D resolveURL("/lib/endorsed/=20 > xmlParserAPIs-2.2.1.jar "); > urls[15] =3D resolveURL("/lib/xpp3-1.1.3.3.jar"); > urls[16] =3D resolveURL("/lib/xstream-1.1.3.jar"); > urls[17] =3D resolveURL("/bin/client.jar"); > urls[18] =3D resolveURL("/bin/deployer.jar"); > urls[19] =3D resolveURL("/bin/shutdown.jar"); > urls[20] =3D resolveURL("/bin/upgrade.jar"); > //urls[0] =3D resolveURL("/"); > > JarFileClassLoader customLoader =3D new JarFileClassLoader=20 > (new Artifact( XrcpActivator.PLUGIN_ID, "", "", ""), urls, =20 > this.getClass().getClassLoader(), true, new String[0], new String[0]); > > try { > Class mainClass =3D customLoader.loadClass =20 > ("org.apache.geronimo.system.main.Daemon"); > Method m =3D mainClass.getMethod("main", new Class[]=20 > {String[].class}); > m.invoke(null, new Object[]{new String[0]}); > } catch (Exception e) { > // TODO Auto-generated catch block > e.printStackTrace(); > } > > But I obtain the following log : > > [*** ] 12% 5s Starting geronimo/j2ee-serve... > [***- ] 12% 5s Loading geronimo/j2ee-secur... > [***> ] 14% 5s Loading geronimo/j2ee-secur... > [***> ] 14% 5s Starting geronimo/j2ee-=20 > secur...java.lang.reflect.InvocationTargetException > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at java.lang.reflect.Method.invoke(Unknown Source) > at org.eclipse.tomcat.internal.TestJob.run(TestJob.java:86) > at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58) > Caused by: java.lang.NoClassDefFoundError : =20 > org.apache.geronimo.system.rmi.RMIClassLoaderSpiImpl > at java.rmi.server.RMIClassLoader.initializeProvider(Unknown =20 > Source)09:36:19,293 WARN [1/car,j2eeType=3DGBean,name=3DJMXService] =20= > Failure in JMXConnector service:jmx:rmi://0.0.0.0:9999/jndi/rmi://=20 > 0.0.0.0:1099/JMXConnector > 09:36:19,303 ERROR [GBeanInstanceState] Error while starting; GBean =20= > is now in the FAILED state: abstractName=3D"geronimo/j2ee-security/=20 > 1.1/car?ServiceModule=3Dgeronimo/j2ee-security/1.1/=20 > car,j2eeType=3DGBean,name=3DJMXService" > java.lang.NoClassDefFoundError: =20 > org.apache.geronimo.system.rmi.RMIClassLoaderSpiImpl > at java.rmi.server.RMIClassLoader.initializeProvider(Unknown =20 > Source) > at java.rmi.server.RMIClassLoader.access$000(Unknown Source) > at java.rmi.server.RMIClassLoader$1.run(Unknown Source) > -sachin --Apple-Mail-20--337074485 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1
My guess is that the = failure is due to not being able to locate a dependency from the = repository when starting a configuration.

And so IIUC the server as-is = this is not currently possible due to the way the dependencies of a = configuration are located as the location of the repository is relative = to the base install location and the base install location I think is = obtained from the startup-jar.=A0 But you may be able to trick it by = setting the=A0org.apache.geronimo.home.dir system property as long as = your plugin is in expanded and not a packaged form as the baseDirectory = is expected to be a java.io.File directory.

On = Sep 15, 2006, at 7:44 AM, J=E9r=F4me GODARD wrote:

Hello = all,

I am trying to embed Little-G (geronimo 1.1) in an eclipse = RCP application. I want to run it in the same JVM as plugins in eclipse. = To easily deploy this feature, I created an eclipse plugin that contains = all the geronimo repositories (lib, var...).
Having a look at the = way tomcat is embedded in the org.eclipse.tomcat plugin, I manage to = launch geronimo but it stops at 14% because of a = NoClassDefFoundException while
instanciating the first GBean. To = avoid to use the BundleResourceHandler of eclipse when it tries to open = jars, I made a test using a dedicated ClassLoader (JarFileClassLoader = from geronimo).

Do you know a way to embed geronimo in eclipse = using the same JVM.

Thanks you for your help.

Following = the test code used to launch geronimo in the eclipse plugin (It calls = the Daemon main method).


=A0=A0 =A0=A0=A0 =A0URL[] urls =3D = new URL[21];
=A0=A0 =A0=A0=A0 =A0urls[0] =3D = resolveURL("/bin/server.jar");
=A0=A0 =A0=A0=A0 =A0urls[1] =3D = resolveURL("/lib/geronimo-qname_1.1_spec-1.0.1.jar");
=A0=A0 =A0=A0=A0 = =A0urls[2] =3D resolveURL("/lib/geronimo- common-1.1.jar");
=A0=A0 = =A0=A0=A0 =A0urls[3] =3D = resolveURL("/lib/geronimo-kernel-1.1.jar");
=A0=A0 =A0=A0=A0 =A0urls[4]= =3D resolveURL("/lib/geronimo-system-1.1.jar");
=A0=A0 =A0=A0=A0 = =A0urls[5] =3D resolveURL("/lib/geronimo- util-1.1.jar");
=A0=A0 =A0=A0= =A0 =A0urls[6] =3D resolveURL("/lib/cglib-nodep-2.1_3.jar");
=A0=A0 = =A0=A0=A0 =A0urls[7] =3D resolveURL("/lib/concurrent-1.3.4.jar");
=A0=A0= =A0=A0=A0 =A0urls[8] =3D resolveURL("/lib/commons-cli-1.0.jar ");
=A0=A0= =A0=A0=A0 =A0urls[9] =3D = resolveURL("/lib/commons-logging-1.0.4.jar");
=A0=A0 =A0=A0=A0 = =A0urls[10] =3D resolveURL("/lib/log4j-1.2.8.jar");
=A0=A0 =A0=A0=A0 = =A0urls[11] =3D resolveURL("/lib/mx4j-3.0.1.jar");
=A0=A0 =A0=A0=A0 = =A0urls[12] =3D resolveURL("/lib/mx4j-remote-3.0.1.jar");
=A0=A0 =A0=A0= =A0 =A0urls[13] =3D = resolveURL("/lib/endorsed/xercesImpl-2.6.2.jar");
=A0=A0 =A0=A0=A0 = =A0urls[14] =3D resolveURL("/lib/endorsed/xmlParserAPIs-2.2.1.jar = ");
=A0=A0 =A0=A0=A0 =A0urls[15] =3D = resolveURL("/lib/xpp3-1.1.3.3.jar");
=A0=A0 =A0=A0=A0 =A0urls[16] =3D = resolveURL("/lib/xstream-1.1.3.jar");
=A0=A0 =A0=A0=A0 =A0urls[17] =3D = resolveURL("/bin/client.jar");
=A0=A0 =A0=A0=A0 =A0urls[18] =3D = resolveURL("/bin/deployer.jar");
=A0=A0 =A0=A0=A0 =A0urls[19] =3D = resolveURL("/bin/shutdown.jar");
=A0=A0 =A0=A0=A0 =A0urls[20] =3D = resolveURL("/bin/upgrade.jar");
=A0=A0 =A0=A0=A0 =A0//urls[0] =3D = resolveURL("/");
=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0
=A0=A0 =A0=A0=A0 = =A0JarFileClassLoader customLoader =3D new JarFileClassLoader(new = Artifact( XrcpActivator.PLUGIN_ID, "", "", ""), urls, = this.getClass().getClassLoader(), true, new String[0], new = String[0]);
=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0
=A0=A0 =A0=A0=A0= =A0try {
=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0Class mainClass =3D = customLoader.loadClass ("org.apache.geronimo.system.main.Daemon");
=A0=A0= =A0=A0=A0 =A0=A0=A0 =A0Method m =3D mainClass.getMethod("main", new = Class[]{String[].class});
=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0m.invoke(null, = new Object[]{new String[0]});
=A0=A0 =A0=A0=A0 =A0} catch (Exception = e) {
=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0// TODO Auto-generated catch = block
=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0e.printStackTrace();
=A0=A0 = =A0=A0=A0 =A0}
=A0=A0 =A0=A0=A0 =A0
But I obtain the following log = :

[***=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0 ] 12%=A0=A0 5s Starting geronimo/j2ee-serve... =
[***-=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= ] 12%=A0=A0 5s=A0 Loading = geronimo/j2ee-secur...
[***>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0 ] 14%=A0=A0 5s=A0 Loading = geronimo/j2ee-secur...
[***>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0 ] 14%=A0=A0 5s Starting = geronimo/j2ee-secur...java.lang.reflect.InvocationTargetException
=A0=A0= =A0at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
=A0=A0= =A0at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
=A0=A0= =A0at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown = Source)
=A0=A0 =A0at java.lang.reflect.Method.invoke(Unknown = Source)
=A0=A0 =A0at = org.eclipse.tomcat.internal.TestJob.run(TestJob.java:86)
=A0=A0 =A0at = org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
Caused by: = java.lang.NoClassDefFoundError : = org.apache.geronimo.system.rmi.RMIClassLoaderSpiImpl
=A0=A0 =A0at = java.rmi.server.RMIClassLoader.initializeProvider(Unknown = Source)09:36:19,293 WARN=A0 [1/car,j2eeType=3DGBean,name=3DJMXService] = Failure in JMXConnector = service:jmx:rmi://0.0.0.0:9999/jndi/rmi://0.0.0.0:1099/JMXConnector =
09:36:19,303 ERROR [GBeanInstanceState] Error while starting; GBean = is now in the FAILED state: = abstractName=3D"geronimo/j2ee-security/1.1/car?ServiceModule=3Dgeronimo/j2= ee-security/1.1/car,j2eeType=3DGBean,name=3DJMXService" =
java.lang.NoClassDefFoundError: = org.apache.geronimo.system.rmi.RMIClassLoaderSpiImpl
=A0=A0 =A0at = java.rmi.server.RMIClassLoader.initializeProvider(Unknown Source)
=A0=A0= =A0at java.rmi.server.RMIClassLoader.access$000(Unknown Source)
=A0=A0= =A0at java.rmi.server.RMIClassLoader$1.run(Unknown = Source)



=

= --Apple-Mail-20--337074485--