[ 
https://issues.apache.org/jira/browse/TUSCANY-1320?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kelvin Goodson resolved TUSCANY-1320.
-------------------------------------

    Resolution: Invalid

The HelperContext [1] is in essence a collection of SDO Helper Class [2] 
instances which together provide means for creation of ,and access to, metadata 
in a local scope (represented by the HelperContext instance).  So if you define 
metadata with a Helper from a given HelperContext instance, then you must use 
the other helpers from the same HelperContext instance in order to be able to 
access the metadata.

The short answer is that it is best practice to never use XXXXHelper.INSTANCE,  
but instead always use myHelperContext.getXXXHelper().


[1] 
https://svn.apache.org/repos/asf/incubator/tuscany/java/spec/sdo-api/src/main/java/commonj/sdo/helper/HelperContext.java
[2] 
https://svn.apache.org/repos/asf/incubator/tuscany/java/spec/sdo-api/src/main/java/commonj/sdo/helper/


> Issues accessing data objects when using HelperContext
> ------------------------------------------------------
>
>                 Key: TUSCANY-1320
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1320
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-SDO-beta1
>         Environment: OS : Windows XP
>            Reporter: Zafrulla Khan
>            Priority: Blocker
>             Fix For: Java-SDO-beta1
>
>
> I'm using HelperContext to load the data objects. 
>    private static HelperContext helperContext = 
> SDOUtil.createHelperContext(); 
>    File xsdFile = new File("SampleSchema.xsd");
>   FileInputStream fis = new FileInputStream(xsdFile);
>   helperContext.getXSDHelper().define(fis, null);
>   fis.close();
> Later in the process I'm trying try to access the data objects 
>       String str = XSDHelper.INSTANCE.getAppinfo(sdoType, source);
>       XMLDocument xmlDoc = XMLHelper.INSTANCE.load(str);
>       DataObject metadata = xmlDoc.getRootObject();
> This is throwing a NullPointerException. 
> Thanks in advance for your help resolving this issue. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to