[jboss-user] [EJB/JBoss] - Re: EJB lookup failure in 5.0.0.GA

jhsingle do-not-reply at jboss.com
Fri Dec 19 23:01:16 EST 2008


Here is the exception stacktrace:
java.lang.ClassCastException: javax.naming.Reference
  | 	at security.ejb.server.SecurityManagerRemoteFactory.createSecurityManangerRemote(SecurityManagerRemoteFactory.java:44)
  | 	at security.ejb.server.SecurityManagerTest.cleanup(SecurityManagerTest.java:760)
  | 	at security.ejb.server.SecurityManagerTest.setUp(SecurityManagerTest.java:742)
  | 	at junit.framework.TestCase.runBare(TestCase.java:128)
  | 	at junit.framework.TestResult$1.protect(TestResult.java:106)
  | 	at junit.framework.TestResult.runProtected(TestResult.java:124)
  | 	at junit.framework.TestResult.run(TestResult.java:109)
  | 	at junit.framework.TestCase.run(TestCase.java:120)
  | 	at junit.framework.TestSuite.runTest(TestSuite.java:230)
  | 	at junit.framework.TestSuite.run(TestSuite.java:225)
  | 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 	at java.lang.reflect.Method.invoke(Method.java:585)
  | 	at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)
  | 	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
  | 	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
  | 	at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
  | 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 	at java.lang.reflect.Method.invoke(Method.java:585)
  | 	at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338)
  | 	at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997)
  | 

Here is the toString of the object returned by the lookup:
EJB lookup returned: Reference Class Name: Proxy for: security.ejb.client.SecurityManagerRemote
  | Type: ProxyFactoryKey
  | Content: ProxyFactory/SecurityManager/usermgmt/SecurityManager/remote
  | Type: EJB Container Name
  | Content: jboss.j2ee:ear=usermgmt.ear,jar=usermgmt-ejb-2.7.0.jar,name=SecurityManager,service=EJB3
  | Type: Proxy Factory is Local
  | Content: false
  | Type: Remoting Host URL
  | Content: socket://Macintosh.home:3873/?
  | Type: Remote Business Interface
  | Content: security.ejb.client.SecurityManagerRemote


As far as using jbossall-client.jar from the distro client directory, there is a problem there.  My client, a JUnit test, like everything else in our project uses a Maven2 build.  So we don't point to any local directories, but rather our pom.xml file points to artifacts from networked maven repositories.  I was unable to locate the client jar files in the current jboss maven repository (http://repository.jboss.org/maven2/) so for this test I loaded the jbosssx-as-client.jar from the distribution client directory into our local project maven repository.  This raises two questions: (1) are the JBoss5 client jars available in any maven repository, and (2) given the indirect nature of jbossall-client.jar, will it even work with maven, or do I need to name all of the referenced jar files in my pom for this test?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4197768#4197768

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4197768



More information about the jboss-user mailing list