geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lasantha Ranaweera" <lasan...@opensource.lk>
Subject Re: Geronimo Custom Plugin Class loading Issues
Date Mon, 27 Nov 2006 14:50:35 GMT
Hi David,

Surely you can ask that question and I think you are the ideal person for
me to get some help on this. Following is root cause of this problem and
it's current situation. ;)

Hope you remember there was an email send by you to the G Lists and Axis 2
lists regarding the JAXWS integration in Geronimo. I have started some
initial investigation there how to integrate Axis 2 with Geronimo and
implemented some small version of it. Currently it has some class loading
issues, and I am not sure it is due to the xml beans or not. Axis 2 1.1
uses xml beans 2.2.0 that is why I need to clarify it. Anyway I am not
happy with my current implementation hoping to change it soon(the way I
have integrated Axis 2 and G 1.1.1). Looks like Axis 1.1 has a bug on that
scenario ;).

Pretty soon I am going to come up with a more complete patch and get your 
inputs. If you have any ideas please share it with us too. :D

Now I will explain what is the current way of my approach (This approach
is not going to be valid any more in my mind). I have created very simple
hypothycal xml schema (jaxws-geronimo) which passes web service related
information to the Geronimo. When an user deploy a JAR file with an
instance of above xml schema, it will read those information and create a
WebServiceGBean (similar to QuartzJobBean). If the deployment happens the
first time it will start a new SimpleAxisServer in new port (9000) and
service will be added to the Axis2Configurations. If the deployment
happens after that service will be only added to the AxisConfigurations.
It all works fine for me until I am going to deploy only one service.
Following is the G console out put for the first time deployment.

05:27:02,953 INFO  [WebServiceManagerGBean] WebService Manager Starting
Before Creating ContextFactory
ContextFactory Created !!!
05:27:31,578 INFO  [DefaultConnectionListener] Listening on port 9000
05:27:31,921 INFO  [WebServiceGBean] Web Service Started HelloService1

As soon as I tried to deploy my second service the app server tries to
load classes from the previous version of the JAR file and fails the
GBean. Please look at the given console output. It clearly shows that
HelloService2 class is finding in the
org.apache.geronimo.jaxws/HelloService1/1164634050421/car. Which is not
the acceptable out put I am looking for (It should look at inside
HelloService2).

05:45:53,359 ERROR [WebServiceGBean] Web Service Failed HelloService2
05:45:53,375 ERROR [GBeanInstanceState] Error while starting; GBean is now
in the FAILED state: abst
ractName="org.apache.geronimo.jaxws/HelloService2/1164635152968/car?ServiceModule=org.apache.geronim
o.jaxws/HelloService2/1164635152968/car,j2eeType=GBean,name=HelloService2"
org.apache.geronimo.jaxws.axis2.Axis2Exception:
org.apache.geronimo.jaxws.HelloService2 in classload
er org.apache.geronimo.jaxws/HelloService1/1164634050421/car; nested
exception is:
        java.lang.ClassNotFoundException:
org.apache.geronimo.jaxws.HelloService2 in classloader org
.apache.geronimo.jaxws/HelloService1/1164634050421/car
        at
org.apache.geronimo.jaxws.axis2.Axis2Manager.addService(Axis2Manager.java:56)
        at
org.apache.geronimo.jaxws.axis2.Axis2Service.start(Axis2Service.java:8)
        at
org.apache.geronimo.jaxws.WebServiceGBean.doStart(WebServiceGBean.java:45)

If I remove the Axis2 integration source code from the WebServiceGBean the
both JAR files can be deployed without any problems. So it looks clearly a
problem of Axis 2 integration. I am not familiar with the Java Thread
context class loading too, may be it has a solution for this kind of
scenario. Can you find any problems with this my description? :) If this
is not enough I ready to share my code and get your feed back. How do I do
that? (But still it is not a complete solution and it may create some more
problems)

Thanks,
Lasantha Ranaweera


>
> On Nov 27, 2006, at 12:17 AM, Lasantha Ranaweera wrote:
>
>> Lasantha Ranaweera wrote:
>>> Hi All,
>>>
>>> I want to write a custom GBean for the Geronimo 1.1. Basically I
>>> am following the Advanced Plugin Sample in the G user
>>> documentation. My custom plug in pretty much the same as Quartz
>>> plug in in the sample. It has a deployer part and manager part.
>>> In my plugin I want to use xml beans 2.2.0 rather than 2.0.0
>>> which comes with Geronimo.  So the class loading issues has to be
>>> resolved from my geronimo-service.xml of the manager part. How do
>>> I resolve this issue? Has anybody used xml beans 2.2.0 with their
>>> plugin components?
>>
>>> Do I need to write some extra coding in the application manager
>>> GBean side?
>> More clarification regarding the this part of the email. Do I need
>> to write some extra coding in the deployer GBean side to pick up my
>> version of JAR from it's class path? Is it enough to do it from the
>> configuration level.  If somebody can point me to a Geronimo coding
>> level sample it would be greatly appreciated.
>>>
>>> All ideas are well come.
>
> I really doubt you are going to be able to get this to work without
> rewriting a lot of the deployment system.  It would be a lot easier
> to move geronimo 1.2 to xmlbeans 2.2.0.  Could I ask what your
> motivation for wanting 2 versions of xmlbeans is?
>
> thanks
> david jencks
>
>>>
>>> Thanks,
>>> Lasantha Ranaweera
>>>
>>>
>>>
>>
>
>


Mime
View raw message