You can skip testing in Maven by running with the command line switch -
Dmaven.test.skip=true. From the error stack trace below it looks like you
are missing a definition in Spring for the personAction bean?

Mike.

On 7/19/07, Gary Darnton <[EMAIL PROTECTED]> wrote:


Hi all,

I got a problem when I try to run command: mvn test
-Dtest=PersonActionTest
The error occur as below. Even I tried to put this code in
applicationContext.xml file

    <bean id="personAction"
class="com.trispaces.app.webapp.action.PersonAction">
    </bean>

If I dont want to run test when I run jetty:run-war. How should I do?

All suggestion are appreciated.

Regards,
Gary

--------------

Tests run: 4, Failures: 0, Errors: 4, Skipped: 0, Time elapsed: 2.516 sec
<<< FA
ILURE!
testSearch(com.mycompany.app.webapp.action.PersonActionTest)  Time
elapsed:
2.48
4 sec  <<< ERROR!
org.springframework.beans.factory.UnsatisfiedDependencyException: Error
creating
bean with name 'com.mycompany.app.webapp.action.PersonActionTest':
Unsatisfied
dependency expressed through bean property 'personAction': Set this
property
val
ue or disable dependency checking for this bean.
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.checkDependencies(AbstractAutowireCapableBeanFactory.java:1039)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.populateBean(AbstractAutowireCapableBeanFactory.java:858)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.autowireBeanProperties(AbstractAutowireCapableBeanFactory.java
:276)
        at
org.springframework.test.AbstractDependencyInjectionSpringContextTest
s.injectDependencies(AbstractDependencyInjectionSpringContextTests.java
:179)
        at
org.springframework.test.AbstractDependencyInjectionSpringContextTest
s.prepareTestInstance(AbstractDependencyInjectionSpringContextTests.java
:158)
        at
org.springframework.test.AbstractSingleSpringContextTests.setUp(Abstr
actSingleSpringContextTests.java:88)
        at junit.framework.TestCase.runBare(TestCase.java:128)
        at
org.springframework.test.ConditionalTestCase.runBare(ConditionalTestC
ase.java:69)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:120)
        at junit.framework.TestSuite.runTest(TestSuite.java:230)
        at junit.framework.TestSuite.run(TestSuite.java:225)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.jav
a:213)
        at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes
tSet(AbstractDirectoryTestSuite.java:138)
        at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Ab
stractDirectoryTestSuite.java:125)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Su
refireBooter.java:290)
        at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j
ava:818)
        at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j
ava:818)

testEdit(com.mycompany.app.webapp.action.PersonActionTest)  Time elapsed:
0
sec
<<< ERROR!
org.springframework.beans.factory.UnsatisfiedDependencyException: Error
creating
bean with name 'com.mycompany.app.webapp.action.PersonActionTest':
Unsatisfied
dependency expressed through bean property 'personAction': Set this
property
val
ue or disable dependency checking for this bean.
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.checkDependencies(AbstractAutowireCapableBeanFactory.java:1039)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.populateBean(AbstractAutowireCapableBeanFactory.java:858)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.autowireBeanProperties(AbstractAutowireCapableBeanFactory.java
:276)
        at
org.springframework.test.AbstractDependencyInjectionSpringContextTest
s.injectDependencies(AbstractDependencyInjectionSpringContextTests.java
:179)
        at
org.springframework.test.AbstractDependencyInjectionSpringContextTest
s.prepareTestInstance(AbstractDependencyInjectionSpringContextTests.java
:158)
        at
org.springframework.test.AbstractSingleSpringContextTests.setUp(Abstr
actSingleSpringContextTests.java:88)
        at junit.framework.TestCase.runBare(TestCase.java:128)
        at
org.springframework.test.ConditionalTestCase.runBare(ConditionalTestC
ase.java:69)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:120)
        at junit.framework.TestSuite.runTest(TestSuite.java:230)
        at junit.framework.TestSuite.run(TestSuite.java:225)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.jav
a:213)
        at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes
tSet(AbstractDirectoryTestSuite.java:138)
        at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Ab
stractDirectoryTestSuite.java:125)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Su
refireBooter.java:290)
        at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j
ava:818)
        at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j
ava:818)

testSave(com.mycompany.app.webapp.action.PersonActionTest)  Time elapsed:
0
sec
<<< ERROR!
org.springframework.beans.factory.UnsatisfiedDependencyException: Error
creating
bean with name 'com.mycompany.app.webapp.action.PersonActionTest':
Unsatisfied
dependency expressed through bean property 'personAction': Set this
property
val
ue or disable dependency checking for this bean.
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.checkDependencies(AbstractAutowireCapableBeanFactory.java:1039)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.populateBean(AbstractAutowireCapableBeanFactory.java:858)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.autowireBeanProperties(AbstractAutowireCapableBeanFactory.java
:276)
        at
org.springframework.test.AbstractDependencyInjectionSpringContextTest
s.injectDependencies(AbstractDependencyInjectionSpringContextTests.java
:179)
        at
org.springframework.test.AbstractDependencyInjectionSpringContextTest
s.prepareTestInstance(AbstractDependencyInjectionSpringContextTests.java
:158)
        at
org.springframework.test.AbstractSingleSpringContextTests.setUp(Abstr
actSingleSpringContextTests.java:88)
        at junit.framework.TestCase.runBare(TestCase.java:128)
        at
org.springframework.test.ConditionalTestCase.runBare(ConditionalTestC
ase.java:69)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:120)
        at junit.framework.TestSuite.runTest(TestSuite.java:230)
        at junit.framework.TestSuite.run(TestSuite.java:225)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.jav
a:213)
        at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes
tSet(AbstractDirectoryTestSuite.java:138)
        at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Ab
stractDirectoryTestSuite.java:125)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Su
refireBooter.java:290)
        at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j
ava:818)
        at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j
ava:818)

testRemove(com.mycompany.app.webapp.action.PersonActionTest)  Time
elapsed:
0 se
c  <<< ERROR!
org.springframework.beans.factory.UnsatisfiedDependencyException: Error
creating
bean with name 'com.mycompany.app.webapp.action.PersonActionTest':
Unsatisfied
dependency expressed through bean property 'personAction': Set this
property
val
ue or disable dependency checking for this bean.
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.checkDependencies(AbstractAutowireCapableBeanFactory.java:1039)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.populateBean(AbstractAutowireCapableBeanFactory.java:858)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.autowireBeanProperties(AbstractAutowireCapableBeanFactory.java
:276)
        at
org.springframework.test.AbstractDependencyInjectionSpringContextTest
s.injectDependencies(AbstractDependencyInjectionSpringContextTests.java
:179)
        at
org.springframework.test.AbstractDependencyInjectionSpringContextTest
s.prepareTestInstance(AbstractDependencyInjectionSpringContextTests.java
:158)
        at
org.springframework.test.AbstractSingleSpringContextTests.setUp(Abstr
actSingleSpringContextTests.java:88)
        at junit.framework.TestCase.runBare(TestCase.java:128)
        at
org.springframework.test.ConditionalTestCase.runBare(ConditionalTestC
ase.java:69)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:120)
        at junit.framework.TestSuite.runTest(TestSuite.java:230)
        at junit.framework.TestSuite.run(TestSuite.java:225)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.jav
a:213)
        at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes
tSet(AbstractDirectoryTestSuite.java:138)
        at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Ab
stractDirectoryTestSuite.java:125)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Su
refireBooter.java:290)
        at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j
ava:818)
        at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j
ava:818)


Results :

Tests in error:
  testSearch(com.mycompany.app.webapp.action.PersonActionTest)
  testEdit(com.mycompany.app.webapp.action.PersonActionTest)
  testSave(com.mycompany.app.webapp.action.PersonActionTest)
  testRemove(com.mycompany.app.webapp.action.PersonActionTest)

Tests run: 4, Failures: 0, Errors: 4, Skipped: 0

[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] There are test failures.
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 11 seconds
[INFO] Finished at: Thu Jul 19 12:06:21 ICT 2007
[INFO] Final Memory: 18M/32M
[INFO]
------------------------------------------------------------------------


--
View this message in context:
http://www.nabble.com/Problem-with-exception-UnsatisfiedDependencyException-and-Integration-test-tf4108306s2369.html#a11682748
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to