-
1. Re: Migration problem to JBoss 5 GA
jaikiran Dec 25, 2008 9:23 AM (in response to onur.aktas)That looks strange. Can you please post the entire console logs and the bean interface and implementation class code including the import statements in those classes. Also please post the JNDI tree contents.
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 your post is correctly formatted. -
2. Re: Migration problem to JBoss 5 GA
onur.aktas Dec 25, 2008 1:01 PM (in response to onur.aktas)Hi.. Thank you for your reply. This EJB work with JBoss 4.2.3 GA and does not work with JBoss 5.0 GA
package com.test.model.ejb.system; import com.test.model.entity.system.Usr; import javax.ejb.Stateless; @Stateless(name = "UsrEJB") public class UsrEJBBean implements UsrEJB, UsrEJBLocal { @PersistenceContext(name = "testPU") EntityManager em; public UsrEJBBean() { } public Usr persist(Usr usrEntity) { em.persist(usrEntity); return usrEntity; } }
It does not give any error, just warnings but it does not bind EJB to JNDI Tree like JBoss 4.2.3 GA.
Related Console logs when i deploy:19:59:20,145 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces} 19:59:20,145 INFO [UpdateTimestampsCache] starting update timestamps cache at region: persistence.unit:unitName=test.ear/testEjb.jar#testPU.org.hibernate.cache.UpdateTimestampsCache 19:59:20,145 INFO [StandardQueryCache] starting query cache at region: persistence.unit:unitName=test.ear/testEjb.jar#testPU.org.hibernate.cache.StandardQueryCache 19:59:20,285 INFO [SessionSpecContainer] Starting jboss.j2ee:ear=test.ear,jar=testEjb.jar,name=UsrEJB,service=EJB3 19:59:20,286 INFO [EJBContainer] STARTED EJB: com.test.model.ejb.system.UsrEJBBean ejbName: UsrEJB 19:59:20,286 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI: 19:59:20,339 WARN [WebServiceDeployerEJB] Ingore ejb deployment with null classname: org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData@97955a49{UsrEJB} 19:59:20,768 INFO [TomcatDeployment] deploy, ctxPath=/, vfsUrl=test.ear/testWeb.war 19:59:21,381 INFO [JBossSerializationProvider] Using JBoss Serialization for JavaServer Faces. 19:59:21,398 INFO [JBossSerializationProvider] Using JBoss Serialization for JavaServer Faces.
Jndi Tree:Other components with java:comp namespace java:comp namespace of the component jboss.j2ee:ear=test.ear,jar=testEjb.jar,name=UsrEJB,service=EJB3 : +- EJBContext (class: javax.ejb.EJBContext) +- TransactionSynchronizationRegistry[link -> java:TransactionSynchronizationRegistry] (class: javax.naming.LinkRef) +- UserTransaction (class: org.jboss.ejb3.tx.UserTransactionImpl) +- env (class: org.jnp.interfaces.NamingContext) | +- testPU (class: org.jboss.jpa.tx.TransactionScopedEntityManager) +- ORB[link -> java:/JBossCorbaORB] (class: javax.naming.LinkRef) java: Namespace +- securityManagement (class: org.jboss.security.integration.JNDIBasedSecurityManagement) +- comp (class: javax.namingMain.Context) +- testds (class: org.jboss.resource.adapter.jdbc.WrapperDataSource) +- XAConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory) +- JmsXA (class: org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl) +- TransactionPropagationContextImporter (class: com.arjuna.ats.internal.jbossatx.jta.PropagationContextManager) +- policyRegistration (class: org.jboss.security.plugins.JBossPolicyRegistration) +- ClusteredConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory) +- Mail (class: javax.mail.Session) +- TransactionPropagationContextExporter (class: com.arjuna.ats.internal.jbossatx.jta.PropagationContextManager) +- DefaultDS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource) +- jaas (class: javax.naming.Context) | +- HsqlDbRealm (class: org.jboss.security.plugins.SecurityDomainContext) | +- profileservice (class: org.jboss.security.plugins.SecurityDomainContext) +- ClusteredXAConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory) +- TransactionSynchronizationRegistry (class: com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple) +- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory) +- ConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory) +- DefaultJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter) +- TransactionManager (class: com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate) +- timedCacheFactory (class: javax.naming.Context) Failed to lookup: timedCacheFactory, errmsg=org.jboss.util.TimedCachePolicy cannot be cast to javax.naming.NamingEnumeration Global JNDI Namespace +- UserTransactionSessionFactory (proxy: $Proxy104 implements interface org.jboss.tm.usertx.interfaces.UserTransactionSessionFactory) +- UUIDKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.uuid.UUIDKeyGeneratorFactory) +- HiLoKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory) +- XAConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory) +- topic (class: org.jnp.interfaces.NamingContext) +- ClusteredConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory) +- ProfileService (class: AOPProxy$0) +- queue (class: org.jnp.interfaces.NamingContext) | +- DLQ (class: org.jboss.jms.destination.JBossQueue) | +- ExpiryQueue (class: org.jboss.jms.destination.JBossQueue) +- ClusteredXAConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory) +- UserTransaction (class: org.jboss.tm.usertx.client.ClientUserTransaction) +- ConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory) +- jmx (class: org.jnp.interfaces.NamingContext) | +- invoker (class: org.jnp.interfaces.NamingContext) | | +- RMIAdaptor (proxy: $Proxy100 implements interface org.jboss.jmx.adaptor.rmi.RMIAdaptor,interface org.jboss.jmx.adaptor.rmi.RMIAdaptorExt) | +- rmi (class: org.jnp.interfaces.NamingContext) | | +- RMIAdaptor[link -> jmx/invoker/RMIAdaptor] (class: javax.naming.LinkRef) +- TomcatAuthenticators (class: java.util.Properties) +- persistence.unit:unitName=test.ear (class: org.jnp.interfaces.NamingContext) | +- testEjb.jar#testPU (class: org.hibernate.impl.SessionFactoryImpl) +- console (class: org.jnp.interfaces.NamingContext) | +- PluginManager (proxy: $Proxy101 implements interface org.jboss.console.manager.PluginManagerMBean)
Thank you very much. -
3. Re: Migration problem to JBoss 5 GA
onur.aktas Dec 25, 2008 5:03 PM (in response to onur.aktas)Solved
The problem is that SessionBean implements 2 interfaces. Local and Remote. Since Remote interfaces has no methods inside while Local one has all methods that SessionBean implements.
Removing Remote interface has solved the issue, however it looks like a bug or any unacceptable design pattern that previous release does not show any warnings neither new release does..
Thanks. -
4. Re: Migration problem to JBoss 5 GA
jaikiran Dec 26, 2008 12:58 AM (in response to onur.aktas)Let's continue any further discussion about this, in your other thread here http://www.jboss.com/index.html?module=bb&op=viewtopic&t=147843