Found the bug. Basically JNDIProducer was not handling non-character
attribute data properly. Attached is the diff for the fixes. I don't know
the procedure for submitting fixes to Exolab so this will have to do . . .



- gil

-----Original Message-----
From: Gilbert Pilz 
Sent: Friday, November 30, 2001 3:33 PM
To: [EMAIL PROTECTED]
Subject: [castor-dev] newbie question - DSML example experiencing a
NullPointerExceptio n


Hi,

I am just learning DSML and am playing with the DSML example. I'm seeing
some behavior that I don't understand. The test program tries to import some
<directory-entries> from a test file into an LDAP directory, then export
some entries from the same directory. If the entries that it is trying to
import are already there it "refreshes" them. I have noticed that if the
program actually ends up creating any new entries calling
JNDIExporter.export() causes the program to crash as follows:

java.lang.NullPointerException
java.lang.NullPointerException
        at
org.exolab.castor.dsml.jndi.JNDIProducer.produce(JNDIProducer.java:191)
        at
org.exolab.castor.dsml.jndi.JNDIProducer.produce(JNDIProducer.java:220)
        at
org.exolab.castor.dsml.jndi.JNDIExporter.export(JNDIExporter.java:133)
        at org.exolab.castor.dsml.Exporter.export(Exporter.java:85)
        at Test.main(Unknown Source)

However if the program only ends up "refreshing" entries calling
JNDIExport.export() works. Is this a bug in the DSML implementation or am I
doing something wrong?

I am using JDK 1.3.1, castor-0.9.3, and xerces-1_4_4 against an IBM
SecureWay Directory Server (not sure on version here).

- gil

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

167,168d166
<                                               MimeBase64Encoder encoder;
<                                               encoder = new MimeBase64Encoder();
182a181,187
>                         }
>                     }
> 
>                     if (bytes != null)
>                     {
>                         MimeBase64Encoder encoder = new MimeBase64Encoder();
> 
185,187c190
<                               attrList.addAttribute( 
XML.Entries.Attributes.Encoding, "NMTOKEN",
<                                                                                      
                                  XML.Entries.Attributes.Encodings.Base64 );
<                               }
---
>                         attrList.addAttribute( XML.Entries.Attributes.Encoding, 
>"NMTOKEN", XML.Entries.Attributes.Encodings.Base64 );

Reply via email to