Page 1 of 1

custom plugin issues: java.lang.reflect.InvocationTargetException

Posted: Mon May 05, 2025 8:35 pm
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

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

Posted: Tue May 06, 2025 7:30 pm
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.