我正在尝试在外部服务器上运行j2ee项目。项目是在netbeans(6.7.1)中完成的,当我从那里运行它时,一切都很好(我在glassfish v3服务器上运行)。但当我从asadmin脚本运行glassfish并将项目的war文件给他时,它返回异常:

Exception Details: javax.el.PropertyNotFoundException
  Target Unreachable, identifier 'loginBean' resolved to null

我在寻找答案,但什么也帮不了我。有什么我想念的,在玻璃鱼配置上网本的地方吗?
关于我发现的最普遍的问题:
loginbean在faces-config.xml中声明
我已在我的loginBean上设置会话范围
我在@ManagedBean()中没有LoginBean.java,但我使用的是jsf1.2,而不是2.0
我发现可能是因为myfaces.jar和sun的jsf,但我首先删除了它,错误仍然出现。
我试着把javaee.jar放到glassfish/lib目录中(在他们写的一本书中)
编辑:可能堆栈跟踪将被处理:
com.sun.el.parser.AstValue.getTarget(AstValue.java:84)
com.sun.el.parser.AstValue.getType(AstValue.java:69)
com.sun.el.ValueExpressionImpl.getType(ValueExpressionImpl.java:194)
com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRenderer.java:92)
javax.faces.component.UIInput.getConvertedValue(UIInput.java:942)
javax.faces.component.UIInput.validate(UIInput.java:868)
javax.faces.component.UIInput.executeValidate(UIInput.java:1072)
javax.faces.component.UIInput.processValidators(UIInput.java:672)
javax.faces.component.UIForm.processValidators(UIForm.java:235)
javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1058)
javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:700)
com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:76)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:431)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:337)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:218)
DomainModels.Adds.UploadFilter.doFilter(UploadFilter.java:63)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:250)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:218)
org.apache.catalina.core.StandardWrapperValve.preInvoke(StandardWrapperValve.java:460)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:139)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:186)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:96)
com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:187)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:142)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:242)
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:180)
com.sun.grizzly.http.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:633)
com.sun.grizzly.http.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:570)
com.sun.grizzly.http.DefaultProcessorTask.process(DefaultProcessorTask.java:827)
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:152)
com.sun.enterprise.v3.services.impl.GlassfishProtocolChain.executeProtocolFilter(GlassfishProtocolChain.java:71)
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:103)
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:89)
com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:67)
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:56)
com.sun.grizzly.util.WorkerThreadImpl.processTask(WorkerThreadImpl.java:325)
com.sun.grizzly.util.WorkerThreadImpl.run(WorkerThreadImpl.java:184)

最佳答案

就我而言,原因完全不同。
我复制了一个包含serialversionuid字段的类:

private static final long serialVersionUID = 5443351151396868724L;

所以我有两个不同的类和对象具有相同的serialversionuid,这就是问题的线索。

关于java - 目标无法到达,标识符解析为空,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/4845041/

10-11 00:41