开发者

JSF referencing spring-bean, error Target Unreachable, identifier 'x' resolved to null

In a JSF 2 + Spring 3.1 environement, i have a test.xhtml page with:

 <h:inputText id="nome" value="#{myBean.userName}" />

then i have a WEB-INF/faces.config containing:

<el-resolver>
     org.springframework.web.jsf.el.SpringBeanFacesELResolver
</el-resolver>

then i have WEB-INF/applicationContext.xml containing:

<bean id="myBean" class="com.test.MyBean" scope="session"/>

What am I missing?

EDIT Another clue is the stack trace: (spring is never mentioned)

25-giu-2011 2.32.35 com.sun.enterprise.glassfish.bootstrap.ASMain main
INFO: Launching GlassFish on Felix platform
Welcome to Felix
================
INFO: Perform lazy SSL initialization for the listener 'http-listener-2'
INFO: Starting Grizzly Framework 1.9.18-o - Sat Jun 25 02:32:40 CEST 2011
INFO: Starting Grizzly Framework 1.9.18-o - Sat Jun 25 02:32:40 CEST 2011
INFO: Grizzly Framework 1.9.18-o started in: 92ms listening on port 4848
INFO: Grizzly Framework 1.9.18-o started in: 128ms listening on port 8080
INFO: Grizzly Framework 1.9.18-o started in: 83ms listening on port 3700
INFO: Grizzly Framework 1.9.18-o started in: 102ms listening on port 8181
INFO: The Admin Console is already installed, but not yet loaded.
INFO: Grizzly Framework 1.9.18-o started in: 72ms listening on port 7676
INFO: Using com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate as the delegate
INFO: SEC1002: Security Manager is OFF.
FINE: Loading keystoreFile = C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/keystore.jks, keystorePass = changeit
FINE: Loading keystoreFile = C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/cacerts.jks, keystorePass = changeit
INFO: Security startup service called
AVVERTENZA: MNTG0201:Flashlight listener registration failed for listener class : com.sun.enterprise.security.WebSecurityDeployerStatsProvider , will retry later 
FINISSIMO: PolicyLoader set [com.sun.enterprise.jaccprovider.property.repository] to [C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/generated/policy]
INFO: SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.
FINE: Policy refresh timestamp calculation included policy file [C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/server.policy].
FINE: Policy refresh timestamp calculation included policy file [\C:\Program Files\Java\jdk1.6.0_23\jre\lib\security\java.policy].
FINE: Policy refresh timestamp calculation included policy file [\C:\Users\agostino\.java.policy].
FINE: JACC Policy Provider: Refreshing Policy files!
FINE: Policy refresh timestamp calculation included policy file [C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/server.policy].
FINE: Policy refresh timestamp calculation included policy file [\C:\Program Files\Java\jdk1.6.0_23\jre\lib\security\java.policy].
FINE: Policy refresh timestamp calculation included policy file [\C:\Users\agostino\.java.policy].
FINE: Policy set to: com.sun.enterprise.security.provider.PolicyWrapper
FINE: Initializing configured realms from SecurityService in Domain.xml....
FINE: FileRealm : file=C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/admin-keyfile
FINE: FileRealm : jaas-context=fileRealm
FINE: Reading file realm: C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/admin-keyfile
INFO: Realm admin-realm of classtype com.sun.enterprise.security.auth.realm.file.FileRealm successfully created.
FINE: Configured realm: admin-realm
FINE: FileRealm : file=C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/keyfile
FINE: FileRealm : jaas-context=fileRealm
FINE: Reading file realm: C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/keyfile
INFO: Realm file of classtype com.sun.enterprise.security.auth.realm.file.FileRealm successfully created.
FINE: Configured realm: file
INFO: Realm certificate of classtype com.sun.enterprise.security.auth.realm.certificate.CertificateRealm successfully created.
FINE: Configured realm: certificate
FINISSIMO: JDBCRealm : jaas-context= jdbcRealm, datasource-jndi = BMDB_jndi, db-user = null, digest-algorithm = MD5, encoding = hex, charset = null
INFO: Realm bmrealm of classtype com.sun.enterprise.security.auth.realm.jdbc.JDBCRealm successfully created.
FINE: Configured realm: bmrealm
FINISSIMO: JDBCRealm : jaas-context= jdbcRealm, datasource-jndi = jdbc/mssqlrealm, db-user = null, digest-algorithm = MD5, encoding = hex, charset = null
INFO: Realm TJSP_REALM of classtype com.sun.enterprise.security.auth.realm.jdbc.JDBCRealm successfully created.
FINE: Configured realm: TJSP_REALM
FINE: Default realm is set to: file
INFO: Security service(s) started successfully....
FINE: Policy already installed. Will not re-install.
FINE: Default CTOR of SecurityContext called
FINE: JACC policy provider: repository set to: C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/generated/policy
FINE: [Web-Security] Creating a Codebase URI with = __default-web-module/__default-web-module
FINE: [Web-Security] Context id (id under which  WEB component in application will be created) = __default-web-module/__default-web-module
FINE: [Web-Security] Codebase (module id for web component) __default-web-module/__default-web-module
FINE: JACC Policy Provider: inService: true __default-web-module/__default-web-module
FINE: JACC Policy Provider: Refreshing Policy files!
FINE: Policy refresh timestamp calculation included policy file [C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/server.policy].
FINE: Policy refresh timestamp calculation included policy file [\C:\Program Files\Java\jdk1.6.0_23\jre\lib\security\java.policy].
FINE: Policy refresh timestamp calculation included policy file [\C:\Users\agostino\.java.policy].
FINE: JACC Policy Provider: inService: true __default-we开发者_如何学运维b-module/__default-web-module
FINE: JACC Policy Provider: Refreshing Policy files!
FINE: Policy refresh timestamp calculation included policy file [C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/server.policy].
FINE: Policy refresh timestamp calculation included policy file [\C:\Program Files\Java\jdk1.6.0_23\jre\lib\security\java.policy].
FINE: Policy refresh timestamp calculation included policy file [\C:\Users\agostino\.java.policy].
INFO: Created HTTP listener http-listener-1 on port 8080
INFO: Created HTTP listener http-listener-2 on port 8181
INFO: Created HTTP listener admin-listener on port 4848
INFO: Created virtual server server
INFO: Created virtual server __asadmin
INFO: Virtual server server loaded system default web module
FINE: JACC Policy Provider: inService: true __default-web-module/__default-web-module
FINE: JACC Policy Provider: Refreshing Policy files!
FINE: Policy refresh timestamp calculation included policy file [C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/server.policy].
FINE: Policy refresh timestamp calculation included policy file [\C:\Program Files\Java\jdk1.6.0_23\jre\lib\security\java.policy].
FINE: Policy refresh timestamp calculation included policy file [\C:\Users\agostino\.java.policy].
FINE: Default CTOR of SecurityContext called
FINE: [Web-Security] Creating a Codebase URI with = Spring01/Spring01
FINE: [Web-Security] Context id (id under which  WEB component in application will be created) = Spring01/Spring01
FINE: [Web-Security] Codebase (module id for web component) Spring01/Spring01
FINE: JACC Policy Provider: inService: true Spring01/Spring01
FINE: JACC Policy Provider: inService: true Spring01/Spring01
INFO: Initializing Mojarra 2.0.2 (FCS b10) for context '/Spring01'
INFO: Monitoring jndi:/server/Spring01/WEB-INF/faces-config.xml for modifications
INFO: PWC1412: WebModule[/Spring01] ServletContext.log():Initializing Spring root WebApplicationContext
INFO: Root WebApplicationContext: initialization started
INFO: Refreshing Root WebApplicationContext: startup date [Sat Jun 25 02:32:50 CEST 2011]; root of context hierarchy
INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml]
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1cc50164: defining beans [myBean]; root of factory hierarchy
INFO: Root WebApplicationContext: initialization completed in 995 ms
FINE: JACC Policy Provider: inService: true Spring01/Spring01
FINE: JACC Policy Provider: Refreshing Policy files!
FINE: Policy refresh timestamp calculation included policy file [C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/server.policy].
FINE: Policy refresh timestamp calculation included policy file [\C:\Program Files\Java\jdk1.6.0_23\jre\lib\security\java.policy].
FINE: Policy refresh timestamp calculation included policy file [\C:\Users\agostino\.java.policy].
FINE: Default CTOR of SecurityContext called
INFO: PWC1412: WebModule[/Spring01] ServletContext.log():Initializing Spring FrameworkServlet 'dispatcher'
INFO: FrameworkServlet 'dispatcher': initialization started
INFO: Refreshing WebApplicationContext for namespace 'dispatcher-servlet': startup date [Sat Jun 25 02:32:51 CEST 2011]; parent: Root WebApplicationContext
INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/dispatcher-servlet.xml]
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5700edc0: defining beans [org.springframework.web.servlet.mvc.support.ControllerClassNameHandlerMapping#0,urlMapping,viewResolver,indexController]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@1cc50164
INFO: Mapped URL path [/index.htm] onto handler [org.springframework.web.servlet.mvc.ParameterizableViewController@44825de5]
INFO: FrameworkServlet 'dispatcher': initialization completed in 610 ms
INFO: Loading application Spring01 at /Spring01
INFO: Loading Spring01 Application done is 11441 ms
INFO: GlassFish Server Open Source Edition 3.0.1 (22) startup time : Felix(3559ms) startup services(13042ms) total(16601ms)
FINE: FileRealm : file=C:\Users\agostino\.netbeans\6.9\config\GF3\domain1\config\admin-keyfile
FINE: FileRealm : jaas-context=ignore
FINE: Reading file realm: C:\Users\agostino\.netbeans\6.9\config\GF3\domain1\config\admin-keyfile
INFO: Binding RMI port to *:8686
FINE: FileRealm : file=C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/admin-keyfile
FINE: FileRealm : jaas-context=ignore
FINE: Reading file realm: C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/admin-keyfile
FINE: FileRealm : file=C:\Users\agostino\.netbeans\6.9\config\GF3\domain1\config\admin-keyfile
FINE: FileRealm : jaas-context=ignore
INFO: JMXStartupService: Started JMXConnector, JMXService URL = service:jmx:rmi://axps:8686/jndi/rmi://axps:8686/jmxrmi
FINE: Reading file realm: C:\Users\agostino\.netbeans\6.9\config\GF3\domain1\config\admin-keyfile
FINE: FileRealm : file=C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/admin-keyfile
FINE: FileRealm : jaas-context=ignore
FINE: Reading file realm: C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/admin-keyfile
FINE: FileRealm : file=C:\Users\agostino\.netbeans\6.9\config\GF3\domain1\config\admin-keyfile
FINE: FileRealm : jaas-context=ignore
FINE: Reading file realm: C:\Users\agostino\.netbeans\6.9\config\GF3\domain1\config\admin-keyfile
FINE: FileRealm : file=C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/admin-keyfile
FINE: FileRealm : jaas-context=ignore
INFO: [Thread[GlassFish Kernel Main Thread,5,main]] started
FINE: Reading file realm: C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/admin-keyfile
FINE: FileRealm : file=C:\Users\agostino\.netbeans\6.9\config\GF3\domain1\config\admin-keyfile
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = C:\Users\agostino\.netbeans\6.9\config\GF3\domain1\autodeploy\bundles, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = C:\Users\agostino\AppData\Local\Temp\fileinstall--8843392006929078449, felix.fileinstall.filter = null}
FINE: FileRealm : jaas-context=ignore
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = C:\Program Files\glassfish-3.0.1\glassfish\modules\autostart, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = C:\Users\agostino\AppData\Local\Temp\fileinstall-5819894755494389227, felix.fileinstall.filter = null}
FINE: Reading file realm: C:\Users\agostino\.netbeans\6.9\config\GF3\domain1\config\admin-keyfile
FINE: FileRealm : file=C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/admin-keyfile
FINE: FileRealm : jaas-context=ignore
FINE: Reading file realm: C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/admin-keyfile
FINE: FileRealm : file=C:\Users\agostino\.netbeans\6.9\config\GF3\domain1\config\admin-keyfile
FINE: FileRealm : jaas-context=ignore
FINE: Reading file realm: C:\Users\agostino\.netbeans\6.9\config\GF3\domain1\config\admin-keyfile
FINE: FileRealm : file=C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/admin-keyfile
FINE: FileRealm : jaas-context=ignore
FINE: Reading file realm: C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/admin-keyfile
FINE: FileRealm : file=C:\Users\agostino\.netbeans\6.9\config\GF3\domain1\config\admin-keyfile
FINE: FileRealm : jaas-context=ignore
FINE: Reading file realm: C:\Users\agostino\.netbeans\6.9\config\GF3\domain1\config\admin-keyfile
FINE: FileRealm : file=C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/admin-keyfile
FINE: FileRealm : jaas-context=ignore
FINE: Reading file realm: C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/admin-keyfile
FINE: FileRealm : file=C:\Users\agostino\.netbeans\6.9\config\GF3\domain1\config\admin-keyfile
FINE: FileRealm : jaas-context=ignore
FINE: Reading file realm: C:\Users\agostino\.netbeans\6.9\config\GF3\domain1\config\admin-keyfile
FINE: FileRealm : file=C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/admin-keyfile
FINE: FileRealm : jaas-context=ignore
FINE: Reading file realm: C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/admin-keyfile
INFO: Hibernate Validator bean-validator-3.0-JBoss-4.0.2
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: Created HTTP listener http-listener-1 on port 8080
INFO: Grizzly Framework 1.9.18-o started in: 3ms listening on port 8080
FINE: FileRealm : file=C:\Users\agostino\.netbeans\6.9\config\GF3\domain1\config\admin-keyfile
FINE: FileRealm : jaas-context=ignore
FINE: Reading file realm: C:\Users\agostino\.netbeans\6.9\config\GF3\domain1\config\admin-keyfile
FINE: FileRealm : file=C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/admin-keyfile
FINE: FileRealm : jaas-context=ignore
FINE: Reading file realm: C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/admin-keyfile
FINE: FileRealm : file=C:\Users\agostino\.netbeans\6.9\config\GF3\domain1\config\admin-keyfile
FINE: FileRealm : jaas-context=ignore
FINE: Reading file realm: C:\Users\agostino\.netbeans\6.9\config\GF3\domain1\config\admin-keyfile
FINE: FileRealm : file=C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/admin-keyfile
FINE: FileRealm : jaas-context=ignore
FINE: Reading file realm: C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/admin-keyfile
INFO: Perform lazy SSL initialization for the listener 'http-listener-2'
INFO: Created HTTP listener http-listener-2 on port 8181
INFO: Grizzly Framework 1.9.18-o started in: 3ms listening on port 8181
INFO: Updating configuration from org.apache.felix.fileinstall-autodeploy-bundles.cfg
INFO: Installed C:\Program Files\glassfish-3.0.1\glassfish\modules\autostart\org.apache.felix.fileinstall-autodeploy-bundles.cfg
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = C:\Users\agostino\.netbeans\6.9\config\GF3\domain1\autodeploy\bundles, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = C:\Users\agostino\AppData\Local\Temp\fileinstall-567376612101955640, felix.fileinstall.filter = null}
FINE: FileRealm : file=C:\Users\agostino\.netbeans\6.9\config\GF3\domain1\config\admin-keyfile
FINE: FileRealm : jaas-context=ignore
FINE: Reading file realm: C:\Users\agostino\.netbeans\6.9\config\GF3\domain1\config\admin-keyfile
FINE: FileRealm : file=C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/admin-keyfile
FINE: FileRealm : jaas-context=ignore
FINE: Reading file realm: C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/admin-keyfile
FINE: FileRealm : file=C:\Users\agostino\.netbeans\6.9\config\GF3\domain1\config\admin-keyfile
FINE: FileRealm : jaas-context=ignore
FINE: Reading file realm: C:\Users\agostino\.netbeans\6.9\config\GF3\domain1\config\admin-keyfile
FINE: FileRealm : file=C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/admin-keyfile
FINE: FileRealm : jaas-context=ignore
FINE: Reading file realm: C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/admin-keyfile
FINE: FileRealm : file=C:\Users\agostino\.netbeans\6.9\config\GF3\domain1\config\admin-keyfile
FINE: FileRealm : jaas-context=ignore
FINE: Reading file realm: C:\Users\agostino\.netbeans\6.9\config\GF3\domain1\config\admin-keyfile
FINE: FileRealm : file=C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/admin-keyfile
FINE: FileRealm : jaas-context=ignore
FINE: Reading file realm: C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/admin-keyfile
FINE: FileRealm : file=C:\Users\agostino\.netbeans\6.9\config\GF3\domain1\config\admin-keyfile
FINE: FileRealm : jaas-context=ignore
FINE: Reading file realm: C:\Users\agostino\.netbeans\6.9\config\GF3\domain1\config\admin-keyfile
FINE: FileRealm : file=C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/admin-keyfile
FINE: FileRealm : jaas-context=ignore
FINE: Reading file realm: C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/admin-keyfile
FINE: FileRealm : file=C:\Users\agostino\.netbeans\6.9\config\GF3\domain1\config\admin-keyfile
FINE: FileRealm : jaas-context=ignore
FINE: Reading file realm: C:\Users\agostino\.netbeans\6.9\config\GF3\domain1\config\admin-keyfile
FINE: FileRealm : file=C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/admin-keyfile
FINE: FileRealm : jaas-context=ignore
FINE: Reading file realm: C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/admin-keyfile
MOLTO FINE: SEC1208: Configuration file does not exist at C:\Users\agostino\.netbeans\6.9\config\GF3\domain1;auth.conf. Will use default providers.
FINE: Intercept Entry: 
    intercept: SOAP
    defaultServerID: null
    defaultClientID:  null
FINE: ID Entry: 
    module class: com.sun.xml.wss.provider.ClientSecurityAuthModule
    id: XWS_ClientProvider
    type: client
    request policy: javax.security.auth.message.MessagePolicy@31490eab
    response policy: javax.security.auth.message.MessagePolicy@336215d4
    options: {signature.key.alias=s1as, debug=false, dynamic.username.password=false, encryption.key.alias=s1as}
FINE: ID Entry: 
    module class: com.sun.xml.wss.provider.ClientSecurityAuthModule
    id: ClientProvider
    type: client
    request policy: javax.security.auth.message.MessagePolicy@1e42d6f4
    response policy: javax.security.auth.message.MessagePolicy@362e3cb1
    options: {signature.key.alias=s1as, debug=false, dynamic.username.password=false, encryption.key.alias=s1as, security.config=C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/wss-server-config-1.0.xml}
FINE: ID Entry: 
    module class: com.sun.xml.wss.provider.ServerSecurityAuthModule
    id: XWS_ServerProvider
    type: server
    request policy: javax.security.auth.message.MessagePolicy@1592a441
    response policy: javax.security.auth.message.MessagePolicy@4e5db277
    options: {signature.key.alias=s1as, debug=false, encryption.key.alias=s1as}
FINE: ID Entry: 
    module class: com.sun.xml.wss.provider.ServerSecurityAuthModule
    id: ServerProvider
    type: server
    request policy: javax.security.auth.message.MessagePolicy@696fcad2
    response policy: javax.security.auth.message.MessagePolicy@2a6cd712
    options: {signature.key.alias=s1as, debug=false, encryption.key.alias=s1as, security.config=C:\Users\agostino\.netbeans\6.9\config\GF3\domain1/config/wss-server-config-1.0.xml}
FINISSIMO: JACC Policy Provider: PolicyWrapper.getPermissions(cs), context (Spring01/Spring01) codesource ((file:/Spring01/Spring01 )) permissions: java.security.Permissions@6a086b19 (
 (unresolved javax.security.jacc.WebUserDataPermission / null)
 (unresolved com.sun.corba.ee.impl.presentation.rmi.DynamicAccessPermission access null)
 (unresolved javax.security.jacc.WebResourcePermission / null)
 (unresolved com.sun.enterprise.security.CORBAObjectPermission * *)
 (javax.security.auth.PrivateCredentialPermission javax.resource.spi.security.PasswordCredential * "*" read)
 (java.util.PropertyPermission line.separator read)
 (java.util.PropertyPermission java.vm.version read)
 (java.util.PropertyPermission java.vm.specification.version read)
 (java.util.PropertyPermission java.vm.specification.vendor read)
 (java.util.PropertyPermission java.vendor.url read)
 (java.util.PropertyPermission java.vm.name read)
 (java.util.PropertyPermission * read,write)
 (java.util.PropertyPermission os.name read)
 (java.util.PropertyPermission java.vm.vendor read)
 (java.util.PropertyPermission path.separator read)
 (java.util.PropertyPermission java.specification.name read)
 (java.util.PropertyPermission os.version read)
 (java.util.PropertyPermission user.home read)
 (java.util.PropertyPermission os.arch read)
 (java.util.PropertyPermission java.class.version read)
 (java.util.PropertyPermission java.version read)
 (java.util.PropertyPermission file.separator read)
 (java.util.PropertyPermission java.vendor read)
 (java.util.PropertyPermission java.vm.specification.name read)
 (java.util.PropertyPermission java.specification.version read)
 (java.util.PropertyPermission java.specification.vendor read)
 (java.io.FilePermission > read,write)
 (java.io.FilePermission C:\Users\agostino\.netbeans\6.9\config\GF3\domain1\lib\databases\- delete)
 (java.io.FilePermission C:\Users\agostino\AppData\Local\Temp\\- delete)
 (java.io.FilePermission C:\Users\agostino\- read,write)
 (java.lang.RuntimePermission getClassLoader)
 (java.lang.RuntimePermission loadLibrary.*)
 (java.lang.RuntimePermission accessDeclaredMembers)
 (java.lang.RuntimePermission getProtectionDomain)
 (java.lang.RuntimePermission modifyThreadGroup)
 (java.lang.RuntimePermission stopThread)
 (java.lang.RuntimePermission setContextClassLoader)
 (java.lang.RuntimePermission queuePrintJob)
 (java.net.SocketPermission 172.17.1.8 connect,listen,accept,resolve)
 (java.net.SocketPermission ftp.axis.com connect,listen,accept,resolve)
 (java.net.SocketPermission localhost:1024- listen,resolve)
 (java.net.SocketPermission * connect,resolve)
 (javax.management.MBeanPermission [com.sun.messaging.jms.*:*] *)
 (javax.management.MBeanTrustPermission register)
)

FINE: [Web-Security] Setting Policy Context ID: old = null ctxID = Spring01/Spring01
FINE: SecurityContext: setCurrentSecurityContext method called
FINE: [Web-Security] Setting Policy Context ID: old = null ctxID = Spring01/Spring01
FINE: SecurityContext: setCurrentSecurityContext method called
FINE: [Web-Security] Policy Context ID was: Spring01/Spring01
AVVERTENZA: /index.xhtml @14,86 value="#{myBean.userName}": Target Unreachable, identifier 'myBean' resolved to null
javax.el.PropertyNotFoundException: /index.xhtml @14,86 value="#{myBean.userName}": Target Unreachable, identifier 'myBean' resolved to null
        at com.sun.faces.facelets.el.TagValueExpression.getType(TagValueExpression.java:93)
        at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRenderer.java:95)
        at javax.faces.component.UIInput.getConvertedValue(UIInput.java:1008)
        at javax.faces.component.UIInput.validate(UIInput.java:934)
        at javax.faces.component.UIInput.executeValidate(UIInput.java:1189)
        at javax.faces.component.UIInput.processValidators(UIInput.java:691)
        at javax.faces.component.UIForm.processValidators(UIForm.java:243)
        at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1080)
        at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1080)
        at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:1180)
        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 javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
        at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
        at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
        at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)
        at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
        at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
        at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
        at java.lang.Thread.run(Thread.java:662)

FINE: SecurityContext: setCurrentSecurityContext method called



You are missing a listener to start the Spring Container:

In your web.xml:

<listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

Since you have the JSF FacesServlet, you might need the RequestContextListener as well:

<listener>
    <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
</listener>


I had a very similar problem. The way I handled it was to change the myBean from a Spring bean to a JSF bean with @ManagedBean @XXXScoped and autowiring spring stuff inside it with @ManagedProperty("#myService")

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜