Quantcast
Viewing all articles
Browse latest Browse all 5648

GuiceCamelContext checked exception issue with Glassfish4

I am trying to run my application in Glassfish 4 and I am getting the error
below which is due to Exception being thrown in the @PostContruct method.
According to the J2EE spec methods with the @PostConstruct annotation "MUST
NOT throw a checked exception".

Does anyone have a good work around for this? About the only thing that I
can think of is to get the camel source code and change this to a runtime
exception.

The lifecycle method [start] must not throw a checked exception. Related
annotation information: annotation [@javax.annotation.PostConstruct()] on
annotated element [public void
org.apache.camel.guice.GuiceCamelContext.start()
throws java.lang.Exception] of type [METHOD]
The lifecycle method [start]
must not throw a checked exception. Related annotation information:
annotation
[@javax.annotation.PostConstruct()] on annotated element [public void
org.apache.camel.guice.GuiceCamelContext.start() throws java.lang.Exception]
of
type [METHOD]
 at
org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:367)

Thanks

Viewing all articles
Browse latest Browse all 5648

Trending Articles