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

Christian

Add a comment
10|10000 characters needed characters exceeded

Related questions

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 .

    Regards,

    Benny

    Add a 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

      Christian

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.