1 Reply Latest reply: Oct 7, 2010 11:56 AM by Sugata Bagchi RSS

EJB Code :: Exception class not recoknized

Sugata Bagchi
Currently Being Moderated

Dear All,

I am basically from SAP Process Integration (XI). Request all of you to please look into this and help me if possible-

I have written one custom adapter EJB module, where I have used the methods - scanBytes() and cleanBytes() from the Instance class.

The API can be found here-

and the packages are-

com.sap.security.core.server.vsi.api.exception    and   com.sap.security.core.server.vsi.api

for this I have added the external JAR -  tc_sec_vsi_interface.jar  in my EJB module development.

Now these two methods are subject to throw exception type of class-

 

VirusInfectionException.

 

it's Class hierarchy is -

 

java.lang.Object

extended by java.lang.Throwable

extended by java.lang.Exception

extended by com.sap.exception.BaseException

extended by com.sap.security.core.server.vsi.api.exception.VSIServiceException

extended by com.sap.security.core.server.vsi.api.exception.VirusInfectionException

 

I have caught the exception - below is the code fragment-

 

catch (VirusInfectionException vie)

{

Instance vsiInstance1 = vsiService.getInstance("Z");

boolean b2=vsiInstance1.cleanBytes(scaninputbytes);

if(b2!=true)

{ Audit.addAuditLogEntry(amk, AuditLogStatus.ERROR, "VIRUS Found"+vie.getLastErrorRC());

}

}

 

but it is showing an error as - No exception of type VirusInfectionException can be thrown; an exception type must be a subclass of Throwable

 

and another error it is showing in my top of the class body-

The type com.sap.exception.BaseException can not be resolved. It is indirectly referenced from required.class files

 

I am using -

SAP NetWeaver Developer Studio

SAP NetWeaver 7.1 Composition Environment SP05 PAT0000

Build id: 200802231406

 

This EJB is a stateless 2.1 module.

Any help would be appreciated in this regard.

Thanks

Sugata B Majumder

Actions