[Beginners Corner] - running jsf application in jbossas 3.2.7
by pietro.maggi
Hi,
I have a jsf web application using myfaces and I must make it run on JbossAS 3.2.7. I simply copied the war file under the server\default\deploy directory. It seems that when the jsf tries to access to the property 'myProp' of bean 'myBean' the following exception arises:
javax.faces.el.PropertyNotFoundException: Base is null: myBean
Actually the WEB-INF/lib directory contains the following jars (jsf and application specific):
bsh-2.0b4.jar
commons-beanutils.jar
commons-codec.jar
commons-collections.jar
commons-digester.jar
commons-el.jar
commons-fileupload.jar
commons-lang.jar
commons-logging.jar
commons-validator.jar
jakarta-oro.jar
jsf-api.jar
jsf-impl.jar
jstl.jar
myfaces-all.jar
portlet-api.jar
standard.jar
struts.jar
Under tomcat 5.0.x it works well.
Where I do wrong ?
Pietro
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3978114#3978114
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3978114
19 years, 8 months
[EJB 3.0] - Re: Remote access error (in the most simple situation, why?)
by lmierzej
Thank you very much for your replay :)
I have just managed to solve this problem.
There were 2 problems.
First, jndi lookup in Test.java in bgsw.ear should be like this:
| BoardGamesServiceFacade bgsf = (BoardGamesServiceFacade) ctx.lookup("bgsc/BoardGamesServiceFacadeBean/remote");
|
In bgsw.ear I know definition of BoardGamesServiceFacade interface, because I imported a jar file to bgsw.ear, which contains needed classes.
I guess that this is not the only way to do this.
Second, jndi bindings whare not refreshed properly? I'm not sure. Now in jmx-console I can see:
| +- bgsc (class: org.jnp.interfaces.NamingContext)
| | +- BoardGamesBean (class: org.jnp.interfaces.NamingContext)
| | | +- local (proxy: $Proxy67 implements interface lmierzej.bgsc.businessMethods.BoardGames,interface org.jboss.ejb3.JBossProxy,interface javax.ejb.EJBLocalObject)
| | +- BoardGamesServiceFacadeBean (class: org.jnp.interfaces.NamingContext)
| | | +- remote (proxy: $Proxy69 implements interface lmierzej.bgsc.businessMethods.BoardGamesServiceFacade,interface org.jboss.ejb3.JBossProxy,interface javax.ejb.EJBObject)
|
But now I have new doubts...
I have 2 different ear archives (the same JBoss server), in both I make jndi lookups... Why they are serching/using the same bindigs (the same context)? How they know that they should use the same?
Finally, what if had every ear on different JBoss server? How form first ear (on first server) would I get access to second ear (on second server)? How would they both knew now to use the same jndi context? Is there any additional configuration needed to do this?
P.S. Sorry for my english... really.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3978111#3978111
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3978111
19 years, 8 months
[EJB 3.0] - @PreDestroy not working..?
by delley
Hi,
Im using a jboss 4.0.4GA with jboss-EJB-3.0_RC8-FD installed.
I have a MDB that needs to do some cleaning before it is garbage collected.
I have tried using @PreDestory or similar - but it doesnt seem like its ever being called!?!
I have tried to deploy a new version of the code. Still nothing happend. I tried to shutdown jboss - nothing happend. Or at least no log statment in my logs. And it cant be my logging - have tested it and I know that it is working!
I've read somewhere in this forum that @PreDestroy was moved from javax.ejb to javax.annotation. But as you can see from my import statment I'm using the correct one.
And the library jboss-ejb3x.jar that contains the class is present in <jboss_home>\server\all\deploy\ejb3.deployer\ so it should be loaded - right?
And yes - i'm starting jboss with the -c all switch ;-)
import javax.annotation.PreDestroy;
| import javax.ejb.ActivationConfigProperty;
| import javax.ejb.MessageDriven;
| import javax.jms.Message;
| import javax.jms.MessageListener;
| import javax.jms.ObjectMessage;
| import javax.jms.JMSException;
|
| import org.apache.commons.logging.Log;
| import org.apache.commons.logging.LogFactory;
|
| @MessageDriven (activationConfig =
| {
| @ActivationConfigProperty(propertyName="destinationType",
| propertyValue="javax.jms.Queue"),
| @ActivationConfigProperty(propertyName="destination",
| propertyValue="queue/wipqueue")
| })
| public class TestMBean implements MessageListener{
|
| /** Logger. */
| private static final Log log_ = LogFactory.getLog(TestMBean.class
| .getName());
|
| public void onMessage(Message message) {
| //do something here...
| }
|
| @PreDestroy
| public void preDestroy(){
| log_.debug("preDestroy called!!!");
| }
|
| }//end class
|
| Any ideas?
Regards,
delley
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3978107#3978107
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3978107
19 years, 8 months