custom plugin issues: java.lang.reflect.InvocationTargetException

Post here questions and problems related to editing and publishing DITA content.
kate_lopresti
Posts: 15
Joined: Tue Aug 08, 2023 2:43 am

custom plugin issues: java.lang.reflect.InvocationTargetException

Post by kate_lopresti »

Hi Oxygen,
I've joined a new team and have a new version of Oxygen I need to set up.
I successfully installed dita-ot-4.3.1 and started creating a custom plugin. I verified the new transtype is working.
Now I'm making changes to the templates and attributes and the build is failing.
At issue, I think, is that the build doesn't recognize the path to the new plugin.

Code: Select all

  Caused by: javax.xml.transform.TransformerException: Malformed URL plugin:com.company.pdf:cfg/fo/attrs/com_basic-settings.xsl(base file:/C:/dita-ot-4.3.1/plugins/com.company.pdf/xsl/fo/com_test.topic2fo.xsl)
I don't understand why. In the example below, the path to org.dita.pdf2 works. What is different or wrong about the path to com.company.pdf?

Code: Select all

  <xsl:import href="plugin:org.dita.pdf2:cfg/fo/attrs/basic-settings.xsl"/>
    <xsl:import href="plugin:com.company.pdf:cfg/fo/attrs/com_basic-settings.xsl"/>
Attached is a redacted log file that may have more information that I can't yet interpret.
companytestpdf.zip
You do not have the required permissions to view the files attached to this post.
kate_lopresti
Posts: 15
Joined: Tue Aug 08, 2023 2:43 am

Re: custom plugin issues: java.lang.reflect.InvocationTargetException

Post by kate_lopresti »

Coming at this fresh today, I now see where directory properties are set in the org.dita.pdf2 plugin build.xml:

Code: Select all

<property name="xsl.dir" value="${dita.plugin.org.dita.pdf2.dir}/xsl"/>
<property name="xsl.fo.dir"  value="${dita.plugin.org.dita.pdf2.dir}/xsl/fo"/>
<property name="xsl.common.dir" value="${dita.plugin.org.dita.pdf2.dir}/xsl/common"/>
<property name="cfg.dir"  value="${dita.plugin.org.dita.pdf2.dir}/cfg"/>
<property name="cfg.fo.dir" value="${dita.plugin.org.dita.pdf2.dir}/cfg/fo"/>
Added similar properties to my plugin and the paths resolved.
TIP: The location value uses the plugin ID not the plugin folder name.
Last edited by kate_lopresti on Tue May 06, 2025 7:36 pm, edited 2 times in total.
Post Reply