Community & Support
Learn
Marketplace
Discussions
Categories
Discussions
General
Platform
Academic
Partner
Regional
Explore Siemens Communities
User Groups
Documentation
Events
Altair Exchange
Share or Download Projects
Resources
News & Instructions
Programs
YouTube
Employee Resources
This tab can be seen by employees only. Please do not share these resources externally.
Groups
Join a User Group
Support
Home
Discussions
Community Q&A
How to load an Ioo file?
srini
I have an ioo file that was generated by UI. I am trying to load that repo programmatically. When I try to load, I am getting NullPointerException. However when I try to load the sample data, it is able to retrieve. What is it that I am doing wrong?
Below is the sample code.
RepositoryLocation pLoc = null;
try {
pLoc = new RepositoryLocation("//NewLocalRepository//Hypo");
} catch (MalformedRepositoryLocationException ex) {
ex.printStackTrace();
}
IOObjectEntry entry = (IOObjectEntry) pLoc.locateEntry();
IOObject myIOObject = entry.retrieveData(null);
IOContainer ioInput = new IOContainer(new IOObject[]{myIOObject});
ExampleSet examples = ioInput.get(ExampleSet.class);
Find more posts tagged with
AI Studio
Developer
Accepted answers
All comments
Marco_Boeck
Hi,
sorry I somehow missed the question..
The problem is that
pLoc.locateEntry();
returns null when the entry could not be found. In your case the entry could not be found because you have too many '/' in the RepositoryLocation. Only at the beginning '//' is needed, otherwise the seperator is simply '/'.
Change the line to
pLoc = new RepositoryLocation("//NewLocalRepository/Hypo");
and it should work.
Regards,
Marco
Quick Links
All Categories
Recent Discussions
Activity
Unanswered
日本語 (Japanese)
한국어(Korean)
Groups