Topic
5 replies Latest Post - ‏2012-10-29T17:33:01Z by berkum
Vincent_MDTVISION
Vincent_MDTVISION
2 Posts
ACCEPTED ANSWER

Pinned topic Category Id limit when creating new company ?

‏2010-03-22T11:56:18Z |
Hi,

We've got an error trying to create a new company, at the step :

====================================================
Building basic objects, users, roles
====================================================
Script execution failed (java.lang.NullPointerException) Exception:java.lang.NullPointerException
at com.ibm.ccd.common.script.ScriptOperationsCategory.newCategoryTree(ScriptOperationsCategory.java:192)
at com.ibm.ccd.common.interpreter.operation.generated.GenNewCategoryTreeOperation.execute(GenNewCategoryTreeOperation.java:88)
at WPCbasiccompanysetupscript12692800257000.run(WPCbasiccompanysetupscript12692800257000.java:88)
at com.ibm.ccd.common.interpreter.engine.Script.runFunction(Script.java:528)
at com.ibm.ccd.common.interpreter.engine.Script.execute(Script.java:458)
at com.ibm.ccd.common.interpreter.engine.Script.run(Script.java:305)
at com.ibm.ccd.common.interpreter.engine.Script.run(Script.java:281)
at com.ibm.ccd.common.interpreter.test.TestScript.runScript(TestScript.java:178)
at com.ibm.ccd.common.interpreter.test.TestScript.main(TestScript.java:49)

at WPCbasiccompanysetupscript12692800257000.run(WPCbasiccompanysetupscript12692800257000.java:266)
at com.ibm.ccd.common.interpreter.engine.Script.runFunction(Script.java:528)
at com.ibm.ccd.common.interpreter.engine.Script.execute(Script.java:458)
at com.ibm.ccd.common.interpreter.engine.Script.run(Script.java:305)
at com.ibm.ccd.common.interpreter.engine.Script.run(Script.java:281)
at com.ibm.ccd.common.interpreter.test.TestScript.runScript(TestScript.java:178)
at com.ibm.ccd.common.interpreter.test.TestScript.main(TestScript.java:49)
Caused by: java.lang.NullPointerException
at com.ibm.ccd.common.script.ScriptOperationsCategory.newCategoryTree(ScriptOperationsCategory.java:192)
at com.ibm.ccd.common.interpreter.operation.generated.GenNewCategoryTreeOperation.execute(GenNewCategoryTreeOperation.java:88)
at WPCbasiccompanysetupscript12692800257000.run(WPCbasiccompanysetupscript12692800257000.java:88)
... 6 more

We have already created many companies ; it seems that the Category Tree Id (CTR_ID) as reached is limit. The column is VARCHAR(4) in the database, and the latest Id is 8403 in the latest company. In the 5.3.2 version, the column was VARCHAR(5).
Is the number of companies limited ? Is it possible to reset the Category Id Sequence ?
Thanks.
Updated on 2012-10-29T17:33:01Z at 2012-10-29T17:33:01Z by berkum
  • SystemAdmin
    SystemAdmin
    648 Posts
    ACCEPTED ANSWER

    Re: Category Id limit when creating new company ?

    ‏2010-03-23T13:13:20Z  in response to Vincent_MDTVISION
    Hi,

    I have not found any limitation of CTR_ID because it is integer type in definition of CTR table both WPC 5.3.2 and MDM4PIM 6.0.
    Check parameters of CategoryTree function for null value.
  • berkum
    berkum
    6 Posts
    ACCEPTED ANSWER

    Re: Category Id limit when creating new company ?

    ‏2012-10-25T11:26:12Z  in response to Vincent_MDTVISION
    Just got the error today (or a similar one).

    Running in verbose mode, it seems like it's looking for a file under /tmp but that file doesn't exist. I have pointed the problem by re-running the java cmd line in verbose mode :
    class load: com.ibm.ccd.common.util.BitMapUtils from: file:/opt/IBM/MDMPIM/jars/ccd_svr.jar
    class load: com.ibm.ccd.common.util.TestUtils from: file:/opt/IBM/MDMPIM/jars/ccd_svr.jar
    class load: java/lang/StringIndexOutOfBoundsException
    java.io.FileNotFoundException: /tmp/nmg5XPlXuY (No such file or directory)
    at java.io.FileInputStream.<init>(FileInputStream.java:123)
    at java.io.FileInputStream.<init>(FileInputStream.java:83)
    at java.io.FileReader.<init>(FileReader.java:52)
    at com.ibm.ccd.common.interpreter.test.TestScript.runScript(Unknown Source)
    at com.ibm.ccd.common.interpreter.test.TestScript.main(Unknown Source)
    class load: com.ibm.ccd.concurrency.common.ResourceRegistrar from: file:/opt/IBM/MDMPIM/jars/ccd_svr.jar
    class load: com.ibm.ccd.concurrency.common.LockMgr from: file:/opt/IBM/MDMPIM/jars/ccd_svr.jar
    class load: com.ibm.db2.jcc.DB2ParameterMetaData from: file:/opt/ibm/db2/V9.7/java/db2jcc.jar
    class load: com.ibm.db2.jcc.am.qf from: file:/opt/ibm/db2/V9.7/java/db2jcc.jar
    class load: com.ibm.db2.jcc.t4.wb from: file:/opt/ibm/db2/V9.7/java/db2jcc.jar
    class load: com.ibm.db2.jcc.am.bd from: file:/opt/ibm/db2/V9.7/java/db2jcc.jar
    class load: com.ibm.db2.jcc.am.ao from: file:/opt/ibm/db2/V9.7/java/db2jcc.jar
    class load: com.ibm.db2.jcc.am.yn from: file:/opt/ibm/db2/V9.7/java/db2jcc.jar
    class load: com.ibm.db2.jcc.am.zn from: file:/opt/ibm/db2/V9.7/java/db2jcc.jar
    class load: com.ibm.db2.jcc.am.bo from: file:/opt/ibm/db2/V9.7/java/db2jcc.jar
    class load: com.ibm.db2.jcc.am.jo from: file:/opt/ibm/db2/V9.7/java/db2jcc.jar
    class load: com.ibm.db2.jcc.am.ko from: file:/opt/ibm/db2/V9.7/java/db2jcc.jar
    class load: com.ibm.db2.jcc.am.ho from: file:/opt/ibm/db2/V9.7/java/db2jcc.jar
    class load: com.ibm.db2.jcc.am.co from: file:/opt/ibm/db2/V9.7/java/db2jcc.jar
    class load: com.ibm.db2.jcc.am.fo from: file:/opt/ibm/db2/V9.7/java/db2jcc.jar
    class load: com.ibm.db2.jcc.am.go from: file:/opt/ibm/db2/V9.7/java/db2jcc.jar
    class load: com.ibm.db2.jcc.am.hm from: file:/opt/ibm/db2/V9.7/java/db2jcc.jar
    class load: com.ibm.db2.jcc.DBBindDiagnostics from: file:/opt/ibm/db2/V9.7/java/db2jcc.jar
    class load: com/ibm/oti/util/Msg
    class load: com/ibm/oti/vm/MsgHelp
    Exception in thread "main" java.lang.NullPointerException
    at com.ibm.ccd.common.interpreter.test.TestScript.runScript(Unknown Source)
    at com.ibm.ccd.common.interpreter.test.TestScript.main(Unknown Source)
    class load: java/io/InterruptedIOException
    If I look at the create_cmp.log file, there is no sign of this file being created.

    Here is the only references to /tmp in the output of create_cmp.sh
    • Creating temp file '/tmp/cVQVdVRHVW.sql' ---
    ...
    Running 'db2 -tf /tmp/cVQVdVRHVW.sql'
    • Creating temp file '/tmp/S71QoRZc1_.sql' ---
    ...
    Running 'db2 -tf /tmp/S71QoRZc1_.sql'
    ...
    java ... com.ibm.ccd.common.interpreter.test.TestScript --companycode=prequal --username="USERNAME" --scriptpath=/tmp/YImiQNGKIR
    Thank you.
    • berkum
      berkum
      6 Posts
      ACCEPTED ANSWER

      Re: Category Id limit when creating new company ?

      ‏2012-10-25T19:17:02Z  in response to berkum
      ok, a precision.

      The files are being created actually.

      In my db log file, I found this message every time we try to create new companies

      WPCM0215E:Invalid user Admin: does not exist.
      at com.ibm.ccd.common.context.AustinContext.initializedContext(Unknown Source)
      at com.ibm.ccd.common.context.AustinContext.getInitializedContext(Unknown Source)
      at com.ibm.ccd.common.interpreter.test.TestScript.getAustinContext(Unknown Source)
      at com.ibm.ccd.common.interpreter.test.TestScript.runScript(Unknown Source)
      at com.ibm.ccd.common.interpreter.test.TestScript.main(Unknown Source)
      Txs
      • SystemAdmin
        SystemAdmin
        648 Posts
        ACCEPTED ANSWER

        Re: Category Id limit when creating new company ?

        ‏2012-10-29T04:55:47Z  in response to berkum
        Is Admin a DB2 user?
        • berkum
          berkum
          6 Posts
          ACCEPTED ANSWER

          Re: Category Id limit when creating new company ?

          ‏2012-10-29T17:33:01Z  in response to SystemAdmin
          The Admin user is the default user created for a company.

          I have traced the code and finally found the problem. It appears that the 'LOCALE' attribute of tsec_ust_user_setting for user trigo_root was tied to a company other (don't know yet how that happened) than default trigo.

          As a consequence, at the beginning of the scripts, when creating access control group, it would use that other company locale which is fr_fr.

          It would create access control Group "Défaut" (note the accentuated character).

          Further in the processing, when trying to retrieve this group (select * from tsec_obg_object_group where obg_name = 'Default' ), it did not retrieve anything since the group was created with "Défaut", not Default (ouch! ids...).

          Running an update to reset the company id to trigo in tsec_ust_user_setting for LOCALE fixed the problem.

          I would think that at least the scripts should have used the fr_fr all the way long. So it does appear that the same set of scripts get the locale in a different way.

          Txs.