java.util.zip.ZipException: invalid block type: thrown by adapter-OIM 11g
752753Nov 8 2011 — edited Nov 8 2011Hello Everyone,
I have deployed an adapter for provisioning to my custom resource and I am calling the code from a process task in the adapter factory.
The jar for my adapter is place in OIM_HOME/server/JavaTasks .
Inside the code there is a need to read a configuration xml file which is then parsed using org.apache.commons.digester.Digester parser
The xml file is present in the src folder.
The code looks like below:
URL myURL = MyPlugIn.class.getResource("/com/orgname/appname/xyz.xml");
InputStream configFileAsStream = myURL.openStream();
macManager = (MachineManager)digester.parse(configFileAsStream);
This code works fine when I run it on my local machine, but when I deploy it in OIM I get the following exception:
java.util.zip.ZipException: invalid block type
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:147)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:105)
at java.io.FilterInputStream.read(FilterInputStream.java:66)
at oracle.xml.parser.v2.XMLReader.pushXMLReader(XMLReader.java:377)
at oracle.xml.parser.v2.XMLReader.pushXMLReader(XMLReader.java:240)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:222)
at weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:173)
at org.apache.commons.digester.Digester.parse(Digester.java:1765)
Any ideas on why I am getting this exception?
Is there any other way of going about reading files in adapter code? I have tried reading files by specifying absolute as well as relative paths in OIM but was unable to read them in the adapter code. Any pointers will be of great help.. Thanks!
Saiesh/-