Return-Path: X-Original-To: apmail-activemq-dev-archive@www.apache.org Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 42E0010311 for ; Fri, 23 Aug 2013 21:29:52 +0000 (UTC) Received: (qmail 61459 invoked by uid 500); 23 Aug 2013 21:29:52 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 61398 invoked by uid 500); 23 Aug 2013 21:29:52 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 61228 invoked by uid 99); 23 Aug 2013 21:29:51 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Aug 2013 21:29:51 +0000 Date: Fri, 23 Aug 2013 21:29:51 +0000 (UTC) From: "Timothy Bish (JIRA)" To: dev@activemq.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (AMQ-4673) Application that uses activemq-camel fails deploying to GlassFish v4 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMQ-4673?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Timothy Bish updated AMQ-4673: ------------------------------ Fix Version/s: 5.9.0 > Application that uses activemq-camel fails deploying to GlassFish v4 > -------------------------------------------------------------------- > > Key: AMQ-4673 > URL: https://issues.apache.org/jira/browse/AMQ-4673 > Project: ActiveMQ > Issue Type: Bug > Components: activemq-camel > Affects Versions: 5.6.0 > Environment: Mac OS X, Java 1.7.0_25, GlassFish v4 > Reporter: Kevin Schmidt > Fix For: 5.9.0 > > Attachments: CamelEndpointLoader.patch > > > I have an application that uses activemq-camel and deploys/works fine with GlassFish v3. I tried to deploy the same application on GlassFish v4 and get this error: > remote failure: Error occurred during deployment: Exception while deploying the app [appname] : The lifecycle method [afterPropertiesSet] must not throw a checked exception. Related annotation information: annotation [@javax.annotation.PostConstruct()] on annotated element [public void org.apache.activemq.camel.component.CamelEndpointLoader.afterPropertiesSet() throws java.lang.Exception] of type [METHOD]. Please see server.log for more details. > Command deploy failed. > It appears that CamelEndpointLoader has a @PostConstruct method that throws an Exception and per the Java EE spec that isn't allowed. Apparently GlassFish v3 was lenient but v4 is not. > Looking at the code, it is easy to fix. The afterPropertiesSet method just needs to catch the exceptions from addQueue/addTopic and log them at the end of the method like it does earlier in the method. If a failure to add these during the method should actually be considered a failure, then something like IllegalStateException or another unchecked exception should be thrown instead. > This fix has been tested and verified to get past the problem. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira