2011-02-25 173 views
0

我收到此錯誤定期間隔。eclipse構建錯誤

'Building workspace' has encountered a problem. 

Errors occurred during the build. 
    Errors running builder 'JavaScript Validator' on project 'bankinguru'. 
    java.lang.NullPointerException 

我使用

Eclipse for PHP Developers 

Version: Helios Release 
Build id: 20100617-1415 

Ubuntu 10.10下。無論如何要解決這個問題嗎?

[編輯]的workspace/.metadata/.log

!ENTRY org.eclipse.core.resources 4 75 2011-02-26 15:28:28.901 
!MESSAGE Errors occurred during the build. 
!SUBENTRY 1 org.eclipse.wst.jsdt.core 4 75 2011-02-26 15:28:28.901 
!MESSAGE Errors running builder 'JavaScript Validator' on project 'bankinguru'. 
!STACK 0 
java.lang.NullPointerException 
    at org.eclipse.wst.jsdt.internal.compiler.ast.ConditionalExpression.analyseCode(ConditionalExpression.java:50) 
    at org.eclipse.wst.jsdt.internal.compiler.ast.ArrayInitializer.analyseCode(ArrayInitializer.java:42) 
    at org.eclipse.wst.jsdt.internal.compiler.ast.LocalDeclaration.analyseCode(LocalDeclaration.java:62) 
    at org.eclipse.wst.jsdt.internal.compiler.ast.Block.analyseCode(Block.java:48) 
    at org.eclipse.wst.jsdt.internal.compiler.ast.IfStatement.analyseCode(IfStatement.java:91) 
    at org.eclipse.wst.jsdt.internal.compiler.ast.MethodDeclaration.analyseCode(MethodDeclaration.java:93) 
    at org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration.analyseCode(AbstractMethodDeclaration.java:108) 
    at org.eclipse.wst.jsdt.internal.compiler.ast.MethodDeclaration.analyseCode(MethodDeclaration.java:91) 
    at org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration.analyseCode(AbstractMethodDeclaration.java:108) 
    at org.eclipse.wst.jsdt.internal.compiler.ast.FunctionExpression.analyseCode(FunctionExpression.java:73) 
    at org.eclipse.wst.jsdt.internal.compiler.ast.Expression.analyseCode(Expression.java:184) 
    at org.eclipse.wst.jsdt.internal.compiler.ast.MessageSend.analyseCode(MessageSend.java:65) 
    at org.eclipse.wst.jsdt.internal.compiler.ast.CompilationUnitDeclaration.analyseCode(CompilationUnitDeclaration.java:155) 
    at org.eclipse.wst.jsdt.internal.compiler.Compiler.process(Compiler.java:589) 
    at org.eclipse.wst.jsdt.internal.compiler.Compiler.compile(Compiler.java:347) 
    at org.eclipse.wst.jsdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:286) 
    at org.eclipse.wst.jsdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:86) 
    at org.eclipse.wst.jsdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:225) 
    at org.eclipse.wst.jsdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:58) 
    at org.eclipse.wst.jsdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:291) 
    at org.eclipse.wst.jsdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:199) 
    at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:629) 
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) 
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:172) 
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:203) 
    at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:255) 
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) 
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:258) 
    at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:311) 
    at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:343) 
    at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144) 
    at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:242) 
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) 
+1

你可以添加完整的堆棧跟蹤嗎?查看錯誤日誌視圖。 – 2011-02-25 16:09:23

+0

@Andrew Eisenberg在哪裏可以得到堆棧跟蹤 - 上面的消息是從彈出的對話框。 – 2011-02-26 04:40:55

+0

打開錯誤日誌視圖:窗口 - >顯示視圖 - >錯誤日誌。請包括完整的堆棧跟蹤和任何消息。 – 2011-02-26 05:33:30

回答

2

這是因爲Eclipse試圖在PHP項目上運行Javascript驗證而發生的。要停止此錯誤,請轉至「項目」菜單下的「屬性」。選擇'建設者'選項並取消選擇'Javascript驗證器'。這應該可以解決你的問題。

+0

謝謝。很容易忘記。這應該是IMO接受的答案。 – Redsandro 2012-08-22 14:28:38