Skip to Content
author's profile photo Former Member
Former Member

Exception in EJB Module code

Dear All,

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

these two methods are subject to throw exceptions type of class-


it's Class hierarchy is -


extended by java.lang.Throwable

extended by java.lang.Exception

extended by

extended by

extended by

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

catch (VirusInfectionException vie)


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

boolean b2=vsiInstance1.cleanBytes(scaninputbytes);


{ 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 the package level as-

The type can not be resolved. It is indirectly referenced from required.class files

Any help would be appreciated in this regard.


Sugata B Majumder

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Oct 07, 2010 at 09:58 AM

    Hi All,

    I have resolved the issue, in my EJB project build path one JAR file was not imported.

    The JAR file is - exception.jar. it is available inside the NWDS installation folder.

    After importing the same it is resolved.



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.