on 04-19-2016 10:30 AM
Hi Experts,
Facing a ridiculous issue at the time of Custom Module development and just because of that whole development is getting delayed.
The issue is when I am deploying my EAR file its getting deployed into the server without any issue and without any warning. But I am facing problem at the run time when I am trying to use the module in my CC. This is not able to find external jars. The problem seems to be my ear is not able to take the external jars at the time of deployment.
I cant see any issue in my development. Please help with your inputs.
Thanks,
Apu
Create a library project using all the JARs and during deployment add that library project as a dependent project to the EAR.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just to be sure: did you add that jars in your project through Build path - Add external jars?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Apu,
You can either navigate to the Java EE Module Dependencies in the project properties or you can right-click the Bundled Libraries folder and click Add/Remove. Then you simply have to input the information for the .jar file(s) you wish to include and they should be included when you generate your EAR.
Regards,
Ryan Crosby
Hi Apu,
The only libraries you have to put in the /lib folder are the ones that do not exist in your SAP system. Not sure if that is why you are seeing an export failure but that is some kind of exception directly within the Eclipse framework. If you cannot get the export to work properly you could take the approach mentioned by Eng Swee to add the .jar files manually into the .ear file using a zip utility.
Regards,
Ryan Crosby
If you use the manual approach of adding the JARs into the EAR, you cannot use the Run On Server command. You will need to use the Deployment view/perspective to select and deploy the manually constructed EAR file.
I have provided a screenshot above of how the content of the EAR should look like. Make sure you follow that EXACTLY, otherwise you might still hit issues.
Hi Eng,
I was recreating the EJB 3.o project and found below. After deployment its giving me below warning and that seems to be reason its not adding at the time of deployment.
I have maintained below steps-
1. In Window -> Preference
2. Adding in EJB 3.0 session bean under Build path
After build the project (only ejb one) getting below warnings -
Any suggestion.
Hi Apu
Those warning are not an issue as it relates to the EJB project only. It is the EAR project that will bundle everything together. My workspace also have those warnings which causes no issue when I create the EAR file.
Please make sure you are exporting using the SAP EAR File option. If you use just the EAR file, the POI JARs won't be bundled in.
As I mentioned, if it still does not work, do try the approach to manually add the files using 7-Zip or a similar utility. Can you confirm if you tried this manual approach or not?
Regards
Eng Swee
Hi Apu
I really don't know why it doesn't work for you and without access to your setup, it is quite difficult to figure out further since we have already tried nearly everything.
I even tried it again with a sample EAR/EJB project and it works perfectly fine when I use the Export SAP EAR File - see below (I just include a few JARs in the EJB project using Classpath variables)
Anyway, glad to know that it works for you at least the manual way, so that you can proceed with the development.
Do take some time to close this thread and also your other open thread below that is related to this.
Closing the thread properly will also benefit others in the future who come across similar issues - read following blog:-
Regards
Can you confirm how you are generating your EAR file? Is it via the Export command? Which option did you choose, EAR file or SAP EAR file?
Or are you generating it directly via the Run As > Server command?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Apu
Since everything else is not working for you for whatever reasons, the simplest workaround is to manually add the JAR files into the SAP EAR file that you have exported out.
Just make sure in your EAR file, all the JAR files as shown below are added into it.
Once the EAR file is complete, then you can deploy it into the server.
Regards
Eng Swee
Hi Apu,
Can you delete the EAR project and recreate the EAR project again and see it solve the problem.
Regards,
Praveen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.