Thanks.  The tip from Rahul worked.

On 12/7/06, Mark Fortner <[EMAIL PROTECTED]> wrote:
I don't have an answer for you either, but I do have some things that
you might try:

(1) Try signing the applet to see if that fixes the permission problem
you're running into.  I suspect that it tries to create a log file and
puts the log file in the user.home directory.  When it tries to grab
the user.home variable, it throws the exception you were seeing.
Signing the applet, may (emphasis on "may") allow it to grab the
variable, and to write the file out.  You might also check out
web-starting the applet.

(2) Instead of writing to a log file, try switching out the
FileAppender for a console appender.  You shouldn't need any special
permissions to write to the console.

Hope this helps,

Mark

On Thursday, December 7, 2006, at 08:06 AM, Lance Semmens wrote:

> I don't have a solution but I can shed some light on the subject.
> Applets can not access the following System Properties:
>
> java.home             Java installation directory
> java.class.path       Java classpath
> user.name             User account name
> user.home             User home directory
> user.dir              User's current working directory
>
> LogFactory.createFactoryStore() must be trying to access one of these.
>
> -----Original Message-----
> From: Mark Webb [mailto:[EMAIL PROTECTED]
> Sent: 07 December 2006 14:58
> To: Jakarta Commons Users List
> Subject: commons-logging 1.1 in an applet
>
> I have a program that can run as an applet or application.  When run
> as an application, all logging works fine.  When I run the program as
> an applet, I get an error.  Is there a way to fix this problem?
>
> TIA.
> Mark
>
> Here is the stack trace:
>
> java.lang.ExceptionInInitializerError
>       at org.hibernate.cfg.Configuration.<clinit>(Configuration.java:120)
>       -- my code --
>       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>       at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructor
> AccessorImpl.java:39)
>       at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCon
> structorAccessorImpl.java:27)
>       at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
>       at java.lang.Class.newInstance0(Class.java:350)
>       at java.lang.Class.newInstance(Class.java:303)
>       at sun.applet.AppletPanel.createApplet(AppletPanel.java:721)
>       at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1760)
>       at sun.applet.AppletPanel.runLoader(AppletPanel.java:650)
>       at sun.applet.AppletPanel.run(AppletPanel.java:324)
>       at java.lang.Thread.run(Thread.java:595)
> Caused by: java.security.AccessControlException: access denied
> (java.util.PropertyPermission
> org.apache.commons.logging.LogFactory.HashtableImpl read)
>       at
> java.security.AccessControlContext.checkPermission(AccessControlContext
> .java:264)
>       at
> java.security.AccessController.checkPermission(AccessController.java:42
> 7)
>       at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
>       at
> java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1285
> )
>       at java.lang.System.getProperty(System.java:627)
>       at
> org.apache.commons.logging.LogFactory.createFactoryStore(LogFactory.jav
> a:320)
>       at
> org.apache.commons.logging.LogFactory.<clinit>(LogFactory.java:1725)
>       ... 14 more
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to