ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luciano Resende" <luckbr1...@gmail.com>
Subject Re: java.lang.NoClassDefFoundError after adding <permissions> element to a java task
Date Tue, 08 Jan 2008 21:52:40 GMT
Thanks Martin, but all the necessary jars are in the CLASSPATH, and as
mentioned on the e-mail, the program runs ok (no issues with
noClassDefFoundError)... the noClassDefFoundError just start after
adding the <permissions>... it seems that it loose the ability to read
the classpath or it get lost...

On Jan 8, 2008 12:32 PM, Martin Gainty <mgainty@hotmail.com> wrote:
> from
> http://cwiki.apache.org/TUSCANY/sca-java-releases.html
> download jar
> tuscany-domain-api-1.1.1-incubating.jar
> and place on CLASSPATH
>
> M-
>
> ----- Original Message -----
> From: "Luciano Resende" <luckbr1975@gmail.com>
> To: <user@ant.apache.org>
> Sent: Tuesday, January 08, 2008 2:11 PM
> Subject: java.lang.NoClassDefFoundError after adding <permissions> element
> to a java task
>
>
> > I have the following ant task :
> >
> >     <target name="run">
> >         <java classname="helloworld.BPELClient">
> >             <classpath>
> >                 <pathelement location="target/classes"/>
> >                 <pathelement location="target/database"/>
> >                 <fileset refid="tuscany.jars"/>
> >                 <fileset refid="3rdparty.jars"/>
> >             </classpath>
> >         </java>
> >     </target>
> >
> >
> > When I run this, everything goes ok, but when trying to exit I get the
> > following exception :
> >
> >    [java] java.security.AccessControlException: access denied
> > (java.lang.RuntimePermission modifyThread)
> >    [java]     at
> >
> java.security.AccessControlContext.checkPermission(AccessControlContext.java
> :264)
> >    [java]     at
> > java.security.AccessController.checkPermission(AccessController.java:427)
> >    [java]     at
> >
> java.util.concurrent.ThreadPoolExecutor.shutdown(ThreadPoolExecutor.java:893
> )
> >    [java]     at
> >
> org.apache.tuscany.sca.core.work.ThreadPoolWorkManager$1.run(ThreadPoolWorkM
> anager.java:220)
> >    [java]     at java.security.AccessController.doPrivileged(Native
> Method)
> >    [java]     at
> >
> org.apache.tuscany.sca.core.work.ThreadPoolWorkManager.destroy(ThreadPoolWor
> kManager.java:218)
> >    [java]     at
> >
> org.apache.tuscany.sca.core.work.Jsr237WorkScheduler.destroy(Jsr237WorkSched
> uler.java:97)
> >    [java]     at
> >
> org.apache.tuscany.sca.host.embedded.impl.ReallySmallRuntime.stop(ReallySmal
> lRuntime.java:187)
> >    [java]     at
> >
> org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.close(DefaultSCAD
> omain.java:264)
> >    [java]     at helloworld.BPELClient.main(BPELClient.java:39)
> >
> >
> > After I fix the security problem by adding the permissions element to
> > the java task
> >
> >             <permissions>
> >         <grant class="java.security.AllPermission"/>
> >     </permissions>
> >
> >
> > I start getting NoClassDefFoundError exceptions and the application
> > does not even get started ...
> >
> > run:
> >      [java] java.lang.NoClassDefFoundError:
> > org/apache/tuscany/sca/host/embedded/SCADomain
> >      [java]     at
> > org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:194)
> >      [java]     at org.apache.tools.ant.taskdefs.Java.run(Java.java:747)
> >      [java]     at
> org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:201)
> >      [java]     at
> org.apache.tools.ant.taskdefs.Java.execute(Java.java:104)
> >      [java]     at
> > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
> >      [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> >      [java]     at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> )
> >      [java]     at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> java:25)
> >      [java]     at java.lang.reflect.Method.invoke(Method.java:585)
> >      [java]     at
> >
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
> >      [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.java:1329)
> >      [java]     at
> org.apache.tools.ant.Project.executeTarget(Project.java:1298)
> >      [java]     at
> >
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.j
> ava:41)
> >      [java]     at
> > org.apache.tools.ant.Project.executeTargets(Project.java:1181)
> >      [java]     at org.apache.tools.ant.Main.runBuild(Main.java:698)
> >      [java]     at org.apache.tools.ant.Main.startAnt(Main.java:199)
> >      [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] Caused by: java.lang.NoClassDefFoundError:
> > org/apache/tuscany/sca/host/embedded/SCADomain
> >      [java]     at helloworld.BPELClient.main(BPELClient.java:33)
> >      [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> >      [java]     at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> )
> >      [java]     at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> java:25)
> >      [java]     at java.lang.reflect.Method.invoke(Method.java:585)
> >      [java]     at
> > org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:217)
> >      [java]     at
> > org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:152)
> >      [java]     ... 20 more
> >
> >
> > Any help is appreciated.
> >
> >
> >
> >
> > --
> > Luciano Resende
> > Apache Tuscany Committer
> > http://people.apache.org/~lresende
> > http://lresende.blogspot.com/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>



-- 
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message