This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JBoss/WildFly and the fly likes NotSerializableException: oracle.jdbc.driver.OracleConnection while binding connection obj to JNDI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "NotSerializableException: oracle.jdbc.driver.OracleConnection while binding connection obj to JNDI" Watch "NotSerializableException: oracle.jdbc.driver.OracleConnection while binding connection obj to JNDI" New topic
Author

NotSerializableException: oracle.jdbc.driver.OracleConnection while binding connection obj to JNDI

Gireesh Mulage
Ranch Hand

Joined: Mar 08, 2010
Posts: 44
Hi All ,

I am getting java.io.NotSerializableException: oracle.jdbc.driver.OracleConnection exception while binding connection obj to JNDI. I was not getting this error in apache-tomcat-6.0.20.

Why error is coming only in Jboss ?

Please help me on this.

Thanks
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5811
    
    7

Here is a guess: you actually do not have an OracleConnection object, but rather a JBoss-specific wrapper around the OracleConnection object, and that wrapper is not serializable. You can verify the object type by logging the result of calling the getClass() method on the connection object.


JBoss In Action
Gireesh Mulage
Ranch Hand

Joined: Mar 08, 2010
Posts: 44
Thank you for your reply.

Exactly , the con.getClass() is giving OracleConnection . How can I solve this issue? any other options ?

Thanks.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5811
    
    7

I guess that OracleConnection is not a serializable class. I have no idea why JBoss wants to serialize it. You might have to dig through the JBoss source code (in the classes mentioned in the stack trace) to find out what is going on.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9915
    
158

So you are trying to bind a database connection to JNDI? Why are you doing that?

[My Blog] [JavaRanch Journal]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: NotSerializableException: oracle.jdbc.driver.OracleConnection while binding connection obj to JNDI
 
Similar Threads
NotSerializableException: oracle.jdbc.driver.OracleConnection while binding connection obj to JNDI
Error on WSADServer startup
JNDI - CMP Factory Connection Binding
setAttribute method not found
No JNDI name found in EJB