SSB: Unable to run createdb on JDK 17

Which IIQ version are you inquiring about?

8.4

I am trying to setup a new sandbox environment for IdentityIQ 8.4. I’m using SSB 7.0.2 with JDK 17, and am able to build the WAR file with no issue. However, when I run the createdb target to create my databases I get the following error:

init-properties:

Trying to override old definition of task propertycopy

     [echo] hostname pulled from OS = ${env.HOSTNAME}

     [echo] Looking for local properties file ${env.HOSTNAME}.build.properties

     [echo] No local properties file for ${env.HOSTNAME}.build.properties

     [echo] Looking for local properties file build.properties.${env.HOSTNAME} (legacy naming convention)

     [echo] No local properties file for build.properties.${env.HOSTNAME}

     [echo] No host-specific properties file for ${env.HOSTNAME}.target.properties

     [echo] host = ${env.HOSTNAME}

     [echo] Found SPTARGET environment variable of sandbox, building for that environment.

     [echo] target=sandbox

     [echo] Building for environment target sandbox

     [echo] Looking for a sandbox.build.properties file...

     [echo] Did not find a sandbox.build.properties file

     [echo] Looking for a build.properties.sandbox file instead

     [echo] Checking for target 'sandbox' files to ignore...

     [echo] Found target ignore list file: 'sandbox.ignorefiles.properties', loading ignore list.

[loadfile] Do not set property ignoreListFile as its length is 0.

     [echo] buildSubset Property is not set to true. Will skip building subset...



-init-db-properties:

     [echo] attempting to set a couple properties via javascript for db targets

Java 15 has removed Nashorn, you must provide an engine for running JavaScript yourself. GraalVM JavaScript currently is the preferred option.


Why is createdb using JavaScript to do this, and how do I get around this error?

Try replacing the script inside of -init-db-properties with something like this:

        <script language="beanshell" setbeans="true">
            <classpath>
                <fileset dir="lib" includes="*.jar"/>
                <fileset dir="build/extract/WEB-INF/lib" includes="*.jar"/>
            </classpath>
            <![CDATA[
                String versionString = project.getProperty("IIQVersion");
                Float version = Float.valueOf(versionString);
                project.setProperty("hasPluginDb", version >= 7.1 ? "true" : "false");
            ]]>
        </script>

There’s another script in build.xml that used to be JavaScript but was converted to BeanShell. That’s what needs to be done here too. If I made a typo, you can use the build.xml script as a reference.