Friday, January 19, 2018

Change database JDBC URL from deployed ear file

When i would like to change database JDBC URL of deployed application in weblogic from console , it gave below error 

Console encountered the following error java.lang.IllegalArgumentException: [J2EE Deployment SPI:260140]Unable to remove descriptor bean 
weblogic.j2ee.descriptor.wl.JDBCPropertyBeanImpl@179efc1([MYAPP]/JDBCDriverParams/Properties/Properties[user]) due to 'Unable to remove bean since not defined in plan'. The remover should first check to see if the bean is removable in the deployment plan prior to removing it.

Of course there is a way to solve this issue at weblogic side , but i prefered changing database url from ear file directly changing related jdbc.xml file

Action Plan,


  • Stop WebLogic
  • Locate ear file of application 
  • Backup ear file 
  • Unzip ear file
    • unzip XXXX_myapp.ear
  • Change url entitiy in META-INF/MYAPP-jdbc.xml to desired url
  • Save MYAPP-jdbc.xml file
  • Using jar , update relate ear file
    • jar uvf XXXX_myapp.ear META-INF/MYAPP-jdbc.xml 
  • Start Weblogic
You can observe the change from weblogic console 

No comments:

Post a Comment