开发者

Websphere Application Server 6.0.2 not accepting xml file in shared libraries

I am on WAS 6.0.2. I need an XML file in classpath for one of my applications.

Taking help from this post , I've configured Shared Library "common" with node scope. The shared library has the following entry.

C:\WebSphere\AppServer\CommonLibs\Config.xml

I then associated the shared libary with my application. When I run the server, I see the following in the log.

[2/10/11 7:36:13:614 EST] 00000017 CompoundClass E   WSVR0120E: An error occurred processing 
C:\WebSphere\AppServer\CommonLibs\Config.xml
java.util.zip.ZipException: Error opening zip file     
C:\WebSphere\AppServer\CommonLibs\Config.xml
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:140)
at java.util.jar.JarFile.<init>(JarFile.java:160)
at java.util.jar.JarFile.<init>(JarFile.java:98)
at com.ibm.ws.classloader.SinglePathClassProvider.buildContentsCache(SinglePathClassProvider.java:557)
at com.ibm.ws.classloader.SinglePathClassProvider.<init>(SinglePathClassProvider.java:99)
at com.ibm.ws.classloader.SinglePathClassProvider.create(SinglePathClassProvider.java:123)
at com.ibm.ws.classloader.CompoundClassLoader.addPat开发者_开发问答hs(CompoundClassLoader.java:234)
at com.ibm.ws.classloader.JarClassLoader.addPaths(JarClassLoader.java:101)
at com.ibm.ws.classloader.ClassGraph.createClassLoaders(ClassGraph.java:472)
at com.ibm.ws.classloader.ClassGraph.calculate(ClassGraph.java:214)
at com.ibm.ws.classloader.ClassLoaderManager.initialize(ClassLoaderManager.java:204)
at com.ibm.ws.classloader.ClassLoaderManager.<init>(ClassLoaderManager.java:155)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:699)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:923)
at com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(ApplicationMgrImpl.java:2214)
at com.ibm.ws.runtime.component.ComponentImpl$_AsynchInitializer.run(ComponentImpl.java:304)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1498)

I guess the server only expects zip or jar files in the classpath. Please guide on how to include the XML file. Thanks.


Perhaps you should try putting the xml file in a jar file.

See this question on how Java: Load a resource contained in a jar


I got it working by adding the classpath entry C:\WebSphere\AppServer\CommonLibs to

Application servers > server > Process Definition > Java Virtual Machine

using the admin console of Websphere. It works finally.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜