javax.el.PropertyNotFoundException:无法到达目标,标识符bean解析为null [英] javax.el.PropertyNotFoundException: Target Unreachable, identifier bean resolved to null

查看:94
本文介绍了javax.el.PropertyNotFoundException:无法到达目标,标识符bean解析为null的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试通过eclipse部署应用程序时会收到此错误消息,因为我通过weblogic控制台进行构建和安装软件包时,我的应用程序运行良好,但是每次我从eclipse部署应用程序时,服务器正常运行,但是当我尝试访问任何页面时都会收到此消息,如果有人可以帮助我,我将非常感谢.下面是我的服务器日志.

I'm getting this error message just when I try to deploy my application through eclipse as I do a build and install the packages by weblogic console my app works fine, but everytime I deploy my app from eclipse my server up normally but I get this message when I try access any page, please if someone can help me I will be really thankful. Below follows my server log.

我正在使用weblogic 12 C用于bean管理的CDI.

I'm using weblogic 12 C CDI for beans manage.

<04/12/2015 11h48min22s BRST> <Warning> <javax.enterprise.resource.webcontainer.jsf.lifecycle> <BEA-000000> <#{productUI.resetTelaConsulta}: javax.el.PropertyNotFoundException: web/src/main/webapp/WEB-INF/template/menu.xhtml @31,127 action="#{productUI.resetTelaConsulta}": Target Unreachable, identifier 'productUI' resolved to null
javax.faces.FacesException: #{productUI.resetTelaConsulta}: javax.el.PropertyNotFoundException:web/src/main/webapp/WEB-INF/template/menu.xhtml @31,127 action="#{productUI.resetTelaConsulta}": Target Unreachable, identifier 'productUI' resolved to null
    at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:117)
    at javax.faces.component.UICommand.broadcast(UICommand.java:315)
    at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:786)
    at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1251)
    at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
    Truncated. see log file for complete stacktrace
Caused By: javax.faces.el.EvaluationException: javax.el.PropertyNotFoundException: /web/src/main/webapp/WEB-INF/template/menu.xhtml @31,127 action="#{productUI.resetTelaConsulta}": Target Unreachable, identifier 'productUI' resolved to null
    at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:94)
    at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:101)
    at javax.faces.component.UICommand.broadcast(UICommand.java:315)
    at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:786)
    at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1251)
    Truncated. see log file for complete stacktrace
Caused By: javax.el.PropertyNotFoundException: /web/src/main/webapp/WEB-INF/template/menu.xhtml @31,127 action="#{productUI.resetTelaConsulta}": Target Unreachable, identifier 'productUI' resolved to null
    at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:107)
    at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:87)
    at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:101)
    at javax.faces.component.UICommand.broadcast(UICommand.java:315)
    at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:786)
    Truncated. see log file for complete stacktrac

ManageBean:

ManageBean:

/**
 * Managed-bean Product
 */
@Named
@SessionScoped
public class ProductUI extends AbstractUI {

    private static final long serialVersionUID = 3033815555702729279L;

    private static final String PRODUTO_CONSULTA = "/produto/produto_consulta.xhtml";


    @Inject
    private ProdutoCadastroUI produtoCadastroUI;
    @Inject
    private ProdutoOpcionalNovoUI produtoOpcionalNovoUI;

    /**
     * Construtor
     */
    public ProductUI() {
        searchProdutos = new ArrayList<Produto>();

        ServiceLocator serviceLocator = new ServiceLocator();
        produtoService = serviceLocator.lookupRemoteEJB(ProdutoService.class);
        tipoProdutoService = serviceLocator.lookupRemoteEJB(TipoProdutoService.class);
        generoService = serviceLocator.lookupRemoteEJB(GeneroService.class);
        canalService = serviceLocator.lookupRemoteEJB(CanalService.class);
        categoriaService = serviceLocator.lookupRemoteEJB(CategoriaService.class);
        ofertaService = serviceLocator.lookupRemoteEJB(OfertaService.class);
        opcionalService = serviceLocator.lookupRemoteEJB(OpcionalService.class);
        regraProdutoService = serviceLocator.lookupRemoteEJB(RegraProdutoService.class);
        disponibilidadeService = serviceLocator.lookupRemoteEJB(DisponibilidadeService.class);
        equipamentoService = serviceLocator.lookupRemoteEJB(EquipamentoService.class);
    }

    @PostConstruct
    public void init() {
        filter = new ProdutoFilter();
        tiposProduto = tipoProdutoService.findTiposProduto();
        generos = generoService.findGenerosAtivos();
        categorias = categoriaService.findCategoriasAtivas();
        produtos = produtoService.findProdutosAtivos();
    }

    /**
     * Reseta a tela de filtro
     */
    public String resetTelaConsulta() {
        init();
        return PRODUTO_CONSULTA;
    }

    //Get/set methods
}

推荐答案

我在WL 12.1.3中遇到了相同的问题:尝试通过eclipse将其部署为分解档案(标准是虚拟应用程序).

I had the same problem for WL 12.1.3: Try to deploy it as exploded archive via eclipse (Standard is virtual application).

右键单击服务器->属性->展开主题WebLogic->发布->单击发布为分解的存档"并应用更改

Right-Click on the Server -> Properties -> Expand the Topic WebLogic -> Publishing -> Click "Publish as an exploded archive" and apply the changes

这篇关于javax.el.PropertyNotFoundException:无法到达目标,标识符bean解析为null的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆