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

Problems looking up EJBs

Hi all,

I have the following szenario: I have some EJBs and a JSP-frontend together in one EAR-file and there is no problem accessing the EJBs from within the webcontainer. Now I have a second JSP-frontend in another EAR which have to access the EJBs deployed in the first EAR. Every time I try to lookup the EJBs I get the following error:

javax.servlet.ServletException: object is not an instance of declaring class.

RootCause: IllegalArgumentException

I used the ClientAPI.jar to import the home- and remote-interfaces. Without that jar-file I get a NoClassDefFoundError.

Does I have to specify a refenrence in the application-j2ee-engine.xml instead of using the additional jar-file for this purpose? I´m using the SAP WAS 6.30

Thanks for help


Add comment
10|10000 characters needed characters exceeded

1 Answer

  • Posted on Nov 14, 2003 at 12:06 PM

    Hi Christian,

    you are on the right way. You actually have to reference the application in application-j2ee-engine.xml .



    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Benny Schaich-Lebek

      Hi Benny,

      because of a bug in the listview of the posts (scrolling to the second site of the list, the format is corrupt ? there is no linebreaking anymore so you cannot read the whole line ? and the link necessary to answer directly is lost) I answer you instead of Ivaylo Ivanov.

      I tried to reference the EJB in the web.xml and web-j2ee-engine.xml with and without a reference in the application-j2ee-engine.xml and with and without the AppClientApi.jar but the result remains the same: my app doesn´t work.

      Using only the reference in web.xml and web-j2ee-engine.xml I always get a ClassDefNotFound, adding the AppClientApi.jar to the war-file I get the ServletException. Using the reference in the application-j2ee-engine.xml I get a deploy exception.

      I know the DTDs in the Reference Manual but I found the description not very instructive. The references only describes how you use the tags but there isn´t a clear hint when you should use the tags and what someone has to reference in the application-j2ee-engine.xml and what in the web-j2ee-engine.xml (something like a best practice using the SAP deployment descriptors).

      I think my szenario is a normal one in a service oriented or even component based environment.

      Thanks for help