天天看點

eclipse錯誤及解決方法(大家把遇到的錯誤也貼到評論裡吧,然後一起解決)

1.不跳轉。把struts.xml中<result name="SUCCESS">/orders-index.jsp</result>

的SUCCESS改為success

2.嚴重: Servlet.service() for servlet default threw exception

java.sql.SQLException: ORA-00932: inconsistent datatypes: expected DATE got NUMBER。

3.嚴重: Servlet.service() for servlet default threw exception

org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessException details (1) are:

PropertyAccessException 1:

org.springframework.beans.TypeMismatchException: Failed to convert property value of type [cn.com.goldmind.crm.test.Action.BookTypeAction$$EnhancerByCGLIB$$20332272] to required type [cn.com.goldmind.crm.test.Entity.BookType] for property 'bookType'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [cn.com.goldmind.crm.test.Action.BookTypeAction$$EnhancerByCGLIB$$20332272] to required type [cn.com.goldmind.crm.test.Entity.BookType] for property 'bookType': no matching editors or conversion strategy found

Caused by: java.lang.IllegalArgumentException: Cannot convert value of type [cn.com.goldmind.crm.test.Action.BookTypeAction$$EnhancerByCGLIB$$20332272] to required type [cn.com.goldmind.crm.test.Entity.BookType] for property 'bookType': no matching editors or conversion strategy found

-=-----------------------------------------

<!-- 查詢記錄總數 --> >多了一個>,錯誤了,sqlmap必須match sql*|select*|insert*|.........

-------------------

找不到pageNum.value。因為form的name與iframe的name重名了

-----------------------

Attribute "parame

rterClass" must be declared for element type "insert". 類的路徑和名稱單詞拼錯了

5.There is no READABLE pro

perty named 'amount ' in class 'gmt.boss.channel.ChannelCharge.Entity.Margin.MarginEntity'

Caused by: 隻是因為#amount #後多了個空格呀

7.Could not initialize class. Cause: java.lang.ClassNotFoundE

xception: gmt.boss.channel.ChannelCharge.Entity.Margin.MaginEntity

--------------------

<2008-11-24 上午10時18分35秒 CST> <Error> <HTTP Session> <BEA-100028> <Could not deserialize se

ssion data.

java.io.NotSerializableException: org.apache.commons.dbcp.BasicDataSource

at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)

at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)

at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)

at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)

at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)

Truncated. see log file for complete stacktrace

>

-----------------------------------------------

Cause: com.ibatis.sqlmap.client.SqlMapException: Error in XmlSqlMapC

lientBuilder. Alias name conflict occurred. The alias 'channeldetailed' is already mappe

d to the value 'null'.

------------------

java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.

02008-8-20 8:01:15 org.apache.struts.action.RequestProcessor processException

警告: Unhandled Exception thrown: class java.lang.NullPointerException

2008-8-20 8:01:15 org.apache.catalina.core.ApplicationContext log

資訊: java.lang.NullPointerException

sqlServer沒開,暈

嚴重: Exception loading sessions from persistent storage

java.io.InvalidClassException: com.form.ApplicationForm; local class incompatible: stream classdesc serialVersionUID = -542564554742344487, local class serialVersionUID = 5322011595094940979

警告: Unhandled Exception thrown: class java.io.FileNotFoundException

2008-8-20 9:42:04 org.apache.catalina.core.ApplicationContext log

資訊: D:/ex/.metadata/.plugins/com.genuitec.eclipse.easie.tomcat.myeclipse/tomcat/webapps/Praxis/upload (拒絕通路。)

GBK

上傳檔案那塊的問題,當上傳檔案為空時就出現這樣的問題

嚴重: Exception loading sessions from persistent storage

java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: com.vo.OperationApplicationformVo

GBK

0java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]将資料類型 nvarchar 轉換為 numeric 時出錯。

把資料庫中的numeric改為varchar就可以了

警告: Cannot serialize session attribute ApplicationForm for session 37B0300C3E6AA8B4075ADE8C42116032

java.io.NotSerializableException: com.vo.OperationApplicationformVo

重新開機伺服器時出的,不影響程式,可能是因為sesseion中有值沒關閉的原因

嚴重: Invalid path /newOperation/newOperation was requested

超聯接到NewOperationAction時出的,<a href="../newOperation.do?action=basicInfoFormGo" target="_blank" rel="external nofollow" >辦理新業務</a>即可

2008-8-18 21:54:14 org.apache.catalina.core.ApplicationContext log

資訊: /newOperation/attachFile.jsp(62,4) The end tag "&lt;/logic:notEmpty" is unbalanced

Jsp頁面有錯誤

2008-8-18 21:56:22 org.apache.struts.action.RequestProcessor processMapping

嚴重: Invalid path /newOperation/action was requested

GBK

和上上個問題一樣

嚴重: Servlet action threw unload() exception

javax.servlet.ServletException: Servlet.destroy() for servlet action threw exception

嚴重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlMapClient' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Error occurred. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: org.xml.sax.SAXParseException: Document root element "sqlMapConfig", must match DOCTYPE root "null".

Caused by: java.lang.RuntimeException: Error occurred. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: org.xml.sax.SAXParseException: Document root element "sqlMapConfig", must match DOCTYPE root "null".

嚴重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener

org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [gmt.boss.com.goldmind.qdgl.ChannelClearArrearage.Action.ArrearCompanyData.ArrearCompanyApplyAction] for bean with name 'scopedTarget.clearArrearageCompanyApply' defined in ServletContext resource [/WEB-INF/applicationContext_test.xml]; nested exception is java.lang.ClassNotFoundException: gmt.boss.com.goldmind.qdgl.ChannelClearArrearage.Action.ArrearCompanyData.ArrearCompanyApplyAction

Caused by: java.lang.ClassNotFoundException: gmt.boss.com.goldmind.qdgl.ChannelClearArrearage.Action.ArrearCompanyData.ArrearCompanyApplyAction

警告: Unhandled Exception thrown: class java.io.FileNotFoundException

2008-8-21 6:35:30 org.apache.catalina.core.ApplicationContext log

資訊: D:/ProgramFile/Tomcat 6.0/webapps/Praxis/upload/eclipceError.doc (系統找不到指定的路徑。)

嚴重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: Association references unmapped class: cn.wy.entity.TblFwxx

Caused by: org.hibernate.MappingException: Association references unmapped class: cn.wy.entity.TblFwxx

applicationContext.xml沒配

嚴重: Servlet.service() for servlet default threw exception

org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'IssuanceinfoLogicDAO' is defined

BaseAction.java檔案中return (IssuanceinfoLogicDAO)webApplicationContext.getBean("issuanceinfoLogicDAO");

issuanceinfoLogicDAO(logicDao中)對應application中的bean

嚴重: Servlet.service() for servlet default threw exception

java.lang.NoSuchMethodException: com.highcom.action.InformationIssuance.getOneInfo()

at java.lang.Class.getMethod(Unknown Source)

Action的方法中不能有參數

嚴重: Servlet.service() for servlet default threw exception

java.lang.ClassCastException: java.util.ArrayList cannot be cast to com.highcom.bean.issuanceInfo.Issuanceinfo

at com.highcom.dao.IssuanceinfoDAO.getInfo(IssuanceinfoDAO.java:41)

嚴重: Servlet.service() for servlet default threw exception

org.apache.jasper.JasperException: /InformationIssuance/upd_information.jsp(23,64) equal symbol expected

<s:url action="save?issuanceinfo=<s:property value="issuanceinfo">" id="loginUrl"></s:url>

<s:form name="theForm" method="post" action="%{loginUrl}" >

<s:property value="issuanceinfo">擷取的是值,不是對象

Action不能傳對象

嚴重: Servlet.service() for servlet jsp threw exception

java.lang.NoClassDefFoundError: org/apache/jsp/informationissuance/info_005findex_jsp (wrong name: org/apache/jsp/InformationIssuance/info_005findex_jsp)

applicationContext.xml檔案沒改

Servlet.service() for servlet default threw exception

java.lang.NullPointerException

at com.highcom.action.informationissuance.InformationIssuance.execute(InformationIssuance.java:19)

嚴重: Context initialization failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'logicDAO' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'issuanceinfoDAO' while setting bean property 'issuanceinfoDAO'; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.highcom.dao.infomationissuance.IssuanceinfoDAO] for bean with name 'issuanceinfoDAO' defined in ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.lang.ClassNotFoundException: com.highcom.dao.infomationissuance.IssuanceinfoDAO

applilcationContext.xml中單詞拼錯了

嚴重: Servlet.service() for servlet default threw exception

java.lang.NoSuchMethodException: com.highcom.action.informationissuance.InformationIssuance.create()

Struts2的action中,方法沒有參數,我在create()中加了參數

嚴重: Servlet.service() for servlet default threw exception

org.hibernate.PropertyValueException: not-null property references a null or transient value: com.highcom.bean.Issuanceinfo.infoContent

at org.hibernate.engine.Nullability.checkNullability(Nullability.java:72)

嚴重: Couldn't find a destroy method named 'close' on bean with name 'sessionFactory'

2008-9-22 10:26:34 org.springframework.web.context.ContextLoader initWebApplicationContext

嚴重: Context initialization failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'logicDAO' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'railwayInfoDAO' while setting bean property 'railwayInfoDAO'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'railwayInfoDAO' is defined

railwayInfoDAO,railwayInfoAciton中沒有内容

嚴重: Servlet.service() for servlet default threw exception

org.hibernate.hql.ast.QuerySyntaxException: station is not mapped [from station station ,stage stage where station.signs = '1' and station.stageByIntoStation.stageId = stage.stageId]

Station原來HQL語句中也分大小寫

嚴重: Servlet.service() for servlet default threw exception

org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessException details (1) are:

PropertyAccessException 1:

org.springframework.beans.TypeMismatchException: Failed to convert property value of type [cn.com.goldmind.crm.test.Action.BookTypeAction$$EnhancerByCGLIB$$20332272] to required type [cn.com.goldmind.crm.test.Entity.BookType] for property 'bookType'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [cn.com.goldmind.crm.test.Action.BookTypeAction$$EnhancerByCGLIB$$20332272] to required type [cn.com.goldmind.crm.test.Entity.BookType] for property 'bookType': no matching editors or conversion strategy found

Caused by: java.lang.IllegalArgumentException: Cannot convert value of type [cn.com.goldmind.crm.test.Action.BookTypeAction$$EnhancerByCGLIB$$20332272] to required type [cn.com.goldmind.crm.test.Entity.BookType] for property 'bookType': no matching editors or conversion strategy found

applicatcionContext_text.xml中的<bean id="bookType"

   class="cn.com.goldmind.crm.test.Action.BookTypeAction"

   scope="session">

   <property name="bookTypeDao">

    <ref bean="bookTypeDAOProxy" />

   </property>

   <aop:s

bookType和實體類重名了,改了就好

嚴重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlMapClient' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Error occurred. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: org.xml.sax.SAXParseException: Invalid byte 2 of 2-byte UTF-8 sequence.

Caused by: java.lang.RuntimeException: Error occurred. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: org.xml.sax.SAXParseException: Invalid byte 2 of 2-byte UTF-8 sequence.

2008-11-06 14:29:01 [org.springframework.beans.factory.xml.XmlBeanDefinitionReader]-[INFO] Loading XML bean definitions from class path resource [org/springframework/jdbc/support/sql-error-codes.xml]

2008-11-06 14:29:01 [org.springframework.jdbc.support.SQLErrorCodesFactory]-[INFO] SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase]

什麼都好使,也沒有什麼錯誤,就是無法插入到資料庫

沒有錯誤是因為你Try Catch了..。去掉後是java.sql.SQLException missing comma(逗号)錯誤.。是因為sql語句中多了一個單詞

Caused by:

org.springframework.aop.framework.AopConfigException: Cannot proxy target class because CGLIB2 is not available. Add CGLIB to the class path or specify proxy interfaces.

少包cglib。。還有兩種317k的可以,錯誤少

Root cause of ServletException.

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.clearArrearageCompanyApply': Scope 'session' is not active for the current thread; consider defining a scoped proxy for this bean if you intend to refer to it from a singleton; nested exception is java.lang.IllegalStateException: No thread-bound request found: Are you referring to request attributes outside of an actual web request? If you are actually operating within a web request and still receive this message,your code is probably running outside of DispatcherServlet/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request.

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:302)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)

at org.springframework.aop.target.SimpleBeanTargetSource.getTarget(SimpleBeanTargetSource.java:33)

at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.getTarget(Cglib2AopProxy.java:662)

at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:612)

Truncated. see log file for complete stacktrace

java.lang.IllegalStateException: No thread-bound request found: Are you referring to request attributes outside of an actual web request? If you are actually operating within a web request and still receive this message,your code is probably running outside of DispatcherServlet/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request.

at org.springframework.web.context.request.RequestContextHolder.currentRequestAttributes(RequestContextHolder.java:102)

at org.springframework.web.context.request.SessionScope.get(SessionScope.java:88)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:283)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)

at org.springframework.aop.target.SimpleBeanTargetSource.getTarget(SimpleBeanTargetSource.java:33)

Truncated. see log file for complete stacktrace

1.result 'null' not found,原因是<result name="error" >中少了type="redirect-action"

2.<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />要放在<titel><title>的上面,不然不是亂碼就是不顯示

繼續閱讀