cancel
Showing results for 
Search instead for 
Did you mean: 

Bug deploying a EJB Session with a method "getIdentifier"

Former Member
0 Kudos

I have a problem during deploy of a EJB Session when the session contains a method with the follow sign:

public BigDecimal getIdentifier()

For the error seem that SAP insert automaticaly method with a sign in the stub/skel classes

public String getIdentifier()

For this problem the stab/skel cannot be compiled and so the EJB cannot be deployed!

This is the error in console:

>deploy E:\sapproject\sapabs.ear

The file E:\sapproject\sapabs.ear was not found!

>deploy E:\sapprojects\sapabs.ear

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

Reason: Errors while compiling:

E:/usr/sap/J2E/JC00/j2ee/cluster/server0/apps/sap.com/ABSolution/EJBContainer/temp/temp1111737109609/com/sap/SapBatchObje

ctImpl30.java:121: getIdentifier() is already defined in com.sap.SapBatchObjectImpl30

public java.math.BigDecimal getIdentifier() throws RemoteException {

^

E:/usr/sap/J2E/JC00/j2ee/cluster/server0/apps/sap.com/ABSolution/EJBContainer/temp/temp1111737109609/com/sap/SapBatchObje

ctImpl30.java:42: getIdentifier() in com.sap.SapBatchObjectImpl30 cannot implement getIdentifier() in com.sap.SapBatch; a

ttempting to use incompatible return type

found : java.lang.String

required: java.math.BigDecimal

public String getIdentifier() {

^

2 errors

; nested exception is:

com.sap.engine.services.ejb.exceptions.deployment.EJBFileGenerationException: Errors while compiling:

E:/usr/sap/J2E/JC00/j2ee/cluster/server0/apps/sap.com/ABSolution/EJBContainer/temp/temp1111737109609/com/sap/SapBatchObje

ctImpl30.java:121: getIdentifier() is already defined in com.sap.SapBatchObjectImpl30

public java.math.BigDecimal getIdentifier() throws RemoteException {

^

E:/usr/sap/J2E/JC00/j2ee/cluster/server0/apps/sap.com/ABSolution/EJBContainer/temp/temp1111737109609/com/sap/SapBatchObje

ctImpl30.java:42: getIdentifier() in com.sap.SapBatchObjectImpl30 cannot implement getIdentifier() in com.sap.SapBatch; a

ttempting to use incompatible return type

found : java.lang.String

required: java.math.BigDecimal

public String getIdentifier() {

^

2 errors

For more information see Error and Debug logs of the DeployService.

>

Is "identifier" or method "getIdentifier" a reserved name?

It's crazy! i hope (and believe) this is a bug, otherwise... where i can find the list of all reserver name ?

The same EJB is correctly deploy under WebSphere, Jboss and Weblogic!

Really in the SAP source generated i can see:

public String getIdentifier() {

return container.getCrossObjectFactoryName() + ":" + container.EJBOBJECT_ID;

}

This is a method added from SAP deploy!

If the solution for sap is.. change you method name... this is not a solution.

I have a complex application with over 1000 Ejb Session and 400 ejb Entity! and i use getIdentifier in many classes!

EJB specification don't say: "getIdentifier" is a reserver method.

To simulate the problem is very simple. write a EJB Session with a method with sign public BigDecimal getIdentifier()

public on remote.

If is necessary i can send the source code of my EJB.

(is it possible to attach a file in this forum?)

Accepted Solutions (1)

Accepted Solutions (1)

Vlado
Advisor
Advisor
0 Kudos

Hi Roberto,

This is definitely an issue with the EJB Container in SAP J2EE Engine 6.40. It will be fixed in the next SP.

Thanks for reporting and best regards,

Vladimir

Answers (0)