1. 程式人生 > >JAVA錯誤提示:The operation is not applicable to the current selection.Select a field which is not declared as type variable or a type that declares such f

JAVA錯誤提示:The operation is not applicable to the current selection.Select a field which is not declared as type variable or a type that declares such f

  平時沒怎麼注意,今天用Eclipse自動生成Set Get方法時提示錯誤,錯誤資訊如下:

The operation is not applicable to the current selection.Select a field which is not declared as type variable or a type that declares such fields.

 

 原因:

 

解決方案:將游標定位到類內部自動生成Set、Get即可

 

相關推薦

JAVA錯誤提示:The operation is not applicable to the current selection.Select a field which is not declared as type variable or a type that declares such f

  平時沒怎麼注意,今天用Eclipse自動生成Set Get方法時提示錯誤,錯誤資訊如下: The operation is not applicable to the current selection.Select a field which is not declared as type varia

OSCache的原始碼編譯Cache.java 檔案報add(Class, T) in the type EventListenerList is not applicable for the arguments 錯誤的解決

下載了 OSCache的原始碼,需要新增一些功能,匯入Eclipse之後編譯,Cache.java 檔案報如下錯誤: Description Resource Path Location TypeThe method add(Class<T>, T) in the

The method setDate(int, java.sql.Date) in the type PreparedStatement is not applicable for the argum

The method setDate(int, java.sql.Date) in the type PreparedStatement is not applicable for the arguments (int, java.util.Date) preparedStatement

invalid LOC header 與 Could not publish to the server. java.lang.IndexOutOfBoundsException 錯誤處理

1. 專案eclipse 部署問題 Could not publish to the server. java.lang.IndexOutOfBoundsException 原因: pom.xml 依賴的jar包有錯誤,maven 下載jar時,檔案為下載文章

stale element reference: element is not attached to the page document 錯誤記錄

2018.10.09 今天又跑了一遍,竟然又神器的不報錯了。。。 持續關注這個問題,應該還會再碰到。 2018.10.09pm 刷部落格發現了這個問題的處理方法,問題完美解決。 下面是程式碼修改:   在基類中做如下修改 #點選元素 def click(self,

selenium常見問題:element is not attached to the page document,頁面重新整理後元素失效,需要重新定位元素

 測試中,常遇到此問題,特此寫一個重新獲取元素的函式,已供呼叫解決此方法     #找不到元素時,重新獲取元素,eletype預設獲取單個元素,若=1,則獲取多個元素 #weblement有值,則傳入webelement def retying_get_el

解決org.apache.ibatis.binding.BindingException: Type interface XXX is not known to the MapperRegistry.

org.apache.ibatis.binding.BindingException: Type interface com.byh.mapper.OrderMapper is not known to the MapperRegistry.     at or

Java 錯誤提示org.apache.poi.POIXMLException: java.lang.reflect.InvocationTargetException

java 操作excel檔案 釋出後報錯 org.apache.poi.POIXMLException: java.lang.reflect.InvocationTargetException XSSFWorkbook xwb = new XSSFWorkbook(fileName); 這句報錯 使用

解決org.apache.ibatis.binding.BindingException: Type interface xxx is not known to the MapperRegistry

執行SpringMVC時控制檯報錯 D:\Java\jdk1.8.0_131\bin\java.exe -ea -Didea.test.cyclic.buffer.size=1048576 -javaagent:D:\IntelliJ_IDEA\lib\idea_rt.jar=553

Eclipse中啟動Tomcat時(MAVEN專案),報錯:Could not publish to the server. java.lang.IndexOutOfBoundsException的解決過程

Eclipse中啟動Tomcat時(MAVEN專案),報錯:Could not publish to the server. java.lang.IndexOutOfBoundsException,tomcat啟動失敗,   原因:該MAVEN專案下載的本地jar包存在下載失敗的情況 &nbs

java.lang.IllegalArgumentException: Called attach on a child which is not detached: ViewHolder

轉載請標明出處,維權必究:https://www.cnblogs.com/tangZH/p/10116298.html  在專案過程中出現了上述錯誤。 會出現這樣的錯誤是在我使用: notifyItemRemoved(position); notifyItemRangeChanged(pos

rac環境打PSU補丁ERROR:This patch is not applicable to GI home.

問題描述: 當我給grid軟體打補丁時,執行到【./opatch auto /tmp/psu/28429134 -oh /u01/app/11.2.0/grid/ -ocmrf /tmp/ocm.rsp】 這一步時,報錯ERROR:This patch is not applicable to

IntelliJ在類檔案中直接修改包名(未定義的包名) 提示Package name does not correspond to the file path

問題就是標題中說的那樣 產生的原因就是:在某個包下建立了一個類發現包名不合適,直接在類檔案頭部第一行修改包名想實現跟eclipse一樣通過快捷鍵 快速生成未定義的包並將該類移動到新建的包下,網上的答案出處基本都是來自stackoverflow的提問 該問題stackoverflow地址:

eclipse配置tomcat,讓java web專案執行起來! Tomcat v9.0 Could not publish to the server. java.lang.IndexOutOfBoundsException

做專案,搞開發。開發環境配置時第一步。只有環境搭好了,以後的事情才能順利進行! 這不需求來了,負一屏專案有新功能需要新增,臨時接手,要進行伺服器前端開發。這個專案是以前後臺java人員進行開發的。都是jsp頁面,那個叫心塞的啊,看的一臉不爽。但是,工作還得繼續,沒接觸過的,就得去趟趟,試試水。 把專案cl

Mybatis測試執行異常之Type interface com.testmybatis.dao.bill.BillMapper is not known to the MapperRegistry.

問題描述:寫了一個BillMapper.xml檔案,相應的寫了一個dao層操作介面BillMapper.java介面,全部寫完ok,在測試類中測試,執行後console視窗報以下異常: org.apache.ibatis.binding.BindingExc

啟動eclipse出現錯誤提示:an error hava occured,see the log

在Win8系統上下載了eclipse3.2,eclipse3.22壓縮包,解壓之後在eclipse的安裝目錄中雙擊eclipse.exe執行eclipse時提示an error hava occured,see the log。如下: 點選eclipse安裝目錄下的co

Type interface is not known to the MapperRegistry.的解決辦法

經驗告訴我們這句錯誤是由於配置檔案缺失配置導致的~~~ 在mybatis中新增如下的配置即可: <mappers> <mapper resource="org/mybatis/builder/AuthorMapper.xml"/> <m

Type interface com.mapper.GradeMapper is not known to the MapperRegistry的解決辦法

使用mybatis,執行出錯,丟擲.org.apache.ibatis.binding.BindingException: Type interface com.mapper.GradeMapper

Java錯誤提示-------。。。。。cannot be resolved 。???

錯誤提示: 型別:。。。。。cannot be resolved 。 原因分析: : /*凡是提示:。。。。。cannot be resolved 。這樣的錯誤都是:* 1.變數沒有宣告或定義就直接使用。* 2.某一個類,沒有匯入或定義* 3.某一物件,沒有定義或宣告。* 

tomcat啟動報錯Could not publish to the server. java.lang.NullPointerException

tomcat部署好後用了很久,突然啟動報錯: Could not publish to the server. java.lang.NullPointerException 解決方法: 在e