You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Jeremy Thomerson <je...@wickettraining.com> on 2009/07/28 02:52:57 UTC

Re: WicketTester and org.slf4j.LoggerFactory and org.slf4j.Logger not serializable

Your logger instances should either be transient or static - so that
they are not serialized.

--
Jeremy Thomerson
http://www.wickettraining.com




On Mon, Jul 27, 2009 at 8:01 PM, David
Brown<db...@sexingtechnologies.com> wrote:
> Hello, I have a Wicket 1.4rc4 application with a homegrown set of JDBC DAO classes: basic JDBC Connection and various methods for SQL queries and transactions. And Connection pooling is imported into the same JDBC DAO class and works well against the JUnit TestCases. The JUnit TestCases for the JDBC DAO implementation is comprehensive and complete with no failed testcases (17 in all). Now, I want to start testing the Pages that use my JDBC DAO class using WicketTester but the TestCases so far are failing with errors. I have scoured this topic with Google and have re-read Dashorst/Hillenius, Kent Tong and the Wicket Wiki and other articles covering WicketTester including the JavaDocs. My TestCases are having trouble with my JDBC DAOs as they not seriablizable because of heavy use of the logging packages:
>
> org.slf4j.LoggerFactory and org.slf4j.Logger
>
> I don't to remove all of the logging from my JDBC DAOs to implement WicketTester. Is there some way around this type of issue with serialization? Please advise, David.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: WicketTester and org.slf4j.LoggerFactory and org.slf4j.Logger not serializable

Posted by Reinhard Nägele <re...@mgm-tp.com>.
If you use slf4j 1.5.3 or newer, serialization should just work fine.

See http://www.slf4j.org/faq.html#declared_static

Reinhard


Jeremy Thomerson schrieb:
> Your logger instances should either be transient or static - so that
> they are not serialized.
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
>
> On Mon, Jul 27, 2009 at 8:01 PM, David
> Brown<db...@sexingtechnologies.com> wrote:
>   
>> Hello, I have a Wicket 1.4rc4 application with a homegrown set of JDBC DAO classes: basic JDBC Connection and various methods for SQL queries and transactions. And Connection pooling is imported into the same JDBC DAO class and works well against the JUnit TestCases. The JUnit TestCases for the JDBC DAO implementation is comprehensive and complete with no failed testcases (17 in all). Now, I want to start testing the Pages that use my JDBC DAO class using WicketTester but the TestCases so far are failing with errors. I have scoured this topic with Google and have re-read Dashorst/Hillenius, Kent Tong and the Wicket Wiki and other articles covering WicketTester including the JavaDocs. My TestCases are having trouble with my JDBC DAOs as they not seriablizable because of heavy use of the logging packages:
>>
>> org.slf4j.LoggerFactory and org.slf4j.Logger
>>
>> I don't to remove all of the logging from my JDBC DAOs to implement WicketTester. Is there some way around this type of issue with serialization? Please advise, David.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org