Hi Stephen,
I try migrating to beta and the same error happened.
I decided to try using the trial version of enterprise edition 5.1, and I get the same error, this is my configuration
-----------------------------------------------------------------------------------------------------------------------
INTERFACE
package ejb;
import javax.ejb.Local;
@Local
public interface HelloBeanLocal
{
public String doQuery();
}
(I have an interface exactly the same for the remote bean)
---------------------------------------------------------------------------------------------------------------------------------------------
CLIENT
package ejb;
import java.util.Properties;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
public class HelloBeanClient {
/**
* @param args
* @throws NamingException
*/
public static void main(String[] args) throws NamingException
{
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
p.put(Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces");
p.put(Context.PROVIDER_URL, "localhost:1099");
InitialContext ctx = new InitialContext(p);
HelloBean ejb = (HelloBean) ctx.lookup("Hello/bean/local");
ejb.doQuery();
}
}
(I added the properties object because if not, I cant run the program because it says I need to specify class name in environment.)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This is my structure of the program
App1
-ejbModule
-ejb
-HelloBean
-HelloBeanClient
-HelloBeanLocal
-HelloBeanRemote
-jndi.properties
-META-INF
-Libraries
(NOTE: I already tried placing the jndi file in the root folder and the meta-inf, and none worked.)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This is the jndi view in the jmx console
java:comp namespace of the component jboss.j2ee:jar=App1.jar,name=HelloBean,service=EJB3 :
+- EJBContext[link -> java:internal/EJBContext] (class: javax.naming.LinkRef)
+- TransactionSynchronizationRegistry[link -> java:TransactionSynchronizationRegistry] (class: javax.naming.LinkRef)
+- UserTransaction (class: org.jboss.ejb3.tx.UserTransactionImpl)
+- env (class: org.jnp.interfaces.NamingContext)
+- ORB[link -> java:/JBossCorbaORB] (class: javax.naming.LinkRef)
java: Namespace
+- securityManagement (class: org.jboss.security.integration.JNDIBasedSecurityManagement)
+- comp (class: javax.namingMain.Context)
+- 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)
+- ProfileService (class: org.jboss.system.server.profileservice.repository.AbstractProfileService)
+- DefaultDS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
+- jaas (class: javax.naming.Context)
| +- jmx-console (class: org.jboss.security.plugins.SecurityDomainContext)
| +- messaging (class: org.jboss.security.plugins.SecurityDomainContext)
| +- HsqlDbRealm (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
+- internal (class: org.jnp.interfaces.NamingContext)
| +- EJBContext (class: javax.ejb.EJBContext)
Global JNDI Namespace
+- UserTransactionSessionFactory (proxy: $Proxy99 implements interface org.jboss.tm.usertx.interfaces.UserTransactionSessionFactory)
+- HelloBean (class: org.jnp.interfaces.NamingContext)
| +- remote-ejb.HelloBeanRemote (class: Proxy for: ejb.HelloBeanRemote)
| +- local (class: Proxy for: ejb.HelloBeanLocal)
| +- local-ejb.HelloBeanLocal (class: Proxy for: ejb.HelloBeanLocal)
| +- remote (class: Proxy for: ejb.HelloBeanRemote)
+- UUIDKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.uuid.UUIDKeyGeneratorFactory)
+- HiLoKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory)
+- SecureDeploymentManager (class: org.jnp.interfaces.NamingContext)
| +- remote[link -> DeploymentManager] (class: javax.naming.LinkRef)
+- SecureManagementView (class: org.jnp.interfaces.NamingContext)
| +- remote[link -> ManagementView] (class: javax.naming.LinkRef)
+- DeploymentManager (class: org.jboss.aop.generatedproxies.AOPProxy$4)
+- XAConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory)
+- topic (class: org.jnp.interfaces.NamingContext)
+- ClusteredConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory)
+- ProfileService (class: org.jboss.aop.generatedproxies.AOPProxy$2)
+- SecureProfileService (class: org.jnp.interfaces.NamingContext)
| +- remote[link -> ProfileService] (class: javax.naming.LinkRef)
+- 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: $Proxy101 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)
+- ProxyFactory (class: org.jnp.interfaces.NamingContext)
| +- App1 (class: org.jnp.interfaces.NamingContext)
| | +- HelloBean (class: org.jnp.interfaces.NamingContext)
| | | +- HelloBean (class: org.jnp.interfaces.NamingContext)
| | | | +- remote (proxy: $Proxy114 implements interface org.jboss.ejb3.proxy.impl.factory.session.SessionProxyFactory,interface org.jboss.ejb3.proxy.impl.factory.ProxyFactory,interface org.jboss.ejb3.proxy.impl.factory.session.SessionSpecProxyFactory)
+- TomcatAuthenticators (class: java.util.Properties)
+- console (class: org.jnp.interfaces.NamingContext)
| +- PluginManager (proxy: $Proxy102 implements interface org.jboss.console.manager.PluginManagerMBean)
+- ManagementView (class: org.jboss.aop.generatedproxies.AOPProxy$3)
Thanks