[prev in list] [next in list] [prev in thread] [next in thread]
List: xalan-dev
Subject: [jira] [Updated] (XALANJ-2615) Exception accessing a public method using Java extension
From: "Mario Jauvin (JIRA)" <jira () apache ! org>
Date: 2018-05-16 14:36:00
Message-ID: JIRA.13158551.1525980302000.85771.1526481360459 () Atlassian ! JIRA
[Download RAW message or body]
[ https://issues.apache.org/jira/browse/XALANJ-2615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel \
]
Mario Jauvin updated XALANJ-2615:
---------------------------------
Attachment: xalan.patch
> Exception accessing a public method using Java extension
> --------------------------------------------------------
>
> Key: XALANJ-2615
> URL: https://issues.apache.org/jira/browse/XALANJ-2615
> Project: XalanJ2
> Issue Type: Bug
> Security Level: No security risk; visible to anyone(Ordinary problems in Xalan \
> projects. Anybody can view the issue.)
> Components: Xalan-extensions
> Affects Versions: 2.7.2
> Reporter: Mario Jauvin
> Assignee: Steven J. Hathaway
> Priority: Major
> Attachments: xalan.patch
>
>
> Using this sample stylesheet:
>
> {code:java}
> <?xml version="1.0" encoding="UTF-8"?>
> <stylesheet version="1.0" xmlns="http://www.w3.org/1999/XSL/Transform"
> xmlns:java="http://xml.apache.org/xalan/java">
> <template match="/">
> <!-- <variable name="p" select="java:exec(java:java.lang.Runtime.getRuntime(), 'cmd \
> /c dir /b')"/> --> <variable name="p" \
> select="java:exec(java:java.lang.Runtime.getRuntime(), 'cmd /c echo oui&echo \
> non')"/> <variable name="is" select="java:getInputStream($p)"/>
> </template>
> </stylesheet>{code}
>
> and this XML file
>
> {code:java}
> <?xml version="1.0" encoding="UTF-8"?>
> <dummy/>{code}
>
> When accessing the getInputStream method of the java.lang.Process class using XALAN \
> I get this error:
> {noformat}
> 15:16:01,284 INFO [main] Main - \
> javax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl
> 15:16:01,287 INFO [main] Main - \
> java.endorsed.dirs=C:\radws\workspace\build-env\.metadata\.plugins\org.eclipse.wst.xsl.jaxp.launching\endorsed
> 15:16:01,293 INFO [main] Main - launchFile: \
> C:\radws\workspace\build-env\.metadata\.plugins\org.eclipse.wst.xsl.jaxp.launching\launch\launch.xml
> 15:16:01,503 INFO [main] JAXPSAXProcessorInvoker - Transforming...
> file:/C:/radws/workspace/build-env/add-infra/samples/t1.xsl; Line #7; Column #57; \
> java.lang.IllegalAccessException: Class \
> org.apache.xalan.extensions.ExtensionHandlerJavaPackage can not access a member of \
> class java.lang.ProcessImpl with modifiers "public" \
> file:/C:/radws/workspace/build-env/add-infra/samples/t1.xsl; Line #7; Column #57; \
> java.lang.NullPointerException 15:16:01,533 INFO [main] JAXPSAXProcessorInvoker \
> - Done.{noformat} This problem is due to the fact that the class ProcessImpl is not \
> exactly identical to the interface java.lang.Process signature. If you set the \
> override to true in the method object (using AccessibleObject.setAccessible) you \
> will be able to invoke the method. This works in the JRE 8 xsl transformer.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xalan.apache.org
For additional commands, e-mail: dev-help@xalan.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic