Whenever I am running my Spring application with activiti integration I am getting below error:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngine' defined in ServletContext
resource [/WEB-INF/config/bean-daos.xml]: Instantiation of bean
failed;
nested exception is
org.springframework.beans.factory.BeanDefinitionStoreException:
Factory method [public org.activiti.engine.ProcessEngine
org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine()]
threw exception;
nested exception is
org.activiti.engine.ActivitiException: Error while building ibatis
SqlSessionFactory: Error creating document instance.
Cause:
java.net.UnknownHostException: mybatis.org
My configuration file for process engine is:
<bean id="dataSource" class="org.springframework.jdbc.datasource.SimpleDriverDataSource">
<property name="driverClass" value="org.postgresql.Driver" />
<property name="url" value="jdbc:postgresql://localhost:5432/activiti" />
<property name="username" value="postgres" />
<property name="password" value="*******" />
</bean>
<bean id="processEngineConfiguration"
class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">
<property name="dataSource" ref="apacheDatasourceref" />
<property name="databaseSchemaUpdate" value="true" />
<property name="jobExecutorActivate" value="false" />
</bean>
<tx:annotation-driven transaction-manager="transactionManager" />
<bean id="processEngine" factory-bean="processEngineConfiguration"
factory-method="buildProcessEngine" />
<bean id="repositoryService" factory-bean="processEngineConfiguration"
factory-method="getRepositoryService" />
<bean id="runtimeService" factory-bean="processEngineConfiguration"
factory-method="getRuntimeService" />
<bean id="taskService" factory-bean="processEngineConfiguration"
factory-method="getTaskService" />
<bean id="historyService" factory-bean="processEngineConfiguration"
factory-method="getHistoryService" />
<bean id="managementService" factory-bean="processEngineConfiguration"
factory-method="getManagementService" />
Related
I am trying to integrate the BPMN tool : camunda in my app . I have been using the camunda docs here : https://docs.camunda.org/stable/guides/getting-started-guides/spring-framework/#set-up/application-context for that purpose .
I have added the application context related information as it has been mentioned in there :
<bean id="dataSource" class="org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy">
<property name="targetDataSource">
<bean class="org.springframework.jdbc.datasource.SimpleDriverDataSource">
<property name="driverClass" value="org.h2.Driver" />
<property name="url"
value="jdbc:h2:mem:process-engine;DB_CLOSE_DELAY=1000" />
<property name="username" value="sa" />
<property name="password" value="" />
</bean>
</property>
</bean>
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
</bean>
<bean id="processEngineConfiguration" class="org.camunda.bpm.engine.spring.SpringProcessEngineConfiguration">
<property name="processEngineName" value="engine" />
<property name="dataSource" ref="dataSource" />
<property name="transactionManager" ref="transactionManager" />
<property name="databaseSchemaUpdate" value="true" />
<property name="jobExecutorActivate" value="false" />
</bean>
<bean id="processEngine" class="org.camunda.bpm.engine.spring.ProcessEngineFactoryBean">
<property name="processEngineConfiguration" ref="processEngineConfiguration" />
</bean>
<bean id="repositoryService" factory-bean="processEngine" factory-method="getRepositoryService" />
<bean id="runtimeService" factory-bean="processEngine" factory-method="getRuntimeService" />
<bean id="taskService" factory-bean="processEngine" factory-method="getTaskService" />
<bean id="historyService" factory-bean="processEngine" factory-method="getHistoryService" />
<bean id="managementService" factory-bean="processEngine" factory-method="getManagementService" />
But during build I am getting this error :
Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngine': FactoryBean threw exception on object creation; nested exception is org.camunda.bpm.engine.ProcessEngineException: Error while building ibatis SqlSessionFactory: Cause: org.xml.sax.SAXParseException; lineNumber: 95; columnNumber: 12; The content of element type "if" must match "(include|trim|where|set|foreach|choose|if)".
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:175) ~[spring-beans.jar:4.3.4.RELEASE]
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103) ~[spring-beans.jar:4.3.4.RELEASE]
Can someone please let me know what mistake I am making here ?
Any help will be greatly appreciated .
Camunda 7.3.0 uses mybatis 3.2.8 as per the project BOM.
You are using mybatis 3.2.2 which possibly causes a dependency version mismatch. Try updating your project mybatis dependencies to match the ones in your Camunda version.
I'm using Camel-Mybatis version 2.12.0.redhat-610379, when we trying to start the bundle thru karaf container the following exception throws. Please advice.
org.apache.ibatis.exceptions.PersistenceException:
Error opening session. Cause: java.lang.NullPointerException
Cause: java.lang.NullPointerException
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23)[280:org.mybatis.mybatis:3.2.5]
at org.apache.ibatis.session.defaults.DefaultSqlSessionFactory.openSessionFromDataSource(DefaultSqlSessionFactory.java:88)[280:org.mybatis.mybatis:3.2.5]
at org.apache.ibatis.session.defaults.DefaultSqlSessionFactory.openSession(DefaultSqlSessionFactory.java:43)[280:org.mybatis.mybatis:3.2.5]
at org.apache.camel.component.mybatis.MyBatisProducer.process(MyBatisProducer.java:51)[282:org.apache.camel.camel-mybatis:2.12.0.redhat-611412]
at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)[144:org.apache.camel.camel-core:2.12.0.redhat-611412]
at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:110)[144:org.apache.camel.camel-core:2.12.0.redhat-611412]
at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[144:org.apache.camel.camel-core:2.12.0.redhat-611412]
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)[144:org.apache.camel.camel-core:2.12.0.redhat-611412]
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:105)[144:org.apache.camel.camel-core:2.12.0.redhat-611412]
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:279)[144:org.apache.camel.camel-core:2.12.0.redhat-611412]
at org.apache.camel.processor.DefaultErrorHandler.process(DefaultErrorHandler.java:56)[144:org.apache.camel.camel-core:2.12.0.redhat-611412]
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:166)[144:org.apache.camel.camel-core:2.12.0.redhat-611412]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)[144:org.apache.camel.camel-core:2.12.0.redhat-611412]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[144:org.apache.camel.camel-core:2.12.0.redhat-611412]
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)[144:org.apache.camel.camel-core:2.12.0.redhat-611412]
at org.apache.camel.spring.spi.TransactionErrorHandler.processByErrorHandler(TransactionErrorHandler.java:218)[150:org.apache.camel.camel-spring:2.12.0.redhat-611412]
at org.apache.camel.spring.spi.TransactionErrorHandler.process(TransactionErrorHandler.java:99)[150:org.apache.camel.camel-spring:2.12.0.redhat-611412]
at org.apache.camel.spring.spi.TransactionErrorHandler.process(TransactionErrorHandler.java:112)[150:org.apache.camel.camel-spring:2.12.0.redhat-611412]
at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[144:org.apache.camel.camel-core:2.12.0.redhat-611412]
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)[144:org.apache.camel.camel-core:2.12.0.redhat-611412]
at org.apache.camel.spring.spi.TransactionErrorHandler.processByErrorHandler(TransactionErrorHandler.java:218)[150:org.apache.camel.camel-spring:2.12.0.redhat-611412]
at org.apache.camel.spring.spi.TransactionErrorHandler$1.doInTransactionWithoutResult(TransactionErrorHandler.java:181)[150:org.apache.camel.camel-spring:2.12.0.redhat-611412]
at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33)[149:org.apache.servicemix.bundles.spring-tx:3.2.9.RELEASE_1]
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:131)[149:org.apache.servicemix.bundles.spring-tx:3.2.9.RELEASE_1]
at org.apache.camel.spring.spi.TransactionErrorHandler.doInTransactionTemplate(TransactionErrorHandler.java:174)[150:org.apache.camel.camel-spring:2.12.0.redhat-611412]
at org.apache.camel.spring.spi.TransactionErrorHandler.processInTransaction(TransactionErrorHandler.java:134)[150:org.apache.camel.camel-spring:2.12.0.redhat-611412]
at org.apache.camel.spring.spi.TransactionErrorHandler.process(TransactionErrorHandler.java:103)[150:org.apache.camel.camel-spring:2.12.0.redhat-611412]
at org.apache.camel.spring.spi.TransactionErrorHandler.process(TransactionErrorHandler.java:112)[150:org.apache.camel.camel-spring:2.12.0.redhat-611412]
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[144:org.apache.camel.camel-core:2.12.0.redhat-611412]
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[144:org.apache.camel.camel-core:2.12.0.redhat-611412]
at org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:147)[144:org.apache.camel.camel-core:2.12.0.redhat-611412]
at org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:69)[144:org.apache.camel.camel-core:2.12.0.redhat-611412]
at java.util.TimerThread.mainLoop(Timer.java:555)[:1.7.0_01]
at java.util.TimerThread.run(Timer.java:505)[:1.7.0_01]
Caused by: java.lang.NullPointerException
at org.apache.ibatis.session.defaults.DefaultSqlSessionFactory.openSessionFromDataSource(DefaultSqlSessionFactory.java:83)[280:org.mybatis.mybatis:3.2.5]
... 32 more
Bean.xml
<bean id="ds" class="com.mchange.v2.c3p0.ComboPooledDataSource">
<property name="driverClass" value="oracle.jdbc.driver.OracleDriver"/>
<property name="jdbcUrl" value=""/>
<property name="user" value=""/>
<property name="password" value="" />
</bean>
<bean id="dataSource" class="org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy">
<argument ref="ds" />
</bean>
<bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource"/>
</bean>
<bean id="mybatisConfig" class="org.springframework.core.io.ClassPathResource">
<argument value="SqlMapConfig.xml" />
</bean>
<bean id="sqlSessionFactoryBean" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="configLocation" ref="mybatisConfig"/>
<property name="mapperLocations">
<array value-type="org.springframework.core.io.Resource">
<bean class="org.springframework.core.io.ClassPathResource">
<argument value="mappings/QueryMessaging.xml" />
</bean>
</array>
</property>
</bean>
<bean id="sqlSessionFactory" class="org.apache.ibatis.session.SqlSessionFactory" factory-ref="sqlSessionFactoryBean"
factory-method="getObject" />
<bean id="myBatis" class="org.apache.camel.component.mybatis.MyBatisComponent">
<property name="sqlSessionFactory" ref="sqlSessionFactory" />
</bean>
<bean id="PROPAGATION_REQUIRED" class="org.apache.camel.spring.spi.SpringTransactionPolicy">
<property name="transactionManager" ref="txManager"/>
<property name="propagationBehaviorName" value="PROPAGATION_REQUIRED"/>
</bean>
Connections and configurations are created properly, the bug I have made was in bean.xml i have used myBatis bean id, and camel route i have type as mybatis, due to case-sensitive, no environment was created, sorry for that.
This question may sound old but I am not able to use multiple properties files as after looking for solution I came to know that for validator class I added hibernate validator 4,5,Jboss Logging final jars and now Its saying
org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#1197783': Cannot resolve reference to bean 'validator' while setting bean property 'validator'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'validator' defined in ServletContext resource [/WEB-INF/springDispatcherServlet-servlet.xml]: Invocation of init method failed; nested exception is java.lang.AbstractMethodError: org.hibernate.validator.internal.engine.ConfigurationImpl.getDefaultParameterNameProvider()Ljavax/validation/ParameterNameProvider;
and this is my configuration file
<mvc:annotation-driven enable-matrix-variables="true"
validator="validator" />
<context:component-scan base-package="com.*" />
<bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/views/" />
<property name="suffix" value=".jsp" />
</bean>
<mvc:interceptors>
<mvc:interceptor>
<mvc:mapping path="/**" />
<bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor">
<property name="paramName" value="language" />
</bean>
</mvc:interceptor>
</mvc:interceptors>
<bean id="messageSource"
class="org.springframework.context.support.ResourceBundleMessageSource">
value="/com/resources/messages,/com/resources/messages_validation.properties"
<property name="defaultEncoding" value="UTF-8" />
</bean>
<bean id="localeResolver"
class="org.springframework.web.servlet.i18n.SessionLocaleResolver">
</bean>
<bean id="validator"
class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean">
<property name="validationMessageSource" ref="messageSource" />
</bean>
name of properties file (they are in same folder)
messages_en.properties
messages_nl.properties
messages_validations.properties
I am not able to understand why It is giving me error if everything is in right place
Please help
Try,
<bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
<property name="basenames">
<list>
<value>classpath:com/resources/messages</value>
<value>classpath:com/resources</value>
</list>
</property>
</bean>
I guess this should work assuming your messageproperties is under /com/resources
<bean id="messageSource"
class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
<property name="basename" value="classpath:/com/resources/messages/" />
<property name="defaultEncoding" value="UTF-8" />
<property name="fallbackToSystemLocale" value="false"/>
</bean>
Below is my spring configuration.
<bean id="taskThreadExecutor" class="org.springframework.scheduling.concurrent.ConcurrentTaskExecutor">
<property name="concurrentExecutor" ref="threadPoolExecutor" />
</bean>
<bean id="threadPoolExecutor" class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
<property name="corePoolSize" value="100" />
<property name="maxPoolSize" value="200" />
<property name="queueCapacity" value="300" />
</bean>
<bean id="concurrentTaskExecutor" class="org.springframework.scheduling.concurrent.ConcurrentTaskExecutor" scope="prototype">
<qualifier value="rmsTaskExecutor"></qualifier>
<property name="concurrentExecutor">
<bean class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
<property name="corePoolSize" value="400" />
<property name="maxPoolSize" value="600" />
<property name="queueCapacity" value="3000" />
</bean>
</property>
</bean>
In my class i do wiring as follows
#Autowired
#qualifier("rmsTaskExecutor")
private ConcurrentTaskExecutor concurrentTaskExecutor;
At runtime., I get the following exception., saying No unique bean of type.
nested exception is
org.springframework.beans.factory.NoSuchBeanDefinitionException: No
unique bean of type
[org.springframework.scheduling.concurrent.ConcurrentTaskExecutor] is
defined: expected single matching bean but found 2:
[taskThreadExecutor, concurrentTaskExecutor]
Dunnow where and what i missed., I am using spring 3.0.x version
Is normal, you have 2 ConcurrentTaskExecutor (taskThreadExecutor and concurrentTaskExecutor) so try to use #Resource(..)
Hy there folks, i'm facing a problem here where I work, there is a project when initialized works with 1 SQL Server Instance, 2 DB2 instances.
The problem is, this project was based on another project to keep the similar structure, but on this new project we don't use the SQL Server instance who is in reference on some xml files, I tried to comment these references, when I start the project on Tomcat, the project show me few errors.
As a new on Spring, how can I remove this connection properly??
beans.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.5.xsd">
<jee:jndi-lookup id="IP_ICMS_RJ" jndi-name="java:comp/env/IP_ICMS_RJ" />
<jee:jndi-lookup id="USUARIO_ICMS_RJ" jndi-name="java:comp/env/USUARIO_ICMS_RJ" />
<jee:jndi-lookup id="SENHA_ICMS_RJ" jndi-name="java:comp/env/SENHA_ICMS_RJ" />
<jee:jndi-lookup id="IP_ICMS_SP" jndi-name="java:comp/env/IP_ICMS_SP" />
<jee:jndi-lookup id="USUARIO_ICMS_SP" jndi-name="java:comp/env/USUARIO_ICMS_SP" />
<jee:jndi-lookup id="SENHA_ICMS_SP" jndi-name="java:comp/env/SENHA_ICMS_SP" />
<jee:jndi-lookup id="PSACWSDocumentURL" jndi-name="java:comp/env/PSACWSDocumentURL" />
<jee:jndi-lookup id="PSACWSEndPoint" jndi-name="java:comp/env/PSACWSEndPoint" />
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<aop:aspectj-autoproxy/>
<bean id="FaleConoscoWSBean" class="br.com.embratel.faleconosco.ws.FaleConoscoWSBean">
</bean>
<bean id="RoboFaleConoscoWSBean" class="br.com.embratel.faleconosco.ws.RoboFaleConoscoWSBean">
</bean>
<!-- <bean id="faleConoscoDS" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="java:comp/env/jdbc/FaleConoscoDS" />
</bean> -->
<bean id="icmsRJDS" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="java:comp/env/jdbc/ICMS_RJ_DS" />
</bean>
<bean id="icmsSPDS" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="java:comp/env/jdbc/ICMS_SP_DS" />
</bean>
<bean id="icmsRJ" class="org.springframework.jdbc.core.simple.SimpleJdbcTemplate">
<constructor-arg ref="icmsRJDS" />
</bean>
<bean id="icmsSP" class="org.springframework.jdbc.core.simple.SimpleJdbcTemplate">
<constructor-arg ref="icmsSPDS" />
</bean>
<util:map id="icmsPropertiesMap">
<entry key="IP_RJ" value-ref="IP_ICMS_RJ" />
<entry key="USUARIO_RJ" value-ref="USUARIO_ICMS_RJ" />
<entry key="SENHA_RJ" value-ref="SENHA_ICMS_RJ" />
<entry key="IP_SP" value-ref="IP_ICMS_SP" />
<entry key="USUARIO_SP" value-ref="USUARIO_ICMS_SP" />
<entry key="SENHA_SP" value-ref="SENHA_ICMS_SP" />
</util:map>
<!-- Lista de processadores de OS -->
<util:list id="processors">
<bean class="br.com.embratel.faleconosco.ws.service.os.processor.ClienteProcessor" />
<bean class="br.com.embratel.faleconosco.ws.service.os.processor.ServicoEquipamentoProcessor" />
<bean class="br.com.embratel.faleconosco.ws.service.os.processor.SuspensaoProcessor" />
<bean class="br.com.embratel.faleconosco.ws.service.os.processor.SaldoProcessor" />
<bean class="br.com.embratel.faleconosco.ws.service.os.processor.DebitoAutomaticoProcessor" />
</util:list>
<context:annotation-config />
<context:component-scan base-package="br.com.embratel.faleconosco">
<context:include-filter type="annotation" expression="javax.jws.WebService" />
</context:component-scan>
<!-- <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="faleConoscoDS" />
<property name="jpaDialect">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaDialect" />
</property>
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="database" value="SQL_SERVER" />
<property name="databasePlatform" value="org.hibernate.dialect.SQLServerDialect" />
<property name="showSql" value="true" />
<property name="generateDdl" value="false" />
</bean>
</property>
<property name="jpaPropertyMap">
<map>
<entry key="org.hibernate.type" value="true" />
<entry key="org.hibernate.transaction" value="true" />
</map>
</property>
</bean>
<bean id="jpaTemplate" class="br.com.embratel.faleconosco.ws.dao.JpaTemplateExt">
<property name="entityManagerFactory" ref="entityManagerFactory" />
</bean>
<bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" />
<bean class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor" />
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory" />
</bean>
enable the configuration of transactional behavior based on annotations
<tx:annotation-driven transaction-manager="transactionManager" /> -->
<bean id="ProtocoloWS" class="org.springframework.remoting.jaxrpc.JaxRpcPortProxyFactoryBean" scope="prototype">
<property name="serviceFactoryClass">
<value>org.apache.axis.client.ServiceFactory</value>
</property>
<property name="wsdlDocumentUrl" ref="PSACWSDocumentURL" />
<property name="endpointAddress" ref="PSACWSEndPoint" />
<property name="serviceName">
<value>ProtocoloWSService</value>
</property>
<property name="namespaceUri">
<value>http://webservices.protocolounico.embratel.com.br/</value>
</property>
<property name="portName">
<value>ProtocoloWSPort</value>
</property>
<property name="portInterface">
<value>br.com.embratel.protocolounico.webservices.ProtocoloWS</value>
</property>
<property name="serviceInterface">
<value>br.com.embratel.protocolounico.webservices.ProtocoloWS</value>
</property>
<property name="customPropertyMap">
<map>
<entry>
<key><value type="java.lang.String">axis.connection.timeout</value></key>
<value type="java.lang.Integer">300000</value>
</entry>
</map>
</property>
</bean>
<bean id="LoggerAspect" class="br.com.embratel.faleconosco.ws.aop.LoggerAspect">
</bean>
<jaxws:endpoint xmlns:tns="http://ws.faleconosco.embratel.com.br/" id="faleconoscowsbean"
implementor="#FaleConoscoWSBean" wsdlLocation="wsdl/faleconoscowsbean.wsdl" endpointName="tns:FaleConoscoWSPort"
serviceName="tns:FaleConoscoWSService" address="/FaleConoscoWSPort">
<jaxws:features>
bean class="org.apache.cxf.feature.LoggingFeature" /
</jaxws:features>
</jaxws:endpoint>
<jaxws:endpoint xmlns:tns="http://ws.faleconosco.embratel.com.br/" id="robofaleconoscowsbean"
implementor="#RoboFaleConoscoWSBean" wsdlLocation="wsdl/robofaleconoscowsbean.wsdl"
endpointName="tns:RoboFaleConoscoWSPort" serviceName="tns:RoboFaleConoscoWSService" address="/RoboFaleConoscoWSPort">
<jaxws:features>
bean class="org.apache.cxf.feature.LoggingFeature" /
</jaxws:features>
</jaxws:endpoint>
</beans>
ERRORS
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'FaleConoscoWSBean': Autowiring of fields failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private br.com.embratel.faleconosco.ws.service.usuario.UsuarioService br.com.embratel.faleconosco.ws.FaleConoscoWSBean.usuarioService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'usuarioServiceImpl': Autowiring of fields failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private br.com.embratel.faleconosco.ws.service.email.EnviarEmailService br.com.embratel.faleconosco.ws.service.usuario.UsuarioServiceImpl.enviarEmailService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'enviarEmailServiceImpl': Autowiring of fields failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private br.com.embratel.faleconosco.ws.dao.JpaTemplateExt br.com.embratel.faleconosco.ws.service.BaseServiceImpl.jpaTemplate; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [br.com.embratel.faleconosco.ws.dao.JpaTemplateExt] is defined: Unsatisfied dependency of type [class br.com.embratel.faleconosco.ws.dao.JpaTemplateExt]: expected at least 1 matching bean
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessAfterInstantiation(AutowiredAnnotationBeanPostProcessor.java:243)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:959)
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:222)
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:728)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at
Well I Studied better Spring and re create the xml.
I removed this part of the code from the code above.
Creating the file from the begining.
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="database" value="SQL_SERVER" />
<property name="databasePlatform" value="org.hibernate.dialect.SQLServerDialect" />
<property name="showSql" value="true" />
<property name="generateDdl" value="false" />
</bean>
</property>