在项目发布时为什么报这个错误?

sigrid 2010-10-25 10:02:58
<2010-10-25 上午10时00分47秒 CST> <Error> <HTTP> <BEA-101216> <Servlet: "action"
failed to preload on startup in Web application: "oiop".
javax.servlet.UnavailableException
at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServle
t.java:880)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:336)
at javax.servlet.GenericServlet.init(GenericServlet.java:241)
at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(St
ubSecurityHelper.java:283)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:321)
Truncated. see log file for complete stacktrace
>
...全文
131 点赞 收藏 10
写回复
10 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
precious 2010-10-26
有可能是你的jar包冲突,有的jar功能上是在spring中实现的,有可能造成冲突,你可以试着把jar全部去掉,然后一个一个的加进去,让编译通过。
回复
无伤 2010-10-25
应该是配置文件的问题
回复
sigrid 2010-10-25
项目刚发布就报的错~!那位高手解答一下?
回复
sigrid 2010-10-25
出现此错误是由于在struts-config.xml文件中配置的datasource不正确,可能的原因是连接数据源的URL配置中IP地址不正确造成的。或jdbc驱动jar包没有放在正确的目录下。
http://blog.ccw.com.cn/article-htm-itemid-1323-type-blog.html


这几种我都试过了,还是出现同样的错误~!
回复
precious 2010-10-25
出现此错误是由于在struts-config.xml文件中配置的datasource不正确,可能的原因是连接数据源的URL配置中IP地址不正确造成的。或jdbc驱动jar包没有放在正确的目录下。
http://blog.ccw.com.cn/article-htm-itemid-1323-type-blog.html
回复
aoli444 2010-10-25
domain路径下config.xml配置有问题
回复
dctanzdsoft 2010-10-25
我还没有这种情况呢。
回复
sigrid 2010-10-25
这是个什么错误啊?
我把weblogic卸了重装的。还是报这个错误~!


<2010-10-25 下午02时51分18秒 CST> <Error> <ServletContext-/oiop> <BEA-000000> <a
ction: null
org.springframework.beans.factory.BeanDefinitionStoreException: IOException pars
ing XML document from ServletContext resource [/WEB-INF/beans.xml]; nested excep
tion is java.io.FileNotFoundException: Could not open ServletContext resource [/
WEB-INF/beans.xml]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea
nDefinitions(XmlBeanDefinitionReader.java:310)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea
nDefinitions(XmlBeanDefinitionReader.java:280)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReade
r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:131)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReade
r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:147)
at org.springframework.web.context.support.XmlWebApplicationContext.load
BeanDefinitions(XmlWebApplicationContext.java:124)
Truncated. see log file for complete stacktrace
java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/
beans.xml]
at org.springframework.web.context.support.ServletContextResource.getInp
utStream(ServletContextResource.java:99)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea
nDefinitions(XmlBeanDefinitionReader.java:297)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea
nDefinitions(XmlBeanDefinitionReader.java:280)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReade
r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:131)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReade
r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:147)
Truncated. see log file for complete stacktrace
>
<2010-10-25 下午02时51分18秒 CST> <Error> <HTTP> <BEA-101216> <Servlet: "action"
failed to preload on startup in Web application: "oiop".
javax.servlet.UnavailableException
at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServle
t.java:880)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:336)
at javax.servlet.GenericServlet.init(GenericServlet.java:241)
at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(St
ubSecurityHelper.java:283)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:321)
Truncated. see log file for complete stacktrace
>
<2010-10-25 下午02时51分53秒 CST> <Warning> <netuix> <BEA-423420> <Redirect is e
xecuted in begin or refresh action. Redirect url is /console/console.portal?_nfp
b=true&_pageLabel=AppAutoApplicationOverviewPage&AppAutoApplicationOverviewPortl
ethandle=com.bea.console.handles.AppDeploymentHandle%28%22com.bea%3AName%3D_apps
dir_Hello_dir%2CType%3DAppDeployment%22%29.>
<2010-10-25 下午02时51分57秒 CST> <Warning> <netuix> <BEA-423420> <Redirect is e
xecuted in begin or refresh action. Redirect url is /console/console.portal?_nfp
b=true&_pageLabel=AppAutoApplicationOverviewPage&AppAutoApplicationOverviewPortl
ethandle=com.bea.console.handles.AppDeploymentHandle%28%22com.bea%3AName%3D_apps
dir_oiop_dir%2CType%3DAppDeployment%22%29.>
<2010-10-25 下午02时52分09秒 CST> <Error> <ServletContext-/oiop> <BEA-000000> <a
ction: null
org.springframework.beans.factory.BeanDefinitionStoreException: IOException pars
ing XML document from ServletContext resource [/WEB-INF/beans.xml]; nested excep
tion is java.io.FileNotFoundException: Could not open ServletContext resource [/
WEB-INF/beans.xml]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea
nDefinitions(XmlBeanDefinitionReader.java:310)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea
nDefinitions(XmlBeanDefinitionReader.java:280)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReade
r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:131)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReade
r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:147)
at org.springframework.web.context.support.XmlWebApplicationContext.load
BeanDefinitions(XmlWebApplicationContext.java:124)
Truncated. see log file for complete stacktrace
java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/
beans.xml]
at org.springframework.web.context.support.ServletContextResource.getInp
utStream(ServletContextResource.java:99)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea
nDefinitions(XmlBeanDefinitionReader.java:297)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea
nDefinitions(XmlBeanDefinitionReader.java:280)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReade
r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:131)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReade
r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:147)
Truncated. see log file for complete stacktrace
>
回复
sigrid 2010-10-25
为什么要重装系统啊?
是我系统出现问题了吗?
我配置文件都看了几十遍了,还是没找到问题在哪~!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
beans.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"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">


<bean id="dataSource"
class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"> </property>
<property name="url" value="jdbc:oracle:thin:@localhost:1521:ORCL"> </property>
<property name="username" value="jinzinan"></property>
<property name="password" value="jinzinan"></property>
</bean>
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource"></ref>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.Oracle9Dialect
</prop>
</props>
</property>
<property name="mappingResources">
<list>
<value>po/PracticeOne.hbm.xml</value></list>
</property></bean>
<bean id="PracticeOneDAO" class="dao.PracticeOneDAO">
<property name="sessionFactory">
<ref bean="sessionFactory"></ref>
</property>
</bean>
<bean id="poneService" class="service.PoneService">
<property name="iponeDao">
<ref bean="PracticeOneDAO"></ref>
</property>
</bean>
<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory">
<ref bean="sessionFactory"/>
</property>
</bean>

<bean id="serviceProxy" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="transactionManager">
<ref local="transactionManager"/>
</property>
<property name="target">
<ref local="service"/>
</property>
<property name="transactionAttributes">
<props>
<prop key="query*">PROPAGATION_REQUIRED,readOnly</prop>
</props>
</property>
</bean>
<bean name="/pone" class="struts.action.PoneAction" >
<property name="poneService" >
<ref bean="serviceProxy"></ref>
</property>
</bean>
</beans>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
struts_config.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config_1_2.dtd">

<struts-config>
<data-sources />
<form-beans >
<form-bean name="poneForm" type="struts.form.PoneForm" />

</form-beans>

<global-exceptions />
<global-forwards />
<action-mappings >
<action
attribute="poneForm"
input="/form/pone.jsp"
name="poneForm"
parameter="method"
path="/pone"
scope="request"
type="org.springframework.web.struts.DelegatingActionProxy" >
<forward name="list" path="list.jsp"></forward>
</action>
</action-mappings>

<message-resources parameter="struts.ApplicationResources" />
<plug-in
className="org.springframework.web.struts.ContextLoaderPlugIn">
<set-property property="contextConfigLocation"
value="/WEB-INF/beans.xml"/>
</plug-in>
</struts-config>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>

<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>3</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>3</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>

</web-app>

回复
相关推荐
发帖
Web 开发
创建于2007-09-28

8.0w+

社区成员

Java Web 开发
申请成为版主
帖子事件
创建了帖子
2010-10-25 10:02
社区公告
暂无公告