You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oodt.apache.org by Michael Starch <st...@umich.edu> on 2015/07/31 01:03:18 UTC

Problems Using Serializable Metadata after Loading Validation Layer

All,

I am getting a NullPointerException deep in the XML library if I try to use
the SerializableMetadata's write to xml function after I load in the XML
Validation Layer from the filemanager. However, if I remove the call to
load in the XML Validation Layer, everything works fine.  Any ideas as to
what might cause this issue?

Thanks,

Michael

Re: Problems Using Serializable Metadata after Loading Validation Layer

Posted by Michael Starch <st...@umich.edu>.
All,

I found the issue.

Using "System.setProperties()" and filling it from properties read from
filemanager.properties clears out other properties setup by the system
which was needed in the XML calls for SerializableMetadata. I did the above
call to setup properties needed by the XMLValidationLayer

To fix set only the properties you need individually.  This adds to the
System properties, not erasing them.

System.setProperty("org.apache.oodt.cas.filemgr.repositorymgr.dirs", ...);

System.setProperty("org.apache.oodt.cas.filemgr.validation.dirs", ...);

-Michael


On Thu, Jul 30, 2015 at 4:20 PM, Michael Starch <st...@umich.edu> wrote:

> Here is the stack trace, but this only happens after a completely
> unrelated peice of the process load the XML Validation Layer.
>
> -Michael
>
> java.lang.NullPointerException
>     at
> com.sun.org.apache.xml.internal.serializer.ToStream.<init>(ToStream.java:143)
>     at
> com.sun.org.apache.xml.internal.serializer.ToXMLStream.<init>(ToXMLStream.java:67)
>     at
> com.sun.org.apache.xml.internal.serializer.ToUnknownStream.<init>(ToUnknownStream.java:143)
>     at
> com.sun.org.apache.xalan.internal.xsltc.runtime.output.TransletOutputHandlerFactory.getSerializationHandler(TransletOutputHandlerFactory.java:160)
>     at
> com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getOutputHandler(TransformerImpl.java:461)
>     at
> com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:344)
>     at
> org.apache.oodt.cas.metadata.SerializableMetadata.writeMetadataToXmlStream(SerializableMetadata.java:157)
>
>
> On Thu, Jul 30, 2015 at 4:16 PM, Chris Mattmann <ch...@gmail.com>
> wrote:
>
>> Mike can you give some specific line numbers? I can help look
>>
>> —
>> Chris Mattmann
>> chris.mattmann@gmail.com
>>
>>
>>
>>
>>
>>
>> -----Original Message-----
>> From: <md...@gmail.com> on behalf of Michael Starch <
>> starchmd@umich.edu>
>> Reply-To: <de...@oodt.apache.org>
>> Date: Thursday, July 30, 2015 at 4:03 PM
>> To: <de...@oodt.apache.org>
>> Subject: Problems Using Serializable Metadata after Loading Validation
>> Layer
>>
>> >All,
>> >
>> >I am getting a NullPointerException deep in the XML library if I try to
>> >use
>> >the SerializableMetadata's write to xml function after I load in the XML
>> >Validation Layer from the filemanager. However, if I remove the call to
>> >load in the XML Validation Layer, everything works fine.  Any ideas as to
>> >what might cause this issue?
>> >
>> >Thanks,
>> >
>> >Michael
>>
>>
>>
>

Re: Problems Using Serializable Metadata after Loading Validation Layer

Posted by Michael Starch <st...@umich.edu>.
Here is the stack trace, but this only happens after a completely unrelated
peice of the process load the XML Validation Layer.

-Michael

java.lang.NullPointerException
    at
com.sun.org.apache.xml.internal.serializer.ToStream.<init>(ToStream.java:143)
    at
com.sun.org.apache.xml.internal.serializer.ToXMLStream.<init>(ToXMLStream.java:67)
    at
com.sun.org.apache.xml.internal.serializer.ToUnknownStream.<init>(ToUnknownStream.java:143)
    at
com.sun.org.apache.xalan.internal.xsltc.runtime.output.TransletOutputHandlerFactory.getSerializationHandler(TransletOutputHandlerFactory.java:160)
    at
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getOutputHandler(TransformerImpl.java:461)
    at
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:344)
    at
org.apache.oodt.cas.metadata.SerializableMetadata.writeMetadataToXmlStream(SerializableMetadata.java:157)


On Thu, Jul 30, 2015 at 4:16 PM, Chris Mattmann <ch...@gmail.com>
wrote:

> Mike can you give some specific line numbers? I can help look
>
> —
> Chris Mattmann
> chris.mattmann@gmail.com
>
>
>
>
>
>
> -----Original Message-----
> From: <md...@gmail.com> on behalf of Michael Starch <starchmd@umich.edu
> >
> Reply-To: <de...@oodt.apache.org>
> Date: Thursday, July 30, 2015 at 4:03 PM
> To: <de...@oodt.apache.org>
> Subject: Problems Using Serializable Metadata after Loading Validation
> Layer
>
> >All,
> >
> >I am getting a NullPointerException deep in the XML library if I try to
> >use
> >the SerializableMetadata's write to xml function after I load in the XML
> >Validation Layer from the filemanager. However, if I remove the call to
> >load in the XML Validation Layer, everything works fine.  Any ideas as to
> >what might cause this issue?
> >
> >Thanks,
> >
> >Michael
>
>
>

Re: Problems Using Serializable Metadata after Loading Validation Layer

Posted by Chris Mattmann <ch...@gmail.com>.
Mike can you give some specific line numbers? I can help look

—
Chris Mattmann
chris.mattmann@gmail.com






-----Original Message-----
From: <md...@gmail.com> on behalf of Michael Starch <st...@umich.edu>
Reply-To: <de...@oodt.apache.org>
Date: Thursday, July 30, 2015 at 4:03 PM
To: <de...@oodt.apache.org>
Subject: Problems Using Serializable Metadata after Loading Validation
Layer

>All,
>
>I am getting a NullPointerException deep in the XML library if I try to
>use
>the SerializableMetadata's write to xml function after I load in the XML
>Validation Layer from the filemanager. However, if I remove the call to
>load in the XML Validation Layer, everything works fine.  Any ideas as to
>what might cause this issue?
>
>Thanks,
>
>Michael