| Issue 271: | For OC4J distributable applications objects bound to a session need to be Serializable | |
| 1 person starred this issue and may be notified of changes. | Back to list |
When using jMesa 2.5 in a distributable web application that runs in Oracle OC4J 10.1.3, I get the exception below when processing a worksheet:
protected void saveWorksheet(Worksheet worksheet) {
worksheet.processRows(new WorksheetCallbackHandler() {
public void process(WorksheetRow worksheetRow) {
...
Exception:
java.lang.IllegalArgumentException: Only java.io.Serializable, javax.ejb.EJBObject and javax.ejb.EJBHome instances can be bound to a session in a distributable web-application, not: org.jmesa.worksheet.WorksheetImpl@1fc671[id=allAccountsTable,rows={}] (class org.jmesa.worksheet.WorksheetImpl)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.EvermindHttpSession.setAttribute(EvermindHttpSession.java:150)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.EvermindHttpSession.setAttribute(EvermindHttpSession.java:137)
at org.jmesa.web.HttpServletRequestWebContext.setSessionAttribute(HttpServletRequestWebContext.java:118)
at org.jmesa.worksheet.state.SessionWorksheetState.persistWorksheet(SessionWorksheetState.java:39)
at org.jmesa.facade.TableFacadeImpl.getWorksheet(TableFacadeImpl.java:196)
at org.jmesa.facade.TableFacadeImpl.setItems(TableFacadeImpl.java:395)
at org.jmesa.facade.TableFacadeTemplate.setup(TableFacadeTemplate.java:100)
at org.jmesa.facade.TableFacadeTemplate.render(TableFacadeTemplate.java:47)
...
This problem goes away and everything works fine if I modify the following classes to implement java.io.Serializable:
org.jmesa.worksheet.WorksheetImpl
org.jmesa.core.message.ResourceBundleMessages
Could you please implement java.io.Serializable in these classes? (and any other classes that may be bound to a session)
Jun 21, 2010
Project Member
#1
jeff.johnston.mn@gmail.com
Jun 21, 2010
Many thanks for your quick response! Yes we have a custom build for now. In a previous application we copied and modified the source code. In a new application we are using AspectJ introductions to make those classes implement Serializable.
Jun 21, 2010
Sounds good. I made the WorksheetColumn and WorksheetRow Serializable as well. Also, if you use any of the new Worksheet features that came out in 2.5 you should let me know how they worked out for you. We are trying to get feedback on the new features. Feel free to write me directly at jeff.johnston.mn@gmail.com if you start using them and have any input!
Mar 9, 2011
This should be fixed now...closing it out.
Status:
Fixed
|