|
Hi All, I've got problems reading resource files from jar files in WebSphere Application Server V5.1. I bundled two EJB jars and some utility jars in an EAR file. When I start the deployed application in WebSphere it ends upnormal because the constructor of a session EJB throws a NullPointerException. The constructor creates an instance of a utility class. This utility class trys to read a XML file from the jar it is bundled in and the URL of the resource is alway null. In JBoss 3.2.3 everything works fine. Example: Jar-File-Structure: com/asap/shaire/server/print/FopController conf/Config.xml I tried different ways to get the URL of the resource "conf/Config.xml" in the consturctor of the FopController class. 1. URL file = FopController.class.getResource("conf/Config.xml"); 2. URL file = Thread.currentThread().getContextClassLoader().getResource("conf/Config.xml"); 3. URL file = ClassLoader.getSystemResource("conf/Config.xml"); No statement of the three stated works. Has anybody a solution for reading resources from jar files in WebSphere Application Server? Thanks and regards Mattias
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.