cancel
Showing results for 
Search instead for 
Did you mean: 

Error DataDestinationProvider already registered

Former Member
0 Kudos

Iam using sapJCO3. I have a java application which runs on JBoss AS. the application connects to SAP system and fetches data. If i deploy my application in the jboss server for the first time it works fine. If I try to redeploy the applicationusing the hot deployment property(my jboss server is running while i re deploy) and try to use the application it gives me error as follows

Caused by: java.lang.IllegalStateException: DestinationDataProvider already regi

stered org.hibersap.execution.jco.JCoDataProvider

at com.sap.conn.jco.rt.RuntimeEnvironment.setDestinationDataProvider

I want to know if there is any way that I can get current instance of DataDestinationProvider and degerister it.

Please respond its critical.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I havnt' used Jboss, But in Netweaver Application Server, If we faced such problem we use to quickly login to

SAP J2EE Engine Administration, there under deployments we browse our application, right click on it and just deactivate it !

Try to find out your J2EE Engine Adminstration Console, there you will find all deployments.

Former Member
0 Kudos

Thankyou for the reply. Actually I want if programmatically we can de register the current registered destination.

The reason is because we are generating some set of SAP java code which is used in application. So we do not want the user to manually perform tasks.

Former Member
0 Kudos

You cannot get the instance of the currently registered DestinationDataProvider. You then would be able to deregister any other provider which is of course not allowed. You are only allowed to deregister your own instance and if it is yours, it should not be that hard to get this object from your own coding.

In general, if you are running within a multi-application environment, you never should bundle the providers with your business application but split this into several parts. Otherwise only the first application being deployed this way will win.

Former Member
0 Kudos

I agree with Stefan Gass.

SAP JCA Adapter would solve these kind of issues as Adapter is deployed once and multiple application can be deployed and/or redeployed. SAP WAS has its own JCA adapter which can be used and for non SAP App server there is open source version available.

Another solution would be to use Link: [javax.servlet.ServletContextListener(contextDestroyed)|http://download.oracle.com/javaee/5/api/javax/servlet/ServletContextListener.html] to unregister DataDestinationProvider. Maybe HiberSAP needs to consider this.

I feel first approach with JCA is lot more cleaner and flexible.

Former Member
0 Kudos

Hi,

Is it possible to see the existing destination data provider from Netweaver admin console? Just to see the name.

Thanks