2017-02-20 7 views
-1

は日食で支柱に始める間違って何かを得た:使用Mavenは、私は以下のように、私はMVNテストを実行しているバグをmavenのStruts2の-原型-blank.whenが使用

testHelloWorld(cn.jx.hw.learn.example.HelloWorldTest) Time elapsed: 0.135 sec <<< ERROR! 
java.lang.NullPointerException 
    at com.opensymphony.xwork2.ActionSupport.getLocale(ActionSupport.java:68) 
    at com.opensymphony.xwork2.TextProviderSupport.getLocale(TextProviderSupport.java:329) 
    at com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSupport.java:204) 
    at com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSupport.java:119) 
    at com.opensymphony.xwork2.ActionSupport.getText(ActionSupport.java:86) 
    at cn.jx.hw.learn.example.HelloWorld.execute(HelloWorld.java:30) 

答えて

0

githubのに支柱-例でHelloworldTest.javaを比較した後、私は)(

のHelloWorld hello_world =新規のHelloWorldを変更します。 への入力 container.inject(HelloWorld.class); などが正しく動作します。 mvnテストはバグを投稿しません

関連する問題