I'm running with the following since three days and debugging/googling doesn't seem very helpful.
Well here's my context :
I have a legacy application -an Alfresco 3.4.d extenstion using war overlay- There's nothing special with the extension it self -a number of specific managers and services were developed and fully functional through spring contexts.
What I did is only upgrading Alfresco version from 3.4.d to 4.2.e, here's what I did :
- Installed Alfresco-4.2.e cummunity distribution somewhere on disk.
- On Eclipse, created a Tomcat server where CATALINA_BASE is the distribution TOMCAT.
- I followed the documentation to be able to deploy my extenstion instead of the original alfresco.war (removed actualy from $ALF/tomcat/webapps.
- I'm using MySQL and every thing is working well from this side.
My problem :
At application bootstrap time here's the exception that rises :
I understood that it's related to CXF but I can't figure out how to deal with it
.
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'smsManagerService': FactoryBean threw exception on object creation; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:149)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102)
at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1429)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
... 86 more
Caused by: java.lang.NullPointerException
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createBindingInfo(AbstractWSDLBasedEndpointFactory.java:338)
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpointInfo(AbstractWSDLBasedEndpointFactory.java:252)
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:147)
at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:90)
at org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:153)
at org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:151)
at org.apache.cxf.jaxws.spring.JaxWsProxyFactoryBeanDefinitionParser$JAXWSSpringClientProxyFactoryBean.create(JaxWsProxyFactoryBeanDefinitionParser.java:79)
at org.apache.cxf.jaxws.spring.JaxWsProxyFactoryBeanDefinitionParser$JAXWSSpringClientProxyFactoryBean.getObject(JaxWsProxyFactoryBeanDefinitionParser.java:83)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142)
... 91 more
Extras added after comments/discussion
smsManagerService code :
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
import javax.xml.ws.WebServiceFeature;
import javax.xml.ws.Service;
/**
* This class was generated by Apache CXF 2.7.6
* 2013-09-20T12:05:27.093+02:00
* Generated source version: 2.7.6
*
*/
@WebServiceClient(name = "managerService",
wsdlLocation = "CustomSoapi-dlw-1.61.wsdl",
targetNamespace = "http://soapi.XXX.com/manager")
public class ManagerService extends Service {
public final static URL WSDL_LOCATION;
public final static QName SERVICE = new QName("http://soapi.XXX.com/manager", "managerService");
public final static QName ManagerPort = new QName("http://soapi.XXX.com/manager", "managerPort");
static {
URL url = ManagerService.class.getResource("CustomSoapi-dlw-1.61.wsdl");
if (url == null) {
url = ManagerService.class.getClassLoader().getResource("CustomSoapi-dlw-1.61.wsdl");
}
if (url == null) {
java.util.logging.Logger.getLogger(ManagerService.class.getName())
.log(java.util.logging.Level.INFO,
"Can not initialize the default wsdl from {0}", "CustomSoapi-dlw-1.61.wsdl");
}
WSDL_LOCATION = url;
}
Migration to Alfresco 5.0.a (9/16/2014)
I recently go back to this issue in order to resolve it (i hope) but it seems it's still being hard to get it done.
Here's what I did and the context :
I have an Alfresco Extension (using maven overlays) based on version 3.4.d and MySQL 5.5 (running in production)
I installed Alfresco-5.0.a (On a Debian 64bits wheezy, JDK7) and run it : it worked
I removed the original alfresco.war (and the exploded war) from $ALF/tomcat/webapps and replaced with a built alfresco.war from my extension project (Java 7, Maven 3.2.1) and of course I updated the Alfresco dependency to meet 5.0.a version.
I kept the Postgres DB as is
started the alfresco
./alfresco.sh startgot this error and especially this part of the error :
{http://www.alfresco.org/model/content/1.0}copiedfrom has not been defined in the data dictionary
The complete Error
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'copyService' defined in class path resource [alfresco/copy-services-context.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Association {http://www.alfresco.org/model/content/1.0}original of class {http://www.alfresco.org/model/content/1.0}copiedfrom has not been defined in the data dictionary
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
... 126 more
Caused by: java.lang.IllegalArgumentException: Association {http://www.alfresco.org/model/content/1.0}original of class **{http://www.alfresco.org/model/content/1.0}copiedfrom has not been defined in the data dictionary**
at org.alfresco.repo.policy.PolicyComponentImpl.bindAssociationBehaviour(PolicyComponentImpl.java:365)
at org.alfresco.repo.copy.CopyServiceImpl.init(CopyServiceImpl.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1544)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1485)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
... 133 more
smsManagerService? - Gagravarr