Hi
I have this configuration on my glassfish UR1 and I get this strange
error.
I have two EJBs exposed as web services.
@Stateless()
@WebService
public class BeanA implements BeanALocal {
@EJB
protected BeanB BeanBLocal;
@WebMethod()
public Investigation someMethod(String sessionId, Long
investigationId) throws Exception {
return BeanBLocal.someMethod(sessionId,investigationId);
}
}
@Stateless()
@WebService
public class BeanB implements BeanBLocal {
@WebMethod()
public Investigation someMethod(String sessionId, Long
investigationId) throws Exception {
return new Investigation();
}
}
There is no security manager turned off and the Default Principal To
Role Mapping enabled.
When I call BeanB.someMethod the method works fine and everything is ok.
But when I call BeanA.someMethod which calls BeanB.someMethod I get this
error (see below).
Why does this error get thrown when there is no security on and the
method to BeanB.someMethod works fine on its own.??
Client side:
javax.xml.ws.soap.SOAPFaultException: Client not authorized to access
public Investigation BeanA.someMethod(String sessionId, Long
investigationId) throws Exception
Server side:
Client not authorized to access public Investigation
BeanA.someMethod(String sessionId, Long investigationId) throws
Exception
javax.ejb.AccessLocalException: Client not authorized to access public
Investigation BeanA.someMethod(String sessionId, Long investigationId)
throws Exception
at
com.sun.ejb.containers.WebServiceInvocationHandler.invoke(WebServiceInvo
cationHandler.java:128)
at $Proxy134.getInvestigation(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.xml.ws.server.PeptTie._invoke(PeptTie.java:61)
at
com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.invokeEndpoint
(SOAPMessageDispatcher.java:280)
at
com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher$SoapInvoker.in
voke(SOAPMessageDispatcher.java:588)
at
com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.receive(SOAPMe
ssageDispatcher.java:147)
at com.sun.xml.ws.server.Tie.handle(Tie.java:90)
at
com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3Messa
geDispatcher.java:160)
at
com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3MessageDi
spatcher.java:89)
at
com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint
(EjbWebServiceServlet.java:186)
at
com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebService
Servlet.java:117)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at
com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.java:1
01)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
:566)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
36)
at
com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:71)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:182)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
:566)
at
com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipelin
e.java:120)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:137)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
:566)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
36)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
at
com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(Pro
cessorTask.java:667)
at
com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked
(ProcessorTask.java:574)
at
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(Processor
Task.java:844)
at
com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(R
eadTask.java:287)
at
com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:2
12)
at
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
at
com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.j
ava:75)