Win a copy of Head First Go this week in the Go forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
Bartenders:
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

Unable to connect weblogic server and intellij idea to remote oracle database  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was creating two domains. One domain named “base_Domain” is for local database, and the other domain named “qa_domain” is for remote database. When I started my base_Domain and from IntelliJ started my deployment, then my war successfully deployed on weblogic server.

But in case of qa_domain, when I started my weblogic and from IntelliJ started my deployment, then my war deployment failed with error:

Caused By: org.springframework.beans.factory.BeanCreationException: Could not autowire field: Injection of autowired dependencies failed;”

This error was resolved when I changed my qa_domain datasource configuration remote database to local database.

Why can't my weblogic and intellij idea connect to my remote db?

Weblogic.xml:

<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/weblogic-web-app">
   <container-descriptor>
       <prefer-web-inf-classes>true</prefer-web-inf-classes>
   </container-descriptor>

   <library-ref>
       <library-name>vjet-shared-libs</library-name>
       <specification-version>1</specification-version>
       <implementation-version>1</implementation-version>
   </library-ref>

   <resource-description>
       <res-ref-name>WorkManager</res-ref-name>
       <jndi-name>wm/WorkManage</jndi-name>
   </resource-description>

   <session-descriptor>
       <persistent-store-type>REPLICATED_IF_CLUSTERED</persistent-store-type>
   </session-descriptor>
</weblogic-web-app>
Weblogic datasource file for base_domain(local database). By using this datasource, my weblogic and intellij idea successfully deployed war and autowired.

local-jdbc.xml
<?xml version='1.0' encoding='UTF-8'?>
<jdbc-data-source xmlns="http://xmlns.oracle.com/weblogic/jdbc-data-source" xmlns:sec="http://xmlns.oracle.com/weblogic/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wls="http://xmlns.oracle.com/weblogic/security/wls" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/jdbc-data-source http://xmlns.oracle.com/weblogic/jdbc-data-source/1.0/jdbc-data-source.xsd">
 <name>local</name>
 <jdbc-driver-params>
   <url>jdbcracle:thin:@localhost:1521:orcl</url>
   <driver-name>oracle.jdbc.xa.client.OracleXADataSource</driver-name>
   <properties>
     <property>
       <name>user</name>
       <value>GLDB</value>
     </property>
   </properties>
   <password-encrypted>{AES}YJAbyQmO3</password-encrypted>
 </jdbc-driver-params>
 <jdbc-connection-pool-params>
   <test-table-name>SQL ISVALID</test-table-name>
 </jdbc-connection-pool-params>
 <jdbc-data-source-params>
   <jndi-name>jdbc/vjcore</jndi-name>
   <global-transactions-protocol>TwoPhaseCommit</global-transactions-protocol>
 </jdbc-data-source-params>
</jdbc-data-source>
Weblogic datasource file for qa_domain(remote database). By using this datasource my weblogic and intellij idea could not find beans.

qa-jdbc.xml
<?xml version='1.0' encoding='UTF-8'?>
<jdbc-data-source xmlns="http://xmlns.oracle.com/weblogic/jdbc-data-source" xmlns:sec="http://xmlns.oracle.com/weblogic/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wls="http://xmlns.oracle.com/weblogic/security/wls" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/jdbc-data-source http://xmlns.oracle.com/weblogic/jdbc-data-source/1.0/jdbc-data-source.xsd">
 <name>qa</name>
 <jdbc-driver-params>
   <url>jdbc:oracle:thin:@host.com:1521/fbhost</url>
   <driver-name>oracle.jdbc.xa.client.OracleXADataSource</driver-name>
   <properties>
     <property>
       <name>user</name>
       <value>QA</value>
     </property>
   </properties>
   <password-encrypted>{AES}Yk6YZOZyX8guA</password-encrypted>
 </jdbc-driver-params>
 <jdbc-connection-pool-params>
   <test-table-name>SQL ISVALID</test-table-name>
 </jdbc-connection-pool-params>
 <jdbc-data-source-params>
   <jndi-name>jdbc/vjcore</jndi-name>
   <global-transactions-protocol>TwoPhaseCommit</global-transactions-protocol>
 </jdbc-data-source-params>
</jdbc-data-source>
Build Failed on inteliij idea, whenever I am trying to connect my remote database.

Error:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bpmIterationsListener' defined in ServletContext resource [/WEB-INF/jms-context.xml]: Cannot resolve reference to bean 'bpmIterationsQueueMessageListener' while setting bean property 'messageListener'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bpmIterationsQueueMessageListener': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.vistajet.business.logic.bpm.BpmIterationsQueueMessageHandler com.vistajet.business.logic.bpm.BpmIterationsQueueMessageListener.messageHandler; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bpmIterationsQueueMessageHandlerImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.vistajet.business.logic.bpm.BpmClientService com.vistajet.business.logic.bpm.BpmIterationsQueueMessageHandlerImpl.bpmClientService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bpmClientServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.vistajet.business.logic.flightorder.FlightOrderBusinessLogicService com.vistajet.business.logic.bpm.BpmClientServiceImpl.flightOrderBusinessLogicService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flightOrderBusinessLogicServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.vistajet.business.logic.AvailabilityObserver com.vistajet.business.logic.flightorder.FlightOrderBusinessLogicServiceImpl.availabilityObserver; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'availabilityObserverImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: protected com.vistajet.business.logic.flightleg.FlightLegBusinessLogicService com.vistajet.business.logic.observer.flightorder.BaseFlightOrderUpdateObserver.flightLegBusinessLogicService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flightLegBusinessLogicServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: com.vistajet.model.redis.redismanager.RedisFlightLegItineraryManager com.vistajet.business.logic.flightleg.FlightLegBusinessLogicServiceImpl.redisFlightLegItineraryManager; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisFlightLegItineraryManagerImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.vistajet.model.redis.Redis com.vistajet.model.redis.redismanager.GenericRedisManagerImpl.redis; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisImplDb0': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.data.redis.core.RedisTemplate com.vistajet.model.redis.RedisImplDB0.redis; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisTemplate' defined in class path resource [core-context.xml]: Cannot resolve reference to bean 'jedisConnFactory' while setting bean property 'connectionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jedisConnFactory' defined in class path resource [core-context.xml]: Invocation of init method failed; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: All sentinels down, cannot determine where is gvmaster master is running...
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:334)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1419)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1160)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
This issue is only with the remote oracle database, not with my local database. Why is ejb dependent on oracle database connections?

I'm using weblogic12c verison 12.1.3.0.0, database oracle sql developer and inellij idea version 14.1.4.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!