cancel
Showing results for 
Search instead for 
Did you mean: 

Error deploying EAR that is a Webservice

joan_ayala
Participant
0 Kudos

In the SAP NetWeaver Developer Studio, when I select the option "Deploy to J2EE engine" on my EAR file, I get the following error:

java.rmi.RemoteException: Cannot deploy application sap.com/LDAPManagerEAR..

Reason: Incorrect application sap.com/LDAPManagerEAR:

Bean EB_bindBean: Remote home interface com.upc.ldap.ejb.EB_bindHome must be a valid RMI-IIOP remote interface.

Bean EB_bindBean: the return type for a create<METHOD> method of the session bean local home interface must be the session bean local interface type. EJB specification 7.10.8.

Error in the remote interface com.upc.ldap.ejb.EB_bind of bean EB_bindBean: No corresponding business method in the bean class com.upc.ldap.ejb.EB_bindBean was found for method bindLDAP.

Error in the local interface com.upc.ldap.ejb.EB_bindLocal of bean EB_bindBean: No corresponding business method in the bean class was found for method bindLDAP.; nested exception is:

com.sap.engine.services.deploy.container.DeploymentException: <--Localization failed: ResourceBundle='com.sap.engine.services.deploy.DeployResourceBundle', ID='com.sap.engine.services.ejb.exceptions.deployment.EJBDeploymentException: Incorrect application sap.com/LDAPManagerEAR:

Anybody can help me ? Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

joan_ayala
Participant
0 Kudos

Thanks Alejandro,

but could you give more detailed explanation of this process ?

Former Member
0 Kudos

Do you have the source code for this EJB?

joan_ayala
Participant
0 Kudos

yes, where should I send it ?

Former Member
0 Kudos

I've sent you an e-mail at gmail as stated on your SDN business card. You can reply it with your code

Former Member
0 Kudos

I?ve seen the code.

You need to synchronize the interfaces and the business method. For instance, on the interface you have declared:

public String bindLDAP(String username, String password)throws RemoteException;

And then you attempt to implement:

public String bindLDAP(String username, String password) throws NamingException

Therefore the error:

Error in the remote interface com.upc.ldap.ejb.EB_bind of bean EB_bindBean: No corresponding business method in the bean class com.upc.ldap.ejb.EB_bindBean was found for method bindLDAP.

Also, you must be consisten with local-remote-home interfaces. You've declared the EB_bindLocalHome as LocalHome, but don't use it as return parameter on the EB_bindHome interface. Try the following:

 
package com.upc.ldap.ejb;
import javax.ejb.EJBHome;

import java.rmi.RemoteException;
import javax.ejb.CreateException;
public interface EB_bindHome extends EJBHome {

	/**
	 * Create Method.
	 */
	public  EB_bindLocalHome create() throws CreateException;

}

You might want to use an EJB generator as on SAP Developer Studio to automate all these tasks and avoid revisiting the code.

I hope it helps

Regards

joan_ayala
Participant
0 Kudos

Thanks for your help Alejandro, but in the first modification you mean I should have NamingException in both declarations ?

I tried that and also tried second modification, but I am still getting the same error.

I hope you can help me.

Former Member
0 Kudos

Hello

The Remote and Home interfaces of the underlying EJB seem to be assymetrical with your actual business method implementation. You need to declare the method signature in at least the Remote interface and then the exact signature to be implemented on the POJO that implements it.

Depending of your EJB version, the method might need to be decorated with the suiting java annotations

Greetings

Alejandro