You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Sergey Beryozkin <sb...@gmail.com> on 2012/07/09 13:39:36 UTC

NPE in one of WS-RM tests

Hi

I spotted NPE (see below) in one of WS-RM tests, when building a WS-RM 
module,but the tests pass...
Aki, may be you'd like to have a look :-)

Cheers, Sergey

Running org.apache.cxf.ws.rm.persistence.jdbc.RMTxStoreConfigurationTest
java.lang.NullPointerException
	at 
org.apache.cxf.ws.rm.persistence.jdbc.RMTxStore.createTables(RMTxStore.java:881)
	at 
org.apache.cxf.ws.rm.persistence.jdbc.RMTxStore.init(RMTxStore.java:1066)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1546)
	at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1487)
	at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1419)
	at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:518)
	at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
	at 
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
	at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
	at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
	at 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
	at 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
	at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1327)
	at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1085)
	at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:516)
	at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
	at 
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
	at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
	at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
	at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
	at 
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
	at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
	at 
org.apache.cxf.bus.spring.BusApplicationContext$1.run(BusApplicationContext.java:107)
	at 
org.apache.cxf.bus.spring.BusApplicationContext$1.run(BusApplicationContext.java:105)
	at java.security.AccessController.doPrivileged(Native Method)
	at 
org.apache.cxf.bus.spring.BusApplicationContext.<init>(BusApplicationContext.java:105)
	at 
org.apache.cxf.bus.spring.SpringBusFactory.createApplicationContext(SpringBusFactory.java:157)
	at 
org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:148)
	at 
org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:124)
	at 
org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:94)
	at 
org.apache.cxf.ws.rm.persistence.jdbc.RMTxStoreConfigurationTest.testTxStoreBean(RMTxStoreConfigurationTest.java:44)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at

Re: NPE in one of WS-RM tests

Posted by Sergey Beryozkin <sb...@gmail.com>.
On 09/07/12 17:07, Daniel Kulp wrote:
> On Monday, July 09, 2012 12:39:36 PM Sergey Beryozkin wrote:
>> Hi
>>
>> I spotted NPE (see below) in one of WS-RM tests, when building a WS-RM
>> module,but the tests pass...
>> Aki, may be you'd like to have a look :-)
>
> I have a fix for this on my machine that I didn't get a chance to commit
> prior to my having to run to the hospital with my kid last week (and then
> vacation).  Give me a few minutes to run tests and such.

Thanks Dan

Cheers, Sergey

>
> Dan
>
>
>
>
>
>>
>> Cheers, Sergey
>>
>> Running org.apache.cxf.ws.rm.persistence.jdbc.RMTxStoreConfigurationTest
>> java.lang.NullPointerException
>> 	at
>> org.apache.cxf.ws.rm.persistence.jdbc.RMTxStore.createTables(RMTxStore.jav
>> a:881) at
>> org.apache.cxf.ws.rm.persistence.jdbc.RMTxStore.init(RMTxStore.java:1066)
>> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> 	at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
>> 39) at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm
>> pl.java:25) at java.lang.reflect.Method.invoke(Method.java:597)
>> 	at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFacto
>> ry.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1546) at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFacto
>> ry.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1487) at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFacto
>> ry.initializeBean(AbstractAutowireCapableBeanFactory.java:1419) at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFacto
>> ry.doCreateBean(AbstractAutowireCapableBeanFactory.java:518) at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFacto
>> ry.createBean(AbstractAutowireCapableBeanFactory.java:455) at
>> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(
>> AbstractBeanFactory.java:293) at
>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.get
>> Singleton(DefaultSingletonBeanRegistry.java:222) at
>> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(Ab
>> stractBeanFactory.java:290) at
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abst
>> ractBeanFactory.java:192) at
>> org.springframework.beans.factory.support.BeanDefinitionValueResolver.reso
>> lveReference(BeanDefinitionValueResolver.java:322) at
>> org.springframework.beans.factory.support.BeanDefinitionValueResolver.reso
>> lveValueIfNecessary(BeanDefinitionValueResolver.java:106) at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFacto
>> ry.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1327) at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFacto
>> ry.populateBean(AbstractAutowireCapableBeanFactory.java:1085) at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFacto
>> ry.doCreateBean(AbstractAutowireCapableBeanFactory.java:516) at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFacto
>> ry.createBean(AbstractAutowireCapableBeanFactory.java:455) at
>> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(
>> AbstractBeanFactory.java:293) at
>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.get
>> Singleton(DefaultSingletonBeanRegistry.java:222) at
>> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(Ab
>> stractBeanFactory.java:290) at
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abst
>> ractBeanFactory.java:192) at
>> org.springframework.beans.factory.support.DefaultListableBeanFactory.preIn
>> stantiateSingletons(DefaultListableBeanFactory.java:585) at
>> org.springframework.context.support.AbstractApplicationContext.finishBeanF
>> actoryInitialization(AbstractApplicationContext.java:895) at
>> org.springframework.context.support.AbstractApplicationContext.refresh(Abs
>> tractApplicationContext.java:425) at
>> org.apache.cxf.bus.spring.BusApplicationContext$1.run(BusApplicationContex
>> t.java:107) at
>> org.apache.cxf.bus.spring.BusApplicationContext$1.run(BusApplicationContex
>> t.java:105) at java.security.AccessController.doPrivileged(Native Method)
>> 	at
>> org.apache.cxf.bus.spring.BusApplicationContext.<init>(BusApplicationConte
>> xt.java:105) at
>> org.apache.cxf.bus.spring.SpringBusFactory.createApplicationContext(Spring
>> BusFactory.java:157) at
>> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java
>> :148) at
>> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java
>> :124) at
>> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java
>> :94) at
>> org.apache.cxf.ws.rm.persistence.jdbc.RMTxStoreConfigurationTest.testTxSto
>> reBean(RMTxStoreConfigurationTest.java:44) at
>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> 	at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
>> 39) at



Re: NPE in one of WS-RM tests

Posted by Aki Yoshida <el...@gmail.com>.
Hi Sergey, Dan,
thanks.

There is an NPE-guard missing in the change I made recently.
This test itself passes okay because it only verifies the bean
configuration part using a dummy driver class.

regards, aki

2012/7/9 Daniel Kulp <dk...@apache.org>:
> On Monday, July 09, 2012 12:39:36 PM Sergey Beryozkin wrote:
>> Hi
>>
>> I spotted NPE (see below) in one of WS-RM tests, when building a WS-RM
>> module,but the tests pass...
>> Aki, may be you'd like to have a look :-)
>
> I have a fix for this on my machine that I didn't get a chance to commit
> prior to my having to run to the hospital with my kid last week (and then
> vacation).  Give me a few minutes to run tests and such.
>
> Dan
>
>
>
>
>
>>
>> Cheers, Sergey
>>
>> Running org.apache.cxf.ws.rm.persistence.jdbc.RMTxStoreConfigurationTest
>> java.lang.NullPointerException
>>       at
>> org.apache.cxf.ws.rm.persistence.jdbc.RMTxStore.createTables(RMTxStore.jav
>> a:881) at
>> org.apache.cxf.ws.rm.persistence.jdbc.RMTxStore.init(RMTxStore.java:1066)
>>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>       at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
>> 39) at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm
>> pl.java:25) at java.lang.reflect.Method.invoke(Method.java:597)
>>       at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFacto
>> ry.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1546) at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFacto
>> ry.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1487) at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFacto
>> ry.initializeBean(AbstractAutowireCapableBeanFactory.java:1419) at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFacto
>> ry.doCreateBean(AbstractAutowireCapableBeanFactory.java:518) at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFacto
>> ry.createBean(AbstractAutowireCapableBeanFactory.java:455) at
>> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(
>> AbstractBeanFactory.java:293) at
>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.get
>> Singleton(DefaultSingletonBeanRegistry.java:222) at
>> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(Ab
>> stractBeanFactory.java:290) at
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abst
>> ractBeanFactory.java:192) at
>> org.springframework.beans.factory.support.BeanDefinitionValueResolver.reso
>> lveReference(BeanDefinitionValueResolver.java:322) at
>> org.springframework.beans.factory.support.BeanDefinitionValueResolver.reso
>> lveValueIfNecessary(BeanDefinitionValueResolver.java:106) at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFacto
>> ry.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1327) at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFacto
>> ry.populateBean(AbstractAutowireCapableBeanFactory.java:1085) at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFacto
>> ry.doCreateBean(AbstractAutowireCapableBeanFactory.java:516) at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFacto
>> ry.createBean(AbstractAutowireCapableBeanFactory.java:455) at
>> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(
>> AbstractBeanFactory.java:293) at
>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.get
>> Singleton(DefaultSingletonBeanRegistry.java:222) at
>> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(Ab
>> stractBeanFactory.java:290) at
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abst
>> ractBeanFactory.java:192) at
>> org.springframework.beans.factory.support.DefaultListableBeanFactory.preIn
>> stantiateSingletons(DefaultListableBeanFactory.java:585) at
>> org.springframework.context.support.AbstractApplicationContext.finishBeanF
>> actoryInitialization(AbstractApplicationContext.java:895) at
>> org.springframework.context.support.AbstractApplicationContext.refresh(Abs
>> tractApplicationContext.java:425) at
>> org.apache.cxf.bus.spring.BusApplicationContext$1.run(BusApplicationContex
>> t.java:107) at
>> org.apache.cxf.bus.spring.BusApplicationContext$1.run(BusApplicationContex
>> t.java:105) at java.security.AccessController.doPrivileged(Native Method)
>>       at
>> org.apache.cxf.bus.spring.BusApplicationContext.<init>(BusApplicationConte
>> xt.java:105) at
>> org.apache.cxf.bus.spring.SpringBusFactory.createApplicationContext(Spring
>> BusFactory.java:157) at
>> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java
>> :148) at
>> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java
>> :124) at
>> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java
>> :94) at
>> org.apache.cxf.ws.rm.persistence.jdbc.RMTxStoreConfigurationTest.testTxSto
>> reBean(RMTxStoreConfigurationTest.java:44) at
>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>       at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
>> 39) at
> --
> Daniel Kulp
> dkulp@apache.org - http://dankulp.com/blog
> Talend Community Coder - http://coders.talend.com

Re: NPE in one of WS-RM tests

Posted by Daniel Kulp <dk...@apache.org>.
On Monday, July 09, 2012 12:39:36 PM Sergey Beryozkin wrote:
> Hi
> 
> I spotted NPE (see below) in one of WS-RM tests, when building a WS-RM
> module,but the tests pass...
> Aki, may be you'd like to have a look :-)

I have a fix for this on my machine that I didn't get a chance to commit 
prior to my having to run to the hospital with my kid last week (and then 
vacation).  Give me a few minutes to run tests and such.

Dan





> 
> Cheers, Sergey
> 
> Running org.apache.cxf.ws.rm.persistence.jdbc.RMTxStoreConfigurationTest
> java.lang.NullPointerException
> 	at
> org.apache.cxf.ws.rm.persistence.jdbc.RMTxStore.createTables(RMTxStore.jav
> a:881) at
> org.apache.cxf.ws.rm.persistence.jdbc.RMTxStore.init(RMTxStore.java:1066)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> 39) at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm
> pl.java:25) at java.lang.reflect.Method.invoke(Method.java:597)
> 	at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFacto
> ry.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1546) at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFacto
> ry.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1487) at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFacto
> ry.initializeBean(AbstractAutowireCapableBeanFactory.java:1419) at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFacto
> ry.doCreateBean(AbstractAutowireCapableBeanFactory.java:518) at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFacto
> ry.createBean(AbstractAutowireCapableBeanFactory.java:455) at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(
> AbstractBeanFactory.java:293) at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.get
> Singleton(DefaultSingletonBeanRegistry.java:222) at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(Ab
> stractBeanFactory.java:290) at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abst
> ractBeanFactory.java:192) at
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.reso
> lveReference(BeanDefinitionValueResolver.java:322) at
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.reso
> lveValueIfNecessary(BeanDefinitionValueResolver.java:106) at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFacto
> ry.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1327) at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFacto
> ry.populateBean(AbstractAutowireCapableBeanFactory.java:1085) at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFacto
> ry.doCreateBean(AbstractAutowireCapableBeanFactory.java:516) at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFacto
> ry.createBean(AbstractAutowireCapableBeanFactory.java:455) at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(
> AbstractBeanFactory.java:293) at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.get
> Singleton(DefaultSingletonBeanRegistry.java:222) at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(Ab
> stractBeanFactory.java:290) at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abst
> ractBeanFactory.java:192) at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preIn
> stantiateSingletons(DefaultListableBeanFactory.java:585) at
> org.springframework.context.support.AbstractApplicationContext.finishBeanF
> actoryInitialization(AbstractApplicationContext.java:895) at
> org.springframework.context.support.AbstractApplicationContext.refresh(Abs
> tractApplicationContext.java:425) at
> org.apache.cxf.bus.spring.BusApplicationContext$1.run(BusApplicationContex
> t.java:107) at
> org.apache.cxf.bus.spring.BusApplicationContext$1.run(BusApplicationContex
> t.java:105) at java.security.AccessController.doPrivileged(Native Method)
> 	at
> org.apache.cxf.bus.spring.BusApplicationContext.<init>(BusApplicationConte
> xt.java:105) at
> org.apache.cxf.bus.spring.SpringBusFactory.createApplicationContext(Spring
> BusFactory.java:157) at
> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java
> :148) at
> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java
> :124) at
> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java
> :94) at
> org.apache.cxf.ws.rm.persistence.jdbc.RMTxStoreConfigurationTest.testTxSto
> reBean(RMTxStoreConfigurationTest.java:44) at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> 39) at
-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com