WebSphere classloader is it different then in tomcat?

问题: i have code which works fine in pure java using classloader Now when installing the same application in websphere 8 The same code gives me exception 回答1: It appears t...

问题:

i have code which works fine in pure java using classloader Now when installing the same application in websphere 8 The same code gives me exception


回答1:

It appears that the Google code is assuming a URLClassLoader as its input (despite the fact that it takes a more general ClassLoader argument). That may be an appropriate assumption for Tomcat, but it is not an appropriate assumption for WebSphere - its application class loaders are a ClassLoader implementation that does not extend URLClassLoader.


回答2:

Tomcat is a light webcontainer server, it will accept nearly every Java application and run it just fine.

WebSphere on the other hand, is a much more advanced product, an enterprise solution. WebSphere includes many libraries, often optimized by IBM, and offers many plugins.

It means that your application has to be compatible with it and not every Tomcat Java application will be running on WebSphere without making changes to the App, or choosing right Classloader policies, or both.

To get more help you need to post more details: error logs, code examples, steps to replicate etc.

Here is a free ebook from IBM, on Websphere classloaders: http://www.redbooks.ibm.com/redpapers/pdfs/redp4581.pdf

This ebook refers to Websphere7 but it is fine for Websphere8 also.

  • 发表于 2019-02-22 05:33
  • 阅读 ( 200 )
  • 分类:sof

条评论

请先 登录 后评论
不写代码的码农
小编

篇文章

作家榜 »

  1. 小编 文章
返回顶部
部分文章转自于网络,若有侵权请联系我们删除