I have a WAS application that I would like to run using Liberty Profile for development purpose.
This application uses a property file that has to be in the applications classpath but it is environment
specific so therefore not included in the project itself.
In the old (current) setup it is dropped in the lib/ext folder an it just works perfectly but I can seem to find
the equivalent in Liberty Profile.
I have tried to put in the following locations relative to the install path of WLP:
I have tried to look in the documentation but nothing comes up.
Can someone point me in the right direction?
This topic has been locked.
3 replies Latest Post - 2012-11-22T07:44:51Z by SystemAdmin
Pinned topic Liberty Profile 8.5 lib/ext
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-11-22T07:44:51Z at 2012-11-22T07:44:51Z by SystemAdmin
bkail 120000PS1Y372 PostsACCEPTED ANSWER
Re: Liberty Profile 8.5 lib/ext2012-10-11T16:25:46Z in response to SystemAdminI would suggest configuring a library and specifically referencing it from your application rather than relying on a single directory:
If you really do need/want a global directory, see the "Providing global libraries for all Java EE applications" topic.
Re: Liberty Profile 8.5 lib/ext2012-11-19T08:46:40Z in response to bkailHi
Thanks for your info. I have read all the stuff about the topic. Also downloaded a couple of redbooks "WebSphere Application
Server V8.5 Concepts,Planning, and Design Guide" and "WebSphere Application Server Liberty Profile,Guide for Developers". These actually have great descriptions about setting up shared libraries.
Nevertheless I can not make it work. What I want is not a jar-file but a property file that has to be in the classpath of the system. Like f.eks. log4j. But in this case it is actually a linkage file to be used by IBM EGL Java Wrappers.
Anybody knows how to do that?
Re: Liberty Profile 8.5 lib/ext2012-11-22T07:44:51Z in response to SystemAdminActually I have been testing it a bit further. I have created a test scenario with log4j.
From my servers.xml:
<library id= "loggingLibrary"> <fileset dir= "c:/lib" includes= "log4j-1.2.17.jar, log4j.properties"/> </library> <application id= "Log4jTestEAR" location= "Log4jTestEAR.ear" name= "Log4jTestEAR" type= "ear"> <classloader commonLibraryRef= "loggingLibrary"/> </application>
I have a Test Servlet with just a log statement. It finds the log4j-1.2.17.jar but not the log4j.properties file.
[err] log4j:WARN No appenders could be found for logger (servlets.TestServlet). [err] log4j:WARN Please initialize the log4j system properly.
I know that this is not the way to do it with log4j, but it is just to create a similar test case as my own scenario.