我在eclipse下调试了两个工程,其中一个只有的structs工程点run没问题已经能运行了,而另一个整合了structs+hibernate+spring的工程却老是出以下错误,调试了一上午还是这样,请问高手是怎么回事啊?该工程在eclipse里只是显示了黄色的叹号,该加的包也都加了,各个xml文件里也没有报错,只是鼠标移动到某些字上时会说"not correctly spelled"
我看网上有人说是web.xml被误放在web-info/lib目录下导致的,我的在ecilpse IDE里确实显示web.xml是放在web-info/lib目录下的,但是查看该工程的文件夹web.xml又是在web-info下,可能是eclipse就是这样显示的把?请各位高手帮忙提示下可能是什么地方出错了HTTP Status 404 - /forum/--------------------------------------------------------------------------------type Status reportmessage /forum/description The requested resource (/forum/) is not available.
--------------------------------------------------------------------------------Apache Tomcat/7.0.28
我看网上有人说是web.xml被误放在web-info/lib目录下导致的,我的在ecilpse IDE里确实显示web.xml是放在web-info/lib目录下的,但是查看该工程的文件夹web.xml又是在web-info下,可能是eclipse就是这样显示的把?请各位高手帮忙提示下可能是什么地方出错了HTTP Status 404 - /forum/--------------------------------------------------------------------------------type Status reportmessage /forum/description The requested resource (/forum/) is not available.
--------------------------------------------------------------------------------Apache Tomcat/7.0.28
2. 路径大小写什么的检查下
严重: Context initialization failed
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 10 in XML document from file [D:\project\coding\EclipseWorkspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\forum\WEB-INF\classes\applicationContext-action.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 10; columnNumber: 114; 必须为元素类型 "beans" 声明属性 "xmlns"。
Caused by: org.xml.sax.SAXParseException; lineNumber: 10; columnNumber: 114; 必须为元素类型 "beans" 声明属性 "xmlns"。
- Attribute "xmlns:xsi" must be declared for element type "beans".
- Attribute "xmlns" must be declared for element type "beans".
- Attribute "xmlns:aop" must be declared for element type "beans".
- Attribute "xmlns:context" must be declared for element type "beans".
- Attribute "xmlns:tx" must be declared for element type "beans".
- Attribute "xsi:schemaLocation" must be declared for element type "beans".
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
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.5.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
<bean id="homeAction" class="com.hrl.action.HomeAction"
scope="prototype">
</bean>
<bean id="userAction" class="com.hrl.action.UserAction"
scope="prototype">
<property name="userDao" ref="userDao"></property>
</bean>
<bean id="articleAction" class="com.hrl.action.ActicleAction"
scope="prototype">
<property name="articleDao" ref="articleDao"></property>
</bean>
<bean id="replyAction" class="com.hrl.action.ReplyAction"
scope="prototype">
<property name="replyDao" ref="replyDao"></property>
</bean></beans>
看它列位置报在了114,已经超出字符数了
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
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.5.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">就这几行的问题,找个规范的applicationContext.xml,从里面copy一份。
"看它列位置报在了114,已经超出字符数了" 这说明什么问题呢?
怎么看不可见字符?