You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-dev@db.apache.org by "Craig Russell (JIRA)" <ji...@apache.org> on 2007/10/19 22:56:50 UTC

[jira] Resolved: (JDO-544) NullPointerException in JDOImplHelper if running with security manager enabled

     [ https://issues.apache.org/jira/browse/JDO-544?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Craig Russell resolved JDO-544.
-------------------------------

       Resolution: Fixed
    Fix Version/s: JDO 2 maintenance release 1

svn commit -m "JDO-544 NullPointerException running with SecurityManager" api2/test/java/javax/jdo/identity/ObjectIdentityTest.java api2-legacy/test/java/javax/jdo/identity/ObjectIdentityTest.java api2/src/java/javax/jdo/spi/JDOImplHelper.java api2-legacy/src/java/javax/jdo/spi/JDOImplHelper.java
Sending        api2/src/java/javax/jdo/spi/JDOImplHelper.java
Sending        api2/test/java/javax/jdo/identity/ObjectIdentityTest.java
Sending        api2-legacy/src/java/javax/jdo/spi/JDOImplHelper.java
Sending        api2-legacy/test/java/javax/jdo/identity/ObjectIdentityTest.java
Transmitting file data ....
Committed revision 586609.


> NullPointerException in JDOImplHelper if running with security manager enabled
> ------------------------------------------------------------------------------
>
>                 Key: JDO-544
>                 URL: https://issues.apache.org/jira/browse/JDO-544
>             Project: JDO
>          Issue Type: Bug
>          Components: api2
>            Reporter: Erik Bengtson
>            Assignee: Craig Russell
>            Priority: Minor
>             Fix For: JDO 2 maintenance release 1
>
>         Attachments: jdo-544.patch
>
>
> --- Craig says:
> Hi Erik,
> Actually, this is a bug in JDOImplHelper. It is missing a  
> doPrivileged around calling getDateTimeInstance.
> The permissions you mention should be assigned to the JDO jar, if  
> needed at all. We need to look at the implementation here and decide  
> if getDateTimeInstance is really needed or if there is some other way  
> to get this functionality.
> Can you please file a JIRA?
> Thanks,
> Craig
> On Oct 8, 2007, at 1:25 PM, Erik Bengtson wrote:
> > An application using JDO needs the following additional permissions  
> > to run:
> >
> > 	permission java.util.PropertyPermission "user.country", "read";
> > 	permission java.util.PropertyPermission "user.timezone",
> > "read,write";
> > 	permission java.util.PropertyPermission "java.home", "read";
> >
> > Otherwise:
> >
> > Caused by: java.lang.NullPointerException
> > 	at java.security.AccessControlContext.checkPermission(Unknown
> > Source)
> > 	at java.security.AccessController.checkPermission(Unknown Source)
> > 	at java.lang.SecurityManager.checkPermission(Unknown Source)
> > 	at java.util.TimeZone.hasPermission(Unknown Source)
> > 	at java.util.TimeZone.setDefaultZone(Unknown Source)
> > 	at java.util.TimeZone.getDefaultRef(Unknown Source)
> > 	at java.util.TimeZone.getDefault(Unknown Source)
> > 	at java.text.SimpleDateFormat.initializeCalendar(Unknown Source)
> > 	at java.text.SimpleDateFormat.<init>(Unknown Source)
> > 	at java.text.DateFormat.get(Unknown Source)
> > 	at java.text.DateFormat.getDateTimeInstance(Unknown Source)
> > 	at javax.jdo.spi.JDOImplHelper.<clinit>(JDOImplHelper.java:123)
> > 	... 22 more
> >
> >
> > Is that interesting to note in the JDO SPEC?
> >
> >
> >

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.