You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by doug <do...@gmail.com> on 2007/09/06 09:27:18 UTC
jaxws:endpoint and depends-on attribute
I have implemented some services and configure them in a
WEB-INF/beans.xml file. I was using this file to specify some
initialization parameters that get stored in a bean (FileUtilities)
and which are subsequently accessed by several other jaxws:endpoint
definedservices. I thought everything was configured ok because all
services are loaded without problems on my development server, running
apache-tomcat-5.5.20 Unfortunately when I try to deploy to our
production server, apache-tomcat-5.5.16 it fails to load, on account of the
error below.
Basically, it seems to me that the FileUtilities bean hasn't been
loaded or initialized at the time the endpoint is being instatiated,
whereas it was under tomcat 5.5.20.
I read that there is a <bean depends-on="otherID"> attribute that induces
otherID beans to be loaded and initialized first, but apparently that
doesn't exist for jaxws:endpoint
Is there another way to achieve the same result?
Thanks
Doug
879 [main] ERROR org.springframework.web.context.ContextLoader - Context
initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected
exception parsing XML document from ServletContext r
esource [/WEB-INF/beans.xml]; nested exception is
org.springframework.beans.FatalBeanException: Could not load class: au.net.mm
sn.pfc.servlet.serbices.rfio.impl.RemoteFileImpl; nested exception is
java.lang.NullPointerException
Caused by:
org.springframework.beans.FatalBeanException: Could not load class:
au.net.mmsn.pfc.servlet.serbices.rfio.impl.RemoteFileImpl;
nested exception is java.lang.NullPointerException
Caused by:
java.lang.NullPointerException
at
au.net.mmsn.pfc.servlet.serbices.rfio.impl.FileUtilities.getServicePreference(FileUtilities.java:76)
at
au.net.mmsn.pfc.servlet.serbices.rfio.impl.RemoteFileImpl.<init>(RemoteFileImpl.java:29)
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:494)
Re: jaxws:endpoint and depends-on attribute
Posted by Willem Jiang <ni...@iona.com>.
Hi Doug,
To be honestly, I know nothing about the applet jars downloading work.
Maybe you need resend you letter somewhere to discuss with some applet
experts.
BTW, I am also interesting with answer, you are the pioneer to use the
CXF client in the applet :)
Willem.
doug wrote:
> Thank you Willem,
> and many apologies for wasting your time. I just discovered an hour ago that
> apparently I accidently had two versions of the compiled classfiles
> floating aroundand the older tomcat loaded preferentially from
> WEB-INF/classes whereas the newer tomcat loaded from my WEB-INF/lib/ jar
> file (discovered after rewriting the class to eliminate any traces of
> servicePreference and still getting the same error with bogus line numbers)
>
> Now my server loads and works, but my applet client still takes forever
> to properly establish a connection - as I described in another email:
>
> http://www.nabble.com/CXF-based-applet-initialization-worries-tf4375613.html#a12472137
>
> Basically the applet is making about 200 calls to the server for
> nonexistent jaxb.properties files and
> http://192.168.98.46:8080/pfc/lib/jaxb-impl-2.0.5.jar
>
> I have no idea what the significance of that is, but it adds about
> 2 to 5 minutes to the startup time of the applet.
> Also, the jar file was already downloaded and cached by the JRE.
>
> Any insights into this one would be much appreciated!
>
> Thanks again
> Doug
>
>
>
>
> On Wednesday 12 September 2007 11:55, Willem Jiang wrote:
>
>> Hi Doug,
>>
>> After I reviewed your stack trace , I just found you need to set the
>> servicePreference in the FileUtilities first.
>>
>> Willem.
>>
>> java.lang.NullPointerException
>>
>>
>>>> at
>>>> au.net.mmsn.pfc.servlet.serbices.rfio.impl.FileUtilities.getServicePref
>>>> er ence(FileUtilities.java:76) at
>>>> au.net.mmsn.pfc.servlet.serbices.rfio.impl.RemoteFileImpl.<init>(Remote
>>>> Fi leImpl.java:29) at
>>>> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>>>>
>> doug wrote:
>>
>>> Hi Willem,
>>> Thanks to you both for that.
>>> Now the depends-on attribute parses ok in the jaxws:endpoint elements of
>>> the beans.xml file, but I still have the same error as before. i.e. it
>>> doesn't seem to have preloaded the depends-on bean.
>>>
>>> thanks again
>>> Doug
>>>
>>> On Thursday 06 September 2007 17:56, Willem Jiang wrote:
>>>
>>>> Hi doug ,
>>>>
>>>> I just committed a patch CXF-955 which is contributed by Fred into the
>>>> trunk.
>>>> It added the depends-on attribute in the jaxws:endpoint. I think you
>>>> just want that :)
>>>>
>>>> You can try latest version in the trunk , or wait for the next snapshot.
>>>>
>>>> Willem.
>>>>
>>>> doug wrote:
>>>>
>>>>> I have implemented some services and configure them in a
>>>>> WEB-INF/beans.xml file. I was using this file to specify some
>>>>> initialization parameters that get stored in a bean (FileUtilities)
>>>>> and which are subsequently accessed by several other jaxws:endpoint
>>>>> definedservices. I thought everything was configured ok because all
>>>>> services are loaded without problems on my development server, running
>>>>> apache-tomcat-5.5.20 Unfortunately when I try to deploy to our
>>>>> production server, apache-tomcat-5.5.16 it fails to load, on account of
>>>>> the error below.
>>>>>
>>>>> Basically, it seems to me that the FileUtilities bean hasn't been
>>>>> loaded or initialized at the time the endpoint is being instatiated,
>>>>> whereas it was under tomcat 5.5.20.
>>>>>
>>>>> I read that there is a <bean depends-on="otherID"> attribute that
>>>>> induces otherID beans to be loaded and initialized first, but
>>>>> apparently that doesn't exist for jaxws:endpoint
>>>>>
>>>>> Is there another way to achieve the same result?
>>>>>
>>>>> Thanks
>>>>> Doug
>>>>>
>>>>>
>>>>>
>>>>> 879 [main] ERROR org.springframework.web.context.ContextLoader -
>>>>> Context initialization failed
>>>>> org.springframework.beans.factory.BeanDefinitionStoreException:
>>>>> Unexpected exception parsing XML document from ServletContext r
>>>>> esource [/WEB-INF/beans.xml]; nested exception is
>>>>> org.springframework.beans.FatalBeanException: Could not load class:
>>>>> au.net.mm sn.pfc.servlet.serbices.rfio.impl.RemoteFileImpl; nested
>>>>> exception is java.lang.NullPointerException
>>>>> Caused by:
>>>>> org.springframework.beans.FatalBeanException: Could not load class:
>>>>> au.net.mmsn.pfc.servlet.serbices.rfio.impl.RemoteFileImpl;
>>>>> nested exception is java.lang.NullPointerException
>>>>> Caused by:
>>>>> java.lang.NullPointerException
>>>>> at
>>>>> au.net.mmsn.pfc.servlet.serbices.rfio.impl.FileUtilities.getServicePref
>>>>> er ence(FileUtilities.java:76) at
>>>>> au.net.mmsn.pfc.servlet.serbices.rfio.impl.RemoteFileImpl.<init>(Remote
>>>>> Fi leImpl.java:29) at
>>>>> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>>>>> at
>>>>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructor
>>>>> Ac cessorImpl.java:39) at
>>>>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCon
>>>>> st ructorAccessorImpl.java:27) at
>>>>> java.lang.reflect.Constructor.newInstance(Constructor.java:494)
>>>>>
>
>
Re: jaxws:endpoint and depends-on attribute
Posted by doug <do...@gmail.com>.
Thank you Willem,
and many apologies for wasting your time. I just discovered an hour ago that
apparently I accidently had two versions of the compiled classfiles
floating aroundand the older tomcat loaded preferentially from
WEB-INF/classes whereas the newer tomcat loaded from my WEB-INF/lib/ jar
file (discovered after rewriting the class to eliminate any traces of
servicePreference and still getting the same error with bogus line numbers)
Now my server loads and works, but my applet client still takes forever
to properly establish a connection - as I described in another email:
http://www.nabble.com/CXF-based-applet-initialization-worries-tf4375613.html#a12472137
Basically the applet is making about 200 calls to the server for
nonexistent jaxb.properties files and
http://192.168.98.46:8080/pfc/lib/jaxb-impl-2.0.5.jar
I have no idea what the significance of that is, but it adds about
2 to 5 minutes to the startup time of the applet.
Also, the jar file was already downloaded and cached by the JRE.
Any insights into this one would be much appreciated!
Thanks again
Doug
On Wednesday 12 September 2007 11:55, Willem Jiang wrote:
> Hi Doug,
>
> After I reviewed your stack trace , I just found you need to set the
> servicePreference in the FileUtilities first.
>
> Willem.
>
> java.lang.NullPointerException
>
> > > at
> > > au.net.mmsn.pfc.servlet.serbices.rfio.impl.FileUtilities.getServicePref
> > >er ence(FileUtilities.java:76) at
> > > au.net.mmsn.pfc.servlet.serbices.rfio.impl.RemoteFileImpl.<init>(Remote
> > >Fi leImpl.java:29) at
> > > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>
> doug wrote:
> > Hi Willem,
> > Thanks to you both for that.
> > Now the depends-on attribute parses ok in the jaxws:endpoint elements of
> > the beans.xml file, but I still have the same error as before. i.e. it
> > doesn't seem to have preloaded the depends-on bean.
> >
> > thanks again
> > Doug
> >
> > On Thursday 06 September 2007 17:56, Willem Jiang wrote:
> >> Hi doug ,
> >>
> >> I just committed a patch CXF-955 which is contributed by Fred into the
> >> trunk.
> >> It added the depends-on attribute in the jaxws:endpoint. I think you
> >> just want that :)
> >>
> >> You can try latest version in the trunk , or wait for the next snapshot.
> >>
> >> Willem.
> >>
> >> doug wrote:
> >>> I have implemented some services and configure them in a
> >>> WEB-INF/beans.xml file. I was using this file to specify some
> >>> initialization parameters that get stored in a bean (FileUtilities)
> >>> and which are subsequently accessed by several other jaxws:endpoint
> >>> definedservices. I thought everything was configured ok because all
> >>> services are loaded without problems on my development server, running
> >>> apache-tomcat-5.5.20 Unfortunately when I try to deploy to our
> >>> production server, apache-tomcat-5.5.16 it fails to load, on account of
> >>> the error below.
> >>>
> >>> Basically, it seems to me that the FileUtilities bean hasn't been
> >>> loaded or initialized at the time the endpoint is being instatiated,
> >>> whereas it was under tomcat 5.5.20.
> >>>
> >>> I read that there is a <bean depends-on="otherID"> attribute that
> >>> induces otherID beans to be loaded and initialized first, but
> >>> apparently that doesn't exist for jaxws:endpoint
> >>>
> >>> Is there another way to achieve the same result?
> >>>
> >>> Thanks
> >>> Doug
> >>>
> >>>
> >>>
> >>> 879 [main] ERROR org.springframework.web.context.ContextLoader -
> >>> Context initialization failed
> >>> org.springframework.beans.factory.BeanDefinitionStoreException:
> >>> Unexpected exception parsing XML document from ServletContext r
> >>> esource [/WEB-INF/beans.xml]; nested exception is
> >>> org.springframework.beans.FatalBeanException: Could not load class:
> >>> au.net.mm sn.pfc.servlet.serbices.rfio.impl.RemoteFileImpl; nested
> >>> exception is java.lang.NullPointerException
> >>> Caused by:
> >>> org.springframework.beans.FatalBeanException: Could not load class:
> >>> au.net.mmsn.pfc.servlet.serbices.rfio.impl.RemoteFileImpl;
> >>> nested exception is java.lang.NullPointerException
> >>> Caused by:
> >>> java.lang.NullPointerException
> >>> at
> >>> au.net.mmsn.pfc.servlet.serbices.rfio.impl.FileUtilities.getServicePref
> >>>er ence(FileUtilities.java:76) at
> >>> au.net.mmsn.pfc.servlet.serbices.rfio.impl.RemoteFileImpl.<init>(Remote
> >>>Fi leImpl.java:29) at
> >>> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> >>> at
> >>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructor
> >>>Ac cessorImpl.java:39) at
> >>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCon
> >>>st ructorAccessorImpl.java:27) at
> >>> java.lang.reflect.Constructor.newInstance(Constructor.java:494)
Re: jaxws:endpoint and depends-on attribute
Posted by Willem Jiang <ni...@iona.com>.
Hi Doug,
After I reviewed your stack trace , I just found you need to set the
servicePreference in the FileUtilities first.
Willem.
java.lang.NullPointerException
> > at
> > au.net.mmsn.pfc.servlet.serbices.rfio.impl.FileUtilities.getServicePrefer
> >ence(FileUtilities.java:76) at
> > au.net.mmsn.pfc.servlet.serbices.rfio.impl.RemoteFileImpl.<init>(RemoteFi
> >leImpl.java:29) at
> > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
doug wrote:
> Hi Willem,
> Thanks to you both for that.
> Now the depends-on attribute parses ok in the jaxws:endpoint elements of the
> beans.xml file, but I still have the same error as before. i.e. it doesn't
> seem to have preloaded the depends-on bean.
>
> thanks again
> Doug
>
> On Thursday 06 September 2007 17:56, Willem Jiang wrote:
>
>> Hi doug ,
>>
>> I just committed a patch CXF-955 which is contributed by Fred into the
>> trunk.
>> It added the depends-on attribute in the jaxws:endpoint. I think you
>> just want that :)
>>
>> You can try latest version in the trunk , or wait for the next snapshot.
>>
>> Willem.
>>
>> doug wrote:
>>
>>> I have implemented some services and configure them in a
>>> WEB-INF/beans.xml file. I was using this file to specify some
>>> initialization parameters that get stored in a bean (FileUtilities)
>>> and which are subsequently accessed by several other jaxws:endpoint
>>> definedservices. I thought everything was configured ok because all
>>> services are loaded without problems on my development server, running
>>> apache-tomcat-5.5.20 Unfortunately when I try to deploy to our
>>> production server, apache-tomcat-5.5.16 it fails to load, on account of
>>> the error below.
>>>
>>> Basically, it seems to me that the FileUtilities bean hasn't been
>>> loaded or initialized at the time the endpoint is being instatiated,
>>> whereas it was under tomcat 5.5.20.
>>>
>>> I read that there is a <bean depends-on="otherID"> attribute that induces
>>> otherID beans to be loaded and initialized first, but apparently that
>>> doesn't exist for jaxws:endpoint
>>>
>>> Is there another way to achieve the same result?
>>>
>>> Thanks
>>> Doug
>>>
>>>
>>>
>>> 879 [main] ERROR org.springframework.web.context.ContextLoader -
>>> Context initialization failed
>>> org.springframework.beans.factory.BeanDefinitionStoreException:
>>> Unexpected exception parsing XML document from ServletContext r
>>> esource [/WEB-INF/beans.xml]; nested exception is
>>> org.springframework.beans.FatalBeanException: Could not load class:
>>> au.net.mm sn.pfc.servlet.serbices.rfio.impl.RemoteFileImpl; nested
>>> exception is java.lang.NullPointerException
>>> Caused by:
>>> org.springframework.beans.FatalBeanException: Could not load class:
>>> au.net.mmsn.pfc.servlet.serbices.rfio.impl.RemoteFileImpl;
>>> nested exception is java.lang.NullPointerException
>>> Caused by:
>>> java.lang.NullPointerException
>>> at
>>> au.net.mmsn.pfc.servlet.serbices.rfio.impl.FileUtilities.getServicePrefer
>>> ence(FileUtilities.java:76) at
>>> au.net.mmsn.pfc.servlet.serbices.rfio.impl.RemoteFileImpl.<init>(RemoteFi
>>> leImpl.java:29) at
>>> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>>> at
>>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAc
>>> cessorImpl.java:39) at
>>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConst
>>> ructorAccessorImpl.java:27) at
>>> java.lang.reflect.Constructor.newInstance(Constructor.java:494)
>>>
>
>
Re: jaxws:endpoint and depends-on attribute
Posted by doug <do...@gmail.com>.
Hi Willem,
Thanks to you both for that.
Now the depends-on attribute parses ok in the jaxws:endpoint elements of the
beans.xml file, but I still have the same error as before. i.e. it doesn't
seem to have preloaded the depends-on bean.
thanks again
Doug
On Thursday 06 September 2007 17:56, Willem Jiang wrote:
> Hi doug ,
>
> I just committed a patch CXF-955 which is contributed by Fred into the
> trunk.
> It added the depends-on attribute in the jaxws:endpoint. I think you
> just want that :)
>
> You can try latest version in the trunk , or wait for the next snapshot.
>
> Willem.
>
> doug wrote:
> > I have implemented some services and configure them in a
> > WEB-INF/beans.xml file. I was using this file to specify some
> > initialization parameters that get stored in a bean (FileUtilities)
> > and which are subsequently accessed by several other jaxws:endpoint
> > definedservices. I thought everything was configured ok because all
> > services are loaded without problems on my development server, running
> > apache-tomcat-5.5.20 Unfortunately when I try to deploy to our
> > production server, apache-tomcat-5.5.16 it fails to load, on account of
> > the error below.
> >
> > Basically, it seems to me that the FileUtilities bean hasn't been
> > loaded or initialized at the time the endpoint is being instatiated,
> > whereas it was under tomcat 5.5.20.
> >
> > I read that there is a <bean depends-on="otherID"> attribute that induces
> > otherID beans to be loaded and initialized first, but apparently that
> > doesn't exist for jaxws:endpoint
> >
> > Is there another way to achieve the same result?
> >
> > Thanks
> > Doug
> >
> >
> >
> > 879 [main] ERROR org.springframework.web.context.ContextLoader -
> > Context initialization failed
> > org.springframework.beans.factory.BeanDefinitionStoreException:
> > Unexpected exception parsing XML document from ServletContext r
> > esource [/WEB-INF/beans.xml]; nested exception is
> > org.springframework.beans.FatalBeanException: Could not load class:
> > au.net.mm sn.pfc.servlet.serbices.rfio.impl.RemoteFileImpl; nested
> > exception is java.lang.NullPointerException
> > Caused by:
> > org.springframework.beans.FatalBeanException: Could not load class:
> > au.net.mmsn.pfc.servlet.serbices.rfio.impl.RemoteFileImpl;
> > nested exception is java.lang.NullPointerException
> > Caused by:
> > java.lang.NullPointerException
> > at
> > au.net.mmsn.pfc.servlet.serbices.rfio.impl.FileUtilities.getServicePrefer
> >ence(FileUtilities.java:76) at
> > au.net.mmsn.pfc.servlet.serbices.rfio.impl.RemoteFileImpl.<init>(RemoteFi
> >leImpl.java:29) at
> > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> > at
> > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAc
> >cessorImpl.java:39) at
> > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConst
> >ructorAccessorImpl.java:27) at
> > java.lang.reflect.Constructor.newInstance(Constructor.java:494)
Re: jaxws:endpoint and depends-on attribute
Posted by Willem Jiang <ni...@iona.com>.
Hi doug ,
I just committed a patch CXF-955 which is contributed by Fred into the
trunk.
It added the depends-on attribute in the jaxws:endpoint. I think you
just want that :)
You can try latest version in the trunk , or wait for the next snapshot.
Willem.
doug wrote:
> I have implemented some services and configure them in a
> WEB-INF/beans.xml file. I was using this file to specify some
> initialization parameters that get stored in a bean (FileUtilities)
> and which are subsequently accessed by several other jaxws:endpoint
> definedservices. I thought everything was configured ok because all
> services are loaded without problems on my development server, running
> apache-tomcat-5.5.20 Unfortunately when I try to deploy to our
> production server, apache-tomcat-5.5.16 it fails to load, on account of the
> error below.
>
> Basically, it seems to me that the FileUtilities bean hasn't been
> loaded or initialized at the time the endpoint is being instatiated,
> whereas it was under tomcat 5.5.20.
>
> I read that there is a <bean depends-on="otherID"> attribute that induces
> otherID beans to be loaded and initialized first, but apparently that
> doesn't exist for jaxws:endpoint
>
> Is there another way to achieve the same result?
>
> Thanks
> Doug
>
>
>
> 879 [main] ERROR org.springframework.web.context.ContextLoader - Context
> initialization failed
> org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected
> exception parsing XML document from ServletContext r
> esource [/WEB-INF/beans.xml]; nested exception is
> org.springframework.beans.FatalBeanException: Could not load class: au.net.mm
> sn.pfc.servlet.serbices.rfio.impl.RemoteFileImpl; nested exception is
> java.lang.NullPointerException
> Caused by:
> org.springframework.beans.FatalBeanException: Could not load class:
> au.net.mmsn.pfc.servlet.serbices.rfio.impl.RemoteFileImpl;
> nested exception is java.lang.NullPointerException
> Caused by:
> java.lang.NullPointerException
> at
> au.net.mmsn.pfc.servlet.serbices.rfio.impl.FileUtilities.getServicePreference(FileUtilities.java:76)
> at
> au.net.mmsn.pfc.servlet.serbices.rfio.impl.RemoteFileImpl.<init>(RemoteFileImpl.java:29)
> 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:494)
>
>