[jboss-user] [JBoss Seam] - SEAM don't can find session bean !!
JohnBat26
do-not-reply at jboss.com
Wed Mar 28 17:57:33 EDT 2007
Hello.
I have next problem with SEAM (1.2.1.GA)
-------------------------------
My config:
JSF: jsf-1.2_04-b10-p01
SEAM: 1.2.1.GA
JBoss: 4.0.5.GA
OS: Gentoo Linux (AMD64)
VM: BEA JRockIt 6.0 and Sun JVM 6.0
---------------------------------
I created one entity (User) and one Session Bean (UserActionBean).
This is my ejb-jar.xml:
---------------------------
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar
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/ejb-jar_3_0.xsd"
version="3.0">
<![CDATA[No Description.]]>
<display-name>Generated by AndroMDA EJB3 Cartridge</display-name>
<enterprise-beans>
<![CDATA[
]]>
<ejb-name>UserActionBean</ejb-name>
org.it.itMail.service.UserActionRemote
org.it.itMail.service.UserActionLocal
<ejb-class>org.it.itMail.service.UserActionBean</ejb-class>
<session-type>Stateful</session-type>
<transaction-type>Container</transaction-type>
<![CDATA[
]]>
<ejb-name>UserDao</ejb-name>
org.it.itMail.domain.UserDao
<ejb-class>org.it.itMail.domain.UserDaoImpl</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</enterprise-beans>
<interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
<assembly-descriptor>
<interceptor-binding>
<ejb-name>*</ejb-name>
<interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
</interceptor-binding>
</assembly-descriptor>
</ejb-jar>
---------------------------
When I start JBoss, EJB3Deployer install this two component properly. So they available from JNDI.
This part log from JBoss:
-------------------------------
01:50:13,292 INFO [JmxKernelAbstraction] jboss.jca:name=jdbc/itMail,service=DataSourceBinding
01:50:13,473 INFO [Version] Hibernate EntityManager 3.2.0.GA
01:50:13,489 INFO [Version] Hibernate Annotations 3.2.0.GA
01:50:13,508 INFO [Environment] Hibernate 3.2.0.ga
01:50:13,514 INFO [Environment] hibernate.properties not found
01:50:13,516 INFO [Environment] Bytecode provider name : javassist
01:50:13,521 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling
01:50:13,634 INFO [Ejb3Configuration] found EJB3 Entity bean: org.it.itMail.domain.User
01:50:13,642 WARN [Ejb3Configuration] Persistence provider caller does not implements the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoader() is null.
01:50:13,698 INFO [Configuration] Reading mappings from resource: META-INF/orm.xml
01:50:13,701 INFO [Ejb3Configuration] [PersistenceUnit: itMail] no META-INF/orm.xml found
01:50:13,893 INFO [AnnotationBinder] Binding entity from annotated class: org.it.itMail.domain.User
01:50:13,915 INFO [QueryBinder] Binding Named query: User.findAll => select user from User AS user
01:50:13,968 INFO [EntityBinder] Bind entity org.it.itMail.domain.User on table USERS
01:50:14,345 INFO [ConnectionProviderFactory] Initializing connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
01:50:14,348 INFO [InjectedDataSourceConnectionProvider] Using provided datasource
01:50:14,700 INFO [SettingsFactory] RDBMS: MySQL, version: 5.0.34-log
01:50:14,700 INFO [SettingsFactory] JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-5.0.4 ( $Date: 2006-10-19 17:47:48 +0200 (Thu, 19 Oct 2006) $, $Revision: 5908 $ )
01:50:14,729 INFO [Dialect] Using dialect: org.hibernate.dialect.MySQLInnoDBDialect
01:50:14,737 INFO [TransactionFactoryFactory] Transaction strategy: org.hibernate.ejb.transaction.JoinableCMTTransactionFactory
01:50:14,740 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
01:50:14,742 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
01:50:14,742 INFO [SettingsFactory] Automatic flush during beforeCompletion(): disabled
01:50:14,742 INFO [SettingsFactory] Automatic session close at end of transaction: disabled
01:50:14,743 INFO [SettingsFactory] JDBC batch size: 15
01:50:14,743 INFO [SettingsFactory] JDBC batch updates for versioned data: disabled
01:50:14,744 INFO [SettingsFactory] Scrollable result sets: enabled
01:50:14,745 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): enabled
01:50:14,745 INFO [SettingsFactory] Connection release mode: auto
01:50:14,746 INFO [SettingsFactory] Maximum outer join fetch depth: 2
01:50:14,746 INFO [SettingsFactory] Default batch fetch size: 1
01:50:14,746 INFO [SettingsFactory] Generate SQL with comments: disabled
01:50:14,746 INFO [SettingsFactory] Order SQL updates by primary key: disabled
01:50:14,747 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
01:50:14,749 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
01:50:14,750 INFO [SettingsFactory] Query language substitutions: {}
01:50:14,750 INFO [SettingsFactory] JPA-QL strict compliance: enabled
01:50:14,750 INFO [SettingsFactory] Second-level cache: enabled
01:50:14,750 INFO [SettingsFactory] Query cache: disabled
01:50:14,751 INFO [SettingsFactory] Cache provider: org.hibernate.cache.HashtableCacheProvider
01:50:14,752 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
01:50:14,752 INFO [SettingsFactory] Structured second-level cache entries: disabled
01:50:14,759 INFO [SettingsFactory] Statistics: disabled
01:50:14,759 INFO [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
01:50:14,760 INFO [SettingsFactory] Default entity-mode: pojo
01:50:14,808 INFO [SessionFactoryImpl] building session factory
01:50:15,201 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
01:50:15,206 INFO [SchemaUpdate] Running hbm2ddl schema update
01:50:15,206 INFO [SchemaUpdate] fetching database metadata
01:50:15,209 INFO [SchemaUpdate] updating schema
01:50:15,300 INFO [TableMetadata] table found: itMail.USERS
01:50:15,300 INFO [TableMetadata] columns: [id, first_name, last_name]
01:50:15,300 INFO [TableMetadata] foreign keys: []
01:50:15,300 INFO [TableMetadata] indexes: [primary]
01:50:15,307 INFO [SchemaUpdate] schema update complete
01:50:15,314 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
01:50:15,867 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=itMail-0.1.0-SNAPSHOT.ear,jar=itMail-core-0.1.0-SNAPSHOT.jar,name=UserActionBean,service=EJB3 with dependencies:
01:50:15,867 INFO [JmxKernelAbstraction] persistence.units:ear=itMail-0.1.0-SNAPSHOT.ear,jar=itMail-core-0.1.0-SNAPSHOT.jar,unitName=itMail
01:50:15,867 INFO [JmxKernelAbstraction] jboss.j2ee:ear=itMail-0.1.0-SNAPSHOT.ear,jar=itMail-core-0.1.0-SNAPSHOT.jar,name=UserDao,service=EJB3
01:50:15,869 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=itMail-0.1.0-SNAPSHOT.ear,jar=itMail-core-0.1.0-SNAPSHOT.jar,name=UserDao,service=EJB3 with dependencies:
01:50:15,869 INFO [JmxKernelAbstraction] persistence.units:ear=itMail-0.1.0-SNAPSHOT.ear,jar=itMail-core-0.1.0-SNAPSHOT.jar,unitName=itMail
01:50:16,144 INFO [EJBContainer] STARTED EJB: org.it.itMail.domain.UserDaoImpl ejbName: UserDao
01:50:16,211 INFO [EJBContainer] STARTED EJB: org.it.itMail.service.UserActionBean ejbName: UserActionBean
01:50:16,256 INFO [SimpleStatefulCache] Initializing SimpleStatefulCache with maxSize: 100000 timeout: 300 for jboss.j2ee:ear=itMail-0.1.0-SNAPSHOT.ear,jar=itMail-core-0.1.0-SNAPSHOT.jar,name=UserActionBean,service=EJB3
01:50:16,259 INFO [EJB3Deployer] Deployed: file:/home/jee/jboss-4.0.5.GA/server/default/deploy/itMail-0.1.0-SNAPSHOT.ear/itMail-core-0.1.0-SNAPSHOT.jar
01:50:16,261 INFO [TomcatDeployer] deploy, ctxPath=/itMail, warUrl=.../tmp/deploy/tmp46547itMail-web-0.1.0-SNAPSHOT-exp.war/
-------------------------------------------
When SEAM deploy this components:
-------------------------------
...
1:50:18,911 INFO [Component] Component: user, scope: EVENT, type: ENTITY_BEAN, class: org.it.itMail.domain.User
01:50:18,917 INFO [Component] Component: userAction, scope: CONVERSATION, type: STATEFUL_SESSION_BEAN, class: org.it.itMail.service.UserActionBean, JNDI: itMail-0.1.0-SNAPSHOT/UserActionBean/local
01:50:18,933 INFO [Lifecycle] starting up: org.jboss.seam.servlet.multipartFilter
01:50:18,934 INFO [Lifecycle] starting up: org.jboss.seam.servlet.exceptionFilter
01:50:18,937 INFO [Lifecycle] starting up: org.jboss.seam.ui.graphicImage.dynamicImageResource
01:50:18,938 INFO [Lifecycle] starting up: org.jboss.seam.servlet.redirectFilter
01:50:18,938 INFO [Lifecycle] starting up: org.jboss.seam.ui.resource.webResource
01:50:18,942 INFO [Initialization] done initializing Seam
01:50
-------------------------------
When all deployed OK. But when I get page from browser, show this error:
-----------------------------------
1:50:20,319 INFO [Server] JBoss (MX MicroKernel) [4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)] Started in 26s:453ms
01:50:46,851 INFO [ServletCacheAdministrator] Created new instance of ServletCacheAdministrator
01:50:46,852 INFO [ServletCacheAdministrator] Created new application-scoped cache at key: __oscache_cache
01:50:46,933 ERROR [STDERR] 29.03.2007 1:50:46 com.sun.faces.lifecycle.ELResolverInitPhaseListener populateFacesELResolverForJsp
INFO: JSF1027: [it-mail] The ELResolvers for JSF were not registered with the JSP container.
01:50:46,967 INFO [Lifecycle] starting up: org.jboss.seam.security.identity
01:50:47,400 ERROR [SeamPhaseListener] uncaught exception
java.lang.IllegalArgumentException: value of context variable is not an instance of the component bound to the context variable: userAction
at org.jboss.seam.Component.getInstance(Component.java:1655)
at org.jboss.seam.Component.getInstance(Component.java:1610)
at org.jboss.seam.Component.getInstance(Component.java:1604)
at org.jboss.seam.jsf.SeamELResolver.getValue(SeamELResolver.java:49)
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:68)
at com.sun.el.parser.AstValue.getTarget(AstValue.java:63)
at com.sun.el.parser.AstValue.invoke(AstValue.java:153)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
at com.sun.faces.application.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
at org.jboss.seam.actionparam.ActionParamBindingHelper.invokeTheExpression(ActionParamBindingHelper.java:58)
at org.jboss.seam.actionparam.ActionParamMethodBinding.invoke(ActionParamMethodBinding.java:75)
at org.jboss.seam.core.Expressions$2.invoke(Expressions.java:148)
at org.jboss.seam.pages.Page.enter(Page.java:229)
at org.jboss.seam.core.Pages.enterPage(Pages.java:276)
at org.jboss.seam.jsf.AbstractSeamPhaseListener.enterPage(AbstractSeamPhaseListener.java:276)
at org.jboss.seam.jsf.AbstractSeamPhaseListener.beforeRender(AbstractSeamPhaseListener.java:214)
at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:56)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
-----------------------------------
So, SEAM don't can find properly deployed session bean!!!
What I do wrong ?
Very wait answer....
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4032560#4032560
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4032560
More information about the jboss-user
mailing list