It seems like the application is looking up a jdbc-resource which has pool by name "mysql_StockDB_applicationuserPool".
Can you compare your GlassFish 2.1 domain.xml and GlassFish 3.1 domain.xml to see whether there is any difference w.r.t jdbc-resource and jdbc-connection-pool ?
Also, the following exception seems to indicate that the pool-name is being changed from mysqlPool to mysql_StockDB_applicationuserPool ?
"WARNING: Unprocessed event : UnprocessedChangeEvent{PropertyName=pool-name, OldValue = mysqlPool, NewValue = mysql_StockDB_applicationuserPool, Source = "
[Message sent by forum member 'jr158900']
http://forums.java.net/jive/thread.jspa?messageID=484492