Menu

JNDI Error in AdminCLI using SignServer 3.5.2 + JBoss AS 7.1.1.

2014-07-27
2014-10-10
  • Hugo Hernandez

    Hugo Hernandez - 2014-07-27

    Hi,
    I'm using SignServer 3.5.2 + JBoss AS 7.1.1 Final + Oracle JDK 7 Update 51 + Oracle Express 11g + Ant 1.9.2 over Win7 Pro SP1 64 bits.

    I just want to share what happened to me in the 9th step of manual. After successful build, I tried to access SignServer using "bin/signserver getstatus brief all" command and I get the error:

    ERROR [AdminCommandHelper] Error instanciating the GlobalConfigurationSession.
    javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307)
        at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:344)
        at javax.naming.InitialContext.lookup(InitialContext.java:411)
        at org.signserver.common.ServiceLocator.lookup(ServiceLocator.java:117)
        at org.signserver.common.ServiceLocator.lookupRemote(ServiceLocator.java:106)
        at org.signserver.common.ServiceLocator.lookupRemote(ServiceLocator.java:94)
        at org.signserver.admin.cli.defaultimpl.AdminCommandHelper.getGlobalConfigurationSession(AdminCommandHelper.java:59)
        at org.signserver.admin.cli.defaultimpl.GetStatusCommand.execute(GetStatusCommand.java:72)
        at org.signserver.cli.CommandLineInterface.execute(CommandLineInterface.java:97)
        at org.signserver.admin.cli.AdminCLI.main(AdminCLI.java:51)
    

    After a couple of days and a re-installation with the same result, I opened signserver.bat file and saw that %SIGNSRV_HOME%\conf\jboss7 which contains jndi.properties was never added to classpath because it is always looking for %APPSRV_HOME%\client\jbossall-client.jar which does not exists in JBoss AS7 (Bug??).

    Adding %APPSRV_HOME%\bin\client\jboss-client.jar;%SIGNSRV_HOME%\conf\jboss7; to OPTIONAL_CLASSPATH did the trick and I finally get AdminCLI working.

    I hope this helps.
    Best regards.

     
  • Hugo Hernandez

    Hugo Hernandez - 2014-07-27

    Logs and signserver_build.properties attached.

     
  • Markus Kilås

    Markus Kilås - 2014-08-17

    Hi Hugo,

    Thank you for the report!

    I have created https://jira.primekey.se/browse/DSS-840 for the issue.

    Cheers,
    Markus

     

Log in to post a comment.