私は春のアプリケーションを持っています。使用すると異なる動作が見られます
1 -
次のように実行 -> jUnit テスト
申請時に
それは良い作品です。
2-
次のように実行 -> Maven テスト
確かなレポートでは、非常に長いトレースが表示されます。その原因:
java.lang.NoClassDefFoundError: Lcom/epam/hhsystem/util/DatabaseHelper;
どの構成がmavenを使用しているかを知るにはどうすればよいですか?
Spring Tool Suitで開発
アップデート
私が試したら
Project -> Clean
以降
mvn clean test
私が見るcmdから
C:\Users\Nikolay_Tkachev\workspace\HHSystem\UI>mvn clean test
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building hhsystem ui 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ ui ---
[INFO] Deleting C:\Users\Nikolay_Tkachev\workspace\HHSystem\UI\target
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ ui ---
[debug] execute contextualize
[WARNING] Using platform encoding (Cp1251 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ ui ---
[WARNING] File encoding has not been set, using platform encoding Cp1251, i.e. build is platform dependent!
[INFO] Compiling 11 source files to C:\Users\Nikolay_Tkachev\workspace\HHSystem\UI\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] bad path element "": no such file or directory
C:\Users\Nikolay_Tkachev\workspace\HHSystem\UI\src\main\java\com\epam\hhsystem\web\controllers\MyContextListener.java:[8,29]
cannot find symbol
symbol : class DatabaseHelper
location: package com.epam.hhsystem.util
[ERROR] C:\Users\Nikolay_Tkachev\workspace\HHSystem\UI\src\main\java\com\epam\hhsystem\web\controllers\MyContextListener.jav
a:[12,1] cannot find symbol
symbol : class DatabaseHelper
location: class com.epam.hhsystem.web.controllers.MyContextListener
[ERROR] C:\Users\Nikolay_Tkachev\workspace\HHSystem\UI\src\main\java\com\epam\hhsystem\web\controllers\MyApplicationListener
.java:[10,29] cannot find symbol
symbol : class DatabaseHelper
location: package com.epam.hhsystem.util
[ERROR] C:\Users\Nikolay_Tkachev\workspace\HHSystem\UI\src\main\java\com\epam\hhsystem\web\controllers\MyApplicationListener
.java:[16,1] cannot find symbol
symbol : class DatabaseHelper
location: class com.epam.hhsystem.web.controllers.MyApplicationListener
[ERROR] C:\Users\Nikolay_Tkachev\workspace\HHSystem\UI\src\main\java\com\epam\hhsystem\web\controllers\ApplicationWebListene
r.java:[9,29] cannot find symbol
symbol : class DatabaseHelper
location: package com.epam.hhsystem.util
[ERROR] C:\Users\Nikolay_Tkachev\workspace\HHSystem\UI\src\main\java\com\epam\hhsystem\web\controllers\ApplicationWebListene
r.java:[14,1] cannot find symbol
symbol : class DatabaseHelper
location: class com.epam.hhsystem.web.controllers.ApplicationWebListener
[ERROR] C:\Users\Nikolay_Tkachev\workspace\HHSystem\UI\src\main\java\com\epam\hhsystem\web\controllers\CustomAuthentificatio
nProvider.java:[12,23] package org.apache.log4j does not exist
[ERROR] C:\Users\Nikolay_Tkachev\workspace\HHSystem\UI\src\main\java\com\epam\hhsystem\web\controllers\CustomAuthentificatio
nProvider.java:[24,16] cannot find symbol
symbol : class Logger
location: class com.epam.hhsystem.web.controllers.CustomAuthentificationProvider
[ERROR] C:\Users\Nikolay_Tkachev\workspace\HHSystem\UI\src\main\java\com\epam\hhsystem\web\controllers\AbstractController.ja
va:[49,20] cannot find symbol
symbol : method getAllSkills()
location: class com.epam.hhsystem.services.UtilService
[ERROR] C:\Users\Nikolay_Tkachev\workspace\HHSystem\UI\src\main\java\com\epam\hhsystem\web\controllers\CustomAuthentificatio
nProvider.java:[24,32] cannot find symbol
symbol : variable Logger
location: class com.epam.hhsystem.web.controllers.CustomAuthentificationProvider
[ERROR] C:\Users\Nikolay_Tkachev\workspace\HHSystem\UI\src\main\java\com\epam\hhsystem\web\controllers\CustomAuthentificatio
nProvider.java:[59,17] [unchecked] unchecked call to put(K,V) as a member of the raw type java.util.Hashtable
[ERROR] C:\Users\Nikolay_Tkachev\workspace\HHSystem\UI\src\main\java\com\epam\hhsystem\web\controllers\CustomAuthentificatio
nProvider.java:[63,17] [unchecked] unchecked call to put(K,V) as a member of the raw type java.util.Hashtable
[ERROR] C:\Users\Nikolay_Tkachev\workspace\HHSystem\UI\src\main\java\com\epam\hhsystem\web\controllers\CustomAuthentificatio
nProvider.java:[64,17] [unchecked] unchecked call to put(K,V) as a member of the raw type java.util.Hashtable
[ERROR] C:\Users\Nikolay_Tkachev\workspace\HHSystem\UI\src\main\java\com\epam\hhsystem\web\controllers\CustomAuthentificatio
nProvider.java:[65,17] [unchecked] unchecked call to put(K,V) as a member of the raw type java.util.Hashtable
[ERROR] C:\Users\Nikolay_Tkachev\workspace\HHSystem\UI\src\main\java\com\epam\hhsystem\web\controllers\CustomAuthentificatio
nProvider.java:[66,17] [unchecked] unchecked call to put(K,V) as a member of the raw type java.util.Hashtable
[ERROR] C:\Users\Nikolay_Tkachev\workspace\HHSystem\UI\src\main\java\com\epam\hhsystem\web\controllers\VacancyMenuController
.java:[79,20] cannot find symbol
symbol : method getAllSkills()
location: class com.epam.hhsystem.services.UtilService
[INFO] 16 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.059s
[INFO] Finished at: Wed Oct 23 18:52:14 MSK 2013
[INFO] Final Memory: 21M/162M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project ui:
Compilation failure: Compilation failure:
[ERROR] bad path element "": no such file or directory
[ERROR] C:\Users\Nikolay_Tkachev\workspace\HHSystem\UI\src\main\java\com\epam\hhsystem\web\controllers\MyContextListener.jav
a:[8,29] cannot find symbol
[ERROR] symbol : class DatabaseHelper
[ERROR] location: package com.epam.hhsystem.util
[ERROR] C:\Users\Nikolay_Tkachev\workspace\HHSystem\UI\src\main\java\com\epam\hhsystem\web\controllers\MyContextListener.jav
a:[12,1] cannot find symbol
[ERROR] symbol : class DatabaseHelper
[ERROR] location: class com.epam.hhsystem.web.controllers.MyContextListener
[ERROR] C:\Users\Nikolay_Tkachev\workspace\HHSystem\UI\src\main\java\com\epam\hhsystem\web\controllers\MyApplicationListener
.java:[10,29] cannot find symbol
[ERROR] symbol : class DatabaseHelper
[ERROR] location: package com.epam.hhsystem.util
[ERROR] C:\Users\Nikolay_Tkachev\workspace\HHSystem\UI\src\main\java\com\epam\hhsystem\web\controllers\MyApplicationListener
.java:[16,1] cannot find symbol
[ERROR] symbol : class DatabaseHelper
[ERROR] location: class com.epam.hhsystem.web.controllers.MyApplicationListener
[ERROR] C:\Users\Nikolay_Tkachev\workspace\HHSystem\UI\src\main\java\com\epam\hhsystem\web\controllers\ApplicationWebListene
r.java:[9,29] cannot find symbol
[ERROR] symbol : class DatabaseHelper
[ERROR] location: package com.epam.hhsystem.util
[ERROR] C:\Users\Nikolay_Tkachev\workspace\HHSystem\UI\src\main\java\com\epam\hhsystem\web\controllers\ApplicationWebListene
r.java:[14,1] cannot find symbol
[ERROR] symbol : class DatabaseHelper
[ERROR] location: class com.epam.hhsystem.web.controllers.ApplicationWebListener
[ERROR] C:\Users\Nikolay_Tkachev\workspace\HHSystem\UI\src\main\java\com\epam\hhsystem\web\controllers\CustomAuthentificatio
nProvider.java:[12,23] package org.apache.log4j does not exist
[ERROR] C:\Users\Nikolay_Tkachev\workspace\HHSystem\UI\src\main\java\com\epam\hhsystem\web\controllers\CustomAuthentificatio
nProvider.java:[24,16] cannot find symbol
[ERROR] symbol : class Logger
[ERROR] location: class com.epam.hhsystem.web.controllers.CustomAuthentificationProvider
[ERROR] C:\Users\Nikolay_Tkachev\workspace\HHSystem\UI\src\main\java\com\epam\hhsystem\web\controllers\AbstractController.ja
va:[49,20] cannot find symbol
[ERROR] symbol : method getAllSkills()
[ERROR] location: class com.epam.hhsystem.services.UtilService
[ERROR] C:\Users\Nikolay_Tkachev\workspace\HHSystem\UI\src\main\java\com\epam\hhsystem\web\controllers\CustomAuthentificatio
nProvider.java:[24,32] cannot find symbol
[ERROR] symbol : variable Logger
[ERROR] location: class com.epam.hhsystem.web.controllers.CustomAuthentificationProvider
[ERROR] C:\Users\Nikolay_Tkachev\workspace\HHSystem\UI\src\main\java\com\epam\hhsystem\web\controllers\CustomAuthentificatio
nProvider.java:[59,17] [unchecked] unchecked call to put(K,V) as a member of the raw type java.util.Hashtable
[ERROR] C:\Users\Nikolay_Tkachev\workspace\HHSystem\UI\src\main\java\com\epam\hhsystem\web\controllers\CustomAuthentificatio
nProvider.java:[63,17] [unchecked] unchecked call to put(K,V) as a member of the raw type java.util.Hashtable
[ERROR] C:\Users\Nikolay_Tkachev\workspace\HHSystem\UI\src\main\java\com\epam\hhsystem\web\controllers\CustomAuthentificatio
nProvider.java:[64,17] [unchecked] unchecked call to put(K,V) as a member of the raw type java.util.Hashtable
[ERROR] C:\Users\Nikolay_Tkachev\workspace\HHSystem\UI\src\main\java\com\epam\hhsystem\web\controllers\CustomAuthentificatio
nProvider.java:[65,17] [unchecked] unchecked call to put(K,V) as a member of the raw type java.util.Hashtable
[ERROR] C:\Users\Nikolay_Tkachev\workspace\HHSystem\UI\src\main\java\com\epam\hhsystem\web\controllers\CustomAuthentificatio
nProvider.java:[66,17] [unchecked] unchecked call to put(K,V) as a member of the raw type java.util.Hashtable
[ERROR] C:\Users\Nikolay_Tkachev\workspace\HHSystem\UI\src\main\java\com\epam\hhsystem\web\controllers\VacancyMenuController
.java:[79,20] cannot find symbol
[ERROR] symbol : method getAllSkills()
[ERROR] location: class com.epam.hhsystem.services.UtilService
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
C:\Users\Nikolay_Tkachev\workspace\HHSystem\UI>