on 06-05-2005 3:30 PM
Hi All,
I'm developing an application using NetWeaver Developer Studio. In my EJB project, I right clicked the project node -> properties -> Java Build Path -> Libraries and added some jar files to the path using "Add External Jars" button. These jar files are automatically packaged into the EAR file. I viewed the properties of the EAR project and found that in the "Archive Build Info" tab, no item is selected to be packaged into the EAR file.
How can I pretend those jar files from being packaged into the EAR file? They already have a copy in the server.
Thanks + Regards
Jerome
Message was edited by: Jerome Zhao
Hi Jerome,
You should create a Library Project for example "myLibs" into the same workplace than your application "myApp". Include all necessary JAR files into "myLibs" and reference it to your Java Build Path onto the tab Projects.
Now the compiler knows all libraries but they will not be packed into the EAR file.
Regards André
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have done what you have recommended, the ear file is successfully created.
However when I deploy to the J2EE server, I get the following error.
Result
=> deployment aborted : file:/C:/DOCUME~1/xxxxx/LOCALS~1/Temp/temp41836xBtrService.ear
Aborted: development component 'xBtrService'/'abc.com'/'localhost'/'2005.06.22.17.30.10':
Caught exception during application deployment from SAP J2EE Engine's deploy service:
java.rmi.RemoteException: Cannot deploy application abc.com/xBtrService.. Reason: Exception during generation of components of application abc.com/xBtrService in container EJBContainer.; nested exception is: com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Exception during generation of components of application abc.com/xBtrService in container EJBContainer.
(message ID: com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.performAction(DeploymentActionTypes).REMEXC)
Deployment exception : The deployment of at least one item aborted.
Thanks,
Manik
Hi Jerome,
you can deploy your libraries as SDA file and hold a refernce to it. This refernce is to specify into the application-j2ee-engine.xml of your EAR archive. If you do this you have to deploy your library SDA only once.
Regards André
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi André,
Thanks a lot for the information. If I don't specify these jar files in the "Build Path", Devleoper Studio could not compile my application code because my code use classes in those jar files. If I do, Developer Studiio will automatically package those jar files into the EAR. The problem is how can I use the local jar files during development and exclude them from package during deployment. Could you have some suggestion?
Thanks + Regards
Jerome
Message was edited by: Jerome Zhao
Hi Jerome,
Wouldn't it be safer to actually have the jar files that you tested your application with packaged everytime into the EAR? That way, you might avoid "rare" errors of having tested your application with a particular jar file only to find that it does not run on the production server due to an outdated jar file there.
My two cents,
Pranav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pranav,
You are right. Packaging all jars in the EAR is much safer. But all the jar files are more than 13 MB. My own applicaiton is only 60KB. Deploying so large an EAR file to remote server is a nightmare. So I need to exclude those lib files to avoid upload them each time I changed my applicaiton.
Thanks + Regards
Jerome
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.