0

I'm a java developer and I'm working on a java based web application project. We're using tomcat 7.0.40 application server. Since I migrated the application to support jsr299 provided by jboss-weld 1.1.10.Final, I'm having troubles with the application deployment on tomcat.

Due to security-reasons, I do not explode the deployed WARs on production servers. In pre-production tests, I noticed I get exceptions because of unpackWARs=false in server.xml.

I get the same exception, if I change this property to unpackWARs=false on my local server. Otherwise (with unpackWARs=true in both, local and preproduction server), the application works.

Here is what the exception looks like:

com.sun.faces.lifecycle.ProcessValidationsPhase execute
WARNING: /usersearch.xhtml @40,123 value="#{userSearch.valuebean.userID}": Target Unreachable, identifier 'userSearch' resolved to null
javax.el.PropertyNotFoundException: /userSearch.xhtml @40,123 value="#{userSearch.valuebean.userID}": Target Unreachable, identifier 'userSearch' resolved to null
at com.sun.faces.facelets.el.TagValueExpression.getType(TagValueExpression.java:100)
at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRenderer.java:95)
at javax.faces.component.UIInput.getConvertedValue(UIInput.java:1030)
at javax.faces.component.UIInput.validate(UIInput.java:960)
at javax.faces.component.UIInput.executeValidate(UIInput.java:1233)
at javax.faces.component.UIInput.processValidators(UIInput.java:698)
at javax.faces.component.UIForm.processValidators(UIForm.java:253)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1214)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1214)
at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:1172)
at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:76)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at org.apache.myfaces.extensions.cdi.jsf2.impl.listener.phase.CodiLifecycleWrapper.execute(CodiLifecycleWrapper.java:95)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1008)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:662)

Frameworks, I'm using:

  • Tomcat 7.0.40 (No Java-EE stack)
  • JBoss-Weld: org.jboss.weld.servlet 1.1.10.Final
  • Apache Myfaces CODI Extensions: org.apache.myfaces.extensions.cdi.core and jsf-module, v1.0.3
  • JSF impl. Mojarra v2.1.7
  • JSF Richfaces component library, v4.3.0.Final

Target Unreachable, identifier resolved to null-exceptions often occurs, if there are some misspellings in the JSF Unified-EL to access bean properties, or the beans.xml is misplaced. But non of them apply to me, because of the applications works with unpackWARs=true.

Thank you very much for your attention to this matters. With kind regards, abertschi

server.xml (tomcat, I didn't change any other properties):

<?xml version="1.0" encoding="UTF-8"?
 <Server port="8005" shutdown="SHUTDOWN">
  <Listener SSLEngine="on" className="org.apache.catalina.core.AprLifecycleListener"/>
  <Listener className="org.apache.catalina.core.JasperListener"/>
  <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/>
  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
  <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"/>
  <GlobalNamingResources>
    <Resource auth="Container" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" name="UserDatabase" pathname="conf/tomcat-users.xml" type="org.apache.catalina.UserDatabase"/>
  </GlobalNamingResources>
  <Service name="Catalina">
    <Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>
    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/>
    <Engine defaultHost="localhost" name="Catalina">
      <Realm className="org.apache.catalina.realm.LockOutRealm">
        <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
      </Realm>
      <Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="false">
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" pattern="%h %l %u %t &quot;%r&quot; %s %b" prefix="localhost_access_log." suffix=".txt"/>
      </Host>
    </Engine>
  </Service>
</Server>
abertschi
  • 41
  • 3

1 Answers1

0

ich chume nöd drus. z vill Infos. Rüef mich mal, wänns Problem nöchst mal vorchunnt. ok, jetzt chumi drus. schräg... In short: when deploying packed as war (unpackWar=FALSE), the application cannot acces some beans. I'll have a look at your settings next time it occurs.

Rémy Schumm
  • 141
  • 1
  • 10