WebLogic 不能使用 Struts???????????????????????????
WebLogic 不能使用 Struts ???????????运行 jsp 正常, 一到 *.do 就出错 --------------------编程问答--------------------
启动时, 显示下面的警告:
<Warning> <HTTP> <BEA-101248> <[Application: 'C:\bea\user_projects\domains\yxpdomain\applications', Module: 'ttt']: Deployment descriptor "web.xml" is malformed. Check against the DTD: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'web-app'. (line 2, column 221).> --------------------编程问答--------------------
运行 jsp 正常
但是点击 <a href="show.do" > do </a> 时 , 出现无数异常
--------------------编程问答--------------------
异常:
严重: No action instance for path /show could be created
java.lang.ClassNotFoundException: Class bytes found but defineClass()
failed for: 'yxp.struts.action.ShowAction'
--------------------编程问答-------------------- 2008-3-21 2:13:26 org.apache.struts.action.RequestProcessor processActionCreate
严重: No action instance for path /show could be created
java.lang.ClassNotFoundException: Class bytes found but defineClass()failed for: 'yxp.struts.action.ShowAction'
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:187)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:61)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:224)
at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:41)
at org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:117)
at org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:143)
at org.apache.struts.action.RequestProcessor.processActionCreate(RequestProcessor.java:280)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:218)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1072)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:348)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6981)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3892)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2766)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
Caused by: java.lang.UnsupportedClassVersionError: yxp/struts/action/ShowAction (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:480)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:182)
... 23 more --------------------编程问答--------------------
但是 在 TOMCAT 中运行正常 --------------------编程问答-------------------- 配置没有打开!
看Weblogic配置说明
在web.xml文件中加入以下配置:
<taglib>
<taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld/</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib> --------------------编程问答-------------------- 警告的原因是因为servlet之前的规范,web.xml的元素必须按照顺序来,警告中会有它的顺序的;struts抛异常,是因为没有找到类,建议采用weblogic的jdk编译再发布 --------------------编程问答-------------------- 肯定是兼容的,要不IBM公司的职工的大牙都没有了 --------------------编程问答-------------------- 接分是王道! --------------------编程问答-------------------- lz要干嘛? --------------------编程问答-------------------- --------------------编程问答-------------------- --------------------编程问答-------------------- --------------------编程问答-------------------- 能用,我就是用的weblogic,应该是你web.xml配置的不对 --------------------编程问答-------------------- 你要将你的struts-config.xml 加载到web.xml中
<init-param>
<param-name>config</param-name>
<param-value>
/WEB-INF/struts-config.xml
</param-value>
</init-param> --------------------编程问答-------------------- 你们这些B人就会回答这种 弱智问题!!
发贴一天了,都没人理会,就只会理会这些傻傻的问题。。。。
信了你们邪!
补充:企业软件 , 中间件