4 Replies Latest reply on Jan 26, 2009 12:26 PM by matt arr

    jsf injection ejb3

    matt arr Newbie

      Hello,i've got a problem! :)
      i use jboss 5, ejb3, jpa, jsf1.2 under eclipse!
      so currently in my ejb project i ve got this:

      local interface:
      @Local
      public interface UserLocal

      implementation bean:

      @Stateless(name = "UserB", mappedName = "ejb/stateless/User")
      public class UserBean implements UserLocal

      in the managed bean (JSF) (in the web dynamic project):

      @EJB(name = "UserB", mappedName = "ejb/stateless/User")
      private UserLocal userBean;

      i get this error:

      20:37:42,110 ERROR [lifecycle] JSF1054: (Phase ID: RENDER_RESPONSE 6, View ID: /signon.jsp) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@1939379]
      20:37:42,110 ERROR [[Faces Servlet]] "Servlet.service()" pour la servlet Faces Servlet a généré une exception
      javax.naming.NameNotFoundException: User not bound
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)


      and i tried with the remote interface and it works, so i don't understand why... please help!lol :)
      thanks!

        • 1. Re: jsf injection ejb3
          jaikiran pai Master

          Entire exception stacktrace please and also the console logs :)

          While posting logs or xml content or code, please remember to wrap it in a code block by using the Code button in the message editor window. Please use the Preview button to ensure that your post is correctly formatted.

          • 2. Re: jsf injection ejb3
            matt arr Newbie

            ok, sorry! here is the entire log:


            09:30:28,766 INFO [SessionSpecContainer] Stopping jboss.j2ee:jar=Social-Network.jar,name=ForumB,service=EJB3
            09:30:28,782 INFO [EJBContainer] STOPPED EJB: com.sn.stateless.ForumBean ejbName: ForumB
            09:30:28,844 INFO [SessionSpecContainer] Stopping jboss.j2ee:jar=Social-Network.jar,name=NetworkB,service=EJB3
            09:30:28,875 INFO [EJBContainer] STOPPED EJB: com.sn.stateless.NetworkBean ejbName: NetworkB
            09:30:28,969 INFO [SessionSpecContainer] Stopping jboss.j2ee:jar=Social-Network.jar,name=PostB,service=EJB3
            09:30:28,969 INFO [EJBContainer] STOPPED EJB: com.sn.stateless.PostBean ejbName: PostB
            09:30:29,016 INFO [SessionSpecContainer] Stopping jboss.j2ee:jar=Social-Network.jar,name=UserB,service=EJB3
            09:30:29,047 INFO [EJBContainer] STOPPED EJB: com.sn.stateless.UserBean ejbName: UserB
            09:30:29,094 INFO [PersistenceUnitDeployment] Stopping persistence unit persistence.unit:unitName=#SocialNetwork
            09:30:29,094 INFO [SessionFactoryImpl] closing
            09:30:29,094 INFO [SessionFactoryObjectFactory] Unbinding factory from JNDI name: persistence.unit:unitName=#SocialNetwork
            09:30:29,094 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
            09:30:29,094 INFO [SessionFactoryObjectFactory] Unbound factory from JNDI name: persistence.unit:unitName=#SocialNetwork
            09:30:29,188 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@1193716{vfszip:/C:/jboss-5.0.0.GA/server/default/deploy/Social-Network.jar}
            09:30:29,188 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@1193716{vfszip:/C:/jboss-5.0.0.GA/server/default/deploy/Social-Network.jar}
            09:30:29,375 INFO [JBossASKernel] Created KernelDeployment for: Social-Network.jar
            09:30:29,375 INFO [JBossASKernel] installing bean: jboss.j2ee:jar=Social-Network.jar,name=ForumB,service=EJB3
            09:30:29,375 INFO [JBossASKernel] with dependencies:
            09:30:29,375 INFO [JBossASKernel] and demands:
            09:30:29,375 INFO [JBossASKernel] jboss.ejb:service=EJBTimerService
            09:30:29,375 INFO [JBossASKernel] persistence.unit:unitName=#SocialNetwork
            09:30:29,375 INFO [JBossASKernel] and supplies:
            09:30:29,375 INFO [JBossASKernel] jndi:ForumB/local-com.sn.stateless.ForumLocal
            09:30:29,375 INFO [JBossASKernel] jndi:ForumB/local
            09:30:29,375 INFO [JBossASKernel] Class:com.sn.stateless.ForumLocal
            09:30:29,375 INFO [JBossASKernel] jndi:ejb/stateless/Forum
            09:30:29,375 INFO [JBossASKernel] Added bean(jboss.j2ee:jar=Social-Network.jar,name=ForumB,service=EJB3) to KernelDeployment of: Social-Network.jar
            09:30:29,375 INFO [JBossASKernel] installing bean: jboss.j2ee:jar=Social-Network.jar,name=NetworkB,service=EJB3
            09:30:29,375 INFO [JBossASKernel] with dependencies:
            09:30:29,375 INFO [JBossASKernel] and demands:
            09:30:29,375 INFO [JBossASKernel] jboss.ejb:service=EJBTimerService
            09:30:29,375 INFO [JBossASKernel] persistence.unit:unitName=#SocialNetwork
            09:30:29,375 INFO [JBossASKernel] and supplies:
            09:30:29,375 INFO [JBossASKernel] jndi:NetworkB/local-com.sn.stateless.NetworkLocal
            09:30:29,375 INFO [JBossASKernel] jndi:ejb/stateless/Network
            09:30:29,375 INFO [JBossASKernel] jndi:NetworkB/local
            09:30:29,375 INFO [JBossASKernel] Class:com.sn.stateless.NetworkLocal
            09:30:29,375 INFO [JBossASKernel] Class:com.sn.stateless.NetworkRemote
            09:30:29,375 INFO [JBossASKernel] jndi:NetworkB/remote-com.sn.stateless.NetworkRemote
            09:30:29,375 INFO [JBossASKernel] Added bean(jboss.j2ee:jar=Social-Network.jar,name=NetworkB,service=EJB3) to KernelDeployment of: Social-Network.jar
            09:30:29,375 INFO [JBossASKernel] installing bean: jboss.j2ee:jar=Social-Network.jar,name=PostB,service=EJB3
            09:30:29,375 INFO [JBossASKernel] with dependencies:
            09:30:29,375 INFO [JBossASKernel] and demands:
            09:30:29,375 INFO [JBossASKernel] jboss.ejb:service=EJBTimerService
            09:30:29,375 INFO [JBossASKernel] persistence.unit:unitName=#SocialNetwork
            09:30:29,375 INFO [JBossASKernel] and supplies:
            09:30:29,375 INFO [JBossASKernel] jndi:PostB/local
            09:30:29,375 INFO [JBossASKernel] jndi:PostB/local-com.sn.stateless.PostLocal
            09:30:29,375 INFO [JBossASKernel] jndi:ejb/stateless/Post
            09:30:29,375 INFO [JBossASKernel] Class:com.sn.stateless.PostLocal
            09:30:29,375 INFO [JBossASKernel] Added bean(jboss.j2ee:jar=Social-Network.jar,name=PostB,service=EJB3) to KernelDeployment of: Social-Network.jar
            09:30:29,375 INFO [JBossASKernel] installing bean: jboss.j2ee:jar=Social-Network.jar,name=UserB,service=EJB3
            09:30:29,375 INFO [JBossASKernel] with dependencies:
            09:30:29,375 INFO [JBossASKernel] and demands:
            09:30:29,375 INFO [JBossASKernel] jboss.ejb:service=EJBTimerService
            09:30:29,375 INFO [JBossASKernel] persistence.unit:unitName=#SocialNetwork
            09:30:29,375 INFO [JBossASKernel] and supplies:
            09:30:29,375 INFO [JBossASKernel] Class:com.sn.stateless.UserRemote
            09:30:29,375 INFO [JBossASKernel] jndi:ejb/stateless/User
            09:30:29,375 INFO [JBossASKernel] jndi:UserB/local-com.sn.stateless.UserLocal
            09:30:29,375 INFO [JBossASKernel] jndi:UserB/local
            09:30:29,375 INFO [JBossASKernel] jndi:UserB/remote-com.sn.stateless.UserRemote
            09:30:29,375 INFO [JBossASKernel] Class:com.sn.stateless.UserLocal
            09:30:29,375 INFO [JBossASKernel] Added bean(jboss.j2ee:jar=Social-Network.jar,name=UserB,service=EJB3) to KernelDeployment of: Social-Network.jar
            09:30:29,422 INFO [PersistenceUnitDeployment] Starting persistence unit persistence.unit:unitName=#SocialNetwork
            09:30:29,422 WARN [Ejb3Configuration] Persistence provider caller does not implement the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoader() is null.
            09:30:29,438 INFO [AnnotationBinder] Binding entity from annotated class: com.sn.entity.Post
            09:30:29,438 INFO [EntityBinder] Bind entity com.sn.entity.Post on table t_post
            09:30:29,453 INFO [AnnotationBinder] Binding entity from annotated class: com.sn.entity.Restricted_Info
            09:30:29,453 INFO [EntityBinder] Bind entity com.sn.entity.Restricted_Info on table t_restricted_info
            09:30:29,453 INFO [AnnotationBinder] Binding entity from annotated class: com.sn.entity.Network
            09:30:29,453 INFO [EntityBinder] Bind entity com.sn.entity.Network on table t_network
            09:30:29,453 INFO [AnnotationBinder] Binding entity from annotated class: com.sn.entity.Public_Info
            09:30:29,453 INFO [EntityBinder] Bind entity com.sn.entity.Public_Info on table t_public_info
            09:30:29,453 INFO [AnnotationBinder] Binding entity from annotated class: com.sn.entity.User
            09:30:29,453 INFO [EntityBinder] Bind entity com.sn.entity.User on table t_user
            09:30:29,469 INFO [AnnotationBinder] Binding entity from annotated class: com.sn.entity.Private_Info
            09:30:29,469 INFO [EntityBinder] Bind entity com.sn.entity.Private_Info on table t_private_info
            09:30:29,469 INFO [AnnotationBinder] Binding entity from annotated class: com.sn.entity.Forum
            09:30:29,469 INFO [EntityBinder] Bind entity com.sn.entity.Forum on table t_forum
            09:30:29,469 INFO [CollectionBinder] Mapping collection: com.sn.entity.Network.LForums -> t_forum
            09:30:29,469 INFO [CollectionBinder] Mapping collection: com.sn.entity.Network.LUsers -> t_user
            09:30:29,469 INFO [CollectionBinder] Mapping collection: com.sn.entity.Forum.topics -> t_post
            09:30:29,469 INFO [CollectionBinder] Mapping collection: com.sn.entity.Forum.users -> t_user
            09:30:29,485 INFO [HibernateSearchEventListenerRegister] Unable to find org.hibernate.search.event.FullTextIndexEventListener on the classpath. Hibernate Search is not enabled.
            09:30:29,500 INFO [ConnectionProviderFactory] Initializing connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
            09:30:29,500 INFO [InjectedDataSourceConnectionProvider] Using provided datasource
            09:30:29,500 INFO [SettingsFactory] RDBMS: MySQL, version: 5.1.28-rc-community
            09:30:29,500 INFO [SettingsFactory] JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-5.1.6 ( Revision: ${svn.Revision} )
            09:30:29,500 INFO [Dialect] Using dialect: org.hibernate.dialect.MySQLDialect
            09:30:29,500 INFO [TransactionFactoryFactory] Transaction strategy: org.hibernate.ejb.transaction.JoinableCMTTransactionFactory
            09:30:29,500 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
            09:30:29,500 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
            09:30:29,500 INFO [SettingsFactory] Automatic flush during beforeCompletion(): disabled
            09:30:29,500 INFO [SettingsFactory] Automatic session close at end of transaction: disabled
            09:30:29,500 INFO [SettingsFactory] JDBC batch size: 15
            09:30:29,500 INFO [SettingsFactory] JDBC batch updates for versioned data: disabled
            09:30:29,500 INFO [SettingsFactory] Scrollable result sets: enabled
            09:30:29,500 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): enabled
            09:30:29,500 INFO [SettingsFactory] Connection release mode: auto
            09:30:29,500 INFO [SettingsFactory] Default schema: socialnetwork
            09:30:29,500 INFO [SettingsFactory] Maximum outer join fetch depth: 2
            09:30:29,500 INFO [SettingsFactory] Default batch fetch size: 1
            09:30:29,500 INFO [SettingsFactory] Generate SQL with comments: disabled
            09:30:29,500 INFO [SettingsFactory] Order SQL updates by primary key: disabled
            09:30:29,500 INFO [SettingsFactory] Order SQL inserts for batching: disabled
            09:30:29,500 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
            09:30:29,500 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
            09:30:29,500 INFO [SettingsFactory] Query language substitutions: {}
            09:30:29,500 INFO [SettingsFactory] JPA-QL strict compliance: enabled
            09:30:29,500 INFO [SettingsFactory] Second-level cache: enabled
            09:30:29,500 INFO [SettingsFactory] Query cache: disabled
            09:30:29,500 INFO [SettingsFactory] Cache region factory : org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge
            09:30:29,500 INFO [RegionFactoryCacheProviderBridge] Cache provider: org.hibernate.cache.HashtableCacheProvider
            09:30:29,500 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
            09:30:29,500 INFO [SettingsFactory] Cache region prefix: persistence.unit:unitName=#SocialNetwork
            09:30:29,500 INFO [SettingsFactory] Structured second-level cache entries: disabled
            09:30:29,500 INFO [SettingsFactory] Statistics: disabled
            09:30:29,500 INFO [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
            09:30:29,500 INFO [SettingsFactory] Default entity-mode: pojo
            09:30:29,500 INFO [SettingsFactory] Named query checking : enabled
            09:30:29,516 INFO [SessionFactoryImpl] building session factory
            09:30:29,578 INFO [SessionFactoryObjectFactory] Factory name: persistence.unit:unitName=#SocialNetwork
            09:30:29,578 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
            09:30:29,594 INFO [SessionFactoryObjectFactory] Bound factory to JNDI name: persistence.unit:unitName=#SocialNetwork
            09:30:29,594 WARN [SessionFactoryObjectFactory] InitialContext did not implement EventContext
            09:30:29,594 INFO [SchemaUpdate] Running hbm2ddl schema update
            09:30:29,594 INFO [SchemaUpdate] fetching database metadata
            09:30:29,594 INFO [SchemaUpdate] updating schema
            09:30:29,610 INFO [TableMetadata] table found: socialNetwork.t_forum
            09:30:29,610 INFO [TableMetadata] columns: [id, network_fk, admin2, status, admin1, name]
            09:30:29,610 INFO [TableMetadata] foreign keys: [fka040c996cc46603f]
            09:30:29,610 INFO [TableMetadata] indexes: [fka040c996cc46603f, primary]
            09:30:29,610 INFO [TableMetadata] table found: socialNetwork.t_network
            09:30:29,610 INFO [TableMetadata] columns: [id, adress, name]
            09:30:29,610 INFO [TableMetadata] foreign keys: []
            09:30:29,610 INFO [TableMetadata] indexes: [primary]
            09:30:29,625 INFO [TableMetadata] table found: socialNetwork.t_post
            09:30:29,625 INFO [TableMetadata] columns: [user_fk, message, id, author, title, forum_fk, date, parent_id]
            09:30:29,625 INFO [TableMetadata] foreign keys: [fkcb61798bc453f1c9, fkcb61798bf1ea421f]
            09:30:29,625 INFO [TableMetadata] indexes: [fkcb61798bc453f1c9, primary, fkcb61798bf1ea421f]
            09:30:29,625 INFO [TableMetadata] table found: socialNetwork.t_private_info
            09:30:29,625 INFO [TableMetadata] columns: [id, street1, mail, birthdate, lastname, firstname, telephone, contacts]
            09:30:29,625 INFO [TableMetadata] foreign keys: []
            09:30:29,625 INFO [TableMetadata] indexes: [primary]
            09:30:29,641 INFO [TableMetadata] table found: socialNetwork.t_public_info
            09:30:29,641 INFO [TableMetadata] columns: [skills, id, studies]
            09:30:29,641 INFO [TableMetadata] foreign keys: []
            09:30:29,641 INFO [TableMetadata] indexes: [primary]
            09:30:29,641 INFO [TableMetadata] table found: socialNetwork.t_restricted_info
            09:30:29,641 INFO [TableMetadata] columns: [id, career, fieldactivities, country, city]
            09:30:29,641 INFO [TableMetadata] foreign keys: []
            09:30:29,641 INFO [TableMetadata] indexes: [primary]
            09:30:29,657 INFO [TableMetadata] table found: socialNetwork.t_user
            09:30:29,657 INFO [TableMetadata] columns: [private_i_fk, id, restricted_i_fk, public_i_fk, network_fk, forum_fk, login, password, authorisation]
            09:30:29,657 INFO [TableMetadata] foreign keys: [fkcb63ccb6f1ea421f, fkcb63ccb6ebea4570, fkcb63ccb6de0be28c, fkcb63ccb6cc46603f, fkcb63ccb6a2f722e6]
            09:30:29,657 INFO [TableMetadata] indexes: [fkcb63ccb6f1ea421f, fkcb63ccb6ebea4570, fkcb63ccb6cc46603f, fkcb63ccb6de0be28c, primary, login, fkcb63ccb6a2f722e6]
            09:30:29,657 INFO [SchemaUpdate] schema update complete
            09:30:29,657 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
            09:30:29,875 INFO [SessionSpecContainer] Starting jboss.j2ee:jar=Social-Network.jar,name=ForumB,service=EJB3
            09:30:29,875 INFO [EJBContainer] STARTED EJB: com.sn.stateless.ForumBean ejbName: ForumB
            09:30:29,891 INFO [SessionSpecContainer] Starting jboss.j2ee:jar=Social-Network.jar,name=UserB,service=EJB3
            09:30:29,891 INFO [EJBContainer] STARTED EJB: com.sn.stateless.UserBean ejbName: UserB
            09:30:29,907 INFO [SessionSpecContainer] Starting jboss.j2ee:jar=Social-Network.jar,name=NetworkB,service=EJB3
            09:30:29,907 INFO [EJBContainer] STARTED EJB: com.sn.stateless.NetworkBean ejbName: NetworkB
            09:30:29,922 INFO [SessionSpecContainer] Starting jboss.j2ee:jar=Social-Network.jar,name=PostB,service=EJB3
            09:30:29,922 INFO [EJBContainer] STARTED EJB: com.sn.stateless.PostBean ejbName: PostB
            09:30:29,938 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:
            
             PostB/local - EJB3.x Default Local Business Interface
             PostB/local-com.sn.stateless.PostLocal - EJB3.x Local Business Interface
            
            09:30:29,969 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:
            
             ejb/stateless/Network - EJB3.x Default Remote Business Interface
             NetworkB/remote-com.sn.stateless.NetworkRemote - EJB3.x Remote Business Interface
             NetworkB/local - EJB3.x Default Local Business Interface
             NetworkB/local-com.sn.stateless.NetworkLocal - EJB3.x Local Business Interface
            
            09:30:29,985 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:
            
             ejb/stateless/User - EJB3.x Default Remote Business Interface
             UserB/remote-com.sn.stateless.UserRemote - EJB3.x Remote Business Interface
             UserB/local - EJB3.x Default Local Business Interface
             UserB/local-com.sn.stateless.UserLocal - EJB3.x Local Business Interface
            
            09:30:30,000 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:
            
             ForumB/local - EJB3.x Default Local Business Interface
             ForumB/local-com.sn.stateless.ForumLocal - EJB3.x Local Business Interface
            
            09:30:40,063 INFO [TomcatDeployment] undeploy, ctxPath=/Social-Network_Web, vfsUrl=Social-Network_Web.war
            09:30:40,391 WARN [MappedReferenceMetaDataResolverDeployer] Unresolved references exist in JBossWebMetaData:[#web-app:AnnotatedEJBReferenceMetaData{name=UserB,ejb-ref-type=null,link=null,ignore-dependecy=false,mapped/jndi-name=ejb/stateless/User,resolved-jndi-name=null,beanInterface=interface com.sn.stateless.UserLocal}, #web-app:AnnotatedEJBReferenceMetaData{name=PostB,ejb-ref-type=null,link=null,ignore-dependecy=false,mapped/jndi-name=ejb/stateless/Post,resolved-jndi-name=null,beanInterface=interface com.sn.stateless.PostLocal}, #web-app:AnnotatedEJBReferenceMetaData{name=NetworkB,ejb-ref-type=null,link=null,ignore-dependecy=false,mapped/jndi-name=ejb/stateless/Network,resolved-jndi-name=null,beanInterface=interface com.sn.stateless.NetworkLocal}, #web-app:AnnotatedEJBReferenceMetaData{name=ForumB,ejb-ref-type=null,link=null,ignore-dependecy=false,mapped/jndi-name=ejb/stateless/Forum,resolved-jndi-name=null,beanInterface=interface com.sn.stateless.ForumLocal}]
            09:30:40,516 INFO [TomcatDeployment] deploy, ctxPath=/Social-Network_Web, vfsUrl=Social-Network_Web.war
            09:31:15,594 ERROR [FieldBeanProperty] Field Classloader: BaseClassLoader@de2a10{vfszip:/C:/jboss-5.0.0.GA/server/default/deploy/Social-Network.jar}
            Value ClassLoader: org.jboss.web.tomcat.service.WebCtxLoader$ENCLoader@5b13ed
            Equal Loaders: false
            09:31:15,594 ERROR [FieldBeanProperty] failed to set value Proxy to jboss.j2ee:jar=Social-Network.jar,name=UserB,service=EJB3 implementing [interface com.sn.stateless.UserRemote, interface org.jboss.ejb3.proxy.intf.EjbProxy, interface org.jboss.ejb3.proxy.intf.SessionProxy] on field private com.sn.stateless.UserLocal com.sn.managedBeanJSF.AccountController.userBean; Reason: ClassLoaders of value and target are not equal
            java.lang.IllegalArgumentException: Can not set com.sn.stateless.UserLocal field com.sn.managedBeanJSF.AccountController.userBean to $Proxy228
             at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:146)
             at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:150)
             at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:63)
             at java.lang.reflect.Field.set(Field.java:657)
             at org.jboss.injection.lang.reflect.FieldBeanProperty.set(FieldBeanProperty.java:74)
             at org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:119)
             at org.jboss.web.tomcat.service.TomcatInjectionContainer.processInjectors(TomcatInjectionContainer.java:360)
             at org.jboss.web.jsf.integration.injection.JBossDelegatingInjectionProvider.inject(JBossDelegatingInjectionProvider.java:77)
             at com.sun.faces.mgbean.BeanBuilder.injectResources(BeanBuilder.java:203)
             at com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:107)
             at com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:368)
             at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:222)
             at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:86)
             at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
             at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
             at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:61)
             at org.apache.el.parser.AstValue.getValue(AstValue.java:107)
             at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
             at org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:101)
             at javax.faces.component.UIOutput.getValue(UIOutput.java:184)
             at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:201)
             at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:284)
             at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:154)
             at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:861)
             at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
             at javax.faces.render.Renderer.encodeChildren(Renderer.java:148)
             at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
             at javax.faces.component.UIComponent.encodeAll(UIComponent.java:930)
             at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
             at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:266)
             at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:197)
             at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
             at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
             at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
             at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
             at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
             at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
             at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
             at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
             at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
             at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
             at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
             at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
             at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
             at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
             at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
             at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
             at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
             at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
             at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
             at java.lang.Thread.run(Thread.java:619)
            09:31:15,610 ERROR [lifecycle] JSF1054: (Phase ID: RENDER_RESPONSE 6, View ID: /signon.jsp) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@d8765b]
            09:31:15,610 ERROR [[Faces Servlet]] "Servlet.service()" pour la servlet Faces Servlet a g�n�r� une exception
            java.lang.IllegalArgumentException: failed to set value Proxy to jboss.j2ee:jar=Social-Network.jar,name=UserB,service=EJB3 implementing [interface com.sn.stateless.UserRemote, interface org.jboss.ejb3.proxy.intf.EjbProxy, interface org.jboss.ejb3.proxy.intf.SessionProxy] on field private com.sn.stateless.UserLocal com.sn.managedBeanJSF.AccountController.userBean; Reason: ClassLoaders of value and target are not equal
             at org.jboss.injection.lang.reflect.FieldBeanProperty.set(FieldBeanProperty.java:99)
             at org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:119)
             at org.jboss.web.tomcat.service.TomcatInjectionContainer.processInjectors(TomcatInjectionContainer.java:360)
             at org.jboss.web.jsf.integration.injection.JBossDelegatingInjectionProvider.inject(JBossDelegatingInjectionProvider.java:77)
             at com.sun.faces.mgbean.BeanBuilder.injectResources(BeanBuilder.java:203)
             at com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:107)
             at com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:368)
             at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:222)
             at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:86)
             at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
             at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
             at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:61)
             at org.apache.el.parser.AstValue.getValue(AstValue.java:107)
             at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
             at org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:101)
             at javax.faces.component.UIOutput.getValue(UIOutput.java:184)
             at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:201)
             at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:284)
             at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:154)
             at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:861)
             at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
             at javax.faces.render.Renderer.encodeChildren(Renderer.java:148)
             at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
             at javax.faces.component.UIComponent.encodeAll(UIComponent.java:930)
             at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
             at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:266)
             at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:197)
             at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
             at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
             at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
             at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
             at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
             at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
             at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
             at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
             at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
             at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
             at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
             at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
             at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
             at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
             at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
             at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
             at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
             at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
             at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
             at java.lang.Thread.run(Thread.java:619)
            
            
            


            (it's too long...)

            • 3. Re: jsf injection ejb3
              jaikiran pai Master

              1) The exception stacktrace that you posted now is not the NameNotFoundException that you reported earlier :)

              2) Going by the logs, it looks like you are deploying the EJB3 app as a jar and the servlet in a separate WAR. Nothing wrong with this.

              3) The WAR contains your EJB interfaces (ex: the UserLocal). The EJB jar too contains the same interfaces. However both these deployments use different classloaders, which i guess is resulting in this error.

              We had a similar discussion about this sometime back. See this http://www.jboss.com/index.html?module=bb&op=viewtopic&t=145941&postdays=0&postorder=asc&start=20

              • 4. Re: jsf injection ejb3
                matt arr Newbie

                thanks, i saw that one of solutions is to change the attribute UseJBossWebLoader to true but in jboss 5 where we can find the file equivalent to

                %JBOSS_HOME%/server/< serverName>/deploy/jboss-web.deployer/META-INF/jboss-service.xml

                i tried to find the attribute but without success...
                thanks for your help! :)