Spring+HIbernate项目部署在weblogic中启动异常
新建一个web项目部署在weblogic可以正常运行,但把在tomcat中运行正常的项目换到Weblogic中运行出现如下异常:org.springframework.b...
新建一个web项目部署在weblogic可以正常运行,但把在tomcat中运行正常的项目换到Weblogic中运行出现如下异常:
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.cw.onlinepharmacy.web.actions.EmployeeAction] for bean with name '/employee' defined in file [D:\bea\autodeploy\OnlinePharmacy\WEB-INF\classes\applicationContext-actions.xml]; nested exception is java.lang.ClassNotFoundException: Class bytes found but defineClass()failed for: 'com.cw.onlinepharmacy.web.actions.EmployeeAction'
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1076)
…………
web.xml中部分代码如下:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<welcome-file-list>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
applicationContext-actions.xml中部分代码:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd">
<!-- 员工Action IOC (ChengWei) -->
<bean name="/employee" class="com.cw.onlinepharmacy.web.actions.EmployeeAction">
<property name="employeeHandler" ref="employeeHandler"/>
<property name="roleHandler" ref="roleHandler"/>
<property name="logHandler" ref="logHandler"/>
</bean>
在tomcat中可以运行的,在weblogic中就报错:
Error 404--Not Found
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.4.5 404 Not Found
The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.
If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address. 展开
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.cw.onlinepharmacy.web.actions.EmployeeAction] for bean with name '/employee' defined in file [D:\bea\autodeploy\OnlinePharmacy\WEB-INF\classes\applicationContext-actions.xml]; nested exception is java.lang.ClassNotFoundException: Class bytes found but defineClass()failed for: 'com.cw.onlinepharmacy.web.actions.EmployeeAction'
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1076)
…………
web.xml中部分代码如下:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<welcome-file-list>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
applicationContext-actions.xml中部分代码:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd">
<!-- 员工Action IOC (ChengWei) -->
<bean name="/employee" class="com.cw.onlinepharmacy.web.actions.EmployeeAction">
<property name="employeeHandler" ref="employeeHandler"/>
<property name="roleHandler" ref="roleHandler"/>
<property name="logHandler" ref="logHandler"/>
</bean>
在tomcat中可以运行的,在weblogic中就报错:
Error 404--Not Found
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.4.5 404 Not Found
The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.
If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address. 展开
2个回答
展开全部
你给出的错误不是很全面,不太好分析
但你个建议,可以使用weblogic命令形式发布应用或者使用ANT工具,这样会跳过一些自动加载的项
weblogic一直认为tomcat不是一个完全遵循J2EE标准的中间件,所以它们之间不同之处还是很多的
但你个建议,可以使用weblogic命令形式发布应用或者使用ANT工具,这样会跳过一些自动加载的项
weblogic一直认为tomcat不是一个完全遵循J2EE标准的中间件,所以它们之间不同之处还是很多的
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
浙江启扬智能科技有限公司
2023-06-12 广告
2023-06-12 广告
Linux 嵌入式系统中,USB 启动模式能够烧写 ARM 的 uboot 的原因主要有以下几个方面:1. USB 启动模式相对于传统的 BIOS 启动模式来说,具有更高的兼容性和灵活性,可以支持更多的硬件设备和操作系统。2. USB 启动...
点击进入详情页
本回答由浙江启扬智能科技有限公司提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询