3
votes

I'm trying to run j2EE project on external server. Project was made in NetBeans (6.7.1) and when I run it from there, everything's going fine (I run it on GlassFish v3 server). But when I run GlassFish from asadmin script and give him my project's war file, it returns exception:

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

I was searching for answer and nothing helped me. Is there something I miss that Netbeans place in GlassFish configuration?

About most popular problems I found:

  1. loginBean is declared in faces-config.xml
  2. I have set session scope on my loginBean
  3. I don't have @ManagedBean() in LoginBean.java, but I use JSF1.2, not 2.0
  4. I found somewhere that it could be because of both myfaces.jar and sun's jsf, but I removed first and the error was still showing up.
  5. I was trying putting javaee.jar in glassfish/lib directory (in one book they have written so)

EDITED: Maybe stack trace will be handle:

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)
4
About point 5. you shouldn't add javaee.jar in the glassfish/lib folder. It already has all the jars you need for javaee.Hiro2k

4 Answers

1
votes

In my case the reason was completely different.

I copied a class including serialVersionUID field:

private static final long serialVersionUID = 5443351151396868724L;

so I had two different classes and objects with the same serialVersionUID and this was the clue of the problem.

0
votes

Please you check your war file and see if your classes are under WEB-INF/classes folder. I ran into the same problem and found out there are no class files WEB-INF/classes folder.

0
votes

Had the same issue. Problem was wrong import. Instead of javax.enterprise.context.SessionScoped, I had javax.faces.bean.SessionScoped which didn't work and was throwing mentioned exception.

0
votes

I cleaned all my project the websphere republished the ear automatically. After that the application was working.