首页 文章

javax.el.PropertyNotFoundException:目标无法访问,标识符bean解析为null

提问于
浏览
0

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

我正在使用weblogic 12 C CDI进行bean管理 .

<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:

/**
 * 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
}

1 回答

  • 0

    我对WL 12.1.3也有同样的问题:尝试通过eclipse将其部署为展开的存档(标准是虚拟应用程序) .

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

相关问题