RE: XML Import issue, and a NullPointerException...

"Kunkee,Nathan" <[email protected]>
Newsgroups gmane.comp.java.scarab.user
Message-ID <9752AB23C49801468143A59061E10089EFA1AB@MSMBWHQ12.northamerica.cerner.net>
I found my issue. Even though I was passing an empty element for domain
<domain/>, the blank value from that was not matching the NULL in the
database on the scarab_module table. Once I entered an empty string for
the domain, the import proceeded as expected. 

Any ideas why this difference, empty string instead of NULL, would
matter? 

-----Original Message-----
From: Kunkee,Nathan [mailto:[email protected]] 
Sent: Monday, December 03, 2007 5:39 PM
To: [email protected]
Subject: XML Import issue, and a NullPointerException...

Hi all,

I'm trying to import a number of issues into an instance of Scarab B21.
(Running Tomcat 5.5.20, Java JDK 1.50._11, MySql 5.0.) I keep getting a
NullPointerException from ScarabIssues.java:566. 

In tracing the code, I found this function in RModuleIssueType.java:

    public static RModuleIssueType getInstance(String key)
        throws TorqueException
    {
        if (key == null) 
        {
            throw new NullPointerException(
                "Cannot request a RModuleIssueType using a null key.");
//EXCEPTION
        }
        int colonPos = key.indexOf(':');
        if (colonPos == -1) 
        {
            throw new IllegalArgumentException(
                "RModuleIssueType keys must be of the form N1:N2, not "
+ key); //EXCEPTION
        }
        // { module_id, issue_type_id } 
        SimpleKey[] keyArray = { new NumberKey(key.substring(1,
colonPos)), 
            new NumberKey(key.substring(colonPos+2, key.length()-1)) 
            };
        return getInstance(new ComboKey(keyArray));
    }

Am I missing something about Java, or is this a recursive function that
never queries the DB and never ends when given valid input?

Thank you,

Nathan Kunkee | System Engineer - Global Translations | Cerner
Corporation | Phone: 816.201.6427 | [email protected] |
http://www.cerner.com

----------------------------------------------------------------------
CONFIDENTIALITY NOTICE This message and any included attachments are
from Cerner Corporation and are intended only for the addressee. The
information contained in this message is confidential and may constitute
inside or non-public information under international, federal, or state
securities laws. Unauthorized forwarding, printing, copying,
distribution, or use of such information is strictly prohibited and may
be unlawful. If you are not the addressee, please promptly delete this
message and notify the sender of the delivery error by e-mail or you may
call Cerner's corporate offices in Kansas City, Missouri, U.S.A at (+1)
(816)221-1024.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.