on 10-18-2006 11:40 PM
I followed the Java EE 5 instructions on creating a Lbrary Component. I created an Enterprise Application Project 5 using the Developer Studio wizard. I then added external jars to the project and published it to server successfully, using a project name of MySharedLibrary.
I subsequently created a normal EAR project using the Enterprise Application Project 5 wizard. Before publishing the project, I modifed application-j2ee-engine.xml by adding the following entry.
<reference reference-type="weak">
<reference-target provider-name="sap.com" target-type="library">MySharedLibrary</reference-target>
</reference>
At runtime, I can see that the application can;t locate the libraries in the library component. I've also noted the following message in the log.
"The application sap.com/MyApp has explicit or implitic reference to [library:MySharedLibrary], but there are no loaders with such names and they will be ignored."
Any suggestions on what I need to do to use library components?
Thanks,
Jerry
Dear Jerry,
Try to change
<b>target-type="library" </b>
to
<b> target-type="application" </b>
Since you have published your library as an Enterprise Application Project 5 , the reference target type should be 'application'. I believe that your library component will be located during runtime this way. In the previous versions, NetWeaver Developer Studio supported separate Library Projects and to reference them you needed to use target-type="library". In Java EE 5 Edition there are no such library projects anymore.
Here is another hint that might help you - except runtime dependency you can also set Design time dependancy for your library. To do it, just right click on a project (from where you want to put a reference to your library) and chose the option 'set AdditionaLibraries'
Greetings,
Bobby
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jerry,
In the Java EE 5 release we have better option for packing shared libraries.
Please check my post describing it : /people/community.user/blog/2006/10/24/applications-and-shared-libraries
Best Regards,
Georgi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the replies. Using "application" instead of "library" did eliminate the error message and I'm no longer getting a ClassNotFound error for a class in the shared library.
Unfortunately I'm now getting a ClassNotFound error for a class that's contained in my application so I suspect that use of the shared library has affected classloading in my application. I need to investigate further.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jerry,
could you please modify the target-type attribute of the reference definition n application-j2ee-engine.xml to <i>application</i> (rather than <i>library</i>).
<reference reference-type="weak">
<reference-target provider-name="sap.com" target-type="<b>application</b>">MySharedLibrary</reference-target>
</reference>
This should work.
Regards,
Ivo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
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.