- 浏览: 1490279 次
- 性别:
- 来自: 杭州
文章分类
- 全部博客 (525)
- SEO (16)
- JAVA-EE-Hibernate (6)
- JAVA-EE-Struts (29)
- JAVA-EE-Spring (15)
- Linux (37)
- JAVA-SE (29)
- NetWork (1)
- CMS (14)
- Semantic Research (3)
- RIA-Flex (0)
- Ajax-Extjs (4)
- Ajax-Jquery (1)
- www.godaddy.com (0)
- SSH (34)
- JavaScript (6)
- SoftwareEngineer (9)
- CMMI (0)
- IDE-Myeclipse (3)
- PHP (1)
- Algorithm (3)
- C/C++ (18)
- Concept&Items (2)
- Useful WebSite (1)
- ApacheServer (2)
- CodeReading (1)
- Socket (2)
- UML (10)
- PowerDesigner (1)
- Repository (19)
- MySQL (3)
- SqlServer (0)
- Society (1)
- Tomcat (7)
- WebService (5)
- JBoss (1)
- FCKeditor (1)
- PS/DW/CD/FW (0)
- DesignPattern (11)
- WebSite_Security (1)
- WordPress (5)
- WebConstruction (3)
- XML|XSD (7)
- Android (0)
- Project-In-Action (9)
- DatabaseDesign (3)
- taglib (7)
- DIV+CSS (10)
- Silverlight (52)
- JSON (7)
- VC++ (8)
- C# (8)
- LINQ (1)
- WCF&SOA (5)
- .NET (20)
- SOA (1)
- Mashup (2)
- RegEx (6)
- Psychology (5)
- Stock (1)
- Google (2)
- Interview (4)
- HTML5 (1)
- Marketing (4)
- Vaadin (2)
- Agile (2)
- Apache-common (6)
- ANTLR (0)
- REST (1)
- HtmlAnalysis (18)
- csv-export (3)
- Nucth (3)
- Xpath (1)
- Velocity (6)
- ASP.NET (9)
- Product (2)
- CSS (1)
最新评论
-
lt26w:
理解成门面模式应该比较容易明白吧
FacadePattern-Java代码实例讲解 -
lt26w:
看下面的例子比较明白.
FacadePattern-Java代码实例讲解 -
javaloverkehui:
这也叫文档,别逗我行吗,也就自己看看。
HtmlCleaner API -
SE_XiaoFeng:
至少也应该写个注释吧。
HtmlCleaner API -
jfzshandong:
...
org.springframework.web.filter.CharacterEncodingFilter 配置
从tomcat 迁移到 WebSphere 经验总结(修改)
我们的项目使用的是 web
work+spring + jsf+dwr ,项目在tomcat
和 weblogic
上部署
均无问题,
我的具体遇到的困难,大家可以看贴http://www.webspherechina.net/club/viewthread.php?tid=2440&extra=page%3D1
但是最近迁移
到 websphere 6.1.0.3了,出现许多问题,现在拿出来,整理与大分享
1. 在迁移过程中,出现的第一个导常:“java.lang.IllegalStateException:
Cannot initialize context because there is already a root application
context present - check whether you have multiple ContextLoader*
definitions in your web.xml
!”。造成这个异常的原因,是有我web.xml文件
有
两处同代码,都对org.springframework.web.context.ContextLoader上下文进行了加载,于量在spring加
载时,就会报错,对于spring来讲,不允许加载两个上下引用,关于这点,大概可以参考
org.springframework.web.context.ContextLoaderListener源码就知道怎么回是了!
2.spring配置文件,出错会报“ nested exception is org.xml.sax.SAXParseException: cvc-elt.1:找不到元素“beans”的声明。
”,解决办法我参考了论坛中《websphere 中 spring 的问题
》一文,现在将原因引入进来,供大家参考:
spring配置文件 引入DTD这种方式在websphere 6.1 下不成功,必须改成 使用schema这种方式。
DTD:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans default-autowire="byName">
SCHEMA:
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
"
default-autowire="byName">
default-autowire="byName">
3.在webm.xml中采用DTD 2.4规范中加载spring的话,必须使用以下方式:
<servlet>
<servlet-name>SpringContextServlet</servlet-name>
<servlet-class>
org.springframework.web.context.ContextLoaderServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
4.在我迁移过程中,还遇到这样一个比较头痛的问题,搞好几天才找到问题:“servlet
debugjsp 抛出的 init() 异常:java.lang.ClassCastException:
com.ibm.ws.classloader.CompoundClassLoader incompatible with
java.net.URLClassLoader
”
第一,就是应用程序
jar类加载机制与webshere类加载机制冲突造成,关于这点解决办法,就是更改webshere 服务
器设置或 应用
程序
的设置。一般情况不建议不更改webshere的设置,至于如何修改设置类加载顺序,可以与论贴,很简单的,所以在不此不做详细描述。
第二种情况比较麻烦,就是工程中存在jar冲突,造成上面的异常,解决的办法就是将简化web.xml,逐个加载自己需要的模块,就可以找问题的原
因,我当时解决这个问题,就是这样,一次次改,最终发现在web.xml这段代码在加载jar时,造在上面的异常,以下是代码片断
<servlet>
<servlet-name>debugjsp</servlet-name>
<description>Added by JBuilder to compile JSPs with debug info</description>
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
<init-param>
<param-name>classdebuginfo</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>3</load-on-startup>
</servlet>
在自己工程下 compiler.jar jasper-runtime.jar
存在两个jar ,至此,根本原因找到,因为在web.xml 配置了那段代码
造成应用程序加载了 compiler.jar jasper-runtime.jar
两个jar包,删除多余代码和jar包,问题即解决。
5.在webshere6.1中对web.xml有严格的语法检测,,一定要按照dtd规范来写,而tomcate在这点比较松,所以在布署的时候,需要注意一下(webshere6.1 支持DTD 2.3 DTD2.4,webshere5 支持2.3
按以下元素顺<context-param>、<filter>、<list>、<servlet>、<servlet-mapping>,具体参考DTD规范
6.大家在打成jar时,建议用ibm jdk1.5,不要sun jdk ,原因是保持兼容性
7.关于tomcate迁移webshere其他的问题,可以参考这篇文章《程序从tomcat迁移至websphere的修改
》,另外有问题
可以及时发贴,把问题贴出来
发表评论
-
java.lang.ClassCastException: java.lang.Integer
2010-01-09 12:55 1359java.lang.ClassCastException: j ... -
Error:org.springframework.web.context.ContextLoaderListener
2010-01-06 21:17 8665Error con ... -
Error configuring application listener of class org.springframework.web.context.
2010-01-06 21:11 20099急!!tomcat启动报错:Error configuring ... -
Cannot find bean org.apache.struts.taglib.html.BEAN
2009-12-29 14:29 1274Cannot find bean org.apache.str ... -
attempt to create delete event with null entity
2009-12-29 11:07 4653attempt to create delete event ... -
懒加载异常org.hibernate.LazyInitializationException: could not initialize proxy - no
2009-12-28 20:44 20178错误页面提示 could n ... -
getHibernateTemplate.load() 和get()之间的区别
2009-12-28 20:16 18501. getHibernateTemplate.load() ... -
getSession()与getHibernateTemplate()区别
2009-12-28 20:13 2540getSession()与getHibernateTempla ... -
使用Hibernate持久层 --- 2 出现的问题与解决方法总结
2009-12-28 15:04 1182使用Hibernate持久层 --- 2 出现的问题与解决方法 ... -
java.lang.NullPointerException DAO
2009-12-28 15:02 1817~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ... -
JSTL1.1中要用的jar--standard.jar jstl.jar
2009-12-09 00:35 4046gg -
Jsessionid
2009-12-07 16:22 1257(1) 这是一个 ... -
spring有三种启动方式,
2009-12-07 15:21 2432spring有三种启动方式,使用 ... -
ContextLoaderListener VS. ContextLoaderServlet
2009-12-07 15:20 3528一旦ContextLoaderServlet或Cont ... -
ERRORcheck whether you have multiple ContextLoader* definitions in your web.xml!
2009-12-07 15:17 6225ERROR:check whether you have mu ... -
CGlib & asm
2009-12-07 15:01 2690缺少包出现的错误信息:cglib-2.1.3.jar CGL ... -
Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTup
2009-12-07 14:57 5419Unable to instantiate default t ... -
asm.jar的冲突问题
2009-12-07 14:53 1458No configuration found. Confi ... -
异常:ERROR [org.hibernate.proxy.BasicLazyInitializer] - CGLIB Enhancement failed..
2009-12-07 14:25 1783用MyEclipse6.0写了一个spri ... -
ssh 整合时报错java.lang.reflect.InvocationTargetException... 但是能运行起[
2009-12-07 14:17 11803内容太长(多次发): [Tomcat]2007-09-0 ...
相关推荐
将web应用从Tomcat5移植到Websphere6.doc将web应用从Tomcat5移植到Websphere6.doc
该文档是本人从网络上找到的,感觉写的不错,就上传了,和大家分享一下
将web应用从Tomcat5移植到Websphere6.pdf
本文包含从真实的项目中学到的技巧、注意事项和经验。这些信息有助于新手完成工作并且把中型项目的迁移时间从2周缩短到1周。典型的Web应用程序体系结构虽然在这里讨论应用程序体系结构是不合适的,但是这个体系结构...
java项目,自己做的项目利用jmx监控weblogic,tomcat,websphere源码
图文并茂,详细描述pinpoint安装部署、监控tomcat、weblogic、webSphere 实际操作,自己编写
websphere迁移 多种容器。。。。。。。。。。。。。。。。。。。。。。。。。
WebspherePortal中的DB2数据库迁移Oracle
经常发现在开发时在tomcat部署、run都没问题,实施发布到was上的websphere上就冲突报错了。这里总结下两个web容器部署的差异!!
JBOSS迁移WEBSPHERE简要流程
在websphere8.5 下部署含有CXFwebservice的war包无法正常启动,而相应的war包在tomcat上是可以正常启动的,通过后台的日志分析大致可以定位为相关的cxf类无法找到,其实这些类在项目的lib目录下都是存在的,莫名其妙...
官方迁移指南中已清楚地记录了用于将 WebSphere Commerce ...本文中使用的示例基于从 WebSphere Commerce 版本 5.5、5.6.0 或 5.6.1 到版本 6.0 的迁移场景。在迁移到版本 5.6.0 或 5.6.1 时,您可以使用类似的方法。
WebSphere Portal 6.0数据库迁移到Oracle参考手册 资料共享:WebSphere Portal 6.0数据库迁移到Oracle参考手册 主要描述在WebSphere Portal 6.0 下,如何将数据库迁移到oracle的参考手册,记录迁移过程,解决迁移...
tomcat、apache、websphere配置
在创建数据源后,在java中使用数据源时tomca和was的引用方法是不同的
WebSphere Application Server v6.1 打包+安装+迁移
IBM+WebSphere+Portal+Express+v6.1数据库迁移手册
本文可帮助您将使用 IBM WebSphere Application Server 5.0.x、5.1.x 或 6.0.x 版的高可用性环境迁移到版本 6.1。您将了解到如何计划迁移,如何最小化停机时间以及如何在发生问题时迅速恢复。本文重点关注当环境中...
WebSphere Application Server v7.0安装与迁移 WebSphere Application Server v7.0系统管理 WebSphere Application Server v7.0安全功能 WebSphere Application Server v7.0运行配置 WebSphere Application ...