Return-Path: Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: (qmail 53669 invoked from network); 19 Oct 2009 17:56:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 19 Oct 2009 17:56:23 -0000 Received: (qmail 77596 invoked by uid 500); 19 Oct 2009 17:56:23 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 77580 invoked by uid 500); 19 Oct 2009 17:56:23 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 77570 invoked by uid 99); 19 Oct 2009 17:56:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Oct 2009 17:56:23 +0000 X-ASF-Spam-Status: No, hits=-1998.5 required=10.0 tests=ALL_TRUSTED,WEIRD_PORT X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Oct 2009 17:56:20 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 65A41234C045 for ; Mon, 19 Oct 2009 10:55:59 -0700 (PDT) Message-ID: <2022427321.1255974959400.JavaMail.jira@brutus> Date: Mon, 19 Oct 2009 17:55:59 +0000 (UTC) From: "Daniel Kulp (JIRA)" To: issues@cxf.apache.org Subject: [jira] Updated: (CXF-2476) NullpointerException when ServiceClass is not set on client In-Reply-To: <2021195078.1255637251455.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CXF-2476?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Kulp updated CXF-2476: ----------------------------- Fix Version/s: (was: 2.3) 2.2.5 > NullpointerException when ServiceClass is not set on client > ----------------------------------------------------------- > > Key: CXF-2476 > URL: https://issues.apache.org/jira/browse/CXF-2476 > Project: CXF > Issue Type: Bug > Components: JAX-WS Runtime > Affects Versions: 2.2.4 > Reporter: Christian Schneider > Assignee: Christian Schneider > Fix For: 2.2.5 > > > When the serviceClass property is set to an empty string or not defined in a client definition a NullpointerException is thrown: > serviceName="customer:CustomerServiceService" > endpointName="customer:CustomerServiceEndpoint" > address="http://localhost:9090/CustomerServicePort" > serviceClass=""> > > The issue can be easily reproduced by deleting the setting the serviceClass like above in the WSDL first example and starting the CustomerServiceSpringClient. > I think we should throw a meaningfull Exception that says that serviceClass has to be set to the fully qualified name of the service interface. The question is only: Where is the right place to put this? > The exception is attached below: > -------------------------------------------------------- > Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tester' defined in class path resource [client-applicationContext.xml]: Cannot resolve reference to bean 'customerService' while setting bean property 'customerService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customerService': FactoryBean threw exception on object creation; nested exception is java.lang.NullPointerException > at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275) > at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104) > at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245) > at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010) > at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472) > at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) > at java.security.AccessController.doPrivileged(Native Method) > at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) > at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) > at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221) > at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) > at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) > at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) > at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429) > at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729) > at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381) > at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139) > at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:93) > at com.example.customerservice.client.CustomerServiceSpringClient.main(CustomerServiceSpringClient.java:33) > Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customerService': FactoryBean threw exception on object creation; nested exception is java.lang.NullPointerException > at org.springframework.beans.factory.support.FactoryBeanRegistrySupport$1.run(FactoryBeanRegistrySupport.java:127) > at java.security.AccessController.doPrivileged(Native Method) > at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:116) > at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:98) > at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1285) > at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:217) > at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) > at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) > at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269) > ... 18 more > Caused by: java.lang.NullPointerException > at org.apache.cxf.jaxws.support.JaxWsImplementorInfo.getWSInterfaceName(JaxWsImplementorInfo.java:231) > at org.apache.cxf.jaxws.support.JaxWsImplementorInfo.initialize(JaxWsImplementorInfo.java:270) > at org.apache.cxf.jaxws.support.JaxWsImplementorInfo.(JaxWsImplementorInfo.java:57) > at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.setServiceClass(JaxWsServiceFactoryBean.java:173) > at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.initializeServiceFactory(AbstractWSDLBasedEndpointFactory.java:227) > at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:99) > at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:52) > at org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:102) > at org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:115) > at org.apache.cxf.jaxws.spring.JaxWsProxyFactoryBeanDefinitionParser$JAXWSSpringClientProxyFactoryBean.getObject(JaxWsProxyFactoryBeanDefinitionParser.java:74) > at org.springframework.beans.factory.support.FactoryBeanRegistrySupport$1.run(FactoryBeanRegistrySupport.java:121) > ... 26 more -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.