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

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

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

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?

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

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

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,

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

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)