W.: serializable problem

2010-02-26 Thread bj�rn liffers
hello,
i´ve got a problem with serialization.

my application is connected to a mysql-db and every class of mine implements 
serializable.
but still there are exceptions telling me that java.lang.Object isn´t 
serializable...

quote
org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException: 
Unable to serialize class: java.lang.Object

private java.util.Map com.mysql.jdbc.ConnectionImpl.charsetConverterMap 
[class=java.util.HashMap]
private java.util.Map 
com.mysql.jdbc.ConnectionImpl.charsetConverterMap[write:1][write:2] 
[class=java.lang.Object] - field that is not serializable
/quote

is there a possibility to deactivate serialization?
or how shall i solve this problem?

kind regards ans many thanks to those who can help me out of the 
serialization-jungle (never serialized anything before and i am relatively new 
to wicket with my very first real wicket-project)




Tolle Dekolletés oder scharfe Tatoos? Vote jetzt ... oder mach selbst mit und 
zeige Deine Schokoladenseite
bei Topp oder Hopp von Arcor: http://www.arcor.de/rd/footer.toh

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



Re: W.: serializable problem

2010-02-26 Thread bgooren

It looks like you are serializing the MySQL connection. You should not keep
it around in the session, but rather create a connection when you need it,
or use a connection pool.


exceptionist wrote:
 
 hello,
 i´ve got a problem with serialization.
 
 my application is connected to a mysql-db and every class of mine
 implements serializable.
 but still there are exceptions telling me that java.lang.Object isn´t
 serializable...
 
 
 
 org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
 Unable to serialize class: java.lang.Object
 
 private java.util.Map com.mysql.jdbc.ConnectionImpl.charsetConverterMap
 [class=java.util.HashMap]
 private java.util.Map
 com.mysql.jdbc.ConnectionImpl.charsetConverterMap[write:1][write:2]
 [class=java.lang.Object] - field that is not serializable
 
 
 is there a possibility to deactivate serialization?
 or how shall i solve this problem?
 
 kind regards ans many thanks to those who can help me out of the
 serialization-jungle (never serialized anything before and i am relatively
 new to wicket with my very first real wicket-project)
 
 
 
 
 Tolle Dekolletés oder scharfe Tatoos? Vote jetzt ... oder mach selbst mit
 und zeige Deine Schokoladenseite
 bei Topp oder Hopp von Arcor: http://www.arcor.de/rd/footer.toh
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://old.nabble.com/W.%3A-serializable-problem-tp27715846p27716936.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: W.: serializable problem

2010-02-26 Thread James Carman
Please don't re-post.  We've already started to answer your question
in another thread (I asked you if you had a Connection field
somewhere).

2010/2/26 björn liffers bad.ad...@arcor.de:
 hello,
 i´ve got a problem with serialization.

 my application is connected to a mysql-db and every class of mine implements 
 serializable.
 but still there are exceptions telling me that java.lang.Object isn´t 
 serializable...

 quote
 org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException: 
 Unable to serialize class: java.lang.Object

 private java.util.Map com.mysql.jdbc.ConnectionImpl.charsetConverterMap 
 [class=java.util.HashMap]
 private java.util.Map 
 com.mysql.jdbc.ConnectionImpl.charsetConverterMap[write:1][write:2] 
 [class=java.lang.Object] - field that is not serializable
 /quote

 is there a possibility to deactivate serialization?
 or how shall i solve this problem?

 kind regards ans many thanks to those who can help me out of the 
 serialization-jungle (never serialized anything before and i am relatively 
 new to wicket with my very first real wicket-project)




 Tolle Dekolletés oder scharfe Tatoos? Vote jetzt ... oder mach selbst mit und 
 zeige Deine Schokoladenseite
 bei Topp oder Hopp von Arcor: http://www.arcor.de/rd/footer.toh

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



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



Re: W.: serializable problem

2010-02-26 Thread exceptionist

i´m sorry for reposting, but i still don´t find the other thread.. i thought
my mail didn´t arrived or something like that.. if you have a link for me :)
(would be kind)

my connection didn´t fail i get all the data i need and the page shows what
it should show.

what about the connectio-pool? does it mean that i won´t have problems with
serialization if i am using a c-pool??


-- 
View this message in context: 
http://old.nabble.com/W.%3A-serializable-problem-tp27715846p27717742.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: W.: serializable problem

2010-02-26 Thread James Carman
We're not saying your connection failed.  What we're saying is that a
JDBC connection isn't serializable.  You shouldn't have a field in
your class for your JDBC connection.  What you should do is
re-establish your connection during each request by either
re-connecting or grabbing a new connection from a pool or something.
You don't store it on your component/page.


On Fri, Feb 26, 2010 at 7:42 AM, exceptionist bad.ad...@arcor.de wrote:

 i´m sorry for reposting, but i still don´t find the other thread.. i thought
 my mail didn´t arrived or something like that.. if you have a link for me :)
 (would be kind)

 my connection didn´t fail i get all the data i need and the page shows what
 it should show.

 what about the connectio-pool? does it mean that i won´t have problems with
 serialization if i am using a c-pool??


 --
 View this message in context: 
 http://old.nabble.com/W.%3A-serializable-problem-tp27715846p27717742.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: W.: serializable problem

2010-02-26 Thread exceptionist

oh my bad.. i read failed instead of field :)
the uploaded file is my connection-pooling-class...
and now i don´t get the exception at java.lang.object it is
org.apache.commons.dbcp.BasicDataSource instead -.-

http://old.nabble.com/file/p27718624/conpooling.java conpooling.java 

this org.apache.commons are libs which i binded as jar-files.
-- 
View this message in context: 
http://old.nabble.com/W.%3A-serializable-problem-tp27715846p27718624.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: W.: serializable problem

2010-02-26 Thread James Carman
You could store your connection pool in your Application object.  That
doesn't get serialized.  And, you can get to that easily whenever you
want by calling the static get() method.  You shouldn't be storing
your data source at the page/component level.

On Fri, Feb 26, 2010 at 9:01 AM, exceptionist bad.ad...@arcor.de wrote:

 oh my bad.. i read failed instead of field :)
 the uploaded file is my connection-pooling-class...
 and now i don´t get the exception at java.lang.object it is
 org.apache.commons.dbcp.BasicDataSource instead -.-

 http://old.nabble.com/file/p27718624/conpooling.java conpooling.java

 this org.apache.commons are libs which i binded as jar-files.
 --
 View this message in context: 
 http://old.nabble.com/W.%3A-serializable-problem-tp27715846p27718624.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: W.: serializable problem

2010-02-26 Thread T Ames
Here was my response to your original post:

Serialization gets tricky. You must be very careful about all of the class
level fields/objects you use. They must all be serializable and each object
that those objects use or refer to must be serializable. Instead of using
class level fields, wherever possible, pass objects around as parameters to
your methods and constructors.  This would include class level
fields/objects in the Session object too since obviously that gets
serialized.


I had a situation similar to yours where a class that is used by the JDBC
driver was not serializable.  To make a long story short, I was using a
class level field that down the chain eventually ended up being mapped to
the database and thus utilizing the jdbc driver's class.  It took me quite a
while to find this one :)

I did not really need that field/object at the class level.  When I removed
it and reworked the code a bit, the problem went away.  After I found it, I
was wondering why I used this at the class level anyway.


2010/2/26 björn liffers bad.ad...@arcor.de

 hello,
 i´ve got a problem with serialization.

 my application is connected to a mysql-db and every class of mine
 implements serializable.
 but still there are exceptions telling me that java.lang.Object isn´t
 serializable...

 quote
 org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
 Unable to serialize class: java.lang.Object

 private java.util.Map com.mysql.jdbc.ConnectionImpl.charsetConverterMap
 [class=java.util.HashMap]
 private java.util.Map
 com.mysql.jdbc.ConnectionImpl.charsetConverterMap[write:1][write:2]
 [class=java.lang.Object] - field that is not serializable
 /quote

 is there a possibility to deactivate serialization?
 or how shall i solve this problem?

 kind regards ans many thanks to those who can help me out of the
 serialization-jungle (never serialized anything before and i am relatively
 new to wicket with my very first real wicket-project)




 Tolle Dekolletés oder scharfe Tatoos? Vote jetzt ... oder mach selbst mit
 und zeige Deine Schokoladenseite
 bei Topp oder Hopp von Arcor: http://www.arcor.de/rd/footer.toh

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




Re: W.: serializable problem

2010-02-26 Thread Igor Vaynberg
On Fri, Feb 26, 2010 at 4:42 AM, exceptionist bad.ad...@arcor.de wrote:

 i´m sorry for reposting, but i still don´t find the other thread.. i thought
 my mail didn´t arrived or something like that.. if you have a link for me :)
 (would be kind)


http://markmail.org/search/?q=bj%C3%B6rn%20liffers#query:bj%C3%B6rn%20liffers+page:1+mid:khdvrqpwpven7cdw+state:results

-igor

 my connection didn´t fail i get all the data i need and the page shows what
 it should show.

 what about the connectio-pool? does it mean that i won´t have problems with
 serialization if i am using a c-pool??


 --
 View this message in context: 
 http://old.nabble.com/W.%3A-serializable-problem-tp27715846p27717742.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



serializable problem

2010-02-25 Thread bj�rn liffers
hello,
i´ve got a problem with serialization.

my application is connected to a mysql-db and every class of mine implements 
serializable.
but still there are exceptions telling me that java.lang.Object isn´t 
serializable...

quote
org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException: 
Unable to serialize class: java.lang.Object

private java.util.Map com.mysql.jdbc.ConnectionImpl.charsetConverterMap 
[class=java.util.HashMap]
private java.util.Map 
com.mysql.jdbc.ConnectionImpl.charsetConverterMap[write:1][write:2] 
[class=java.lang.Object] - field that is not serializable
/quote

is there a possibility to deactivate serialization?
or how shall i solve this problem?

kind regards ans many thanks to those who can help me out of the 
serialization-jungle (never serialized anything before and i am relatively new 
to wicket with my very first real wicket-project)

Immer auf dem Laufenden! Sport, Auto, Reise, Politik und Promis. Von uns für 
Sie: der neue Arcor.de-Newsletter!
Jetzt anmelden und einfach alles wissen: 
http://www.arcor.de/rd/footer.newsletter

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



Re: serializable problem

2010-02-25 Thread nino martinez wael
declare it transient

But im not sure why you a object of that kind in there... Would be nice with
some more code..

2010/2/25 björn liffers bad.ad...@arcor.de

 hello,
 i´ve got a problem with serialization.

 my application is connected to a mysql-db and every class of mine
 implements serializable.
 but still there are exceptions telling me that java.lang.Object isn´t
 serializable...

 quote
 org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
 Unable to serialize class: java.lang.Object

 private java.util.Map com.mysql.jdbc.ConnectionImpl.charsetConverterMap
 [class=java.util.HashMap]
 private java.util.Map
 com.mysql.jdbc.ConnectionImpl.charsetConverterMap[write:1][write:2]
 [class=java.lang.Object] - field that is not serializable
 /quote

 is there a possibility to deactivate serialization?
 or how shall i solve this problem?

 kind regards ans many thanks to those who can help me out of the
 serialization-jungle (never serialized anything before and i am relatively
 new to wicket with my very first real wicket-project)

 Immer auf dem Laufenden! Sport, Auto, Reise, Politik und Promis. Von uns
 für Sie: der neue Arcor.de-Newsletter!
 Jetzt anmelden und einfach alles wissen:
 http://www.arcor.de/rd/footer.newsletter

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




Re: serializable problem

2010-02-25 Thread James Carman
Do you have a java.sql.Connection field in one of your components/pages?

2010/2/25 björn liffers bad.ad...@arcor.de:
 hello,
 i´ve got a problem with serialization.

 my application is connected to a mysql-db and every class of mine implements 
 serializable.
 but still there are exceptions telling me that java.lang.Object isn´t 
 serializable...

 quote
 org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException: 
 Unable to serialize class: java.lang.Object

 private java.util.Map com.mysql.jdbc.ConnectionImpl.charsetConverterMap 
 [class=java.util.HashMap]
 private java.util.Map 
 com.mysql.jdbc.ConnectionImpl.charsetConverterMap[write:1][write:2] 
 [class=java.lang.Object] - field that is not serializable
 /quote

 is there a possibility to deactivate serialization?
 or how shall i solve this problem?

 kind regards ans many thanks to those who can help me out of the 
 serialization-jungle (never serialized anything before and i am relatively 
 new to wicket with my very first real wicket-project)

 Immer auf dem Laufenden! Sport, Auto, Reise, Politik und Promis. Von uns für 
 Sie: der neue Arcor.de-Newsletter!
 Jetzt anmelden und einfach alles wissen: 
 http://www.arcor.de/rd/footer.newsletter

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



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



Re: serializable problem

2010-02-25 Thread Fatih Mehmet Ucar
probably you have some non-serializable object in your page, have you checked?

-fmu

On 25 February 2010 14:40, James Carman jcar...@carmanconsulting.com wrote:
 Do you have a java.sql.Connection field in one of your components/pages?

 2010/2/25 björn liffers bad.ad...@arcor.de:
 hello,
 i´ve got a problem with serialization.

 my application is connected to a mysql-db and every class of mine implements 
 serializable.
 but still there are exceptions telling me that java.lang.Object isn´t 
 serializable...

 quote
 org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
  Unable to serialize class: java.lang.Object

 private java.util.Map com.mysql.jdbc.ConnectionImpl.charsetConverterMap 
 [class=java.util.HashMap]
 private java.util.Map 
 com.mysql.jdbc.ConnectionImpl.charsetConverterMap[write:1][write:2] 
 [class=java.lang.Object] - field that is not serializable
 /quote

 is there a possibility to deactivate serialization?
 or how shall i solve this problem?

 kind regards ans many thanks to those who can help me out of the 
 serialization-jungle (never serialized anything before and i am relatively 
 new to wicket with my very first real wicket-project)

 Immer auf dem Laufenden! Sport, Auto, Reise, Politik und Promis. Von uns für 
 Sie: der neue Arcor.de-Newsletter!
 Jetzt anmelden und einfach alles wissen: 
 http://www.arcor.de/rd/footer.newsletter

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



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



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



Re: serializable problem

2010-02-25 Thread T Ames
Serialization gets tricky. You must be very careful about all of the class
level fields/objects you use. They must all be serializable and each object
that those objects use or refer to must be serializable. Instead of using
class level fields, wherever possible, pass objects around as parameters to
your methods and constructors.  This would include class level
fields/objects in the Session object too since obviously that gets
serialized.


I had a situation similar to yours where a class that is used by the JDBC
driver was not serializable.  To make a long story short, I was using a
class level field that down the chain eventually ended up being mapped to
the database and thus utilizing the jdbc driver's class.  It took me quite a
while to find this one :)

I did not really need that field/object at the class level.  When I removed
it and reworked the code a bit, the problem went away.  After I found it, I
was wondering why I used this at the class level anyway.



2010/2/25 björn liffers bad.ad...@arcor.de

 hello,
 i´ve got a problem with serialization.

 my application is connected to a mysql-db and every class of mine
 implements serializable.
 but still there are exceptions telling me that java.lang.Object isn´t
 serializable...

 quote
 org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
 Unable to serialize class: java.lang.Object

 private java.util.Map com.mysql.jdbc.ConnectionImpl.charsetConverterMap
 [class=java.util.HashMap]
 private java.util.Map
 com.mysql.jdbc.ConnectionImpl.charsetConverterMap[write:1][write:2]
 [class=java.lang.Object] - field that is not serializable
 /quote

 is there a possibility to deactivate serialization?
 or how shall i solve this problem?

 kind regards ans many thanks to those who can help me out of the
 serialization-jungle (never serialized anything before and i am relatively
 new to wicket with my very first real wicket-project)

 Immer auf dem Laufenden! Sport, Auto, Reise, Politik und Promis. Von uns
 für Sie: der neue Arcor.de-Newsletter!
 Jetzt anmelden und einfach alles wissen:
 http://www.arcor.de/rd/footer.newsletter

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