@PostConstruct annotation not called jboss5.1
marko123 Apr 12, 2010 5:44 PMHey guys,
I've been stuck with this problem for 2 day's now and i'm running out of ideas, so hopefully someone can help. I've been trying really hard to persuade the head of java to start the next project(starting next week) using richfaces over GWT and need to iron out all the problem's in order to have a solid argument, so please if anyone has ideas/tips i would really appreciate it.
Basically the @PostConstruct method wont fire on my jsf managed bean when using the built in jsf1.2 libraries in jboss 5.1GA using richfaces 3.3.3, i'm using the ee5 web.xml deployment descriptor, below is the header.
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
When disabling the built in libraries, packaging libs in the webapp and setting org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL to true, @postConstruct works but i get the following error in the jboss log and certain injections like 'FacesConfig.getInstance()' dont work. When deploying jars with the webapp(WEB-INF/lib) i also get 'Class 'za.co.ucs.jsf.basic.ExceptionHandlingActionListener' is not an instance of 'interface javax.faces.event.ActionListener'' even thought the class both extends 'ActionListenerImpl' and implements ActionListener.
I even tried copying the libs from jbossweb.sar into the webapp and again @PostConstruct does not work.
"2010-04-12 16:28:28,805 SEVERE [javax.enterprise.resource.webcontainer.jsf.application] (main) JSF1029: The specified InjectionProvider implementation 'org.jboss.web.jsf.integration.injection.JBossDelegatingInjectionProvider' does not implement the InjectionProvider interface."
The postconstruct annotation in the baking bean is simple.
public SystemUsersBB() {
log.info("SystemUsersBB()");
}
@PostConstruct
public void init() {
log.info("init()");
listUsers();
}
So there it is, i would appreciate any help or tips as i'm running out of time.
Thanx
Regards