[ https://issues.apache.org/jira/browse/MTOMCAT-255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13894441#comment-13894441 ]
Tamal Kanti Nath commented on MTOMCAT-255: ------------------------------------------ The root cause is: in tomcat7:run goal the resource path starts from /src/main/webapp and /WEB-INF/classes/ directory do not contain the compiled classes. It can easily be tested in a servlet: request.getServletContext().getResourcePaths("/WEB-INF/classes/"); In tomcat7:run goal, the above code returns null. But In tomcat7:run-war goal, the above code returns packaged classes. If somebody can change ServletContext.getResourcePaths() to pick /target/classes/ for /WEB-INF/classes/, then the problem will be resolved. > Getting "Target Unreachable, identifier 'pessoaBean' resolved to null" on > tomcat:run but not in tomcat:run-war > -------------------------------------------------------------------------------------------------------------- > > Key: MTOMCAT-255 > URL: https://issues.apache.org/jira/browse/MTOMCAT-255 > Project: Apache Tomcat Maven Plugin > Issue Type: Bug > Components: tomcat7 > Affects Versions: 2.2 > Environment: gilberto.andrade@A37710:~$ mvn -version > Apache Maven 3.0.4 (r1232337; 2012-01-17 05:44:56-0300) > Maven home: /home/gilberto.andrade/bin/maven > Java version: 1.7.0_45, vendor: Oracle Corporation > Java home: /usr/java/jdk1.7.0_45/jre > Default locale: pt_BR, platform encoding: UTF-8 > OS name: "linux", version: "3.7.10-1.24-desktop", arch: "amd64", family: > "unix" > Reporter: Gilberto C Andrade > Assignee: Olivier Lamy (*$^¨%`£) > Priority: Minor > Attachments: MTOMCAT-255.zip > > > Simple JSF 2.2 project with just one manage bean(PessoaMb) and one xhtml page. > 1 Run mvn clean tomcat7:run > 2 hitting http://localhost:8080/MTOMCAT-255/pessoaView.xhtml > 3 enter some value on field or click the consultar button > The same steps works when using tomcat7:run-war. -- This message was sent by Atlassian JIRA (v6.1.5#6160) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org