aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes EJB Client is able to lookup the bean and not able to invoke remote method on that bean in jboss 5 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJB Client is able to lookup the bean and not able to invoke remote method on that bean in jboss 5" Watch "EJB Client is able to lookup the bean and not able to invoke remote method on that bean in jboss 5" New topic
Author

EJB Client is able to lookup the bean and not able to invoke remote method on that bean in jboss 5

Sanal Grover
Greenhorn

Joined: Jun 22, 2013
Posts: 1

Please help me out i have not been able to resolve this issue since long time.



public class Client {

/**
* @param args the command line arguments
*/
public static void main(String[] args) {

try
{
System.out.println("Test");
Properties props=new Properties();
props.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
props.put("java.naming.factory.url.pkgs","org.jboss.namingrg.jnp.interfaces");
props.put("java.naming.provider.url","localhost");
System.out.println("Test");
//props.load(new FileInputStream("jndi.properties"));

InitialContext ctx=new InitialContext(props);
System.out.println("Test");
FirstBeanLocal bean=(FirstBeanLocal)ctx.lookup("FirstBean/remote");
System.out.println(bean.getString());

}catch(Exception ex){ex.printStackTrace();}

}
}





java.lang.reflect.UndeclaredThrowableException
at $Proxy2.getString(Unknown Source)
at client.Client.main(Client.java:35)
Caused by: java.security.PrivilegedActionException: java.lang.reflect.InvocationTargetException
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.ejb3.security.client.SecurityActions.createSecurityContext(SecurityActions.java:657)
at org.jboss.ejb3.security.client.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:59)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
at $Proxy3.invoke(Unknown Source)
at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:207)
at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:164)
... 2 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.jboss.security.SecurityContextFactory.createSecurityContext(SecurityContextFactory.java:117)
at org.jboss.security.SecurityContextFactory.createSecurityContext(SecurityContextFactory.java:76)
at org.jboss.ejb3.security.client.SecurityActions$1.run(SecurityActions.java:662)
... 12 more
Caused by: java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/security/jacc/PolicyContextException
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at org.jboss.security.plugins.JBossSecurityContext.<init>(JBossSecurityContext.java:82)
... 19 more
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: EJB Client is able to lookup the bean and not able to invoke remote method on that bean in jboss 5