from eclipse you can also run the test from the menu run as junit test.
but you need to install the classes using:
mvn integration-test
mvn war:inplace
rm -r src/main/webapp/WEB-INF/lib
rm src/main/webapp/WEB-INF/classes/struts.xml
mvn install eclipse:eclipse
tibi
Philip Barlow wrote:
I haven't used intelliJ but in eclipse you can create external tools.
I have created an external tool that calls things like mvn test or mvn
compile, effectively you are making command line calls from within
your IDE...
Cliff wrote:
Oh wait! I see the problem! I'm running the test from my IDE (IntelliJ)
instead of from Maven. When run from Maven the error matches the
tutorial.
Is there no way to launch the test accurately from the IDE? Obviously
there's some paths missing from the classpath. What's missing? I ask
because
I don't like running tests from Maven. I'd preferr tight IDE
integration for
my code/test/refactor cycle.
Cliff wrote:
I'm following the Spring/iBatis tutorial and I'm at the step where
you run
the PersonDaoTest using the GenericDao. The error I get is different
from
the error the tutorial expects. I get:
AbandonedObjectPool is used
([EMAIL PROTECTED])
LogAbandoned: false
RemoveAbandoned: true
RemoveAbandonedTimeout: 60
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'universalDao' defined in URL
[jar:file:/home/ccc/.m2/repository/org/appfuse/appfuse-ibatis/2.0-m5-SNAPSHOT/appfuse-ibatis-2.0-m5-SNAPSHOT.jar!/applicationContext-dao.xml]:
Cannot resolve reference to bean 'sqlMapClient' while setting bean
property 'sqlMapClient'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'sqlMapClient' defined in URL
[jar:file:/home/ccc/.m2/repository/org/appfuse/appfuse-ibatis/2.0-m5-SNAPSHOT/appfuse-ibatis-2.0-m5-SNAPSHOT.jar!/applicationContext-dao.xml]:
Invocation of init method failed; nested exception is
java.lang.RuntimeException: Error occurred. Cause:
com.ibatis.common.xml.NodeletException: Error parsing XML. Cause:
java.lang.RuntimeException: Error parsing XPath
'/sqlMapConfig/sqlMap'. Cause:
com.ibatis.common.xml.NodeletException: Error parsing XML. Cause:
java.lang.RuntimeException: Error parsing XPath '/sqlMap/resultMap'.
Cause: java.lang.RuntimeException: Error configuring Result. Could not
set ResultClass. Cause: java.lang.ClassNotFoundException:
org.appfuse.tutorial.model.Person
Caused by: org.springframework.beans.factory.BeanCreationException:
Error
creating bean with name 'sqlMapClient' defined in URL
[jar:file:/home/ccc/.m2/repository/org/appfuse/appfuse-ibatis/2.0-m5-SNAPSHOT/appfuse-ibatis-2.0-m5-SNAPSHOT.jar!/applicationContext-dao.xml]:
Invocation of init method failed; nested exception is
java.lang.RuntimeException: Error occurred. Cause:
com.ibatis.common.xml.NodeletException: Error parsing XML. Cause:
java.lang.RuntimeException: Error parsing XPath
'/sqlMapConfig/sqlMap'. Cause:
com.ibatis.common.xml.NodeletException: Error parsing XML. Cause:
java.lang.RuntimeException: Error parsing XPath '/sqlMap/resultMap'.
Cause: java.lang.RuntimeException: Error configuring Result. Could not
set ResultClass. Cause: java.lang.ClassNotFoundException:
org.appfuse.tutorial.model.Person
Caused by: java.lang.RuntimeException: Error occurred. Cause:
com.ibatis.common.xml.NodeletException: Error parsing XML. Cause:
java.lang.RuntimeException: Error parsing XPath
'/sqlMapConfig/sqlMap'. Cause:
com.ibatis.common.xml.NodeletException: Error parsing XML. Cause:
java.lang.RuntimeException: Error parsing XPath '/sqlMap/resultMap'.
Cause: java.lang.RuntimeException: Error configuring Result. Could not
set ResultClass. Cause: java.lang.ClassNotFoundException:
org.appfuse.tutorial.model.Person
at
com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:109)
at
com.ibatis.sqlmap.client.SqlMapClientBuilder.buildSqlMapClient(SqlMapClientBuilder.java:90)
I can see the error is from the missing sqlMapClient bean definition in
applicationContext.xml. I noticed the problem right when I created the
file and copied the contents from the tutorial as Idea was highlighting
it. (I also noted how the dataSource was defined in another spring bean
def file so I ignored that error.) I'm looking back over the
tutorial and
I don't see where I was supposed to define this bean. So now I ask
did I
miss something or is the tutorial leaving out a step?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]