Bug 200716 - @PostContruct method cannot throw checked exception
@PostContruct method cannot throw checked exception
Product: javaee
Classification: Unclassified
Component: EJB
PC Other
: P3 (vote)
: 7.2
Assigned To: Martin Fousek
Depends on:
  Show dependency treegraph
Reported: 2011-08-06 00:12 UTC by arungupta
Modified: 2012-04-13 12:22 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description arungupta 2011-08-06 00:12:42 UTC
As per the @PostConstruct javadoc at:


The method MUST NOT throw a checked exception.

So the following code should tag an error:

-- cut here --
public class NewSessionBean {

    void startup() throws SQLException {
-- cut here --
Comment 1 Martin Fousek 2011-10-12 04:44:42 UTC
Will be fixed together with issue #200715 in next release.
Comment 2 Martin Fousek 2012-04-13 12:22:07 UTC
Done in web-main #acb87914f0bb.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo