Skip to Content
avatar image
Former Member

User defined java function-compilation error! Activation cancelled

Hi all!

I have written an User defined Function in java for converting XML to PDF which is available at this blog:

/people/divya.vidyanandanprabhu/blog/2005/06/28/converting-xml-to-pdf-using-xi

I added both dom4j-1.6.1.jar and itext-1.4.1.jar files in (XIserver machine)D:/usr/sap/....server0/bin.

When i try to activate in IR, i got the following error.

Activation of the change list canceled Check result for Message Mapping test | http://httpadp.com/send: Starting compilation Source code has syntax error: D:/usr/sap/QN7/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map7bf962e0f21411daae8a00111120e6db/source/com/sap/xi/tf/_test_.java:3: package com.xml2pdf does not exist import com.sap.aii.mappingtool.tf3.;import com.sap.aii.mappingtool.tf3.rt.;import java.util.;import java.io.; import java.lang.reflect.*;import com.xml2pdf.XmlToPdf; ^ D:/usr/sap/QN7/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map7bf962e0f21411daae8a00111120e6db/source/com/sap/xi/tf/_test_.java:51: cannot resolve symbol symbol : class XmlToPdf location: class com.sap.xi.tf._test_ XmlToPdf x = new XmlToPdf("D:
qf
source
Input.xml", "D:
qf
target
Output.pdf"); ^ D:/usr/sap/QN7/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map7bf962e0f21411daae8a00111120e6db/source/com/sap/xi/tf/_test_.java:51: cannot resolve symbol symbol : class XmlToPdf location: class com.sap.xi.tf._test_ XmlToPdf x = new XmlToPdf("D:
qf
source
Input.xml", "D:
qf
target
Output.pdf");

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Jun 02, 2006 at 09:47 AM

    Hi Datta,

    You have to upload the Jars as "imported archive" in the IR, not put them on the server.

    Regards

    Stefan

    Message was edited by: Stefan Grube

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      <i>

      >>I placed these jars in D:/usr/sap/..../server0/bin

      also. I followed the blog thoroughly and carefully.</i>

      Hey, you have to upload the jar files as Imported Archive!!!

      Regards

      Suraj

  • Jun 02, 2006 at 09:19 AM

    Hi Datta,

    Did you type the Import statement in your User Defined Function? this has known to cause some problem.

    Remove all import statements, then use the import button in UDF, and import the packages/ classes you want and try to activate . Might work.

    regards,

    bhavesh

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      I hav written import statement

      In my itext-1.4.1.jar file i can find XmlToPdf.class file

      I imported both dom4j-1.6.1.jar and itext-1.4.1.jar files

      into my IR->Namespace->ImportedArchives.

      as told in blog.

      Thanks a lot

  • avatar image
    Former Member
    Jun 02, 2006 at 09:43 AM

    Hi,

    From your error what i can deduce is that you are missing the package com/xml2pdf. Also in import section write <b>com.xml2pdf.XmlToPdf</b>

    Regards

    Suraj

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi

      I have imported com.xml2pdf.XmlToPdf in my java prg.

      When i opened dom4j-1.6.1.jar with winzip, it is not there, but when i opened itext-1.4.1.jar it was there.

      Help me!

      Thanks a lot!

  • Jun 02, 2006 at 10:06 AM

    Hi Datta,

    Be careful with using blogs. Most of them are intended for experienced guys and have prerequisites which are not mentioned.

    In this blog the Java class com.xml2pdf.XmlToPdf is not provided, but without this class the mapping woun't work.

    The blogs can be used for getting ideas for own scenarios, but the cannot be used as how-to guides.

    Regards

    Stefan

    Add comment
    10|10000 characters needed characters exceeded