Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0005703 [Quercus] major always 03-27-14 11:15 05-19-14 10:18
Reporter matthiasblaesing View Status public  
Assigned To nam
Priority normal Resolution no change required Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version Product Version
  Product Build
Summary 0005703: PostContruct-Annotation on WebApp#init: Quercus can not be deployed into glassfish4
Description I tried deploying Quercus into one of our newer glassfish instances, which refused the deployment.

The reason is the PostConstruct-Annotation on WebApp#init (modules/resin/src/com/caucho/server/webapp/WebApp.java). The method declares to throw a checked Exception. This violates the JavaEE specification (http://docs.oracle.com/javaee/5/api/javax/annotation/PostConstruct.html), [^] which states that a post construct method must not throw a checked exception.

Glassfish 3 did not enforce this, Glassfish 4 does.

I tried removing the throws clause and successfully compiled and deployed quercus:

diff --git a/modules/resin/src/com/caucho/server/webapp/WebApp.java b/modules/resin/src/com/caucho/server/webapp/WebApp.java
index c4a7419..2d61b63 100644
--- a/modules/resin/src/com/caucho/server/webapp/WebApp.java
+++ b/modules/resin/src/com/caucho/server/webapp/WebApp.java
@@ -2725,7 +2725,6 @@ public class WebApp extends ServletContextImpl
    */
   @PostConstruct
   public void init()
- throws Exception
   {
     if (! _lifecycle.toInitializing()) {
       return;
Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
(0006424)
nam
04-03-14 11:10

Moved report to the Resin project.
 
(0006448)
nam
05-19-14 10:18

Quercus no longer bundles JavaEE classes.
 

- Issue History
Date Modified Username Field Change
03-27-14 11:15 matthiasblaesing New Issue
04-03-14 11:09 nam Project Quercus => Resin
04-03-14 11:10 nam Note Added: 0006424
05-05-14 10:12 ferg Project Resin => Quercus
05-19-14 10:18 nam Status new => assigned
05-19-14 10:18 nam Assigned To  => nam
05-19-14 10:18 nam Status assigned => closed
05-19-14 10:18 nam Note Added: 0006448
05-19-14 10:18 nam Resolution open => no change required


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