JBOSS 點滴

          豐豐的博客

          webservice錯誤集錦

          在Eclipse中遇到The type XXX cannot be resolved. It is indirectly referenced from required .class files錯誤.....,查找的解決辦法如下:

          一:
          It is indirectly referenced from required .class file

          原因:你正要使用的類調用了另一個類,而這個類又調用了其他類,這種關系可能會有好多層。而在這個調用的過程中,某個類所在的包的缺失就會造成以上那個錯誤。

          解決方法:導入缺失的包

          二:
          The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project
          The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files

          出現以上訊息的原因是因為你裝了多個版本的jre或jdk的關係。本來Eclipse在建立專案時,會自動參照你的jre路徑,但多個版本就沒辦法了。
          你只能手動建立…
          1. 進入window\preferences\java\Installed JREs
          1)按Add
          2)輸入JRE Name, 例JDK1.5.0.03
          3)JRE home directory, 選擇安裝的路徑
          4)按OK
          2. 進入Project\properties\Java Bulid Path
          1)Add library
          2)選JRE System Library後按Next
          3)選workplace default JRE後按finish...

          三,the type org.apache.axiom.soap.SOAPEnvelope cannot be resolved,it is indirectly referenced from required .class files
              當自動生成webservice程序時報的錯誤,最終解決辦法為,把xis2_Codegen_Wizard_1.4.0\lib包全復制到build path下,問題全解決了.
          問題:An error occurred while completing process,java.lang.reflect.InvocationTargetException
                  當我用axis自動生成代碼時,最后一步報的錯,網上通常說的解決辦法是

          從AXIS2的LIB庫中復制"geronimo-stax-api_1.0_spec-1.0.1.jar"和"backport-util-concurrent-3.1.jar"文件到Codegen的lib目錄中,同時修改plugin.xml文件,添加

          <library name="lib/geronimo-stax-api_1.0_spec-1.0.1.jar">
                   <export name="*"/>
          </library>
          <library name="lib/backport-util-concurrent-3.1.jar">
                  <export name="*"/>
          </library>

          到plugin.xml文件中,保存后重新啟動Eclipse即可!


          但本人用這種辦法,怎么試也不行,本人用的JDK1.4,自動生成代碼插件為:Axis2_Codegen_Wizard_1.3.0
          所以怎么試也行不通,最后本來換了個.Axis2_Codegen_Wizard_1.4.0問題終于解決.也整了一天了!

          axis所需要的包:
          Axis2_Codegen_Service_1.4.0_plugins 代碼自動生成   新建工程時,記得把該文件夾下lib\.jar包全部導入.

          獲取XML
          JDOM1.0\build\jdom.jar   要加載到lib中
          記住,當你用JDK1.4時,所有的包都要下載后墜為1.4的包,不然會出些稀奇古怪的錯誤.

          webservice操作步驟:
          1,把Axis2_Codegen_Service_1.4.0_plugins拷貝到plugin下.
          2,打開eclipse,新建文件時選擇axis.
          3,選擇JWDL地址.
          4,生成代碼,
          5,調用:

               TaskServiceStub ts = new TaskServiceStub();
               TaskServiceStub.GetTaskList gt = new TaskServiceStub.GetTaskList();
               gt.setPassword(usercode);
               gt.setUsercode(password);
               String sxml = ts.GetTaskList(gt).getGetTaskListResult();
          四,java.net.SocketException: Software caused connection abort: socket write error
               at java.net.SocketOutputStream.socketWrite0(Native Method)
              at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
              at java.net.SocketOutputStream.write(SocketOutputStream.java:126)
          這個問題,我一直找不到答案,希望各位高手能告訴我.

          posted on 2010-09-30 17:01 半導體 閱讀(467) 評論(0)  編輯  收藏 所屬分類: Eclipse

          主站蜘蛛池模板: 新河县| 墨玉县| 凭祥市| 西城区| 合川市| 木兰县| 正宁县| 富阳市| 三门县| 上林县| 弥渡县| 喀喇| 庄浪县| 吉木萨尔县| 大名县| 乌鲁木齐县| 那坡县| 饶平县| 达孜县| 社旗县| 营口市| 定襄县| 普兰县| 东平县| 大同市| 金沙县| 新建县| 蓝田县| 集贤县| 宁乡县| 鄂托克旗| 九龙坡区| 紫云| 樟树市| 通辽市| 金山区| 大理市| 峨眉山市| 隆子县| 海原县| 阿克苏市|