spring - Cannot convert value of type [com.ibm.ws.naming.util.CacheableReference] to required type [javax.persistence.EntityManagerFactory] for property -


i have spring (using jsf1.2 , hibernate) web application, when try run in websphere8.5 following exception unable debug

below error stacktrace:

com.ibm.ws.naming.util.cacheablereference@70bf45a1[super=reference class name: javax.persistence.entitymanagerfactory type: jpajndilookupinfo content: puid=3dsacsfrontofficeweb_war#3dsacsfrontofficeweb.war#3ds-acs-entitymanager-pu, 3dsacsfrontofficeweb_war#3dsacsfrontofficeweb.war#persistence/3ds-acs-entitymanager-pu, isfactory=true, issfsb=false, , properties=[] ]  [27/01/16 10:18:27:872 wet] 0000008a ffdcprovider  w com.ibm.ws.ffdc.impl.ffdcprovider logincident ffdc1003i: incident ffdc émis sur c:\program files (x86)\ibm\websphere\appserver\profiles\appsrv01\logs\ffdc\server1_22048ced_16.01.27_10.18.27.8516602842131953426877.txt com.ibm.ws.webcontainer.webapp.webapp.notifyservletcontextcreated 1341 [27/01/16 10:18:27:872 wet] 0000008a webapp        e com.ibm.ws.webcontainer.webapp.webapp notifyservletcontextcreated srve0283e: exception interceptée lors de l''initialisation du contexte : {0}                                  org.springframework.beans.factory.beancreationexception: error creating bean name 'org.springframework.security.config.http.userdetailsserviceinjectionbeanpostprocessor#0': initialization of bean failed; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'cxf' defined in class path resource [meta-inf/cxf/cxf.xml]: initialization of bean failed; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'org.springframework.transaction.config.internaltransactionadvisor': cannot resolve reference bean 'org.springframework.transaction.annotation.annotationtransactionattributesource#0' while setting bean property 'transactionattributesource'; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'org.springframework.transaction.annotation.annotationtransactionattributesource#0': initialization of bean failed; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'org.springframework.transaction.interceptor.transactionattributesourceadvisor#0' defined in url [wsjar:file:/c:/program%20files%20(x86)/ibm/websphere/appserver/profiles/appsrv01/installedapps/pc-s2m4node01cell/3dsacsfrontofficeweb_war.ear/3dsacsfrontofficeweb.war/web-inf/lib/3ds-acs-front-office-service-1.0.0-snapshot.jar!/selectsystem-service-context.xml]: cannot resolve reference bean 'txinterceptor' while setting bean property 'transactioninterceptor'; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'txinterceptor' defined in url [wsjar:file:/c:/program%20files%20(x86)/ibm/websphere/appserver/profiles/appsrv01/installedapps/pc-s2m4node01cell/3dsacsfrontofficeweb_war.ear/3dsacsfrontofficeweb.war/web-inf/lib/3ds-acs-front-office-service-1.0.0-snapshot.jar!/selectsystem-service-context.xml]: cannot resolve reference bean 'transactionmanager' while setting bean property 'transactionmanager'; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'transactionmanager' defined in url [wsjar:file:/c:/program%20files%20(x86)/ibm/websphere/appserver/profiles/appsrv01/installedapps/pc-s2m4node01cell/3dsacsfrontofficeweb_war.ear/3dsacsfrontofficeweb.war/web-inf/lib/3ds-acs-front-office-service-1.0.0-snapshot.jar!/selectsystem-service-context.xml]: initialization of bean failed; nested exception org.springframework.beans.conversionnotsupportedexception: failed convert property value of type 'com.ibm.ws.naming.util.cacheablereference' required type 'javax.persistence.entitymanagerfactory' property 'entitymanagerfactory'; nested exception java.lang.illegalstateexception: cannot convert value of type [com.ibm.ws.naming.util.cacheablereference] required type [javax.persistence.entitymanagerfactory] property 'entitymanagerfactory': no matching editors or conversion strategy found     @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.docreatebean(abstractautowirecapablebeanfactory.java:527)     @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.createbean(abstractautowirecapablebeanfactory.java:456)     @ org.springframework.beans.factory.support.abstractbeanfactory$1.getobject(abstractbeanfactory.java:293)     @ org.springframework.beans.factory.support.defaultsingletonbeanregistry.getsingleton(defaultsingletonbeanregistry.java:222)     @ org.springframework.beans.factory.support.abstractbeanfactory.dogetbean(abstractbeanfactory.java:290)     @ org.springframework.beans.factory.support.abstractbeanfactory.getbean(abstractbeanfactory.java:196)     @ org.springframework.context.support.abstractapplicationcontext.registerbeanpostprocessors(abstractapplicationcontext.java:722)     @ org.springframework.context.support.abstractapplicationcontext.refresh(abstractapplicationcontext.java:410)     @ org.springframework.web.context.contextloader.createwebapplicationcontext(contextloader.java:282)  ... ... caused by: org.springframework.beans.factory.beancreationexception: error creating bean name 'cxf' defined in class path resource [meta-inf/cxf/cxf.xml]: initialization of bean failed; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'org.springframework.transaction.config.internaltransactionadvisor': cannot resolve reference bean 'org.springframework.transaction.annotation.annotationtransactionattributesource#0' while setting bean property 'transactionattributesource'; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'org.springframework.transaction.annotation.annotationtransactionattributesource#0': initialization of bean failed; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'org.springframework.transaction.interceptor.transactionattributesourceadvisor#0' defined in url [wsjar:file:/c:/program%20files%20(x86)/ibm/websphere/appserver/profiles/appsrv01/installedapps/pc-s2m4node01cell/3dsacsfrontofficeweb_war.ear/3dsacsfrontofficeweb.war/web-inf/lib/3ds-acs-front-office-service-1.0.0-snapshot.jar!/selectsystem-service-context.xml]: cannot resolve reference bean 'txinterceptor' while setting bean property 'transactioninterceptor'; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'txinterceptor' defined in url [wsjar:file:/c:/program%20files%20(x86)/ibm/websphere/appserver/profiles/appsrv01/installedapps/pc-s2m4node01cell/3dsacsfrontofficeweb_war.ear/3dsacsfrontofficeweb.war/web-inf/lib/3ds-acs-front-office-service-1.0.0-snapshot.jar!/selectsystem-service-context.xml]: cannot resolve reference bean 'transactionmanager' while setting bean property 'transactionmanager'; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'transactionmanager' defined in url [wsjar:file:/c:/program%20files%20(x86)/ibm/websphere/appserver/profiles/appsrv01/installedapps/pc-s2m4node01cell/3dsacsfrontofficeweb_war.ear/3dsacsfrontofficeweb.war/web-inf/lib/3ds-acs-front-office-service-1.0.0-snapshot.jar!/selectsystem-service-context.xml]: initialization of bean failed; nested exception org.springframework.beans.conversionnotsupportedexception: failed convert property value of type 'com.ibm.ws.naming.util.cacheablereference' required type 'javax.persistence.entitymanagerfactory' property 'entitymanagerfactory'; nested exception java.lang.illegalstateexception: cannot convert value of type [com.ibm.ws.naming.util.cacheablereference] required type [javax.persistence.entitymanagerfactory] property 'entitymanagerfactory': no matching editors or conversion strategy found     @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.docreatebean(abstractautowirecapablebeanfactory.java:527)     @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.createbean(abstractautowirecapablebeanfactory.java:456)     @ org.springframework.beans.factory.support.abstractbeanfactory$1.getobject(abstractbeanfactory.java:293)     @ org.springframework.beans.factory.support.defaultsingletonbeanregistry.getsingleton(defaultsingletonbeanregistry.java:222)     @ org.springframework.beans.factory.support.abstractbeanfactory.dogetbean(abstractbeanfactory.java:290)     @ org.springframework.beans.factory.support.abstractbeanfactory.getbean(abstractbeanfactory.java:192)     @ org.springframework.context.support.abstractapplicationcontext.getbean(abstractapplicationcontext.java:1075)     @ org.apache.cxf.bus.spring.busextensionpostprocessor.getbus(busextensionpostprocessor.java:62)     @ org.apache.cxf.bus.spring.busextensionpostprocessor.postprocessbeforeinitialization(busextensionpostprocessor.java:53)     @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.applybeanpostprocessorsbeforeinitialization(abstractautowirecapablebeanfactory.java:394)     @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.initializebean(abstractautowirecapablebeanfactory.java:1413)     @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.docreatebean(abstractautowirecapablebeanfactory.java:519)     ... 114 more 

the added following code in web.xml :

 <resource-ref>    <res-ref-name>jdbc/acs_3ds_websphere_db</res-ref-name>    <res-type>javax.sql.datasource</res-type>    <res-auth>container</res-auth>    <res-sharing-scope>shareable</res-sharing-scope> </resource-ref>  <persistence-unit-ref>    <persistence-unit-ref-name>persistence/3ds-acs-entitymanager-pu</persistence-unit-ref-name>    <persistence-unit-name>3ds-acs-entitymanager-pu</persistence-unit-name> </persistence-unit-ref>  

in application-context.xml have following :

<?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:jee="http://www.springframework.org/schema/jee"        xmlns:tx="http://www.springframework.org/schema/tx"        xsi:schemalocation="http://www.springframework.org/schema/beans         http://www.springframework.org/schema/beans/spring-beans-3.0.xsd           http://www.springframework.org/schema/jee            http://www.springframework.org/schema/jee/spring-jee-3.0.xsd           http://www.springframework.org/schema/tx          http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">       <!-- <bean id="entitymanagerfactory" class="javax.persistence.persistence" factory-method="createentitymanagerfactory">         <constructor-arg type="java.lang.string" value="3ds-acs-back-entitymanager-pu" />     </bean> -->     <jee:jndi-lookup id="datasource" jndi-name="jdbc/acs_3ds_websphere_db" cache="true" resource-ref="true" lookup-on-startup="false"     proxy-interface="javax.sql.datasource"/>      <jee:jndi-lookup id="entitymanagerfactory" jndi-name="persistence/3ds-acs-entitymanager-pu" />      <bean id="transactionmanager"             class="org.springframework.transaction.jta.websphereuowtransactionmanager"/>     <tx:annotation-driven transaction-manager="transactionmanager" proxy-target-class="true" />   </beans> 

and persistence.xml have :

<?xml version="1.0" encoding="utf-8"?> <persistence xmlns="http://java.sun.com/xml/ns/persistence"     xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"     xsi:schemalocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"     version="2.0">         <persistence-unit name="3ds-acs-entitymanager-pu" transaction-type="jta">         <provider>org.hibernate.ejb.hibernatepersistence</provider>         <jta-data-source>java:comp/env/jdbc/acs_3ds_websphere_db</jta-data-source>             <properties>              <property name="hibernate.dialect" value="org.hibernate.dialect.oracle10gdialect"/>              <property name="hibernate.transaction.factory_class" value="org.hibernate.transaction.cmttransactionfactory" />              <property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.websphereextendedjtaplatform" />              <property name="hibernate.transaction.flush_before_completion" value="true" />              <property name="hibernate.transaction.auto_close_session" value="true" />              <property name="hibernate.temp.use_jdbc_metadata_defaults" value="false" />              <property name="hibernate.show_sql" value="false" />              <property name="hibernate.query.substitutions" value="true 'y', false 'n'" />              <property name="hibernate.cache.use_second_level_cache" value="true" />         </properties>     </persistence-unit>   </persistence> 

i added file web-inf/ibm-web-bnd.xml contains :

<?xml version="1.0" encoding="utf-8"?> <web-bnd      xmlns="http://websphere.ibm.com/xml/ns/javaee"     xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"     xsi:schemalocation="http://websphere.ibm.com/xml/ns/javaee http://websphere.ibm.com/xml/ns/javaee/ibm-web-bnd_1_2.xsd"     version="1.2">      <virtual-host name="default_host" />      <resource-ref name="jdbc/acs_3ds_websphere_db" binding-name="jdbc/acs_3ds_websphere_db" /> </web-bnd> 

i stucked here more 2 days


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -