IdP Version.bat throws NPE

Ian Young ian at iay.org.uk
Thu Jun 19 08:52:11 EDT 2014


On 19 Jun 2014, at 13:38, bleb1982 <btl at fischerinternational.com> wrote:

> I am trying to run the version.bat file to display the version of my IDP and
> I get an NPE. Any ideas?
> 
> C:\Fischer\IdP\bin>version.bat
> Exception in thread "main" java.lang.ExceptionInInitializerError
> Caused by: java.lang.NullPointerException
>        at
> edu.internet2.middleware.shibboleth.idp.Version.<clinit>(Version.java
> :99)
> 
> C:\Fischer\IdP\bin>

That's very curious. Can you tell us any more about the environment; for example, which version of Java do you have installed?

The failure is in static class initialisation when accessing part of the Java environment, here I think:

    static {
        Package pkg = Version.class.getPackage();
        NAME = pkg.getImplementationTitle().intern(); // NPE HERE
        VERSION = pkg.getImplementationVersion().intern();
        String[] versionParts = VERSION.split("\\.");
        MAJOR_VERSION = Integer.parseInt(versionParts[0]);
        MINOR_VERSION = Integer.parseInt(versionParts[1]);
        MICRO_VERSION = Integer.parseInt(versionParts[2]);
    }

That's not really dependent on much other than the Java runtime. You'd get an NPE if the getPackage on the previous line returned a null, or of getImplementationTitle did later. However, neither of those things should be happening under normal circumstances.

	-- Ian



-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5943 bytes
Desc: not available
Url : http://shibboleth.net/pipermail/users/attachments/20140619/4c36af88/attachment.bin 


More information about the users mailing list