bonjour chers développeurs,
Je developpe une application Java EE avec Spring pour l'IOC,JSF 2.2 et PrimeFaces 3.5 et JBoss 7.1.
Le probleme c'est avec JSF,qui me renvoi l'exception:"Target Unreachable, identifier 'carb' resolved to null:"
J'ai cherché sur google et tous les forum,aucune solution proposée n'a resolu mon probleme. alors je voudrais avoir des indication sur les causes possibles .
Merci
le msg d'erreur:
19:24:18,395 WARNING [javax.enterprise.resource.webcontainer.jsf.lifecycle] (http-localhost-127.0.0.1-8080-2) /Views/NewCarburant.xhtml @18,39 value="#{carb.typeCarburant.idCarburant}": Target Unreachable, identifier 'carb' resolved to null: javax.el.PropertyNotFoundException: /Views/NewCarburant.xhtml @18,39 value="#{carb.typeCarburant.idCarburant}": Target Unreachable, identifier 'carb' resolved to null
at com.sun.faces.facelets.el.TagValueExpression.getType(TagValueExpression.java:100) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]
at org.primefaces.renderkit.InputRenderer.findImplicitConverter(InputRenderer.java:170) [primefaces-3.5.jar:]
at org.primefaces.renderkit.InputRenderer.findConverter(InputRenderer.java:190) [primefaces-3.5.jar:]
at org.primefaces.renderkit.InputRenderer.getConvertedValue(InputRenderer.java:196) [primefaces-3.5.jar:]
at javax.faces.component.UIInput.getConvertedValue(UIInput.java:1030) [jboss-jsf-api_2.1_spec-2.0.0.Final.jar:2.0.0.Final]
at javax.faces.component.UIInput.validate(UIInput.java:960) [jboss-jsf-api_2.1_spec-2.0.0.Final.jar:2.0.0.Final]
at javax.faces.component.UIInput.executeValidate(UIInput.java:1233) [jboss-jsf-api_2.1_spec-2.0.0.Final.jar:2.0.0.Final]
at javax.faces.component.UIInput.processValidators(UIInput.java:698) [jboss-jsf-api_2.1_spec-2.0.0.Final.jar:2.0.0.Final]
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1214) [jboss-jsf-api_2.1_spec-2.0.0.Final.jar:2.0.0.Final]
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1214) [jboss-jsf-api_2.1_spec-2.0.0.Final.jar:2.0.0.Final]
at org.primefaces.component.panel.Panel.processValidators(Panel.java:297) [primefaces-3.5.jar:]
at javax.faces.component.UIForm.processValidators(UIForm.java:253) [jboss-jsf-api_2.1_spec-2.0.0.Final.jar:2.0.0.Final]
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1214) [jboss-jsf-api_2.1_spec-2.0.0.Final.jar:2.0.0.Final]
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1214) [jboss-jsf-api_2.1_spec-2.0.0.Final.jar:2.0.0.Final]
at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:1172) [jboss-jsf-api_2.1_spec-2.0.0.Final.jar:2.0.0.Final]
at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:76) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593) [jboss-jsf-api_2.1_spec-2.0.0.Final.jar:2.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.10.Final.jar:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.10.Final.jar:]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.10.Final.jar:]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.10.Final.jar:]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:154) [jboss-as-web-7.1.0.Final.jar:7.1.0.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.10.Final.jar:]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.10.Final.jar:]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.10.Final.jar:]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.10.Final.jar:]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.10.Final.jar:]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.10.Final.jar:]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.10.Final.jar:]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_21]

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
 
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="3.0"
 xmlns="http://java.sun.com/xml/ns/javaee"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
 <display-name>AMS</display-name>
 <context-param>
  <param-name>contextConfigLocation</param-name>
  <param-value>/WEB-INF/ApplicationContext.xml</param-value>
 </context-param>
 <context-param>
  <param-name>javax.faces.CONFIG_FILES</param-name>
  <param-value>/WEB-INF/faces-config.xml</param-value>
 </context-param>
 <context-param>
  <param-name>javax.faces.PROJECT_STAGE</param-name>
  <param-value>Development</param-value>
 </context-param>
 <listener>
  <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
 </listener>
 <!-- Lets the bean definition file specify scopes of request and session. -->
 <listener>
  <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
 </listener>
 <servlet>
  <servlet-name>facesServlet</servlet-name>
  <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
 </servlet>
 <servlet-mapping>
  <servlet-name>facesServlet</servlet-name>
  <url-pattern>*.jsf</url-pattern>
  <url-pattern>*.htm</url-pattern>
  <url-pattern>*.xhtml</url-pattern>
  <url-pattern>*.faces</url-pattern>
 </servlet-mapping>
 <welcome-file-list>
  <welcome-file>Newuser.xhtml</welcome-file>
 </welcome-file-list>
</web-app>
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
 
<?xml version="1.0"?>
<faces-config version="2.0" xmlns="http://java.sun.com/xml/ns/javaee"
 xmlns:xi="http://www.w3.org/2001/XInclude"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">
<application>
   <el-resolver>org.springframework.web.jsf.el.SpringBeanFacesELResolver</el-resolver>
</application>
 
</faces-config>
ApplicationContext
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
 
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:aop="http://www.springframework.org/schema/aop"
	xmlns:c="http://www.springframework.org/schema/c"
	xmlns:context="http://www.springframework.org/schema/context"
	xmlns:jdbc="http://www.springframework.org/schema/jdbc"
	xmlns:jee="http://www.springframework.org/schema/jee"
	xmlns:jms="http://www.springframework.org/schema/jms"
	xmlns:lang="http://www.springframework.org/schema/lang"
	xmlns:mvc="http://www.springframework.org/schema/mvc"
	xmlns:oxm="http://www.springframework.org/schema/oxm"
	xmlns:p="http://www.springframework.org/schema/p"
	xmlns:task="http://www.springframework.org/schema/task"
	xmlns:tx="http://www.springframework.org/schema/tx"
	xmlns:util="http://www.springframework.org/schema/util"
	xsi:schemaLocation="http://www.springframework.org/schema/beans <a href="http://www.springframework.org/schema/beans/spring-beans-3.2.xsd" target="_blank">http://www.springframework.org/schem...-beans-3.2.xsd</a>
		<a href="http://www.springframework.org/schema/aop" target="_blank">http://www.springframework.org/schema/aop</a> <a href="http://www.springframework.org/schema/aop/spring-aop-3.2.xsd" target="_blank">http://www.springframework.org/schem...ng-aop-3.2.xsd</a>
		<a href="http://www.springframework.org/schema/context" target="_blank">http://www.springframework.org/schema/context</a> <a href="http://www.springframework.org/schema/context/spring-context-3.2.xsd" target="_blank">http://www.springframework.org/schem...ontext-3.2.xsd</a>
		<a href="http://www.springframework.org/schema/jdbc" target="_blank">http://www.springframework.org/schema/jdbc</a> <a href="http://www.springframework.org/schema/jdbc/spring-jdbc-3.2.xsd" target="_blank">http://www.springframework.org/schem...g-jdbc-3.2.xsd</a>
		<a href="http://www.springframework.org/schema/jee" target="_blank">http://www.springframework.org/schema/jee</a> <a href="http://www.springframework.org/schema/jee/spring-jee-3.2.xsd" target="_blank">http://www.springframework.org/schem...ng-jee-3.2.xsd</a>
		<a href="http://www.springframework.org/schema/jms" target="_blank">http://www.springframework.org/schema/jms</a> <a href="http://www.springframework.org/schema/jms/spring-jms-3.2.xsd" target="_blank">http://www.springframework.org/schem...ng-jms-3.2.xsd</a>
		<a href="http://www.springframework.org/schema/lang" target="_blank">http://www.springframework.org/schema/lang</a> <a href="http://www.springframework.org/schema/lang/spring-lang-3.2.xsd" target="_blank">http://www.springframework.org/schem...g-lang-3.2.xsd</a>
		<a href="http://www.springframework.org/schema/mvc" target="_blank">http://www.springframework.org/schema/mvc</a> <a href="http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd" target="_blank">http://www.springframework.org/schem...ng-mvc-3.2.xsd</a>
		<a href="http://www.springframework.org/schema/oxm" target="_blank">http://www.springframework.org/schema/oxm</a> <a href="http://www.springframework.org/schema/oxm/spring-oxm-3.2.xsd" target="_blank">http://www.springframework.org/schem...ng-oxm-3.2.xsd</a>
		<a href="http://www.springframework.org/schema/task" target="_blank">http://www.springframework.org/schema/task</a> <a href="http://www.springframework.org/schema/task/spring-task-3.2.xsd" target="_blank">http://www.springframework.org/schem...g-task-3.2.xsd</a>
		<a href="http://www.springframework.org/schema/tx" target="_blank">http://www.springframework.org/schema/tx</a> <a href="http://www.springframework.org/schema/tx/spring-tx-3.2.xsd" target="_blank">http://www.springframework.org/schem...ing-tx-3.2.xsd</a>
		<a href="http://www.springframework.org/schema/util" target="_blank">http://www.springframework.org/schema/util</a> http://www.springframework.org/schema/util/spring-util-3.2.xsd">
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" >
	 <property name="driverClassName" value="com.microsoft.sqlserver.jdbc.SQLServerDriver" ></property>
	 <property name="url" value="jdbc:sqlserver://SACKYHARREY-HP\MSSQLSERVER2;DatabaseName=park_auto;SelectMethod=cursor"></property>
	 <property name="username" value="sacky"></property>
	 <property name="password" value="jmk"></property>
	</bean>
 
	<context:component-scan base-package="project" />
 
	<bean id="sessionFactory"
        class="org.springframework.orm.hibernate4.LocalSessionFactoryBean"
        p:dataSource-ref="dataSource" p:packagesToScan="project.matier.mouse">
        <property name="hibernateProperties">
            <value>
                hibernate.format_sql=true
                hibernate.dialect=org.hibernate.dialect.HSQLDialect
                hibernate.hbm2ddl.auto=create
            </value>
        </property>
    </bean>
	 <bean id="transactionManager"
        class="org.springframework.orm.hibernate4.HibernateTransactionManager">
        <property name="sessionFactory">
            <ref bean="sessionFactory" />
        </property>
    </bean>
 
 
</beans>