<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: 5 Days of Wicket &#8211; Writing the tests</title>
	<atom:link href="http://www.mysticcoders.com/blog/5-days-of-wicket-writing-the-tests/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mysticcoders.com/blog/5-days-of-wicket-writing-the-tests/</link>
	<description>to our success!</description>
	<lastBuildDate>Mon, 30 Jan 2012 18:29:22 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Maxat Yermukhanov</title>
		<link>http://www.mysticcoders.com/blog/5-days-of-wicket-writing-the-tests/comment-page-1/#comment-3226</link>
		<dc:creator>Maxat Yermukhanov</dc:creator>
		<pubDate>Thu, 16 Sep 2010 16:10:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysticcoders.com/?p=317#comment-3226</guid>
		<description>Sorry, just set hibernate.hbm2ddl.auto - create
in applicationContext.xml / hibernateProperties.</description>
		<content:encoded><![CDATA[<p>Sorry, just set hibernate.hbm2ddl.auto &#8211; create<br />
in applicationContext.xml / hibernateProperties.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Maxat Yermukhanov</title>
		<link>http://www.mysticcoders.com/blog/5-days-of-wicket-writing-the-tests/comment-page-1/#comment-3225</link>
		<dc:creator>Maxat Yermukhanov</dc:creator>
		<pubDate>Thu, 16 Sep 2010 16:08:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysticcoders.com/?p=317#comment-3225</guid>
		<description>Hi, I think you need to add 
create
in applicationContext.xml / hibernateProperties.</description>
		<content:encoded><![CDATA[<p>Hi, I think you need to add<br />
create<br />
in applicationContext.xml / hibernateProperties.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://www.mysticcoders.com/blog/5-days-of-wicket-writing-the-tests/comment-page-1/#comment-3172</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Tue, 04 May 2010 16:07:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysticcoders.com/?p=317#comment-3172</guid>
		<description>Hi there.

I&#039;ve been following the series and checked out the code for mysticpaste via your repository. I&#039;ve setup my own project with a simple shoutbox, but I haven&#039;t been able to run tests by following this tutorial and by looking at your test modules in the repository.

I have made sure that the unitils property file is the same as yours and that it is loaded by the mvn test goal. When starting up, however, one of the lines from the console output says: INFO - Dialect: using org.hibernate.dialect.PostgreSQLDialect even though my unitils.properties has the database.dialect=hsqldb line set.

Could you have a look at let me know if you&#039;ve seen this before?

When I run mvn test the tests fail, and it all boils down to this exception:

Caused by: java.sql.SQLException: Table not found in statement [select relname from pg_class]
	at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
	at org.hsqldb.jdbc.jdbcStatement.fetchResult(Unknown Source)
	at org.hsqldb.jdbc.jdbcStatement.executeQuery(Unknown Source)
	at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:188)
	at org.hibernate.tool.hbm2ddl.DatabaseMetadata.initSequences(DatabaseMetadata.java:151)
	at org.hibernate.tool.hbm2ddl.DatabaseMetadata.(DatabaseMetadata.java:69)
	at org.hibernate.tool.hbm2ddl.DatabaseMetadata.(DatabaseMetadata.java:62)
	at org.springframework.orm.hibernate3.LocalSessionFactoryBean$3.doInHibernate(LocalSessionFactoryBean.java:958)
	at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:419)
	... 49 more</description>
		<content:encoded><![CDATA[<p>Hi there.</p>
<p>I&#8217;ve been following the series and checked out the code for mysticpaste via your repository. I&#8217;ve setup my own project with a simple shoutbox, but I haven&#8217;t been able to run tests by following this tutorial and by looking at your test modules in the repository.</p>
<p>I have made sure that the unitils property file is the same as yours and that it is loaded by the mvn test goal. When starting up, however, one of the lines from the console output says: INFO &#8211; Dialect: using org.hibernate.dialect.PostgreSQLDialect even though my unitils.properties has the database.dialect=hsqldb line set.</p>
<p>Could you have a look at let me know if you&#8217;ve seen this before?</p>
<p>When I run mvn test the tests fail, and it all boils down to this exception:</p>
<p>Caused by: java.sql.SQLException: Table not found in statement [select relname from pg_class]<br />
	at org.hsqldb.jdbc.Util.sqlException(Unknown Source)<br />
	at org.hsqldb.jdbc.jdbcStatement.fetchResult(Unknown Source)<br />
	at org.hsqldb.jdbc.jdbcStatement.executeQuery(Unknown Source)<br />
	at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:188)<br />
	at org.hibernate.tool.hbm2ddl.DatabaseMetadata.initSequences(DatabaseMetadata.java:151)<br />
	at org.hibernate.tool.hbm2ddl.DatabaseMetadata.(DatabaseMetadata.java:69)<br />
	at org.hibernate.tool.hbm2ddl.DatabaseMetadata.(DatabaseMetadata.java:62)<br />
	at org.springframework.orm.hibernate3.LocalSessionFactoryBean$3.doInHibernate(LocalSessionFactoryBean.java:958)<br />
	at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:419)<br />
	&#8230; 49 more</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joseph Crawford</title>
		<link>http://www.mysticcoders.com/blog/5-days-of-wicket-writing-the-tests/comment-page-1/#comment-3107</link>
		<dc:creator>Joseph Crawford</dc:creator>
		<pubDate>Fri, 22 Jan 2010 15:53:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysticcoders.com/?p=317#comment-3107</guid>
		<description>I have been trying to get this to work however I cannot get the project to build properly.  I am getting the following errors.

[code]
[ERROR]BUILD FAILURE
------------------------------------------------------------------------
Compilation failure

com/mysticcoders/PasteServiceIntegrationTest.java:[8,12] cannot find symbol
symbol  : class PasteService
location: class PasteServiceIntegrationTest

com/mysticcoders/PasteServiceIntegrationTest.java:[10,12] cannot find symbol
symbol  : class PasteItemDao
location: class PasteServiceIntegrationTest

com/mysticcoders/PasteServiceIntegrationTest.java:[30,47] cannot find symbol
symbol  : class InvalidClientException
location: class PasteServiceIntegrationTest

com/mysticcoders/PasteServiceIntegrationTest.java:[12,5] incompatible types
found   : junit.framework.Test
required: java.lang.annotation.Annotation

com/mysticcoders/PasteServiceIntegrationTest.java:[16,5] incompatible types
found   : junit.framework.Test
required: java.lang.annotation.Annotation

com/mysticcoders/PasteServiceIntegrationTest.java:[29,5] incompatible types
found   : junit.framework.Test
required: java.lang.annotation.Annotation

com/mysticcoders/PasteServiceIntegrationTest.java:[18,8] cannot find symbol
symbol  : class PasteItem
location: class PasteServiceIntegrationTest

com/mysticcoders/PasteServiceIntegrationTest.java:[18,30] cannot find symbol
symbol  : class PasteItem
location: class PasteServiceIntegrationTest

com/mysticcoders/PasteServiceIntegrationTest.java:[24,12] cannot find symbol
symbol  : method assertTrue(boolean)
location: class PasteServiceIntegrationTest

com/mysticcoders/PasteServiceIntegrationTest.java:[25,17] cannot find symbol
symbol  : class InvalidClientException
location: class PasteServiceIntegrationTest

com/mysticcoders/PasteServiceIntegrationTest.java:[31,8] cannot find symbol
symbol  : class PasteItem
location: class PasteServiceIntegrationTest

com/mysticcoders/PasteServiceIntegrationTest.java:[31,30] cannot find symbol
symbol  : class PasteItem
location: class PasteServiceIntegrationTest

com/mysticcoders/PasteServiceIntegrationTest.java:[37,8] cannot find symbol
symbol  : class PasteItem
location: class PasteServiceIntegrationTest
[/code]

I know that the class PasteItem is missing because until this point your tutorial has not stated to create the file or what the contents should be. However I am getting an incompatible type error when you use @Test in the code.</description>
		<content:encoded><![CDATA[<p>I have been trying to get this to work however I cannot get the project to build properly.  I am getting the following errors.</p>
<p>[code]<br />
[ERROR]BUILD FAILURE<br />
------------------------------------------------------------------------<br />
Compilation failure</p>
<p>com/mysticcoders/PasteServiceIntegrationTest.java:[8,12] cannot find symbol<br />
symbol  : class PasteService<br />
location: class PasteServiceIntegrationTest</p>
<p>com/mysticcoders/PasteServiceIntegrationTest.java:[10,12] cannot find symbol<br />
symbol  : class PasteItemDao<br />
location: class PasteServiceIntegrationTest</p>
<p>com/mysticcoders/PasteServiceIntegrationTest.java:[30,47] cannot find symbol<br />
symbol  : class InvalidClientException<br />
location: class PasteServiceIntegrationTest</p>
<p>com/mysticcoders/PasteServiceIntegrationTest.java:[12,5] incompatible types<br />
found   : junit.framework.Test<br />
required: java.lang.annotation.Annotation</p>
<p>com/mysticcoders/PasteServiceIntegrationTest.java:[16,5] incompatible types<br />
found   : junit.framework.Test<br />
required: java.lang.annotation.Annotation</p>
<p>com/mysticcoders/PasteServiceIntegrationTest.java:[29,5] incompatible types<br />
found   : junit.framework.Test<br />
required: java.lang.annotation.Annotation</p>
<p>com/mysticcoders/PasteServiceIntegrationTest.java:[18,8] cannot find symbol<br />
symbol  : class PasteItem<br />
location: class PasteServiceIntegrationTest</p>
<p>com/mysticcoders/PasteServiceIntegrationTest.java:[18,30] cannot find symbol<br />
symbol  : class PasteItem<br />
location: class PasteServiceIntegrationTest</p>
<p>com/mysticcoders/PasteServiceIntegrationTest.java:[24,12] cannot find symbol<br />
symbol  : method assertTrue(boolean)<br />
location: class PasteServiceIntegrationTest</p>
<p>com/mysticcoders/PasteServiceIntegrationTest.java:[25,17] cannot find symbol<br />
symbol  : class InvalidClientException<br />
location: class PasteServiceIntegrationTest</p>
<p>com/mysticcoders/PasteServiceIntegrationTest.java:[31,8] cannot find symbol<br />
symbol  : class PasteItem<br />
location: class PasteServiceIntegrationTest</p>
<p>com/mysticcoders/PasteServiceIntegrationTest.java:[31,30] cannot find symbol<br />
symbol  : class PasteItem<br />
location: class PasteServiceIntegrationTest</p>
<p>com/mysticcoders/PasteServiceIntegrationTest.java:[37,8] cannot find symbol<br />
symbol  : class PasteItem<br />
location: class PasteServiceIntegrationTest<br />
[/code]</p>
<p>I know that the class PasteItem is missing because until this point your tutorial has not stated to create the file or what the contents should be. However I am getting an incompatible type error when you use @Test in the code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 5 Days of Wicket - Putting it all together</title>
		<link>http://www.mysticcoders.com/blog/5-days-of-wicket-writing-the-tests/comment-page-1/#comment-604</link>
		<dc:creator>5 Days of Wicket - Putting it all together</dc:creator>
		<pubDate>Tue, 25 Aug 2009 21:28:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysticcoders.com/?p=317#comment-604</guid>
		<description>[...] On Day 2, we ran through some basics on Mocks, and with a bit of upfront design on interfaces, a testing harness is available for building out the backend.  We also learned how to take Unitils and extend our tests passed just a functional unit, and move through many layers of the built system, and ensure we go a bit beyond just code coverage. [...]</description>
		<content:encoded><![CDATA[<p>[...] On Day 2, we ran through some basics on Mocks, and with a bit of upfront design on interfaces, a testing harness is available for building out the backend.  We also learned how to take Unitils and extend our tests passed just a functional unit, and move through many layers of the built system, and ensure we go a bit beyond just code coverage. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dane</title>
		<link>http://www.mysticcoders.com/blog/5-days-of-wicket-writing-the-tests/comment-page-1/#comment-585</link>
		<dc:creator>Dane</dc:creator>
		<pubDate>Wed, 19 Aug 2009 20:13:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysticcoders.com/?p=317#comment-585</guid>
		<description>Not a problem! Your application has been a godsend. For a developer like me who is trying to simultaneously learn Wicket, Hibernate, and Spring, the Mystic Paste application is just about perfect. The only addition I could wish for would be for it to include an authentication/authorization piece ;)</description>
		<content:encoded><![CDATA[<p>Not a problem! Your application has been a godsend. For a developer like me who is trying to simultaneously learn Wicket, Hibernate, and Spring, the Mystic Paste application is just about perfect. The only addition I could wish for would be for it to include an authentication/authorization piece <img src='http://www.mysticcoders.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jedstrom</title>
		<link>http://www.mysticcoders.com/blog/5-days-of-wicket-writing-the-tests/comment-page-1/#comment-584</link>
		<dc:creator>jedstrom</dc:creator>
		<pubDate>Wed, 19 Aug 2009 18:25:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysticcoders.com/?p=317#comment-584</guid>
		<description>Dane, updated the tests. It looks like the SpringInjector got funny after the 1.4 upgrade, thanks for noticing!</description>
		<content:encoded><![CDATA[<p>Dane, updated the tests. It looks like the SpringInjector got funny after the 1.4 upgrade, thanks for noticing!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dane</title>
		<link>http://www.mysticcoders.com/blog/5-days-of-wicket-writing-the-tests/comment-page-1/#comment-582</link>
		<dc:creator>Dane</dc:creator>
		<pubDate>Tue, 18 Aug 2009 22:46:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysticcoders.com/?p=317#comment-582</guid>
		<description>Thanks for responding! I&#039;m also using Maven 2.0.9. I just re-cloned the app again to try it from scratch (using &quot;hg clone https://kenai.com/hg/mystic-apps~mystic-apps&quot;) and came up with the same errors on running &quot;mvn clean test&quot;.

The reports show that all the errors are of type &quot;java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered?&quot; However, the web.xml does contain &quot;  org.springframework.web.context.ContextLoaderListener  &quot;. All I can guess is that the Maven build isn&#039;t picking that up, but I don&#039;t know enough about Maven to know where to start looking for that.

The Maven output is below. Thanks again for your help!

  Results :
  Tests in error:  testRenderMyPage(com.mysticcoders.webapp.TestHomePage)  
testRenderMyPage(com.mysticcoders.webapp.TestPastePage)  
testHistoryMenuClick(com.mysticcoders.webapp.TestPastePage)
Tests run: 7, Failures: 0, Errors: 3, Skipped: 0</description>
		<content:encoded><![CDATA[<p>Thanks for responding! I&#8217;m also using Maven 2.0.9. I just re-cloned the app again to try it from scratch (using &#8220;hg clone <a href="https://kenai.com/hg/mystic-apps~mystic-apps" rel="nofollow">https://kenai.com/hg/mystic-apps~mystic-apps</a>&#8220;) and came up with the same errors on running &#8220;mvn clean test&#8221;.</p>
<p>The reports show that all the errors are of type &#8220;java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered?&#8221; However, the web.xml does contain &#8221;  org.springframework.web.context.ContextLoaderListener  &#8220;. All I can guess is that the Maven build isn&#8217;t picking that up, but I don&#8217;t know enough about Maven to know where to start looking for that.</p>
<p>The Maven output is below. Thanks again for your help!</p>
<p>  Results :<br />
  Tests in error:  testRenderMyPage(com.mysticcoders.webapp.TestHomePage)<br />
testRenderMyPage(com.mysticcoders.webapp.TestPastePage)<br />
testHistoryMenuClick(com.mysticcoders.webapp.TestPastePage)<br />
Tests run: 7, Failures: 0, Errors: 3, Skipped: 0</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jedstrom</title>
		<link>http://www.mysticcoders.com/blog/5-days-of-wicket-writing-the-tests/comment-page-1/#comment-581</link>
		<dc:creator>jedstrom</dc:creator>
		<pubDate>Tue, 18 Aug 2009 20:15:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysticcoders.com/?p=317#comment-581</guid>
		<description>What version of Maven are you using? I just tried mvn clean test and passed all tests with 2.0.9.</description>
		<content:encoded><![CDATA[<p>What version of Maven are you using? I just tried mvn clean test and passed all tests with 2.0.9.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dane</title>
		<link>http://www.mysticcoders.com/blog/5-days-of-wicket-writing-the-tests/comment-page-1/#comment-580</link>
		<dc:creator>Dane</dc:creator>
		<pubDate>Tue, 18 Aug 2009 18:30:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysticcoders.com/?p=317#comment-580</guid>
		<description>I&#039;m trying to run the tests by running &quot;mvn test&quot; from the mysticpaste root directory, but I get:

Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.031 sec &lt;&lt;&lt; FAILURE!
testRenderMyPage(com.mysticcoders.webapp.TestPastePage)  Time elapsed: 0 sec  &lt;&lt;&lt; ERROR!
java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered?
	at org.springframework.web.context.support.WebApplicationContextUtils.getRequiredWebApplicationContext(WebApplicationContextUtils.java:70)

Any suggestions?</description>
		<content:encoded><![CDATA[<p>I&#8217;m trying to run the tests by running &#8220;mvn test&#8221; from the mysticpaste root directory, but I get:</p>
<p>Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.031 sec &lt;&lt;&lt; FAILURE!<br />
testRenderMyPage(com.mysticcoders.webapp.TestPastePage)  Time elapsed: 0 sec  &lt;&lt;&lt; ERROR!<br />
java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered?<br />
	at org.springframework.web.context.support.WebApplicationContextUtils.getRequiredWebApplicationContext(WebApplicationContextUtils.java:70)</p>
<p>Any suggestions?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

