2013-04-03 88 views
1

從intellij ultimate試圖部署到tomcat7時,得到這個奇怪的消息。您會注意到INFO行上的路徑完全錯誤。它從哪裏得到,我如何解決它?intellij tomcat部署問題

Apr 03, 2013 12:38:26 PM org.apache.naming.resources.WARDirContext doLookup 
    INFO: The name [/WEB-INF/classes/C:\dev\apps\admin\newjdbcprops/xvdev.oracle.properties\] is not valid 
    javax.naming.InvalidNameException: /WEB-INF/classes/C:\dev\apps\admin\newjdbcprops/xvdev.oracle.properties\: unescaped \ at end of component 
     at javax.naming.NameImpl.extractComp(NameImpl.java:161) 
     at javax.naming.NameImpl.<init>(NameImpl.java:284) 
    ... 
+0

IDEA版本?看起來您的Web應用程序工件已損壞或配置不正確。嘗試設置一個新的神器。如果它沒有幫助,請在http://youtrack.jetbrains.com/issues/IDEA上提交一個錯誤,並附帶一個示例項目來重現。 – CrazyCoder 2013-04-03 19:20:46

+0

intellij 12(最新)。那麼你會想,但使用Spring Tools Suite(eclipse)和它提供的內置Tomcat,項目運行得很好。 – 2013-04-04 14:16:25

+0

當然,它在外部運行,問題在於IDEA工件配置。 – CrazyCoder 2013-04-04 14:40:52

回答

0

OK.This似乎Java常量池大小恰好是005C。

There are 10 basic sections to the Java Class File structure: 
Magic Number: 0xCAFEBABE 
Version of Class File Format: the minor and major versions of the class file 
Constant Pool: Pool of constants for the class 
Access Flags: for example whether the class is abstract, static, etc. 
This Class: The name of the current class 
Super Class: The name of the super class 
Interfaces: Any interfaces in the class 
Fields: Any fields in the class 
Methods: Any methods in the class 
Attributes: Any attributes of the class (for example the name of the sourcefile, etc.) 

所以實際上你的常量池大小是5c。 我建議你添加一個const就像

private String avoidInvalidNameException = "unescaped \\ at end of component"; 

那麼你的池大小可能會改變。 好運!

0

我也遇到過這個問題。 請檢查映射器文件中是否有空白文件。

-1

我也遇到了這個問題,我解決了這個問題,主要是Web應用程序工件被破壞或配置不正確。由兩個setps檢查:

  • 檢查Project Structure-->Modules,如果模塊的名稱與pom.xml文件不同,你可以刪除的模塊,然後它會自動生成一個配置(如果你不知道正確的配置,你可以參考你電腦中的另外一個項目)

  • 確定你的文物,你必須選擇戰爭爆炸,而不是戰爭。