Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Jdeveloper - Stateless Session Bean + OC4J Exception - Urgent Please Help

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
I have a stateless Session Bean EJBs deployed on OC4J and the client on the same machine.

public String getCurrentTime()
{
return ""+ new java.util.Date();
}

I try to access it from a client running on the same machine(windows nt).

DateEJBClient dateEJBClient = new DateEJBClient();
try
{
Context context = getInitialContext();
DateEJBHome dateEJBHome = (DateEJBHome)PortableRemoteObject.narrow(context.lookup("DateEJB"), DateEJBHome.class);
DateEJB dateEJB;

// Use one of the create() methods below to create a new instance
dateEJB = dateEJBHome.create();

// Call any of the Remote methods below to access the EJB
System.out.println("Date & Time >>> "+dateEJB.getCurrentTime());

}
catch(Throwable ex)

Any idea why I get this error?

com.evermind.server.rmi.OrionRemoteException: jazn.com/admin is not allowed to call this EJB method, check your security settings (method-permission in ejb-jar.xml and security-role-mapping in orion-application.xml).
at DateEJBHome_StatelessSessionHomeWrapper3.create(DateEJBHome_StatelessSessionHomeWrapper3.java:40)
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:324)
at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:124)
at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:48)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
at java.lang.Thread.run(Thread.java:534)
at connection to localhost/127.0.0.1 as admin
at DateEJBHome_StatelessSessionHomeWrapper3.create(DateEJBHome_StatelessSessionHomeWrapper3.java:40)
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:324)
at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:124)
at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:48)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
at java.lang.Thread.run(Thread.java:534)
Process exited with exit code 0.
 
Sheriff
Posts: 4012
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Hi Kola,

I'm closing this thread - you got some answers over in the Oracle forum. In future, please post your question in one forum only. Having one discussion at a time makes it a lot easier for people to help you out.

Welcome to Java Ranch!


Pauline

p.s. A little friendly advice... Some people get in a really bad mood when they see "Urgent" in the subject of a post. In our effort to keep everyone smiling and feeling good at javaranch, we strongly discourage using the word "urgent" in a post's subject. You're actually more likely to get help if you leave off the "urgent" part.
 
    Bookmark Topic Watch Topic
  • New Topic