Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001489 [Resin] major always 12-04-06 12:14 12-05-06 19:02
Reporter gzhu View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product 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.
Additional Information
Attached Files

- Relationships

- Notes
(0001634)
gzhu
12-04-06 12:32
edited on: 12-04-06 15:39

My modified code to see the full context of the change:

http://backhoe.ironplanet.com/download/resin/fix1489/EntityCreateCall.java [^]

 
(0001638)
ferg
12-05-06 19:02

regressions already catch this issue
 

- Issue History
Date Modified Username Field Change
12-04-06 12:14 gzhu New Issue
12-04-06 12:27 gzhu Issue Monitored: gzhu
12-04-06 12:32 gzhu Note Added: 0001634
12-04-06 15:39 gzhu Note Edited: 0001634
12-05-06 19:02 ferg Note Added: 0001638
12-05-06 19:02 ferg Assigned To  => ferg
12-05-06 19:02 ferg Status new => closed
12-05-06 19:02 ferg Resolution open => fixed
12-05-06 19:02 ferg Fixed in Version  => 3.1.0


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
33 total queries executed.
27 unique queries executed.
Powered by Mantis Bugtracker