设为首页 收藏本站
查看: 811|回复: 0

[经验分享] 某高校应用迁移记录(tomcat-apusic)

[复制链接]

尚未签到

发表于 2017-2-1 15:36:06 | 显示全部楼层 |阅读模式
应客户需求,将原来所有跑在TOMCAT下的应用全部迁移到APUSIC下来;涉及10余个WEB应用;现将大致的迁移过程记录如下:
环境:
应用服务器:APUSIC 6.0
DB:ORACLE 10g
OS:IBM AIX
1.原先使用了C3p0作为数据库连接池,迁移到APUSIC上后,需将其替换成APUSIC的连接池;修改CONIFG目录下的datasource.xml配置文件新增数据库连接池,重启APUSIC后:
apusic.JMS.JMSQueue.SYSTEM.DEAD_LETTER] Started.
2010-06-29 16:11:18 INFO [apusic.JMS.JMSQueue.testQueue] Started.
2010-06-29 16:11:18 INFO [apusic.JMS.JMSQueue.testReplyQueue] Started.
2010-06-29 16:11:18 INFO [apusic.JMS.JMSTopic.SYSTEM] Started.
2010-06-29 16:11:18 INFO [apusic.JMS.JMSTopic.SYSTEM.ADMIN_EVENT_TOPIC] Started.
2010-06-29 16:11:18 INFO [apusic.JMS.JMSTopic.testTopic] Started.
2010-06-29 16:11:18 INFO [apusic.JMS.ConnectionFactory.ConnectionFactory] Started.
2010-06-29 16:11:18 INFO [apusic.JMS.ConnectionFactory.SYSTEM.ADMIN_CONNECTION_FACTORY] Started.
2010-06-29 16:11:18 INFO [apusic.service.JMSRegistry] Started.
2010-06-29 16:11:19 INFO [apusic.ejb.mejb.jar.MEJB] EJB home 'ejb/mgmt/MEJB' registered.
2010-06-29 16:11:19 INFO [apusic.application.mejb.jar] Started.
2010-06-29 16:11:21 INFO [apusic.web.webtool.ear./admin] Context Root [/admin]
2010-06-29 16:11:21 INFO [apusic.application.webtool.ear] Started.
2010-06-29 16:11:22 INFO [apusic.web.default./] Context Root [/]
2010-06-29 16:11:22 INFO [apusic.application.default] Started.
2010-06-29 16:11:22 WARNING [apusic.deploy.env] External reference 'jdbc/projndi' of type 'javax.sql.DataSource' not found
2010-06-29 16:11:23 INFO [apusic.web.dyrx./dyrx] Context Root [/dyrx]
2010-06-29 16:11:23 INFO [apusic.application.dyrx] Started.
2010-06-29 16:11:23 INFO [apusic.service.J2EEDeployer] Started.
2010-06-29 16:11:23 INFO [apusic.service.ClassLoaderViewer] Started.
2010-06-29 16:11:23 INFO [apusic.service.JDBCTracer] Started.
2010-06-29 16:11:23 INFO [apusic.service.admin] Started.
2010-06-29 16:11:23 INFO [apusic.server.Main] Server is ready.
日志显示:还是报数据源没找着
需要看下web.xml是否有对DataSource的引用;
查看web.xml代码片段
      <resource-ref>
              <res-ref-name>jdbc/projndi</res-ref-name>
              <res-type>javax.sql.DataSource</res-type>
              <res-auth>Container</res-auth>
       </resource-ref>
发现确实有对DataSource做了引用;所以需在META-INF下添加apusic-application.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE apusic-application PUBLIC "-//Apusic//DTD Apusic Application 4.0.2//EN" "http://www.apusic.com/dtds/apusic-application_4_0_2.dtd">
<apusic-application>
  <module uri="">
    <web>
      <context-root>zfoa</context-root>//应用上下文
      <resource-ref>
      <res-ref-name>jdbc/projndi</res-ref-name>
      <jndi-name>jdbc/projndi</jndi-name>
      </resource-ref>
    </web>
  </module>
</apusic-application>
2.WEB.xml下相关的FCKeditor配置;
[apusic.application.qjoa] 启动失败 com.apusic.xml.reader.ScanException: The URL pattern '/common/FCKeditor/editor/filemanager/browser/default/con nectors/jsp/connector ' cannot contains CR(#xD) or LF(#xA) charactersat com.apusic.deploy.runtime.WebModule.validateUrlPattern(Unknown Source ) at com.apusic.deploy.runtime.WebModule$ServletMappingAction.readXml(Unkn own Source) at com.apusic.deploy.runtime.WebModule.readXml(Unknown Source) at com.apusic.deploy.runtime.J2EEModule.loadDeploymentDescriptor(Unknown Source) at com.apusic.deploy.runtime.J2EEModule.load(Unknown Source) at com.apusic.deploy.runtime.WebModule.load(Unknown Source) at com.apusic.deploy.runtime.J2EEApplication.load(Unknown Source) at com.apusic.deploy.runtime.J2EEApplication.startService(Unknown Source ) at com.apusic.service.Service.start(Unknown Source) at com.apusic.deploy.runtime.J2EEDeployer.deploy(Unknown Source) at com.apusic.deploy.runtime.J2EEDeployer.deploy(Unknown Source) at com.apusic.deploy.runtime.J2EEDeployer.deploy(Unknown Source) at com.apusic.deploy.runtime.AutoDeployer.deploy(Unknown Source) at com.apusic.deploy.runtime.AutoDeployer.run(Unknown Source) at java.lang.Thread.run(Thread.java:619)
    错误的地方在蓝的 /common/FCKeditor/editor/filemanager/browser/default/connectors/jsp/connector
  WEB.xml下FCKeditor相关的:
   <servlet-mapping>
<servlet-name>Connector</servlet-name>
<url-pattern>
/common/FCKeditor/editor/filemanager/browser/default/connectors/jsp/connector
</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>SimpleUploader</servlet-name>
<url-pattern>
/common/FCKeditor/editor/filemanager/upload/simpleuploader
</url-pattern>
</servlet-mapping>
<url-pattern></url-pattern>只能写在一行并排。如下:
  
<url-pattern>/common/FCKeditor/editor/filemanager/browser/default/connectors/jsp/connector</url-pattern>
改之。暂时启用成功。
3Struts配置文件下的关于CLASS的大小写;
2010-06-30 15:16:02 信息 [apusic.web.webtool.ear./admin] Context Root [/admin]
2010-06-30 15:16:02 信息 [apusic.application.webtool.ear] 成功启动
2010-06-30 15:16:02 信息 [apusic.web.default./] Context Root [/]
2010-06-30 15:16:02 信息 [apusic.application.default] 成功启动
2010-06-30 15:16:02 信息 [con.out] - Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
2010-06-30 15:16:02 信息 [con.out] - Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
2010-06-30 15:16:03 信息 [con.out] - Begin event threw exception
java.lang.reflect.InvocationTargetException
       at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.apache.commons.beanutils.PropertyUtilsBean.invokeMethod(PropertyUtilsBean.java:2065)
       at org.apache.commons.beanutils.PropertyUtilsBean.setSimpleProperty(PropertyUtilsBean.java:2051)
       at org.apache.commons.beanutils.PropertyUtilsBean.setNestedProperty(PropertyUtilsBean.java:1858)
       at org.apache.commons.beanutils.PropertyUtilsBean.setProperty(PropertyUtilsBean.java:1964)
       at org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:1019)
       at org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java:829)
       at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:433)
       at org.apache.commons.digester.SetPropertiesRule.begin(SetPropertiesRule.java:259)
       at org.apache.commons.digester.Rule.begin(Rule.java:200)
       at org.apache.commons.digester.Digester.startElement(Digester.java:1273)
       at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
       at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179)
       at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.emptyElement(XMLDTDValidator.java:788)
       at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:377)
       at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2747)
       at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
       at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
       at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
       at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
       at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
       at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
       at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
       at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
       at org.apache.commons.digester.Digester.parse(Digester.java:1548)
       at org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.java:1006)
       at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:955)
       at org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
       at javax.servlet.GenericServlet.init(GenericServlet.java:241)
       at com.apusic.web.container.ServletComponent.initializeComponent(Unknown Source)
       at com.apusic.web.container.ServletComponent.initializeComponent(Unknown Source)
       at com.apusic.web.container.WebComponent.create(Unknown Source)
       at com.apusic.web.container.WebComponent.getComponent(Unknown Source)
       at com.apusic.web.container.WebComponent.init(Unknown Source)
       at com.apusic.web.container.WebContainer.loadServlet(Unknown Source)
       at com.apusic.web.container.WebContainer.loadServlet(Unknown Source)
       at com.apusic.web.container.WebContainer.loadStartupServlets(Unknown Source)
       at com.apusic.web.container.WebContainer.start(Unknown Source)
       at com.apusic.web.http.VirtualHost.addContext(Unknown Source)
       at com.apusic.web.http.HttpServer.loadWebModule(Unknown Source)
       at com.apusic.web.WebService.loadWebModule(Unknown Source)
       at com.apusic.deploy.runtime.WebModule.load(Unknown Source)
       at com.apusic.deploy.runtime.J2EEApplication.loadModules(Unknown Source)
       at com.apusic.deploy.runtime.J2EEApplication.startApplication(Unknown Source)
       at com.apusic.deploy.runtime.J2EEApplication.startService(Unknown Source)
       at com.apusic.service.Service.start(Unknown Source)
       at com.apusic.deploy.runtime.J2EEDeployer.startUserApplications(Unknown Source)
       at com.apusic.deploy.runtime.J2EEDeployer.startService(Unknown Source)
       at com.apusic.service.Service.start(Unknown Source)
       at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at com.apusic.jmx.MBeanDescriptor.invoke(Unknown Source)
       at com.apusic.jmx.DynamicMBeanSupport.invoke(Unknown Source)
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
       at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
       at com.apusic.server.J2EEServer.start(Unknown Source)
       at com.apusic.server.J2EEServer.startup(Unknown Source)
       at com.apusic.server.Main.main(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: xgxt/form/commanForm (wrong name: xgxt/form/CommanForm)
       at java.lang.ClassLoader.defineClass1(Native Method)
       at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
       at com.apusic.util.UCPClassLoader.defineClass(Unknown Source)
       at com.apusic.util.UCPClassLoader.access$100(Unknown Source)
       at com.apusic.util.UCPClassLoader$1.run(Unknown Source)
       at java.security.AccessController.doPrivileged(Native Method)
       at com.apusic.util.UCPClassLoader.findClass(Unknown Source)
       at com.apusic.web.container.ReloadableClassLoader.findClass(Unknown Source)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
       at com.apusic.web.container.ReloadableClassLoader.loadClass(Unknown Source)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:300)
       at com.apusic.web.container.ReloadableClassLoader.loadClass(Unknown Source)
       at com.apusic.web.container.JSPClassLoader.loadClass(Unknown Source)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
       at com.apusic.web.container.CompositeLoaderDelegate.loadClass(Unknown Source)
       at com.apusic.web.container.ServletClassLoader.loadClass(Unknown Source)
       at org.apache.struts.config.FormBeanConfig.formBeanClass(FormBeanConfig.java:320)
       at org.apache.struts.config.FormBeanConfig.setType(FormBeanConfig.java:191)
       ... 61 more
2010-06-30 15:16:03 信息 [con.out] - Parsing error processing resource path /WEB-INF/sztz-struts-config.xml, /WEB-INF/sxjy-struts-config.xml,/WEB-INF/gygl-struts-config.xml, /WEB-INF/wjcf-struts-config.xml,/WEB-INF/yxgl.xml,/WEB-INF/wjsc-struts-config.xml, /WEB-INF/jxgl.xml,/WEB-INF/lrh_commen_util.xml, /WEB-INF/zbdx/xszzstruts.xml, /WEB-INF/zbdx/nullFormStruts.xml, /WEB-INF/shgc/xszzstruts.xml, /WEB-INF/shgc/nullFormStruts.xml, /WEB-INF/bjlhdx/xszzstruts.xml,/WEB-INF/qgzx-config.xml, /WEB-INF/hzzyjsxy/xszzstruts.xml,/pjpy/jcxy/pjpy.xml, /WEB-INF/xszz-jcxy.xml, /WEB-INF/wjcf/wjcf_jcxy_dispatch.xml,/WEB-INF/wjcf/wjcf_jcxy.xml
java.lang.reflect.InvocationTargetException
       at org.apache.commons.digester.Digester.createSAXException(Digester.java:2540)
       at org.apache.commons.digester.Digester.createSAXException(Digester.java:2566)
一看错误是在Caused by: java.lang.NoClassDefFoundError: xgxt/form/commanForm (wrong name: xgxt/form/CommanForm)
有可能是项目中有大小的问题;用total commander工具首先查找CommanForm.class;发现存在;那估计是有地方把他写成commanForm了;所以马上查找xgxt/form/commanForm结果发现是xgxt\WEB-INF\jygl.xml下有
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts-config (View Source for full doctype...)>
- <struts-config>
- <form-beans>
<form-bean name="commanForm" type="xgxt.form.commanForm" />
<form-bean name="jyglForm" type="xgxt.base.form.JyglForm" />
<form-bean name="xxxForm" type="xgxt.base.form.XxxForm" />
………………………………
type="xgxt.form.commanForm" />修改成type="xgxt.form.CommanForm" />
重启发现问题解决;
有可能是原先TOMCAT下对此大小写不敏感;
至此全部的应用迁移成功

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-336264-1-1.html 上篇帖子: 解决windows版idea的tomcat配置问题 下篇帖子: Web界面配置Tomcat连接池---我得一点个人心得
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表