geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pierre PRIMOT (JIRA)" <j...@apache.org>
Subject [jira] Created: (GERONIMO-4820) Double webservice instantiation
Date Thu, 27 Aug 2009 13:09:59 GMT
Double webservice instantiation
-------------------------------

                 Key: GERONIMO-4820
                 URL: https://issues.apache.org/jira/browse/GERONIMO-4820
             Project: Geronimo
          Issue Type: Bug
      Security Level: public (Regular issues)
          Components: webservices
    Affects Versions: 2.1.4
         Environment: Windows XP, WebSphere Community Edition 2.1.1.2 (based on Geronimo 2.1.4)
            Reporter: Pierre PRIMOT


I am having the following problem, on WAS CE 2.1.1.2, which I assume is the same in Geronimo
2.1.4 :

I am deploying a Pojo WebService in JAX-WS style (@WebService (serviceName="MyPojo") + declaration
in web.xml as a servlet).

I noticed that my Pojo is instantiated twice : once with a limited access to the webapp context
(I am working with Spring but it happens without it either), and one with a full access to
my webappcontext. The second instantiation only happens when I declare my Pojo as a servlet
in the web.xml deployment file (which is what I read I must do).
When I try to remotely access my Web Service, I hit the first instantiation.

Here is two stacktraces extracts from my web service MyPojo's constructor, traced during the
same deployment session of my war :

First : 
	at mytest.MyPojo.<init>(MyPojo.java:36)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at org.apache.xbean.recipe.ReflectionUtil$ConstructorFactory.create(ReflectionUtil.java:882)
	at org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:272)
	at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
	at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
	at org.apache.geronimo.j2ee.annotation.Holder.newInstance(Holder.java:173)
	at org.apache.geronimo.jaxws.annotations.AnnotationHolder.newInstance(AnnotationHolder.java:39)
	at org.apache.geronimo.axis2.pojo.POJOWebServiceContainer.init(POJOWebServiceContainer.java:82)
	at org.apache.geronimo.axis2.pojo.POJOWebServiceContainerFactoryGBean.getWebServiceContainer(POJOWebServiceContainerFactoryGBean.java:94)
	at org.apache.geronimo.tomcat.TomcatWebAppContext.createWebServices(TomcatWebAppContext.java:281)
	at org.apache.geronimo.tomcat.TomcatWebAppContext.<init>(TomcatWebAppContext.java:255)
And then (only if I declare my webservice in web.xml as a servlet)

        at mytest.MyPojo.<init>(MyPojo.java:36)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at java.lang.Class.newInstance0(Class.java:355)
	at java.lang.Class.newInstance(Class.java:308)
	at org.apache.geronimo.webservices.POJOWebServiceServlet.init(POJOWebServiceServlet.java:60)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1064)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4051)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4361)
	at org.apache.geronimo.tomcat.GeronimoStandardContext.access$201(GeronimoStandardContext.java:63)
	at org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:398)
	at org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:47)
	at org.apache.geronimo.tomcat.GeronimoStandardContext.start(GeronimoStandardContext.java:251)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
	at org.apache.geronimo.tomcat.TomcatContainer.addContext(TomcatContainer.java:364)
	at org.apache.geronimo.tomcat.TomcatWebAppContext.doStart(TomcatWebAppContext.java:512)

Something happens twice in the TomcatWebAppContext constructor and doStart method...
I hope I do not pollute this issue list with a Spring or WAS CE's specific issue...


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message