axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Veithen <andreas.veit...@gmail.com>
Subject Re: [Axis2] failed to invoke JMS application -- java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThread)
Date Wed, 20 May 2009 14:25:41 GMT
This is not an Axis2 problem, but related to how ant executes Java
programs. Trying with fork=true may help here.

Andreas

On Wed, May 20, 2009 at 15:41, Sirasani, Balaji <Balaji.Sirasani@ca.com> wrote:
> Hi All,
>
>
>
> I am trying to create client to invoke JMS Web Service, I have created the
> client by adding the following code in my client class
>
>
>
> ConfigurationContext cc =
> ConfigurationContextFactory.createConfigurationContextFromFileSystem("C:\\axis2-1.4.1\\repository","C:\\axis2-1.4.1\\conf\\axis2-client.xml");
>
> String url =
> "jms:/Version?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&java.naming.provider.url=tcp://localhost:61616";
>
> VersionStub stub = new VersionStub(cc,url);
>
>
>
> I got the following error when I run the client program
>
>
>
>      [java] java.security.AccessControlException: access denied
> (java.lang.Runti
>
> mePermission modifyThread)
>
>      [java]     at
> java.security.AccessControlContext.checkPermission(AccessCont
>
> rolContext.java:264)
>
>      [java]     at
> java.security.AccessController.checkPermission(AccessControll
>
> er.java:427)
>
>      [java]     at
> java.util.concurrent.ThreadPoolExecutor.shutdownNow(ThreadPoo
>
> lExecutor.java:959)
>
>      [java]     at
> org.apache.activemq.thread.TaskRunnerFactory.shutdown(TaskRun
>
> nerFactory.java:71)
>
>      [java]     at
> org.apache.activemq.ActiveMQConnection.close(ActiveMQConnecti
>
> on.java:636)
>
>      [java]     at
> org.apache.axis2.transport.jms.JMSSender.invoke(JMSSender.jav
>
> a:258)
>
>      [java]     at
> org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)
>
>      [java]     at
> org.apache.axis2.description.OutInAxisOperationClient.send(Ou
>
> tInAxisOperation.java:401)
>
>      [java]     at
> org.apache.axis2.description.OutInAxisOperationClient.execute
>
> Impl(OutInAxisOperation.java:228)
>
>      [java]     at
> org.apache.axis2.client.OperationClient.execute(OperationClie
>
> nt.java:163)
>
>      [java]     at sample.axisversion.VersionStub.getVersion(Unknown Source)
>
>      [java]     at client.JMSClient.main(Unknown Source)
>
>      [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
>
>      [java]     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
>
> sorImpl.java:39)
>
>      [java]     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
>
> hodAccessorImpl.java:25)
>
>      [java]     at java.lang.reflect.Method.invoke(Method.java:585)
>
>      [java]     at
> org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.jav
>
> a:217)
>
>      [java]     at
> org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava
>
> .java:152)
>
>      [java]     at org.apache.tools.ant.taskdefs.Java.run(Java.java:764)
>
>      [java]     at
> org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:218)
>
>
>
>      [java]     at
> org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:132)
>
>
>
>      [java]     at org.apache.tools.ant.taskdefs.Java.execute(Java.java:105)
>
>      [java]     at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja
>
> va:288)
>
>      [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
>
>      [java]     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
>
> sorImpl.java:39)
>
>      [java]     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
>
> hodAccessorImpl.java:25)
>
>      [java]     at java.lang.reflect.Method.invoke(Method.java:585)
>
>      [java]     at
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchU
>
> tils.java:106)
>
>      [java]     at org.apache.tools.ant.Task.perform(Task.java:348)
>
>      [java]     at org.apache.tools.ant.Target.execute(Target.java:357)
>
>      [java]     at org.apache.tools.ant.Target.performTasks(Target.java:385)
>
>      [java]     at
> org.apache.tools.ant.Project.executeSortedTargets(Project.jav
>
> a:1337)
>
>      [java]     at
> org.apache.tools.ant.Project.executeTarget(Project.java:1306)
>
>
>
>      [java]     at
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(De
>
> faultExecutor.java:41)
>
>      [java]     at
> org.apache.tools.ant.Project.executeTargets(Project.java:1189
>
> )
>
>      [java]     at org.apache.tools.ant.Main.runBuild(Main.java:758)
>
>      [java]     at org.apache.tools.ant.Main.startAnt(Main.java:217)
>
>      [java]     at
> org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
>
>      [java]     at
> org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
>
>      [java] Java Result: -1
>
>
>
> Please help me to resolve this error.
>
>
>
> Regards,
>
> Balaji
>
>

Mime
View raw message