Skip to Content
0
Former Member
Apr 16, 2007 at 11:58 AM

resource in jar loading problem in udf

12 Views

Hi,

I am trying to use the apache xml Canonicalizer class to canonicalize some xml from within a user-defined function. When I try to initialize the apache security package by calling the org.apache.xml.security.Init.init(); method I get errors that the XI server cannot load the resource bundles which are packaged in the xmlsec-1.3.0.jar. I have included the xmlsec-1.3.0.jar in the Imported Archives.

I know there are some restrictions when writing java code for mapping. (http://help.sap.com/saphelp_nw04/helpdata/en/bd/c91241c738f423e10000000a155106/frameset.htm). Is there another way to call this code?

Any help would be appreciated.

The error I am getting is:-

Class not found: org/apache/xml/security/resource/xmlsecurity

com.sap.aii.ibrun.server.mapping.persist.ResourceNotFoundException: Unable to find resource org/apache/xml/security/resource/xmlsecurity.class (http://esb.ie/file2SOAP, bbdc7f60-e11e-11db-b40e-e1f10a46d441, -1) at com.sap.aii.ibrun.server.mapping.persist.DBSwcvMappingPersistor.getInputStream(DBSwcvMappingPersistor.java:325) at com.sap.aii.ibrun.server.mapping.persist.DBSwcvMappingPersistor.readFile(DBSwcvMappingPersistor.java:203) at com.sap.aii.ibrun.server.mapping.persist.DBSwcvMappingPersistor.readClass(DBSwcvMappingPersistor.java:195) at com.sap.aii.ibrun.server.mapping.MappingLoader.findClass(MappingLoader.java:138) at java.lang.ClassLoader.loadClass(ClassLoader.java:590) at java.lang.ClassLoader.loadClass(ClassLoader.java:556) at java.util.ResourceBundle.loadBundle(ResourceBundle.java:1030) at java.util.ResourceBundle.findBundle(ResourceBundle.java:907) at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:732) at java.util.ResourceBundle.getBundle(ResourceBundle.java:559) at org.apache.xml.security.utils.I18n.initLocale(Unknown Source) at org.apache.xml.security.utils.I18n.init(Unknown Source) at org.apache.xml.security.Init.init(Unknown Source) at ie.esb.its.Security.<init>(Security.java:77) at ie.esb.its.Security.getInstance(Security.java:58) at com.sap.xi.tf._javaTest2_.testf2$(_javaTest2_.java:66) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60) at java.lang.reflect.Method.invoke(Method.java:391) at com.sap.aii.mappingtool.tf3.rt.C2CFunctionWrapper.cacheContext(C2CFunctionWrapper.java:90) at com.sap.aii.mappingtool.tf3.rt.C2CFunctionWrapper.gotoNextContext(C2CFunctionWrapper.java:46) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:249) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:309) at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:398) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:141) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:102) at com.sap.aii.ibrun.server.mapping.JavaMapping.executeStep(JavaMapping.java:64) at com.sap.aii.ibrun.server.mapping.Mapping.execute(Mapping.java:91) at com.sap.aii.ibrun.server.mapping.MappingHandler.run(MappingHandler.java:90) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleMappingRequest(MappingRequestHandler.java:95) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleRequest(MappingRequestHandler.java:68) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceImpl.processFunction(MappingServiceImpl.java:79) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceObjectImpl0.processFunction(MappingServiceObjectImpl0.java:131) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60) at java.lang.reflect.Method.invoke(Method.java:391) at com.sap.engine.services.ejb.session.stateless_sp5.ObjectStubProxyImpl.invoke(ObjectStubProxyImpl.java:187) at $Proxy196.processFunction(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60) at java.lang.reflect.Method.invoke(Method.java:391) at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.call(RFCDefaultRequestHandler.java:219) at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:169) at com.sap.engine.services.rfcengine.RFCJCOServer.handleRequest(RFCJCOServer.java:156) at com.sap.mw.jco.JCO$Server.dispatchRequest(JCO.java:7701) at com.sap.mw.jco.MiddlewareJRfc$Server.dispatchRequest(MiddlewareJRfc.java:2376) at com.sap.mw.jco.MiddlewareJRfc$Server.listen(MiddlewareJRfc.java:1700) at com.sap.mw.jco.JCO$Server.listen(JCO.java:8061) at com.sap.mw.jco.JCO$Server.work(JCO.java:8181) at com.sap.mw.jco.JCO$Server.loop(JCO.java:8128) at com.sap.mw.jco.JCO$Server.run(JCO.java:8044) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(AccessController.java:215) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:124)