|
Mantis - Resin
|
|||||
| Viewing Issue Advanced Details | |||||
|
|
|||||
| ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
| 1489 | major | always | 12-04-06 12:14 | 12-05-06 19:02 | |
|
|
|||||
| Reporter: | gzhu | Platform: | Dell | ||
| Assigned To: | ferg | OS: | Debian | ||
| Priority: | normal | OS Version: | 2.6.7-1-686-smp | ||
| Status: | closed | Product Version: | 3.1.0 | ||
| Product Build: | resin-3.1.s061203 | Resolution: | fixed | ||
| Projection: | none | ||||
| ETA: | none | Fixed in Version: | 3.1.0 | ||
|
|
|||||
| Summary: | 0001489: EJB 2 CMP deploy failed on snapshot version 3.1.s061203 | ||||
| Description: |
EJB2 CMP failed to deploy because of uncaught exception in generated java MyCodeCMP__EJB.java. The generated code : public com.ironplanet.db.addcreditinfo.AddCreditInfo create() throws javax.ejb.CreateException { .... try { thread.setContextClassLoader(_context._server.getClassLoader()); try { ...... trans.getAmberConnection().create("MyCode", bean); <<<< HERE ...... } } catch (java.sql.SQLException e) { throw new com.caucho.ejb.CreateExceptionWrapper(e); } } catch (RuntimeException e) { throw trans.setRollbackOnly(e); } finally { thread.setContextClassLoader(oldLoader); trans.commit(); } return ....; } In this snapshot version, src/com/caucho/amber/manager/AmberConnection.java::create(...) (line 1499) now throws Exception instead of (previously) SQLException, which caused compilation error for MyCodeCMP__EJB.java with "Uncaught Exception: java.lang.Exception". My Temp. Fix: src/com/caucho/ejb/gen/EntityCreateCall.java: 145,145 < out.println("} catch (java.sql.SQLException e) {"); > out.println("} catch (java.lang.Exception e) {"); At this point, I wont worry too much about trans.setRollbackOnly(e); our application code will deal with CreateException properly. |
||||
| Steps To Reproduce: | configure any EJB2 CMP, and start resin | ||||
| Additional Information: | |||||
| System Description: | Development environment | ||||
| Relationships | |||||
| Attached Files: | |||||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||