Injetar ejb no war dentro do mesmo ear

Bom dia pessoal…

estou estudando EJB por conta, com uns materiais que peguei na net… bom to tentando fazer o seguinte: tenho um ear, dentro dele um war e um jar de ejb, dentro do jar tenho dois session beans, um statefull e outro stateless, estou tentando injetar o statefull em um Filter que tenho la dentro do meu war, mas não estou conseguindo. Estou usando o JBoss 5.1 no eclipse. Será que alguém saberia o motivo de estar dando a exceção abaixo?

dentro do meu projeto ejb tenho isso:

[code]package ejb.interfaces;

import java.util.List;

import javax.ejb.Local;

import org.jboss.ejb3.annotation.LocalBinding;

import vo.Produto;

@Local
@LocalBinding(jndiBinding=“carrinhoCompras”)
public interface CarrinhoLocal {

public void add(Produto p);
public boolean remove(Produto p);
public List<Produto> getCarrinho();
public void clear();

}[/code]

[code]package ejb.sessionBeans.local;

import java.util.ArrayList;
import java.util.List;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.ejb.Stateful;

import vo.Produto;
import ejb.interfaces.CarrinhoLocal;

@Stateful
public class CarrinhoBean implements CarrinhoLocal {

List<Produto> carrinho;

public CarrinhoBean() {
	super();
	carrinho = new ArrayList<Produto>();
}

public void add(Produto p) {
	carrinho.add(p);
}

public List<Produto> getCarrinho(){
	return carrinho;
}

public void clear() {
	carrinho.clear();
}

public boolean remove(Produto p) {
	return carrinho.remove(p);
}

@PostConstruct
public void inicializaCarrinho(){
	System.out.println("preenchendo o carrinho de compras");

	Produto p1 = new Produto("maçã", 1.50F, "maçã descrição");
	Produto p2 = new Produto("banana", 1.10F, "banana descrição");
	Produto p3 = new Produto("limão", 1.80F, "limão descrição");
	
	carrinho.add(p1);
	carrinho.add(p2);
	carrinho.add(p3);

	System.out.println("carrinho de compras preenchido com sucesso");
}

@PreDestroy
public void terminaBean(){
	System.out.println("terminando bean do carrinho de compras");
	carrinho.clear();
	carrinho = null;
}

}
[/code]

[code]package ejb.interfaces;

import javax.ejb.Local;

import org.jboss.ejb3.annotation.LocalBinding;

@Local
@LocalBinding(jndiBinding=“finalizarCompra”)
public interface FinalizarCompraLocal {
public void finalizaCompra(CarrinhoLocal carrinho);
public void cancelaCompra(CarrinhoLocal carrinho);
}
[/code]

[code]package ejb.sessionBeans.local;

import java.util.List;

import javax.ejb.EJB;
import javax.ejb.Stateless;

import vo.Produto;
import ejb.interfaces.CarrinhoLocal;
import ejb.interfaces.FinalizarCompraLocal;

@Stateless
public class FinalizarCompraBean implements FinalizarCompraLocal {

@EJB
private CarrinhoLocal carrinho;

@Override
public void cancelaCompra(CarrinhoLocal carrinho) {
	System.out.println("cancelando a compra dos seguintes itens");
	List<Produto> produtos = carrinho.getCarrinho();
	
	for (Produto p: produtos){
		System.out.println(p.getNome()+" - R$"+p.getPreco()+" - "+p.getDetalhes());
	}
}

@Override
public void finalizaCompra(CarrinhoLocal carrinho) {
	System.out.println("finalizando a compra dos seguintes itens");
	List<Produto> produtos = carrinho.getCarrinho();
	
	for (Produto p: produtos){
		System.out.println(p.getNome()+" - R$"+p.getPreco()+" - "+p.getDetalhes());
	}
}

}
[/code]

dentro do mesmo enterprise aplication project (projeto que pega os outros e monta no ear) estão o ejb project que monta o jar com os arquivos acima e o meu web project, que monta o war, contendo o seguinte Filter:

[code]package filter;

import java.io.IOException;

import javax.annotation.Resource;
import javax.ejb.EJB;
import javax.ejb.SessionContext;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import ejb.interfaces.CarrinhoLocal;

/**

  • Servlet Filter implementation class PreencheListaNaMemoria
    */
    @EJB(name=“carrinhoCompras”, beanInterface=CarrinhoLocal.class, beanName=“CarrinhoBean”)
    public class PreencheListaSessao implements Filter {

    private CarrinhoLocal carrinho;

    @Resource
    private SessionContext ejbContext;

    public PreencheListaSessao() {
    Object o = ejbContext.lookup(“carrinhoCompras”);
    if (o instanceof CarrinhoLocal)
    carrinho = (CarrinhoLocal) o;
    else{
    System.out.println("tipo: "+o.getClass().getName());
    System.out.println(o.toString());
    }
    }

    public void destroy() {

    }

    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {

     HttpServletRequest req = (HttpServletRequest) request;
     HttpSession session = req.getSession();
     
     Object o = session.getAttribute("carrinho");
     
     if (o == null){
     	System.out.println("inserindo o carrinho na sessão");
     	session.setAttribute("carrinho", carrinho);
     }
     
     chain.doFilter(request, response);
    

    }

    public void init(FilterConfig fConfig) throws ServletException {

    }

}
[/code]

La no eclipse eu configurei no build path do projeto web, adicionando o projeto do ejb, la no build path do projeto e no JEE module dependencies.

o JBoss ta falando que registrou os EJBs:

[quote]09:02:17,766 INFO [EJBContainer] STARTED EJB: ejb.sessionBeans.local.CarrinhoBean ejbName: CarrinhoBean
09:02:17,781 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:

carrinhoCompras - EJB3.x Default Local Business Interface
CarrinhoEar/CarrinhoBean/local-ejb.interfaces.CarrinhoLocal - EJB3.x Local Business Interface

09:02:17,891 INFO [SessionSpecContainer] Starting jboss.j2ee:ear=CarrinhoEar.ear,jar=CarrinhoDeCompras.jar,name=FinalizarCompraBean,service=EJB3
09:02:17,891 INFO [EJBContainer] STARTED EJB: ejb.sessionBeans.local.FinalizarCompraBean ejbName: FinalizarCompraBean
09:02:17,906 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:

finalizarCompra - EJB3.x Default Local Business Interface
CarrinhoEar/FinalizarCompraBean/local-ejb.interfaces.FinalizarCompraLocal - EJB3.x Local Business Interface

09:02:19,984 INFO [TomcatDeployment] deploy, ctxPath=/AppComCarrinho
[/quote]

esse é o stack trace ao iniciar o JBOSS:

[code]09:02:20,453 ERROR [[/AppComCarrinho]] Exception starting filter PreencheListaSessao
java.lang.NullPointerException
at filter.PreencheListaSessao.<init>(PreencheListaSessao.java:31)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at org.jboss.web.tomcat.service.TomcatInjectionContainer.newInstance(TomcatInjectionContainer.java:264)
at org.jboss.web.tomcat.service.TomcatInjectionContainer.newInstance(TomcatInjectionContainer.java:256)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:220)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:332)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:90)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3783)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4413)
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
at $Proxy38.start(Unknown Source)
at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
at org.jboss.system.ServiceController.start(ServiceController.java:460)
at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
at org.jboss.Main.boot(Main.java:221)
at org.jboss.Main$1.run(Main.java:556)
at java.lang.Thread.run(Thread.java:619)
09:02:20,453 ERROR [StandardContext] Error filterStart
09:02:20,453 ERROR [StandardContext] Context [/AppComCarrinho] startup failed due to previous errors
09:02:20,500 ERROR [AbstractKernelController] Error installing to Start: name=jboss.web.deployment:war=/AppComCarrinho state=Create mode=Manual requiredState=Installed
org.jboss.deployers.spi.DeploymentException: URL file:/C:/FLAVIO/DESENV/jboss-5.1.0.GA/server/default/tmp/5c4o03j-bzrfvw-g7him14w-1-g7hin3tc-9q/AppComCarrinho.war/ deployment failed
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:331)
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
at $Proxy38.start(Unknown Source)
at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
at org.jboss.system.ServiceController.start(ServiceController.java:460)
at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
at org.jboss.Main.boot(Main.java:221)
at org.jboss.Main$1.run(Main.java:556)
at java.lang.Thread.run(Thread.java:619)
09:02:20,578 INFO [SessionSpecContainer] Stopping jboss.j2ee:ear=CarrinhoEar.ear,jar=CarrinhoDeCompras.jar,name=FinalizarCompraBean,service=EJB3
09:02:20,578 INFO [EJBContainer] STOPPED EJB: ejb.sessionBeans.local.FinalizarCompraBean ejbName: FinalizarCompraBean
09:02:20,625 INFO [SessionSpecContainer] Stopping jboss.j2ee:ear=CarrinhoEar.ear,jar=CarrinhoDeCompras.jar,name=CarrinhoBean,service=EJB3
09:02:20,641 INFO [EJBContainer] STOPPED EJB: ejb.sessionBeans.local.CarrinhoBean ejbName: CarrinhoBean
09:02:20,719 ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/C:/FLAVIO/DESENV/jboss-5.1.0.GA/server/default/deploy/CarrinhoEar.ear/ state=PreReal mode=Manual requiredState=Real
org.jboss.deployers.spi.DeploymentException: URL file:/C:/FLAVIO/DESENV/jboss-5.1.0.GA/server/default/tmp/5c4o03j-bzrfvw-g7him14w-1-g7hin3tc-9q/AppComCarrinho.war/ deployment failed
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:331)
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
at $Proxy38.start(Unknown Source)
at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
at org.jboss.system.ServiceController.start(ServiceController.java:460)
at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
at org.jboss.Main.boot(Main.java:221)
at org.jboss.Main$1.run(Main.java:556)
at java.lang.Thread.run(Thread.java:619)
09:02:20,797 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

DEPLOYMENTS IN ERROR:
Deployment “vfszip:/C:/FLAVIO/DESENV/jboss-5.1.0.GA/server/default/deploy/CarrinhoEar.ear/” is in error due to the following reason(s): org.jboss.deployers.spi.DeploymentException: URL file:/C:/FLAVIO/DESENV/jboss-5.1.0.GA/server/default/tmp/5c4o03j-bzrfvw-g7him14w-1-g7hin3tc-9q/AppComCarrinho.war/ deployment failed
[/code]

iniciando o servidor em modo debug, botei um break point no construtor do filter onde tento obter o objeto da interface do meu EJB, ao tentar fazer isso ele entra na classe InvocationTargetException.

Grato pela ajuda.

Tem como você postar seu web.xml ?

desculpa pela demora… foi meio corrido aqui no serviço…

bem, estou seguindo um pdf aqui que não diz nada sobre esse arquivo, portanto deixei do jeito que a IDE gerou para mim.

&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; &lt;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" id="WebApp_ID" version="2.5"&gt; &lt;display-name&gt;AppComCarrinho&lt;/display-name&gt; &lt;welcome-file-list&gt; &lt;welcome-file&gt;exibeCarrinho.jsp&lt;/welcome-file&gt; &lt;/welcome-file-list&gt; &lt;filter&gt; &lt;display-name&gt;PreencheListaSessao&lt;/display-name&gt; &lt;filter-name&gt;PreencheListaSessao&lt;/filter-name&gt; &lt;filter-class&gt;filter.PreencheListaSessao&lt;/filter-class&gt; &lt;/filter&gt; &lt;filter-mapping&gt; &lt;filter-name&gt;PreencheListaSessao&lt;/filter-name&gt; &lt;url-pattern&gt;/exibeCarrinho.jsp&lt;/url-pattern&gt; &lt;/filter-mapping&gt; &lt;/web-app&gt;

esse é o web.xml do meu projeto web, aliais o unico que encontrei aqui no eclipse.

obrigado pela ajuda.

Você só consegue injetar Stateless Session Beans em filters e listeners. Statefull não dá, já que filter e servlets não são thread-safe.

Não sabia que existia essa restrição… :slight_smile: Irira sugerir a ele utilizar DI + web.xml , mas provavelmente iria dar o mesmo erro…

Não sabia que existia essa restrição… :slight_smile: Irira sugerir a ele utilizar DI + web.xml , mas provavelmente iria dar o mesmo erro…[/quote]

Note bem que essa restrição é bem obvio. Afinal stateful mantém estado, porém como você quer manter estado em uma instância compartilhada entre threads.

Quanto a usar um Stateful em um serlvet ou filter, você pode fazer um lookup manual via JNDI, porém use isso apenas dentro do método e nunca deixe a instância na classe, pois assim você irá deixar uma única instância para todo mundo e também o EJB nunca irá ser “passivado”.

Na verdade você quis dizer statefull…

Concordo, além de ser inseguro e ter o ciclo de vida gerenciado pelo cliente ele nunca será passivado…

:oops: hehe, é mesmo. Já fiz a correção.

intendi… e se eu deixasse essa instancia do session bean na sessão do usuario, depois pegasse na sessão? rolaria?

eu cabei de chegar na empresa e vi as respostas (agradeço por todas) só agora, ainda não testei, vou fazer o teste, deixar um getter pro innitialContext e caso o atributo não exista na sessão ele usa o getter.

obrigado a todos, depois volto aqui para dizer se deu certo… :wink:

pessoal, mudei o meu CarrinhoBean para stateless, porém continua dando o mesmo erro…

iniciando o JBOSS em modo debug botei um ponto para parar na parte onde tenta obter a referencia ao EJB, e percebi que o meu objeto SessionContext (com a anotação @Resource) está nulo… eu estou fazendo alguma coisa errada?

Está…

@Resource é para ser usado em um componente de negócio, não em um componente web… Se quiser trabalhar com lookup obtenha uma conexão com a JNDI ( InitialContext ) e através dela faça o seu lookup…

Testa aí…

Está…

@Resource é para ser usado em um componente de negócio, não em um componente web… Se quiser trabalhar com lookup obtenha uma conexão com a JNDI ( InitialContext ) e através dela faça o seu lookup…

Testa aí…[/quote]

quer dizer que eu não posso injetar um EJB stateless numa servlet também?

eu alterei a servlet e criei uma classe para popular o carrinho e retornar o objeto para a servlet, ficou desse jeito:

[code]package model;

import javax.annotation.Resource;
import javax.ejb.EJB;
import javax.ejb.SessionContext;

import ejb.interfaces.CarrinhoLocal;

@EJB(name=“carrinhoCompras”, beanInterface=CarrinhoLocal.class, beanName=“CarrinhoBean”)
public class TesteBO {

private CarrinhoLocal carrinho;

@Resource
private SessionContext ejbContext;

public TesteBO(){
	Object o =  ejbContext.lookup("carrinhoCompras");
	if (o instanceof CarrinhoLocal)
		carrinho = (CarrinhoLocal) o;
	else{
		System.out.println("tipo: "+o.getClass().getName());
		System.out.println(o.toString());
	}
}

public CarrinhoLocal getCarrinho() {
	return carrinho;
}

}
[/code]

e a minha servlet mudei para isso:

[code]package filter;

import java.io.IOException;

import javax.annotation.Resource;
import javax.ejb.EJB;
import javax.ejb.SessionContext;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import model.TesteBO;

import ejb.interfaces.CarrinhoLocal;

/**

  • Servlet Filter implementation class PreencheListaNaMemoria
    */
    public class PreencheListaSessao implements Filter {

    private CarrinhoLocal carrinho;

    public PreencheListaSessao() {
    carrinho = new TesteBO().getCarrinho();
    }

    public void destroy() {

    }

    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {

     HttpServletRequest req = (HttpServletRequest) request;
     HttpSession session = req.getSession();
     
     Object o = session.getAttribute("carrinho");
     
     if (o == null){
     	carrinho = new TesteBO().getCarrinho();
     	System.out.println("inserindo o carrinho na sessão");
     	session.setAttribute("carrinho", carrinho);
     }
     
     chain.doFilter(request, response);
    

    }

    public void init(FilterConfig fConfig) throws ServletException {

    }

}
[/code]

o erro persiste aquele mesmo, mais alguma sugestão?

a claro, obrigado pelo help.

Não, você pode sim…

Achei seu código um pouco estranho, não é legal instanciar objetos no “braço” quando se trabalha com componentes de negócio…

Persiste pois sua classe TesteBO é uma classe java comum, o container não irá injetar dependências nela, a não ser que você a marque como um componente de negócio(stateless,statefull…), e o container tbm não irá injetar depedencias em componentes WEB, ele pode no máximo injetar um EJB na sua variável, você apenas trocou seu problema de lugar, de um componente WEB para uma classe java comum…

Se quiser trabalhar com o lookup tente fazer da forma que te falei, procure pelo InitialContext() …

Abraços…

Você PODE injetar stateless, mas NAO pode injetar stateful.

Não, você pode sim…

Achei seu código um pouco estranho, não é legal instanciar objetos no “braço” quando se trabalha com componentes de negócio…

Persiste pois sua classe TesteBO é uma classe java comum, o container não irá injetar dependências nela, a não ser que você a marque como um componente de negócio(stateless,statefull…), e o container tbm não irá injetar depedencias em componentes WEB, ele pode no máximo injetar um EJB na sua variável, você apenas trocou seu problema de lugar, de um componente WEB para uma classe java comum…

Se quiser trabalhar com o lookup tente fazer da forma que te falei, procure pelo InitialContext() …

Abraços…

[/quote]

então cara… tentei injetar o EJB na variavel, deixei assim:

@EJB(name="carrinhoCompras", beanInterface=CarrinhoLocal.class, beanName="CarrinhoBean")
public class TesteBO {
	
	@EJB
	private CarrinhoLocal carrinho;
...

a variavel estava nula, foi repassada para o servlet ainda estava nula, por isso não melhorei muito ainda…

eu procurei marcar a classe com um @Stateless, conforme você disse, mas não mudou muit coisa, tentei destes 2 jeitos:

[code]
@EJB(name=“carrinhoCompras”, beanInterface=CarrinhoLocal.class, beanName=“CarrinhoBean”)
@Stateless
public class TesteBO {

@EJB
private CarrinhoLocal carrinho;

…[/code]

e

[code]
@EJB(name=“carrinhoCompras”, beanInterface=CarrinhoLocal.class, beanName=“CarrinhoBean”)
@Stateless
public class TesteBO {

@EJB
private CarrinhoLocal carrinho;

@Resource
private SessionContext ejbContext;

public TesteBO(){
	
	if (ejbContext == null){
		System.out.println("ejbContext ta nulo");
	}
	
	Object o =  ejbContext.lookup("carrinhoCompras");
	
	if (o == null){
		System.out.println("carrinho ta nulo");
	}
	
	if (o instanceof CarrinhoLocal)
		carrinho = (CarrinhoLocal) o;
	else{
		System.out.println("tipo: "+o.getClass().getName());
		System.out.println(o.toString());
	}
}
[/code]

onde o meu SessionContext esta nulo…

eu não quero trabalhar com InnitialContext, preencher o properties na mão, com informações que dependem de container para container…etc, eu to tentando fazer com que o container monte o objeto para mim, ou o sessionContext, ou o EJB em si… não to conseguindo, mesmo só tendo um session bean implementando a interface em questão…

alguma dica?

Primeiramente, recomendo que você leia algum material bacana antes de sair programando…Este livro que está na sua assinatura é um bom exemplo…

Você está misturando um pouco alguns conceitos: Injeção de dependência com lookup em EJBContext, O que se pode utilizar dentro de um componente WEB com o que se pode utilizar em um componente de negócio… Mas tranquilo, vou tentar te ajudar…

Ok, mantenha como Stateless…

 @Resource  
 private SessionContext ejbContext;  

Como já tinha te falado, isto sempre virá null em um componente WEB, se vier nulo em um componente de negócio provavelmente deve ter ocorrido algum erro na subida da sua aplicação…

Este tipo de interface(SessionContext ou EJBContext) não é utilizada em componentes de negócio para recuperar outros EJBs(utiliza-se apenas @EJB, mas nada te impede de utilizar SessionContext), geralmente ela é utilizada para outros tipos de serviço(Temporização,Segurança programática,Serviços de gerencia de Transação,etc…)

Existem várias formas de se fazer…Já que não quer trabalhar com InitialContext você pode colocar declarações no web.xml para o container injetar a dependência para você…

Tente colocar isto no seu web.xml e verifique se a variável carrinho continua nula:

<ejb-local-ref>
    <ejb-ref-name>Isto depende do container e de como você empacota seus arquivos (EAR,WAR + JAR) a princípio teste assim: CarrinhoBean/local se tiver um EAR pode ser assim: NomeDoMeuEAR/CarrinhoBean/local</ejb-ref-name>
    <local>coloque aqui o nome totalmente qualificado da sua interface local</local>
    <injection-target>
        <injection-target-class>coloque aqui o nome totalmente qualificado da sua classe TesteBO ou da classe PreencheListaSessao ou do seu servlet, lembrando que aqui deve vir uma classe que não seja um componente de negócio... </injection-target-class>
        <injection-target-name>coloque aqui o nome da sua variável de instância onde o container irá injetar o EJB, no caso carrinho</injection-target-name>
    </injection-target>
</ejb-local-ref>

Teste desta forma, se não funcionar poste o erro para que possamos te ajudar…

Existem outras alternativas que não precisam de lookup, nem de declarações no web.xml…Uma delas seria o Jboss Seam(só que no caso seu controller é o JSF, não sei se é do seu agrado…)

Boa sorte…

duplicou…aff…

Primeiramente, recomendo que você leia algum material bacana antes de sair programando…Este livro que está na sua assinatura é um bom exemplo…

Você está misturando um pouco alguns conceitos: Injeção de dependência com lookup em EJBContext, O que se pode utilizar dentro de um componente WEB com o que se pode utilizar em um componente de negócio… Mas tranquilo, vou tentar te ajudar…

Ok, mantenha como Stateless…

 @Resource  
 private SessionContext ejbContext;  

Como já tinha te falado, isto sempre virá null em um componente WEB, se vier nulo em um componente de negócio provavelmente deve ter ocorrido algum erro na subida da sua aplicação…

Este tipo de interface(SessionContext ou EJBContext) não é utilizada em componentes de negócio para recuperar outros EJBs(utiliza-se apenas @EJB, mas nada te impede de utilizar SessionContext), geralmente ela é utilizada para outros tipos de serviço(Temporização,Segurança programática,Serviços de gerencia de Transação,etc…)

Existem várias formas de se fazer…Já que não quer trabalhar com InitialContext você pode colocar declarações no web.xml para o container injetar a dependência para você…

Tente colocar isto no seu web.xml e verifique se a variável carrinho continua nula:

<ejb-local-ref>
    <ejb-ref-name>Isto depende do container e de como você empacota seus arquivos (EAR,WAR + JAR) a princípio teste assim: CarrinhoBean/local se tiver um EAR pode ser assim: NomeDoMeuEAR/CarrinhoBean/local</ejb-ref-name>
    <local>coloque aqui o nome totalmente qualificado da sua interface local</local>
    <injection-target>
        <injection-target-class>coloque aqui o nome totalmente qualificado da sua classe TesteBO ou da classe PreencheListaSessao ou do seu servlet, lembrando que aqui deve vir uma classe que não seja um componente de negócio... </injection-target-class>
        <injection-target-name>coloque aqui o nome da sua variável de instância onde o container irá injetar o EJB, no caso carrinho</injection-target-name>
    </injection-target>
</ejb-local-ref>

Teste desta forma, se não funcionar poste o erro para que possamos te ajudar…

Existem outras alternativas que não precisam de lookup, nem de declarações no web.xml…Uma delas seria o Jboss Seam(só que no caso seu controller é o JSF, não sei se é do seu agrado…)

Boa sorte…[/quote]

primeiro obrigado ai, to te dando mó trabalho…rs

bom… continuando, eu não to usando o JSF, é só um projetinho que seria de exemplo, bem pra teste mesmo de EJB, só to usando uma servlet como se fosse o meu controler, imaginando que quero injetar o EJB que seria o meu modelo, até pra não fugir muito do padrão… enfim, se estou errando em algo quanto a essa parte de camadas fico até grato em me avisar aonde, mesmo que a minha duvida seja quanto ao EJB, em como injeta-lo, isso faz parte…

enfim, eu estava querendo injeta-lo, só pelas anotações mesmo, quero fugir do XML… a menos que não seja possivel isso, é claro… não vi nenhum problema descrito na inicilização do JBOSS, exceto é claro o null pointer que dava por que o objeto anotado com @EJB estava nulo, ou por que o meu objeto apontado com o SessionResource estava nulo, não vi nada no log printado do JBOSS que dissesse o por que destes objetos não terem sido inicializados, tem como olhar minha classe e meu log para ver se tem alguma coisa que eu não percebi? (obrigado denovo…)

@EJB(name="carrinhoCompras", beanInterface=CarrinhoLocal.class, beanName="CarrinhoBean")
@Stateless
public class TesteBO {
	
	@EJB
	private CarrinhoLocal carrinho;

	@Resource
	private SessionContext ejbContext;
	
	public TesteBO(){
		
		if (ejbContext == null){
			System.out.println("ejbContext ta nulo");
		}
		
		//nem botei num else daqui para baixo para pegar o stack trace
		Object o =  ejbContext.lookup("carrinhoCompras");
		
		if (o == null){
			System.out.println("carrinho ta nulo");
		}
		
    	if (o instanceof CarrinhoLocal)
    		carrinho = (CarrinhoLocal) o;
    	else{
    		System.out.println("tipo: "+o.getClass().getName());
    		System.out.println(o.toString());
    	}
	}
	
	public CarrinhoLocal getCarrinho() {
		return carrinho;
	}
	
}

[code]14:54:28,765 INFO [ServerImpl] Starting JBoss (Microcontainer)…
14:54:28,765 INFO [ServerImpl] Release ID: JBoss [The Oracle] 5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221634)
14:54:28,765 INFO [ServerImpl] Bootstrap URL: null
14:54:28,765 INFO [ServerImpl] Home Dir: C:\FLAVIO\DESENV\jboss-5.1.0.GA
14:54:28,765 INFO [ServerImpl] Home URL: file:/C:/FLAVIO/DESENV/jboss-5.1.0.GA/
14:54:28,765 INFO [ServerImpl] Library URL: file:/C:/FLAVIO/DESENV/jboss-5.1.0.GA/lib/
14:54:28,765 INFO [ServerImpl] Patch URL: null
14:54:28,781 INFO [ServerImpl] Common Base URL: file:/C:/FLAVIO/DESENV/jboss-5.1.0.GA/common/
14:54:28,781 INFO [ServerImpl] Common Library URL: file:/C:/FLAVIO/DESENV/jboss-5.1.0.GA/common/lib/
14:54:28,781 INFO [ServerImpl] Server Name: default
14:54:28,781 INFO [ServerImpl] Server Base Dir: C:\FLAVIO\DESENV\jboss-5.1.0.GA\server
14:54:28,781 INFO [ServerImpl] Server Base URL: file:/C:/FLAVIO/DESENV/jboss-5.1.0.GA/server/
14:54:28,781 INFO [ServerImpl] Server Config URL: file:/C:/FLAVIO/DESENV/jboss-5.1.0.GA/server/default/conf/
14:54:28,781 INFO [ServerImpl] Server Home Dir: C:\FLAVIO\DESENV\jboss-5.1.0.GA\server\default
14:54:28,781 INFO [ServerImpl] Server Home URL: file:/C:/FLAVIO/DESENV/jboss-5.1.0.GA/server/default/
14:54:28,781 INFO [ServerImpl] Server Data Dir: C:\FLAVIO\DESENV\jboss-5.1.0.GA\server\default\data
14:54:28,781 INFO [ServerImpl] Server Library URL: file:/C:/FLAVIO/DESENV/jboss-5.1.0.GA/server/default/lib/
14:54:28,781 INFO [ServerImpl] Server Log Dir: C:\FLAVIO\DESENV\jboss-5.1.0.GA\server\default\log
14:54:28,781 INFO [ServerImpl] Server Native Dir: C:\FLAVIO\DESENV\jboss-5.1.0.GA\server\default\tmp\native
14:54:28,781 INFO [ServerImpl] Server Temp Dir: C:\FLAVIO\DESENV\jboss-5.1.0.GA\server\default\tmp
14:54:28,781 INFO [ServerImpl] Server Temp Deploy Dir: C:\FLAVIO\DESENV\jboss-5.1.0.GA\server\default\tmp\deploy
14:54:29,843 INFO [ServerImpl] Starting Microcontainer, bootstrapURL=file:/C:/FLAVIO/DESENV/jboss-5.1.0.GA/server/default/conf/bootstrap.xml
14:54:30,828 INFO [VFSCacheFactory] Initializing VFSCache [org.jboss.virtual.plugins.cache.CombinedVFSCache]
14:54:30,828 INFO [VFSCacheFactory] Using VFSCache [CombinedVFSCache[real-cache: null]]
14:54:31,156 INFO [CopyMechanism] VFS temp dir: C:\FLAVIO\DESENV\jboss-5.1.0.GA\server\default\tmp
14:54:31,156 INFO [ZipEntryContext] VFS force nested jars copy-mode is enabled.
14:54:32,703 INFO [ServerInfo] Java version: 1.6.0_07,Sun Microsystems Inc.
14:54:32,703 INFO [ServerInfo] Java Runtime: Java™ SE Runtime Environment (build 1.6.0_07-b06)
14:54:32,703 INFO [ServerInfo] Java VM: Java HotSpot™ Client VM 10.0-b23,Sun Microsystems Inc.
14:54:32,703 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
14:54:32,703 INFO [ServerInfo] VM arguments: -Dprogram.name=run.bat -Xms128m -Xmx512m -XX:MaxPermSize=256m -Dfile.encoding=Cp1252
14:54:32,765 INFO [JMXKernel] Legacy JMX core initialized
14:54:34,671 INFO [ProfileServiceBootstrap] Loading profile: ProfileKey@1f85a86[domain=default, server=default, name=default]
14:54:37,015 INFO [WebService] Using RMI server codebase: http://127.0.0.1:8083/
14:54:44,703 INFO [NativeServerConfig] JBoss Web Services - Stack Native Core
14:54:44,703 INFO [NativeServerConfig] 3.1.2.GA
14:54:45,328 INFO [AttributeCallbackItem] Owner callback not implemented.
14:54:46,718 INFO [LogNotificationListener] Adding notification listener for logging mbean “jboss.system:service=Logging,type=Log4jService” to server org.jboss.mx.server.MBeanServerImpl@18bbb61[ defaultDomain=‘jboss’ ]
14:55:04,594 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@21397885{vfsfile:/C:/FLAVIO/DESENV/jboss-5.1.0.GA/server/default/deploy/profileservice-secured.jar/}
14:55:04,594 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@21397885{vfsfile:/C:/FLAVIO/DESENV/jboss-5.1.0.GA/server/default/deploy/profileservice-secured.jar/}
14:55:04,594 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@21397885{vfsfile:/C:/FLAVIO/DESENV/jboss-5.1.0.GA/server/default/deploy/profileservice-secured.jar/}
14:55:04,594 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@21397885{vfsfile:/C:/FLAVIO/DESENV/jboss-5.1.0.GA/server/default/deploy/profileservice-secured.jar/}
14:55:04,609 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@27860804{vfszip:/C:/FLAVIO/DESENV/jboss-5.1.0.GA/server/default/deploy/CarrinhoEar.ear/CarrinhoDeCompras.jar/}
14:55:04,609 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@27860804{vfszip:/C:/FLAVIO/DESENV/jboss-5.1.0.GA/server/default/deploy/CarrinhoEar.ear/CarrinhoDeCompras.jar/}
14:55:08,094 INFO [JMXConnectorServerService] JMX Connector server: service:jmx:rmi://127.0.0.1/jndi/rmi://127.0.0.1:1090/jmxconnector
14:55:08,281 INFO [MailService] Mail Service bound to java:/Mail
14:55:11,344 WARN [JBossASSecurityMetadataStore] WARNING! POTENTIAL SECURITY RISK. It has been detected that the MessageSucker component which sucks messages from one node to another has not had its password changed from the installation default. Please see the JBoss Messaging user guide for instructions on how to do this.
14:55:11,359 WARN [AnnotationCreator] No ClassLoader provided, using TCCL: org.jboss.managed.api.annotation.ManagementComponent
14:55:11,484 WARN [AnnotationCreator] No ClassLoader provided, using TCCL: org.jboss.managed.api.annotation.ManagementComponent
14:55:11,562 INFO [TransactionManagerService] JBossTS Transaction Service (JTA version - tag:JBOSSTS_4_6_1_GA) - JBoss Inc.
14:55:11,562 INFO [TransactionManagerService] Setting up property manager MBean and JMX layer
14:55:11,859 INFO [TransactionManagerService] Initializing recovery manager
14:55:12,062 INFO [TransactionManagerService] Recovery manager configured
14:55:12,062 INFO [TransactionManagerService] Binding TransactionManager JNDI Reference
14:55:12,109 INFO [TransactionManagerService] Starting transaction recovery manager
14:55:12,734 INFO [AprLifecycleListener] The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Arquivos de programas\Java\jdk1.6.0_07\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Arquivos de programas/Java/jdk1.6.0_07/bin/…/jre/bin/client;C:/Arquivos de programas/Java/jdk1.6.0_07/bin/…/jre/bin;C:\Arquivos de programas\Java\jdk1.6.0_07\bin;C:\oracle\ora92\bin;C:\Arquivos de programas\Oracle\jre\1.3.1\bin;C:\Arquivos de programas\Oracle\jre\1.1.8\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Arquivos de programas\Intel\DMIX;C:\Arquivos de programas\MySQL\MySQL Server 5.0\bin;C:\cygwin\bin;C:\Arquivos de programas\Arquivos comuns\Ahead\Lib
14:55:12,797 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-127.0.0.1-8080
14:55:12,797 INFO [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-127.0.0.1-8009
14:55:12,828 INFO [StandardService] Starting service jboss.web
14:55:12,828 INFO [StandardEngine] Starting Servlet Engine: JBoss Web/2.1.3.GA
14:55:12,891 INFO [Catalina] Server startup in 97 ms
14:55:12,922 INFO [TomcatDeployment] deploy, ctxPath=/web-console
14:55:14,500 INFO [TomcatDeployment] deploy, ctxPath=/invoker
14:55:14,562 INFO [TomcatDeployment] deploy, ctxPath=/jbossws
14:55:14,687 INFO [RARDeployment] Required license terms exist, view vfszip:/C:/FLAVIO/DESENV/jboss-5.1.0.GA/server/default/deploy/jboss-local-jdbc.rar/META-INF/ra.xml
14:55:14,703 INFO [RARDeployment] Required license terms exist, view vfszip:/C:/FLAVIO/DESENV/jboss-5.1.0.GA/server/default/deploy/jboss-xa-jdbc.rar/META-INF/ra.xml
14:55:14,734 INFO [RARDeployment] Required license terms exist, view vfszip:/C:/FLAVIO/DESENV/jboss-5.1.0.GA/server/default/deploy/jms-ra.rar/META-INF/ra.xml
14:55:14,750 INFO [RARDeployment] Required license terms exist, view vfszip:/C:/FLAVIO/DESENV/jboss-5.1.0.GA/server/default/deploy/mail-ra.rar/META-INF/ra.xml
14:55:14,797 INFO [RARDeployment] Required license terms exist, view vfszip:/C:/FLAVIO/DESENV/jboss-5.1.0.GA/server/default/deploy/quartz-ra.rar/META-INF/ra.xml
14:55:14,922 INFO [SimpleThreadPool] Job execution threads will use class loader of thread: main
14:55:14,937 INFO [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
14:55:14,953 INFO [RAMJobStore] RAMJobStore initialized.
14:55:14,953 INFO [StdSchedulerFactory] Quartz scheduler ‘DefaultQuartzScheduler’ initialized from default resource file in Quartz package: 'quartz.properties’
14:55:14,953 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2
14:55:14,953 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
14:55:15,766 INFO [ConnectionFactoryBindingService] Bound ConnectionManager ‘jboss.jca:service=DataSourceBinding,name=DefaultDS’ to JNDI name 'java:DefaultDS’
14:55:17,922 INFO [ServerPeer] JBoss Messaging 1.4.3.GA server [0] started
14:55:18,125 INFO [QueueService] Queue[/queue/ExpiryQueue] started, fullSize=200000, pageSize=2000, downCacheSize=2000
14:55:18,281 INFO [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has leasing enabled, lease period 10000 milliseconds
14:55:18,281 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@bcd1f4 started
14:55:18,281 INFO [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has leasing enabled, lease period 10000 milliseconds
14:55:18,281 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@c7e52b started
14:55:18,281 INFO [QueueService] Queue[/queue/DLQ] started, fullSize=200000, pageSize=2000, downCacheSize=2000
14:55:18,281 INFO [ConnectionFactoryJNDIMapper] supportsFailover attribute is true on connection factory: jboss.messaging.connectionfactory:service=ClusteredConnectionFactory but post office is non clustered. So connection factory will not support failover
14:55:18,281 INFO [ConnectionFactoryJNDIMapper] supportsLoadBalancing attribute is true on connection factory: jboss.messaging.connectionfactory:service=ClusteredConnectionFactory but post office is non clustered. So connection factory will not support load balancing
14:55:18,281 INFO [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has leasing enabled, lease period 10000 milliseconds
14:55:18,281 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@1aaf4e5 started
14:55:18,469 INFO [ConnectionFactoryBindingService] Bound ConnectionManager ‘jboss.jca:service=ConnectionFactoryBinding,name=JmsXA’ to JNDI name 'java:JmsXA’
14:55:18,969 INFO [JBossASKernel] Created KernelDeployment for: profileservice-secured.jar
14:55:18,984 INFO [JBossASKernel] installing bean: jboss.j2ee:jar=profileservice-secured.jar,name=SecureProfileService,service=EJB3
14:55:18,984 INFO [JBossASKernel] with dependencies:
14:55:18,984 INFO [JBossASKernel] and demands:
14:55:18,984 INFO [JBossASKernel] jndi:SecureManagementView/remote-org.jboss.deployers.spi.management.ManagementView
14:55:18,984 INFO [JBossASKernel] jboss.ejb:service=EJBTimerService
14:55:18,984 INFO [JBossASKernel] and supplies:
14:55:18,984 INFO [JBossASKernel] Class:org.jboss.profileservice.spi.ProfileService
14:55:18,984 INFO [JBossASKernel] jndi:SecureProfileService/remote
14:55:18,984 INFO [JBossASKernel] jndi:SecureProfileService/remote-org.jboss.profileservice.spi.ProfileService
14:55:18,984 INFO [JBossASKernel] Added bean(jboss.j2ee:jar=profileservice-secured.jar,name=SecureProfileService,service=EJB3) to KernelDeployment of: profileservice-secured.jar
14:55:18,984 INFO [JBossASKernel] installing bean: jboss.j2ee:jar=profileservice-secured.jar,name=SecureDeploymentManager,service=EJB3
14:55:18,984 INFO [JBossASKernel] with dependencies:
14:55:18,984 INFO [JBossASKernel] and demands:
14:55:18,984 INFO [JBossASKernel] jboss.ejb:service=EJBTimerService
14:55:18,984 INFO [JBossASKernel] and supplies:
14:55:18,984 INFO [JBossASKernel] jndi:SecureDeploymentManager/remote-org.jboss.deployers.spi.management.deploy.DeploymentManager
14:55:18,984 INFO [JBossASKernel] Class:org.jboss.deployers.spi.management.deploy.DeploymentManager
14:55:18,984 INFO [JBossASKernel] jndi:SecureDeploymentManager/remote
14:55:18,984 INFO [JBossASKernel] Added bean(jboss.j2ee:jar=profileservice-secured.jar,name=SecureDeploymentManager,service=EJB3) to KernelDeployment of: profileservice-secured.jar
14:55:18,984 INFO [JBossASKernel] installing bean: jboss.j2ee:jar=profileservice-secured.jar,name=SecureManagementView,service=EJB3
14:55:18,984 INFO [JBossASKernel] with dependencies:
14:55:18,984 INFO [JBossASKernel] and demands:
14:55:18,984 INFO [JBossASKernel] jboss.ejb:service=EJBTimerService
14:55:18,984 INFO [JBossASKernel] and supplies:
14:55:18,984 INFO [JBossASKernel] jndi:SecureManagementView/remote-org.jboss.deployers.spi.management.ManagementView
14:55:18,984 INFO [JBossASKernel] Class:org.jboss.deployers.spi.management.ManagementView
14:55:18,984 INFO [JBossASKernel] jndi:SecureManagementView/remote
14:55:18,984 INFO [JBossASKernel] Added bean(jboss.j2ee:jar=profileservice-secured.jar,name=SecureManagementView,service=EJB3) to KernelDeployment of: profileservice-secured.jar
14:55:18,984 INFO [EJB3EndpointDeployer] Deploy AbstractBeanMetaData@97d017{name=jboss.j2ee:jar=profileservice-secured.jar,name=SecureProfileService,service=EJB3_endpoint bean=org.jboss.ejb3.endpoint.deployers.impl.EndpointImpl properties=[container] constructor=null autowireCandidate=true}
14:55:18,984 INFO [EJB3EndpointDeployer] Deploy AbstractBeanMetaData@6aaa6d{name=jboss.j2ee:jar=profileservice-secured.jar,name=SecureDeploymentManager,service=EJB3_endpoint bean=org.jboss.ejb3.endpoint.deployers.impl.EndpointImpl properties=[container] constructor=null autowireCandidate=true}
14:55:18,984 INFO [EJB3EndpointDeployer] Deploy AbstractBeanMetaData@1b8a8c6{name=jboss.j2ee:jar=profileservice-secured.jar,name=SecureManagementView,service=EJB3_endpoint bean=org.jboss.ejb3.endpoint.deployers.impl.EndpointImpl properties=[container] constructor=null autowireCandidate=true}
14:55:19,141 INFO [SessionSpecContainer] Starting jboss.j2ee:jar=profileservice-secured.jar,name=SecureDeploymentManager,service=EJB3
14:55:19,141 INFO [EJBContainer] STARTED EJB: org.jboss.profileservice.ejb.SecureDeploymentManager ejbName: SecureDeploymentManager
14:55:19,203 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:

SecureDeploymentManager/remote - EJB3.x Default Remote Business Interface
SecureDeploymentManager/remote-org.jboss.deployers.spi.management.deploy.DeploymentManager - EJB3.x Remote Business Interface

14:55:19,313 INFO [SessionSpecContainer] Starting jboss.j2ee:jar=profileservice-secured.jar,name=SecureManagementView,service=EJB3
14:55:19,313 INFO [EJBContainer] STARTED EJB: org.jboss.profileservice.ejb.SecureManagementView ejbName: SecureManagementView
14:55:19,328 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:

SecureManagementView/remote - EJB3.x Default Remote Business Interface
SecureManagementView/remote-org.jboss.deployers.spi.management.ManagementView - EJB3.x Remote Business Interface

14:55:19,391 INFO [SessionSpecContainer] Starting jboss.j2ee:jar=profileservice-secured.jar,name=SecureProfileService,service=EJB3
14:55:19,391 INFO [EJBContainer] STARTED EJB: org.jboss.profileservice.ejb.SecureProfileServiceBean ejbName: SecureProfileService
14:55:19,406 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:

SecureProfileService/remote - EJB3.x Default Remote Business Interface
SecureProfileService/remote-org.jboss.profileservice.spi.ProfileService - EJB3.x Remote Business Interface

14:55:19,547 INFO [TomcatDeployment] deploy, ctxPath=/admin-console
14:55:19,625 INFO [config] Initializing Mojarra (1.2_12-b01-FCS) for context '/admin-console’
14:55:23,969 INFO [TomcatDeployment] deploy, ctxPath=/
14:55:24,078 INFO [TomcatDeployment] deploy, ctxPath=/jmx-console
14:55:24,156 INFO [JBossASKernel] Created KernelDeployment for: CarrinhoDeCompras.jar
14:55:24,156 INFO [JBossASKernel] installing bean: jboss.j2ee:ear=CarrinhoEar.ear,jar=CarrinhoDeCompras.jar,name=CarrinhoBean,service=EJB3
14:55:24,156 INFO [JBossASKernel] with dependencies:
14:55:24,156 INFO [JBossASKernel] and demands:
14:55:24,156 INFO [JBossASKernel] jboss.ejb:service=EJBTimerService
14:55:24,156 INFO [JBossASKernel] and supplies:
14:55:24,156 INFO [JBossASKernel] jndi:CarrinhoEar/CarrinhoBean/local-ejb.interfaces.CarrinhoLocal
14:55:24,156 INFO [JBossASKernel] jndi:CarrinhoEar/CarrinhoBean/local
14:55:24,156 INFO [JBossASKernel] Class:ejb.interfaces.CarrinhoLocal
14:55:24,156 INFO [JBossASKernel] jndi:CarrinhoEar/CarrinhoBean/remote
14:55:24,156 INFO [JBossASKernel] Added bean(jboss.j2ee:ear=CarrinhoEar.ear,jar=CarrinhoDeCompras.jar,name=CarrinhoBean,service=EJB3) to KernelDeployment of: CarrinhoDeCompras.jar
14:55:24,156 INFO [JBossASKernel] installing bean: jboss.j2ee:ear=CarrinhoEar.ear,jar=CarrinhoDeCompras.jar,name=FinalizarCompraBean,service=EJB3
14:55:24,156 INFO [JBossASKernel] with dependencies:
14:55:24,156 INFO [JBossASKernel] and demands:
14:55:24,156 INFO [JBossASKernel] jndi:CarrinhoEar/CarrinhoBean/local-ejb.interfaces.CarrinhoLocal
14:55:24,156 INFO [JBossASKernel] jboss.ejb:service=EJBTimerService
14:55:24,156 INFO [JBossASKernel] and supplies:
14:55:24,156 INFO [JBossASKernel] jndi:CarrinhoEar/FinalizarCompraBean/local-ejb.interfaces.FinalizarCompraLocal
14:55:24,156 INFO [JBossASKernel] jndi:CarrinhoEar/FinalizarCompraBean/remote
14:55:24,156 INFO [JBossASKernel] jndi:CarrinhoEar/FinalizarCompraBean/local
14:55:24,156 INFO [JBossASKernel] Class:ejb.interfaces.FinalizarCompraLocal
14:55:24,156 INFO [JBossASKernel] Added bean(jboss.j2ee:ear=CarrinhoEar.ear,jar=CarrinhoDeCompras.jar,name=FinalizarCompraBean,service=EJB3) to KernelDeployment of: CarrinhoDeCompras.jar
14:55:24,156 INFO [EJB3EndpointDeployer] Deploy AbstractBeanMetaData@1475cbd{name=jboss.j2ee:ear=CarrinhoEar.ear,jar=CarrinhoDeCompras.jar,name=CarrinhoBean,service=EJB3_endpoint bean=org.jboss.ejb3.endpoint.deployers.impl.EndpointImpl properties=[container] constructor=null autowireCandidate=true}
14:55:24,156 INFO [EJB3EndpointDeployer] Deploy AbstractBeanMetaData@174f6c8{name=jboss.j2ee:ear=CarrinhoEar.ear,jar=CarrinhoDeCompras.jar,name=FinalizarCompraBean,service=EJB3_endpoint bean=org.jboss.ejb3.endpoint.deployers.impl.EndpointImpl properties=[container] constructor=null autowireCandidate=true}
14:55:24,219 INFO [SessionSpecContainer] Starting jboss.j2ee:ear=CarrinhoEar.ear,jar=CarrinhoDeCompras.jar,name=CarrinhoBean,service=EJB3
14:55:24,219 INFO [EJBContainer] STARTED EJB: ejb.sessionBeans.local.CarrinhoBean ejbName: CarrinhoBean
14:55:24,234 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:

carrinhoCompras - EJB3.x Default Local Business Interface
CarrinhoEar/CarrinhoBean/local-ejb.interfaces.CarrinhoLocal - EJB3.x Local Business Interface

14:55:24,297 INFO [SessionSpecContainer] Starting jboss.j2ee:ear=CarrinhoEar.ear,jar=CarrinhoDeCompras.jar,name=FinalizarCompraBean,service=EJB3
14:55:24,297 INFO [EJBContainer] STARTED EJB: ejb.sessionBeans.local.FinalizarCompraBean ejbName: FinalizarCompraBean
14:55:24,297 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:

finalizarCompra - EJB3.x Default Local Business Interface
CarrinhoEar/FinalizarCompraBean/local-ejb.interfaces.FinalizarCompraLocal - EJB3.x Local Business Interface

14:55:25,250 INFO [TomcatDeployment] deploy, ctxPath=/AppComCarrinho
14:55:25,344 INFO [STDOUT] obtendo carrinho
14:55:25,344 INFO [STDOUT] ejbContext ta nulo
14:55:25,344 ERROR [[/AppComCarrinho]] Exception starting filter PreencheListaSessao
java.lang.NullPointerException
at model.TesteBO.(TesteBO.java:27)
at filter.PreencheListaSessao.(PreencheListaSessao.java:30)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at org.jboss.web.tomcat.service.TomcatInjectionContainer.newInstance(TomcatInjectionContainer.java:264)
at org.jboss.web.tomcat.service.TomcatInjectionContainer.newInstance(TomcatInjectionContainer.java:256)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:220)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:332)
at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:90)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3783)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4413)
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
at $Proxy38.start(Unknown Source)
at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
at org.jboss.system.ServiceController.start(ServiceController.java:460)
at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
at org.jboss.Main.boot(Main.java:221)
at org.jboss.Main$1.run(Main.java:556)
at java.lang.Thread.run(Thread.java:619)
14:55:25,344 ERROR [StandardContext] Error filterStart
14:55:25,344 ERROR [StandardContext] Context [/AppComCarrinho] startup failed due to previous errors
14:55:25,344 ERROR [AbstractKernelController] Error installing to Start: name=jboss.web.deployment:war=/AppComCarrinho state=Create mode=Manual requiredState=Installed
org.jboss.deployers.spi.DeploymentException: URL file:/C:/FLAVIO/DESENV/jboss-5.1.0.GA/server/default/tmp/5c4o03j-oasj49-g7xl2edm-1-g7xl3kmw-9p/AppComCarrinho.war/ deployment failed
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:331)
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
at $Proxy38.start(Unknown Source)
at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
at org.jboss.system.ServiceController.start(ServiceController.java:460)
at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
at org.jboss.Main.boot(Main.java:221)
at org.jboss.Main$1.run(Main.java:556)
at java.lang.Thread.run(Thread.java:619)
14:55:25,594 INFO [SessionSpecContainer] Stopping jboss.j2ee:ear=CarrinhoEar.ear,jar=CarrinhoDeCompras.jar,name=FinalizarCompraBean,service=EJB3
14:55:25,609 INFO [EJBContainer] STOPPED EJB: ejb.sessionBeans.local.FinalizarCompraBean ejbName: FinalizarCompraBean
14:55:25,734 INFO [SessionSpecContainer] Stopping jboss.j2ee:ear=CarrinhoEar.ear,jar=CarrinhoDeCompras.jar,name=CarrinhoBean,service=EJB3
14:55:25,750 INFO [EJBContainer] STOPPED EJB: ejb.sessionBeans.local.CarrinhoBean ejbName: CarrinhoBean
14:55:25,797 ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/C:/FLAVIO/DESENV/jboss-5.1.0.GA/server/default/deploy/CarrinhoEar.ear/ state=PreReal mode=Manual requiredState=Real
org.jboss.deployers.spi.DeploymentException: URL file:/C:/FLAVIO/DESENV/jboss-5.1.0.GA/server/default/tmp/5c4o03j-oasj49-g7xl2edm-1-g7xl3kmw-9p/AppComCarrinho.war/ deployment failed
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:331)
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
at $Proxy38.start(Unknown Source)
at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
at org.jboss.system.ServiceController.start(ServiceController.java:460)
at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
at org.jboss.Main.boot(Main.java:221)
at org.jboss.Main$1.run(Main.java:556)
at java.lang.Thread.run(Thread.java:619)
14:55:25,828 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

DEPLOYMENTS IN ERROR:
Deployment “vfszip:/C:/FLAVIO/DESENV/jboss-5.1.0.GA/server/default/deploy/CarrinhoEar.ear/” is in error due to the following reason(s): org.jboss.deployers.spi.DeploymentException: URL file:/C:/FLAVIO/DESENV/jboss-5.1.0.GA/server/default/tmp/5c4o03j-oasj49-g7xl2edm-1-g7xl3kmw-9p/AppComCarrinho.war/ deployment failed

14:55:25,844 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
14:55:25,891 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
14:55:25,906 INFO [ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221634)] Started in 57s:125ms
[/code]

Em um componente WEB nunca testei com anotações sem as declarações no web.xml(se tiver um tempinho dou uma olhada quando chegar do trabalho), mas presumo que não é possível não, provavelmente o container vai ignorar… Mas pode ser que alguém aqui do fórum já tenha feito…enfim, é pesquisar e ir testando…

Como te falei você também pode tentar o Seam, ele integra EJB + JSF, sem InitialContext + lookup e sem delcarações no web.xml, mas já que seu projeto é apenas de teste tranquilo em não utiliza-lo…

Então, já tinha visto sua log, os pontos a se ter atenção são os mesmos:

  at model.TesteBO.<init>(TesteBO.java:27)  
  at filter.PreencheListaSessao.<init>(PreencheListaSessao.java:30)  

Eu mudaria sua lógica de:

Classe => PreencheListaSessao

     @Resource  
     private SessionContext ejbContext;  
       
     public PreencheListaSessao() {  
         Object o =  ejbContext.lookup("carrinhoCompras");  
         if (o instanceof CarrinhoLocal)  
             carrinho = (CarrinhoLocal) o;  
         else{  
             System.out.println("tipo: "+o.getClass().getName());  
             System.out.println(o.toString());  
         }  
     }  

Classe => TesteBO


     @EJB
     private CarrinhoLocal carrinho;  
   
     @Resource  
     private SessionContext ejbContext;  
      
     //Quando você cria um construtor é interessante deixar um default, para o container invocar ... public TesteBO(){} 
     public TesteBO(){  
           
         if (ejbContext == null){  
             System.out.println("ejbContext ta nulo");  
         }  
           
         //nem botei num else daqui para baixo para pegar o stack trace  
         Object o =  ejbContext.lookup("carrinhoCompras");  
           
         if (o == null){  
             System.out.println("carrinho ta nulo");  
         }  
           
         if (o instanceof CarrinhoLocal)  
             carrinho = (CarrinhoLocal) o;  
         else{  
             System.out.println("tipo: "+o.getClass().getName());  
             System.out.println(o.toString());  
         }  
     }  
       
     public CarrinhoLocal getCarrinho() {  
         return carrinho;  
     }  

para:

Classe => PreencheListaSessao

     @EJB
     private TesteLocal  teste;  
       
     public PreencheListaSessao() {  
          System.out.println("tipo: "+teste.getClass().getName());  
          System.out.println("Testando: "+teste.toString());  
     }  

     //No web.xml as declarações que postei no último tópico

Classe => TesteBO

 @Stateless  
 public class TesteBO implements TesteLocal {  
       
     @EJB  
     private CarrinhoLocal carrinho;  
   
     
     @PostConstruct   
     public void iniciando() {
      
          System.out.println("tipo: "+carrinho.getClass().getName());  
          System.out.println("Testando: "+carrinho.toString());  
          
     }     


  }

Em relação aos componentes de negócio, é interessante entrar no jmx-console e ir em JNDI View para ver se todos seus EJBs foram associados a JNDI com sucesso…