on 02-22-2007 8:58 AM
Hi
I have a .jar file (of another J2EE project) which I want to refer in EJB project. when I am using this .jar file as an external reference , it does runs successfully n I can access the method in .jar file. But when I create an extra folder in the EJB project and put the .jar file in that n refer it it as internal jar,it deploys successfully but gives an exception of methodname not found on running.
Please tell me where does the problem lie?
Regards
Hai ,
its the problem becuase your refered jar is not available in server in first case.
in second case its in the project directory so it was avail on server.
better approach is to create a library project for refer jars.
create J2ee library project.
add jars in server/provider.xml
deploy it to j2ee engine.
for your j2ee projects refer the jars from this library.
regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
if you have an application say XYZ.ear deployed on the same server, then you can set referecne to that application inside your client EJB application ear. For this add an entry to the application-j2ee-engine.xml file in the ear project as
<reference
reference-type="weak">
<reference-target
provider-name="sap.com"
target-type="application">XYZ</reference-target>
</reference>
this establishes runtime references with your deployed application.
if you are using DCs then you must set runtime dependency of the client app DC onto the already deployed DC.
a PAR as far as I know is a Protal project and I really dont think it makes sense to set reference to a PAR project...I somehow feel its not correct!!
what you can do is take out the jar file, create an external library project using the jar file , deploy it and then have references...not sure if this suits your requirement but..
Dear Shilpa,
Try to redploy the .jar file and access the file you wanted.
Actually according to J2EE specifications once you have deployed a application and run it that it will run successfully but if you change the application you have to redeploy and run the application.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.