From: Jian L. <jia...@st...> - 2002-10-30 23:21:06
|
I am a student in UTD. I am trying to use webmacro with j2ee. i just = added the webmacro.jar and webmacro.properties files into the WAR = components. But when I run the servlet, it gave me such an error = message: java.lang.ExceptionInInitializerError: = java.security.AccessControlException: access denied = (java.lang.RuntimePermission getClassLoader) at = java.security.AccessControlContext.checkPermission(AccessControlContext.j= ava:272) at = java.security.AccessController.checkPermission(AccessController.java:399)= at java.lang.SecurityManager.checkPermission(SecurityManager.java:545) at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:964) at org.webmacro.Broker.(Broker.java:58) at org.webmacro.WM.(WM.java:74) at MyServlet.init(MyServlet.java:33) at = org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:852) ...... What does this mean? I am using webmacro 1.0.1 and j2sdkee1.3.1, = jdk1.3.1_01. Btw, i tested my servlet using apache+tomcat+webmacro, it worked. Thank you very much, with the best regrads. Jian Liu |
From: Eric B. R. <eb...@tc...> - 2002-10-30 23:32:25
|
Hi Jian! Let me apologize up front. The WebMacro project is in the =20= process of moving our mailing lists to SourceForge (should be complete =20= in the next few days), and you're the first to post to our new =20 SourceForge list. Unfortunately, our j2ee experts are not on this list =20= yet. I'm cc'ing our old list just to see if anyone has any ideas. =20 Hopefully, if they do, they'll make sure to include the new list in =20 their reponse. I know little about j2ee, so bear with me... What I do know about j2ee is that it is supposed to be secure and that =20= the security policies can be configured. Is this true? Anyways, it looks to me as if the java.lang.ClassLoader class (or even =20= the java.lang.ClassLoader.getSystemClassLoader() method) is something =20= that cannot be accessed by regular code. WebMacro does all sorts of =20 loading via the classloader. I'm wondering if you can expand your security policy to allow access to =20= (at least) java.lang.ClassLoader.getSystemClassLoader(). Perhaps even =20= all methods of the class. Does this help? I hope it does eric On Wednesday, October 30, 2002, at 06:19 PM, Jian Liu wrote: > I am a student in UTD. I am trying to use webmacro with j2ee. i just =20= > added the webmacro.jar and webmacro.properties files into the WAR =20 > components. But when I run=A0the servlet, it gave me such an error =20 > message: > =A0 > java.lang.ExceptionInInitializerError: =20 > java.security.AccessControlException: access denied =20 > (java.lang.RuntimePermission getClassLoader) > at =20 > = java.security.AccessControlContext.checkPermission(AccessControlContext=20= > .java:272) > at =20 > = java.security.AccessController.checkPermission(AccessController.java:39=20= > 9) > at java.lang.SecurityManager.checkPermission(SecurityManager.java:545) > at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:964) > at org.webmacro.Broker.(Broker.java:58) > at org.webmacro.WM.(WM.java:74) > at MyServlet.init(MyServlet.java:33) > at =20 > = org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:852) > ...... > =A0 > What does this mean?=A0=A0I am using webmacro 1.0.1 and j2sdkee1.3.1, =20= > jdk1.3.1_01. > =A0 > Btw, i tested my servlet using apache+tomcat+webmacro, it worked. > > =A0 > Thank you very much, with the best regrads. > =A0 > Jian Liu |
From: Keats K. <kea...@na...> - 2002-10-31 05:28:55
|
I'm no J2EE expert either but here is my understanding ... First of all, the Servlet API is part of J2EE, in fact, as I understand it, it is by far the most popular part of the J2EE. Presumeably you are talking about EJBs. I don't think you'll have much luck calling WebMacro directly from an EJB. EJBs have lot's of restrictions that WebMacro violates -- dynamic class loading, threads, etc. WM must run outside of the EJB container -- like inside of a Servlet container. This is probably about your only choice from an EJB, since I don't think you're allowed to open a socket either. However, you should be able to call EJBs from a WM application without any problems. I hope this helps. Keats Eric B.Ridge wrote: > Hi Jian! Let me apologize up front. The WebMacro project is in the > process of moving our mailing lists to SourceForge (should be complete > in the next few days), and you're the first to post to our new > SourceForge list. Unfortunately, our j2ee experts are not on this list > yet. I'm cc'ing our old list just to see if anyone has any ideas. > Hopefully, if they do, they'll make sure to include the new list in > their reponse. > > I know little about j2ee, so bear with me... > > What I do know about j2ee is that it is supposed to be secure and that > the security policies can be configured. Is this true? > > Anyways, it looks to me as if the java.lang.ClassLoader class (or even > the java.lang.ClassLoader.getSystemClassLoader() method) is something > that cannot be accessed by regular code. WebMacro does all sorts of > loading via the classloader. > > I'm wondering if you can expand your security policy to allow access to > (at least) java.lang.ClassLoader.getSystemClassLoader(). Perhaps even > all methods of the class. > > Does this help? I hope it does > > eric > > On Wednesday, October 30, 2002, at 06:19 PM, Jian Liu wrote: > >> I am a student in UTD. I am trying to use webmacro with j2ee. i just >> added the webmacro.jar and webmacro.properties files into the WAR >> components. But when I run the servlet, it gave me such an error >> message: >> >> java.lang.ExceptionInInitializerError: >> java.security.AccessControlException: access denied >> (java.lang.RuntimePermission getClassLoader) >> at >> java.security.AccessControlContext.checkPermission(AccessControlContext >> .java:272) >> at >> java.security.AccessController.checkPermission(AccessController.java:39 >> 9) >> at java.lang.SecurityManager.checkPermission(SecurityManager.java:545) >> at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:964) >> at org.webmacro.Broker.(Broker.java:58) >> at org.webmacro.WM.(WM.java:74) >> at MyServlet.init(MyServlet.java:33) >> at >> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:852) >> ...... >> >> What does this mean? I am using webmacro 1.0.1 and j2sdkee1.3.1, >> jdk1.3.1_01. >> >> Btw, i tested my servlet using apache+tomcat+webmacro, it worked. >> >> >> Thank you very much, with the best regrads. >> >> Jian Liu > > > --- > WebMacro Mailing List > > WebMacro URL: http://www.webmacro.org > List Address: web...@we... > List Archive: http://spitfire.velocet.net/pipermail/webmacro/ > > Subscribe/Unsubscribe: > http://spitfire.velocet.net/mailman/listinfo/webmacro > Subscribe/Unsubscribe: email:web...@we... > |
From: Jian L. <jia...@st...> - 2002-11-05 22:53:38
|
Thank you for your help. I did not call WM from an EJB. I have several EJBs, I want to use servelet to access them. I packaged my servelet classes along with the wm jar as a j2ee web component. Thanks Jian ----- Original Message ----- From: "Keats Kirsch" <kea...@na...> Cc: <web...@li...> Sent: Wednesday, October 30, 2002 11:28 PM Subject: Re: [WebMacro] Re: [WebMacro-user] Help about using webmacro with J2ee > I'm no J2EE expert either but here is my understanding ... > > First of all, the Servlet API is part of J2EE, in fact, as I understand > it, it is by far the most popular part of the J2EE. Presumeably you are > talking about EJBs. > > I don't think you'll have much luck calling WebMacro directly from an > EJB. EJBs have lot's of restrictions that WebMacro violates -- dynamic > class loading, threads, etc. WM must run outside of the EJB container > -- like inside of a Servlet container. This is probably about your only > choice from an EJB, since I don't think you're allowed to open a socket > either. > > However, you should be able to call EJBs from a WM application without > any problems. > > I hope this helps. > > Keats > > Eric B.Ridge wrote: > > Hi Jian! Let me apologize up front. The WebMacro project is in the > > process of moving our mailing lists to SourceForge (should be complete > > in the next few days), and you're the first to post to our new > > SourceForge list. Unfortunately, our j2ee experts are not on this list > > yet. I'm cc'ing our old list just to see if anyone has any ideas. > > Hopefully, if they do, they'll make sure to include the new list in > > their reponse. > > > > I know little about j2ee, so bear with me... > > > > What I do know about j2ee is that it is supposed to be secure and that > > the security policies can be configured. Is this true? > > > > Anyways, it looks to me as if the java.lang.ClassLoader class (or even > > the java.lang.ClassLoader.getSystemClassLoader() method) is something > > that cannot be accessed by regular code. WebMacro does all sorts of > > loading via the classloader. > > > > I'm wondering if you can expand your security policy to allow access to > > (at least) java.lang.ClassLoader.getSystemClassLoader(). Perhaps even > > all methods of the class. > > > > Does this help? I hope it does > > > > eric > > > > On Wednesday, October 30, 2002, at 06:19 PM, Jian Liu wrote: > > > >> I am a student in UTD. I am trying to use webmacro with j2ee. i just > >> added the webmacro.jar and webmacro.properties files into the WAR > >> components. But when I run the servlet, it gave me such an error > >> message: > >> > >> java.lang.ExceptionInInitializerError: > >> java.security.AccessControlException: access denied > >> (java.lang.RuntimePermission getClassLoader) > >> at > >> java.security.AccessControlContext.checkPermission(AccessControlContext > >> .java:272) > >> at > >> java.security.AccessController.checkPermission(AccessController.java:39 > >> 9) > >> at java.lang.SecurityManager.checkPermission(SecurityManager.java:545) > >> at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:964) > >> at org.webmacro.Broker.(Broker.java:58) > >> at org.webmacro.WM.(WM.java:74) > >> at MyServlet.init(MyServlet.java:33) > >> at > >> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:852) > >> ...... > >> > >> What does this mean? I am using webmacro 1.0.1 and j2sdkee1.3.1, > >> jdk1.3.1_01. > >> > >> Btw, i tested my servlet using apache+tomcat+webmacro, it worked. > >> > >> > >> Thank you very much, with the best regrads. > >> > >> Jian Liu > > > > > > --- > > WebMacro Mailing List > > > > WebMacro URL: http://www.webmacro.org > > List Address: web...@we... > > List Archive: http://spitfire.velocet.net/pipermail/webmacro/ > > > > Subscribe/Unsubscribe: > > http://spitfire.velocet.net/mailman/listinfo/webmacro > > Subscribe/Unsubscribe: email:web...@we... > > > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by: Influence the future > of Java(TM) technology. Join the Java Community > Process(SM) (JCP(SM)) program now. > http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en > _______________________________________________ > Webmacro-user mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webmacro-user |
From: Sebastian K. <seb...@mu...> - 2002-10-31 22:38:20
|
On Thursday 31 October 2002 00:30, Eric B.Ridge wrote: > On Wednesday, October 30, 2002, at 06:19 PM, Jian Liu wrote: > > I am a student in UTD. I am trying to use webmacro with j2ee. i just > > added the webmacro.jar and webmacro.properties files into the WAR > > components. But when I run=A0the servlet, it gave me such an error > > message: > > =A0 > > java.lang.ExceptionInInitializerError: > > java.security.AccessControlException: access denied > > (java.lang.RuntimePermission getClassLoader) > > at > > java.security.AccessControlContext.checkPermission(AccessControlConte= xt > > .java:272) The problem seems to be, that WebMacro is run under a restrictive securi= ty=20 manager, that forbids getClassLoader-calls. You'll have to add appropriat= e=20 permissions to the security configuration of your app-server. ciao Sebastian |