[jira] [Commented] (BSF-43) Exception while executing the javascript from xslt

2015-11-30 Thread Rony G. Flatscher (JIRA)

[ 
https://issues.apache.org/jira/browse/BSF-43?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15032033#comment-15032033
 ] 

Rony G. Flatscher commented on BSF-43:
--

You would need to supply a few more pieces of information, like

- what exception is thrown where (stack trace?),
- supply a script that demonstrates the problem,
- where did you get the jars from.

The more precise your information the more likelier that a cause can be 
identified, and if in BSF 2.4, a fix for it.

---rony

> Exception while executing the javascript from xslt
> --
>
> Key: BSF-43
> URL: https://issues.apache.org/jira/browse/BSF-43
> Project: Commons BSF
>  Issue Type: Bug
>Reporter: sravya
>Priority: Critical
>
> I am gettingjavax.xml.transform.TransformerException: Could not initialize 
> BSF Manager exception while executing the javascript from xslt.
> I included bfs 2.4.jar,js 1.7.jar,xalan 2.7.jar



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Closed] (BSF-42) Exception while executing the javascript from xslt

2015-11-30 Thread Rony G. Flatscher (JIRA)

 [ 
https://issues.apache.org/jira/browse/BSF-42?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rony G. Flatscher closed BSF-42.

Resolution: Duplicate

> Exception while executing the javascript from xslt
> --
>
> Key: BSF-42
> URL: https://issues.apache.org/jira/browse/BSF-42
> Project: Commons BSF
>  Issue Type: Bug
>Reporter: sravya
>Priority: Critical
>
> I am gettingjavax.xml.transform.TransformerException: Could not initialize 
> BSF Manager exception while executing the javascript from xslt.
> I included bfs 2.4.jar,js 1.7R3.jar,xalan 2.7.jar



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (BSF-42) Exception while executing the javascript from xslt

2015-11-30 Thread Rony G. Flatscher (JIRA)

[ 
https://issues.apache.org/jira/browse/BSF-42?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15032027#comment-15032027
 ] 

Rony G. Flatscher commented on BSF-42:
--

This looks exactly like BSF-43, hence closing this issue, please see comment 
with BSF-43.

> Exception while executing the javascript from xslt
> --
>
> Key: BSF-42
> URL: https://issues.apache.org/jira/browse/BSF-42
> Project: Commons BSF
>  Issue Type: Bug
>Reporter: sravya
>Priority: Critical
>
> I am gettingjavax.xml.transform.TransformerException: Could not initialize 
> BSF Manager exception while executing the javascript from xslt.
> I included bfs 2.4.jar,js 1.7R3.jar,xalan 2.7.jar



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Issue Comment Deleted] (BSF-43) Exception while executing the javascript from xslt

2015-11-30 Thread sravya (JIRA)

 [ 
https://issues.apache.org/jira/browse/BSF-43?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

sravya updated BSF-43:
--
Comment: was deleted

(was: Below is the exception I am getting while executing:
20:37:25,465 ERROR [main] JAXPSAXProcessorInvoker  - The first argument to the 
non-static Java function 'getdate' is not a valid object reference.
20:37:25,470 ERROR [main] JAXPSAXProcessorInvoker  - Could not compile 
stylesheet
javax.xml.transform.TransformerConfigurationException: Could not compile 
stylesheet
at 
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(Unknown
 Source)
at 
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(Unknown
 Source)
at 
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformerHandler(Unknown
 Source)
at 
org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.addStylesheet(JAXPSAXProcessorInvoker.java:136)
at 
org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.addStylesheet(JAXPSAXProcessorInvoker.java:127)
at 
org.eclipse.wst.xsl.jaxp.debug.invoker.PipelineDefinition.addStyleSheet(PipelineDefinition.java:161)
at 
org.eclipse.wst.xsl.jaxp.debug.invoker.PipelineDefinition.configure(PipelineDefinition.java:152)
at 
org.eclipse.wst.xsl.jaxp.debug.invoker.internal.Main.main(Main.java:72)
20:37:25,477 FATAL [main] Main  - Error with stylesheet: 
file:/C:/Users/syarabat/workspace/XSLExampleProject/files/JC_Test.xsl
org.eclipse.wst.xsl.jaxp.debug.invoker.internal.ConfigurationException: Error 
with stylesheet: 
file:/C:/Users/syarabat/workspace/XSLExampleProject/files/JC_Test.xsl
at 
org.eclipse.wst.xsl.jaxp.debug.invoker.PipelineDefinition.addStyleSheet(PipelineDefinition.java:163)
at 
org.eclipse.wst.xsl.jaxp.debug.invoker.PipelineDefinition.configure(PipelineDefinition.java:152)
at 
org.eclipse.wst.xsl.jaxp.debug.invoker.internal.Main.main(Main.java:72)

And while debugging am getting below exception:
Caused by: javax.xml.transform.TransformerException: Could not initialize BSF 
Manager
   at 
org.apache.xalan.extensions.ExtensionHandlerGeneral.(ExtensionHandlerGeneral.java:216)
   ... 21 more
-
java.lang.reflect.InvocationTargetException
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown 
Source)
   at java.lang.reflect.Constructor.newInstance(Unknown Source)
   at 
org.apache.xalan.extensions.ExtensionNamespaceSupport.launch(ExtensionNamespaceSupport.java:95)
   at 
org.apache.xalan.extensions.ExtensionsTable.(ExtensionsTable.java:66)
   at 
org.apache.xalan.transformer.TransformerImpl.setExtensionsTable(TransformerImpl.java:441)
   at 
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1312)
   at 
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3447)
   at 
org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:408)
   at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endDocument(Unknown
 Source)
   at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
 Source)
   at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
Source)
   at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
Source)
   at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown 
Source)
   at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown 
Source)
   at 
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
 Source)
   at 
org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.transform(JAXPSAXProcessorInvoker.java:220)
   at 
org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.transform(JAXPSAXProcessorInvoker.java:186)
   at 
org.eclipse.wst.xsl.jaxp.debug.debugger.AbstractDebugger.run(AbstractDebugger.java:111)
   at java.lang.Thread.run(Unknown Source)
Caused by: javax.xml.transform.TransformerException: Could not initialize BSF 
Manager
   at 
org.apache.xalan.extensions.ExtensionHandlerGeneral.(ExtensionHandlerGeneral.java:216)
   ... 21 more
file:/C:/Users/syarabat/workspace/XSLExampleProject/files/JC_Test.xsl; Line 
#31; Column #42; java.lang.NullPointerException

)

> Exception while executing the javascript from xslt
> --
>
> Key: BSF-43
> URL: https://issues.apache.org/jira/browse/BSF-43
> Project: Commons BSF
>  Issue Type: Bug
>Reporter: 

[jira] [Commented] (BSF-43) Exception while executing the javascript from xslt

2015-11-30 Thread sravya (JIRA)

[ 
https://issues.apache.org/jira/browse/BSF-43?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15033206#comment-15033206
 ] 

sravya commented on BSF-43:
---

Below is the exception I am getting while executing:
20:37:25,465 ERROR [main] JAXPSAXProcessorInvoker - The first argument to the 
non-static Java function 'getdate' is not a valid object reference.
20:37:25,470 ERROR [main] JAXPSAXProcessorInvoker - Could not compile stylesheet
javax.xml.transform.TransformerConfigurationException: Could not compile 
stylesheet
at 
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(Unknown
 Source)
at 
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(Unknown
 Source)
at 
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformerHandler(Unknown
 Source)
at 
org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.addStylesheet(JAXPSAXProcessorInvoker.java:136)
at 
org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.addStylesheet(JAXPSAXProcessorInvoker.java:127)
at 
org.eclipse.wst.xsl.jaxp.debug.invoker.PipelineDefinition.addStyleSheet(PipelineDefinition.java:161)
at 
org.eclipse.wst.xsl.jaxp.debug.invoker.PipelineDefinition.configure(PipelineDefinition.java:152)
at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.Main.main(Main.java:72)
20:37:25,477 FATAL [main] Main - Error with stylesheet: 
file:/C:/Users/syarabat/workspace/XSLExampleProject/files/JC_Test.xsl
org.eclipse.wst.xsl.jaxp.debug.invoker.internal.ConfigurationException: Error 
with stylesheet: 
file:/C:/Users/syarabat/workspace/XSLExampleProject/files/JC_Test.xsl
at 
org.eclipse.wst.xsl.jaxp.debug.invoker.PipelineDefinition.addStyleSheet(PipelineDefinition.java:163)
at 
org.eclipse.wst.xsl.jaxp.debug.invoker.PipelineDefinition.configure(PipelineDefinition.java:152)
at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.Main.main(Main.java:72)
And while debugging am getting below exception:
Caused by: javax.xml.transform.TransformerException: Could not initialize BSF 
Manager
at 
org.apache.xalan.extensions.ExtensionHandlerGeneral.(ExtensionHandlerGeneral.java:216)
... 21 more
-
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at 
org.apache.xalan.extensions.ExtensionNamespaceSupport.launch(ExtensionNamespaceSupport.java:95)
at org.apache.xalan.extensions.ExtensionsTable.(ExtensionsTable.java:66)
at 
org.apache.xalan.transformer.TransformerImpl.setExtensionsTable(TransformerImpl.java:441)
at 
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1312)
at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3447)
at 
org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:408)
at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endDocument(Unknown
 Source)
at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
 Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown 
Source)
at 
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
 Source)
at 
org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.transform(JAXPSAXProcessorInvoker.java:220)
at 
org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.transform(JAXPSAXProcessorInvoker.java:186)
at 
org.eclipse.wst.xsl.jaxp.debug.debugger.AbstractDebugger.run(AbstractDebugger.java:111)
at java.lang.Thread.run(Unknown Source)
Caused by: javax.xml.transform.TransformerException: Could not initialize BSF 
Manager
at 
org.apache.xalan.extensions.ExtensionHandlerGeneral.(ExtensionHandlerGeneral.java:216)
... 21 more
file:/C:/Users/syarabat/workspace/XSLExampleProject/files/JC_Test.xsl; Line 
#31; Column #42; java.lang.NullPointerException

> Exception while executing the javascript from xslt
> --
>
> Key: BSF-43
> URL: https://issues.apache.org/jira/browse/BSF-43
> Project: Commons BSF
>  Issue Type: Bug
>Reporter: sravya
>Priority: Critical
>
> I am gettingjavax.xml.transform.TransformerException: Could not initialize 
> BSF Manager exception while executing the javascript from xslt.
> I included bfs 2.4.jar,js 1.7.jar,xalan 2.7.jar



--
This message was sent by 

[jira] [Commented] (BSF-43) Exception while executing the javascript from xslt

2015-11-30 Thread sravya (JIRA)

[ 
https://issues.apache.org/jira/browse/BSF-43?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15033195#comment-15033195
 ] 

sravya commented on BSF-43:
---

Below is the exception I am getting while executing:
20:37:25,465 ERROR [main] JAXPSAXProcessorInvoker  - The first argument to the 
non-static Java function 'getdate' is not a valid object reference.
20:37:25,470 ERROR [main] JAXPSAXProcessorInvoker  - Could not compile 
stylesheet
javax.xml.transform.TransformerConfigurationException: Could not compile 
stylesheet
at 
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(Unknown
 Source)
at 
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(Unknown
 Source)
at 
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformerHandler(Unknown
 Source)
at 
org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.addStylesheet(JAXPSAXProcessorInvoker.java:136)
at 
org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.addStylesheet(JAXPSAXProcessorInvoker.java:127)
at 
org.eclipse.wst.xsl.jaxp.debug.invoker.PipelineDefinition.addStyleSheet(PipelineDefinition.java:161)
at 
org.eclipse.wst.xsl.jaxp.debug.invoker.PipelineDefinition.configure(PipelineDefinition.java:152)
at 
org.eclipse.wst.xsl.jaxp.debug.invoker.internal.Main.main(Main.java:72)
20:37:25,477 FATAL [main] Main  - Error with stylesheet: 
file:/C:/Users/syarabat/workspace/XSLExampleProject/files/JC_Test.xsl
org.eclipse.wst.xsl.jaxp.debug.invoker.internal.ConfigurationException: Error 
with stylesheet: 
file:/C:/Users/syarabat/workspace/XSLExampleProject/files/JC_Test.xsl
at 
org.eclipse.wst.xsl.jaxp.debug.invoker.PipelineDefinition.addStyleSheet(PipelineDefinition.java:163)
at 
org.eclipse.wst.xsl.jaxp.debug.invoker.PipelineDefinition.configure(PipelineDefinition.java:152)
at 
org.eclipse.wst.xsl.jaxp.debug.invoker.internal.Main.main(Main.java:72)

And while debugging am getting below exception:
Caused by: javax.xml.transform.TransformerException: Could not initialize BSF 
Manager
   at 
org.apache.xalan.extensions.ExtensionHandlerGeneral.(ExtensionHandlerGeneral.java:216)
   ... 21 more
-
java.lang.reflect.InvocationTargetException
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown 
Source)
   at java.lang.reflect.Constructor.newInstance(Unknown Source)
   at 
org.apache.xalan.extensions.ExtensionNamespaceSupport.launch(ExtensionNamespaceSupport.java:95)
   at 
org.apache.xalan.extensions.ExtensionsTable.(ExtensionsTable.java:66)
   at 
org.apache.xalan.transformer.TransformerImpl.setExtensionsTable(TransformerImpl.java:441)
   at 
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1312)
   at 
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3447)
   at 
org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:408)
   at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endDocument(Unknown
 Source)
   at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
 Source)
   at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
Source)
   at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
Source)
   at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown 
Source)
   at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown 
Source)
   at 
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
 Source)
   at 
org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.transform(JAXPSAXProcessorInvoker.java:220)
   at 
org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.transform(JAXPSAXProcessorInvoker.java:186)
   at 
org.eclipse.wst.xsl.jaxp.debug.debugger.AbstractDebugger.run(AbstractDebugger.java:111)
   at java.lang.Thread.run(Unknown Source)
Caused by: javax.xml.transform.TransformerException: Could not initialize BSF 
Manager
   at 
org.apache.xalan.extensions.ExtensionHandlerGeneral.(ExtensionHandlerGeneral.java:216)
   ... 21 more
file:/C:/Users/syarabat/workspace/XSLExampleProject/files/JC_Test.xsl; Line 
#31; Column #42; java.lang.NullPointerException



> Exception while executing the javascript from xslt
> --
>
> Key: BSF-43
> URL: https://issues.apache.org/jira/browse/BSF-43
> Project: Commons BSF
>  Issue Type: Bug
>

[jira] [Commented] (BSF-43) Exception while executing the javascript from xslt

2015-11-30 Thread sravya (JIRA)

[ 
https://issues.apache.org/jira/browse/BSF-43?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15033197#comment-15033197
 ] 

sravya commented on BSF-43:
---

XSL Script:

http://www.w3.org/1999/XSL/Transform;
xmlns:xalan="http://xml.apache.org/xalan;
xmlns:my-ext="ext1"
extension-element-prefixes="my-ext">

 
   var multiplier=1;
   
System.setProperty("org.apache.xalan.extensions.bsf.BSFManager","org.apache.bsf.BSFManager");
function timelapse(xslProcessorContext, elem)
{
multiplier=parseInt(elem.getAttribute("multiplier"));
 // The element return value is placed in the result tree.
// If you do not want a return value, return null.


 return null;
}
function getdate(numdays)
{
var d = new Date();
var totalDays = parseInt(numdays) * multiplier;
d.setDate(d.getDate() + totalDays);
return d.toLocaleString();
 }
 



We have logged your enquiry and will 
  respond by .
  


XMl script


3


> Exception while executing the javascript from xslt
> --
>
> Key: BSF-43
> URL: https://issues.apache.org/jira/browse/BSF-43
> Project: Commons BSF
>  Issue Type: Bug
>Reporter: sravya
>Priority: Critical
>
> I am gettingjavax.xml.transform.TransformerException: Could not initialize 
> BSF Manager exception while executing the javascript from xslt.
> I included bfs 2.4.jar,js 1.7.jar,xalan 2.7.jar



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (BSF-43) Exception while executing the javascript from xslt

2015-11-30 Thread sravya (JIRA)

[ 
https://issues.apache.org/jira/browse/BSF-43?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15033203#comment-15033203
 ] 

sravya commented on BSF-43:
---

I downloaded the jars from Java2s.com

> Exception while executing the javascript from xslt
> --
>
> Key: BSF-43
> URL: https://issues.apache.org/jira/browse/BSF-43
> Project: Commons BSF
>  Issue Type: Bug
>Reporter: sravya
>Priority: Critical
>
> I am gettingjavax.xml.transform.TransformerException: Could not initialize 
> BSF Manager exception while executing the javascript from xslt.
> I included bfs 2.4.jar,js 1.7.jar,xalan 2.7.jar



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (VFS-589) SFTP moveTo operation hangs if the server does not support SSH channelExec.

2015-11-30 Thread L (JIRA)
L created VFS-589:
-

 Summary: SFTP moveTo operation hangs if the server does not 
support SSH channelExec.
 Key: VFS-589
 URL: https://issues.apache.org/jira/browse/VFS-589
 Project: Commons VFS
  Issue Type: Bug
Affects Versions: Nightly Builds
Reporter: L


In our case the server was explicitly configured to disable SSH channelExec.
Our code was hanging trying to execute moveTo(). Stacktrace:

{code}
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.io.PipedInputStream.read(PipedInputStream.java:326)
- locked <0x0006a7a184d0> (a com.jcraft.jsch.Channel$MyPipedInputStream)
at java.io.PipedInputStream.read(PipedInputStream.java:377)
- locked <0x0006a7a184d0> (a com.jcraft.jsch.Channel$MyPipedInputStream)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
- locked <0x0006a7a184b8> (a java.io.InputStreamReader)
at java.io.InputStreamReader.read(InputStreamReader.java:184)
at 
org.apache.commons.vfs2.provider.sftp.SftpFileSystem.executeCommand(SftpFileSystem.java:328)
at 
org.apache.commons.vfs2.provider.sftp.SftpFileSystem.getGroupsIds(SftpFileSystem.java:260)
at 
org.apache.commons.vfs2.provider.sftp.SftpFileObject.getPermissions(SftpFileObject.java:317)
at 
org.apache.commons.vfs2.provider.sftp.SftpFileObject.doIsWriteable(SftpFileObject.java:357)
at 
org.apache.commons.vfs2.provider.AbstractFileObject.isWriteable(AbstractFileObject.java:1791)
at 
org.apache.commons.vfs2.impl.DecoratedFileObject.isWriteable(DecoratedFileObject.java:229)
at 
org.apache.commons.vfs2.cache.OnCallRefreshFileObject.isWriteable(OnCallRefreshFileObject.java:156)
at 
org.apache.commons.vfs2.provider.AbstractFileObject.moveTo(AbstractFileObject.java:1857)
at 
org.apache.commons.vfs2.impl.DecoratedFileObject.moveTo(DecoratedFileObject.java:241)
at 
org.apache.commons.vfs2.cache.OnCallRefreshFileObject.moveTo(OnCallRefreshFileObject.java:184)
...
{code}

Technically the connection was alive because the session had a configured 
timeout and the jcraft code kept sending keepalive SSH_MSG_GLOBAL_REQUEST 
messages, but the thread performing FileObject.moveTo() did not return from 
moveTo().
I have changed SftpProviderTestCase to reproduce the problem: testRenameFile() 
hangs.
The patch (patch_sftp_tests_hang_no_exec.diff) is attached.


I traced the problem to the fact that VFS invokes method 
com.jcraft.jsch.Channel.connect(). This method uses timeout value 0, in which 
case class com.jcraft.jsch.ChannelExec creates an instance of class 
com.jcraft.jsch.RequestExec that sends an SSH packet SSH_MSG_CHANNEL_REQUEST 
with "want reply" set to 0.
Correspondingly, if the server supports SSH channelExec, it executes the 
specified command and returns some data.
But if the server *does not* support SSH channelExec it sends nothing back 
while jcraft code tries to read something. This is the hang I am observing.


The fix would be to invoke com.jcraft.jsch.Channel.connect(int connectTimeout).
As a result jcraft sends an SSH packet SSH_MSG_CHANNEL_REQUEST with "want 
reply" set to 1 *and* it waits for an answer *and* it reacts to the answer.

Correspondingly, if the server supports SSH channelExec, it sends an SSH packet 
SSH_MSG_CHANNEL_SUCCESS and the executes the specified command and returns some 
data.
If the server *does not* support SSH channelExec it sends an SSH packet 
SSH_MSG_CHANNEL_FAILURE.
jcraft reacts on either of this messages because if waits for one of them. If 
it receives SSH_MSG_CHANNEL_SUCCESS it goes further and reads the response of 
the executed command.
If it receives SSH_MSG_CHANNEL_FAILURE it immediately reports this by throwing 
JSchException with message "failed to send channel request".
There is no hang whatsoever. Instead all tests from ProviderRenameTests fail 
with errors like

{code}
Could not determine if file "sftp://testtest@localhost:50036/write-tests; is 
writeable.
{code}


The test suite actually hangs at the end, but this is caused by 
https://issues.apache.org/jira/browse/VFS-588


I have patched VFS classes to always open jcraft's channels with timeouts. In 
addition the patch always sets some default timeout value on jcraft's session 
if none was configured via SftpFileSystemConfigBuilder.
Patch is also attached:  patch_sftp_timeouts.diff




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (VFS-590) SFTP moveTo operation might fail on permission checks even if the operation itself might succeed

2015-11-30 Thread L (JIRA)
L created VFS-590:
-

 Summary: SFTP moveTo operation might fail on permission checks 
even if the operation itself might succeed
 Key: VFS-590
 URL: https://issues.apache.org/jira/browse/VFS-590
 Project: Commons VFS
  Issue Type: Bug
Affects Versions: Nightly Builds
Reporter: L


Continuing with SFTP moveTo, see VFS-588 and VFS-589 for more details.

The permission checks that VFS performs during moveTo() can result in failure. 

org.apache.commons.vfs2.provider.AbstractFileObject.moveTo(final FileObject 
destFile) starts with some checks:

{code:java}
@Override
public void moveTo(final FileObject destFile) throws FileSystemException
{
if (canRenameTo(destFile))
{
if (!getParent().isWriteable())
{
throw new 
FileSystemException("vfs.provider/rename-parent-read-only.error",
getName(),
getParent().getName());
}
}
else
{
if (!isWriteable())
{
throw new 
FileSystemException("vfs.provider/rename-read-only.error", getName());
}
}
{code}

The problem is: isWriteable() might fail or even hang while performing moveTo 
without this check might successfully rename the file.

isWriteable() in case of SFTP can fail if the server disables SSH channelExec. 
Or if it does not support "id" command.





--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (VFS-590) SFTP moveTo operation might fail on permission checks even if the operation itself might succeed

2015-11-30 Thread L (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-590?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

L updated VFS-590:
--
Description: 
Continuing with SFTP moveTo, see VFS-588 and VFS-589 for more details.

The permission checks that VFS performs during moveTo() can result in failure. 

org.apache.commons.vfs2.provider.AbstractFileObject.moveTo(final FileObject 
destFile) starts with some checks:

{code:java}
@Override
public void moveTo(final FileObject destFile) throws FileSystemException
{
if (canRenameTo(destFile))
{
if (!getParent().isWriteable())
{
throw new 
FileSystemException("vfs.provider/rename-parent-read-only.error",
getName(),
getParent().getName());
}
}
else
{
if (!isWriteable())
{
throw new 
FileSystemException("vfs.provider/rename-read-only.error", getName());
}
}
{code}

The problem is: isWriteable() might fail or even hang. Performing moveTo 
without this check might successfully rename the file.

isWriteable() in case of SFTP can fail if the server disables SSH channelExec. 
Or if it does not support "id" command.



  was:
Continuing with SFTP moveTo, see VFS-588 and VFS-589 for more details.

The permission checks that VFS performs during moveTo() can result in failure. 

org.apache.commons.vfs2.provider.AbstractFileObject.moveTo(final FileObject 
destFile) starts with some checks:

{code:java}
@Override
public void moveTo(final FileObject destFile) throws FileSystemException
{
if (canRenameTo(destFile))
{
if (!getParent().isWriteable())
{
throw new 
FileSystemException("vfs.provider/rename-parent-read-only.error",
getName(),
getParent().getName());
}
}
else
{
if (!isWriteable())
{
throw new 
FileSystemException("vfs.provider/rename-read-only.error", getName());
}
}
{code}

The problem is: isWriteable() might fail or even hang while performing moveTo 
without this check might successfully rename the file.

isWriteable() in case of SFTP can fail if the server disables SSH channelExec. 
Or if it does not support "id" command.




> SFTP moveTo operation might fail on permission checks even if the operation 
> itself might succeed
> 
>
> Key: VFS-590
> URL: https://issues.apache.org/jira/browse/VFS-590
> Project: Commons VFS
>  Issue Type: Bug
>Affects Versions: Nightly Builds
>Reporter: L
>
> Continuing with SFTP moveTo, see VFS-588 and VFS-589 for more details.
> The permission checks that VFS performs during moveTo() can result in 
> failure. 
> org.apache.commons.vfs2.provider.AbstractFileObject.moveTo(final FileObject 
> destFile) starts with some checks:
> {code:java}
> @Override
> public void moveTo(final FileObject destFile) throws FileSystemException
> {
> if (canRenameTo(destFile))
> {
> if (!getParent().isWriteable())
> {
> throw new 
> FileSystemException("vfs.provider/rename-parent-read-only.error",
> getName(),
> getParent().getName());
> }
> }
> else
> {
> if (!isWriteable())
> {
> throw new 
> FileSystemException("vfs.provider/rename-read-only.error", getName());
> }
> }
> {code}
> The problem is: isWriteable() might fail or even hang. Performing moveTo 
> without this check might successfully rename the file.
> isWriteable() in case of SFTP can fail if the server disables SSH 
> channelExec. Or if it does not support "id" command.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (VFS-589) SFTP moveTo operation hangs if the server does not support SSH channelExec.

2015-11-30 Thread L (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-589?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

L updated VFS-589:
--
Attachment: patch_sftp_tests_hang_no_exec.diff

Patch to the test (SftpProviderTestCase) to reproduce the issue

> SFTP moveTo operation hangs if the server does not support SSH channelExec.
> ---
>
> Key: VFS-589
> URL: https://issues.apache.org/jira/browse/VFS-589
> Project: Commons VFS
>  Issue Type: Bug
>Affects Versions: Nightly Builds
>Reporter: L
> Attachments: patch_sftp_tests_hang_no_exec.diff, 
> patch_sftp_timeouts.diff
>
>
> In our case the server was explicitly configured to disable SSH channelExec.
> Our code was hanging trying to execute moveTo(). Stacktrace:
> {code}
>java.lang.Thread.State: TIMED_WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> at java.io.PipedInputStream.read(PipedInputStream.java:326)
> - locked <0x0006a7a184d0> (a 
> com.jcraft.jsch.Channel$MyPipedInputStream)
> at java.io.PipedInputStream.read(PipedInputStream.java:377)
> - locked <0x0006a7a184d0> (a 
> com.jcraft.jsch.Channel$MyPipedInputStream)
> at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
> at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
> at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
> - locked <0x0006a7a184b8> (a java.io.InputStreamReader)
> at java.io.InputStreamReader.read(InputStreamReader.java:184)
> at 
> org.apache.commons.vfs2.provider.sftp.SftpFileSystem.executeCommand(SftpFileSystem.java:328)
> at 
> org.apache.commons.vfs2.provider.sftp.SftpFileSystem.getGroupsIds(SftpFileSystem.java:260)
> at 
> org.apache.commons.vfs2.provider.sftp.SftpFileObject.getPermissions(SftpFileObject.java:317)
> at 
> org.apache.commons.vfs2.provider.sftp.SftpFileObject.doIsWriteable(SftpFileObject.java:357)
> at 
> org.apache.commons.vfs2.provider.AbstractFileObject.isWriteable(AbstractFileObject.java:1791)
> at 
> org.apache.commons.vfs2.impl.DecoratedFileObject.isWriteable(DecoratedFileObject.java:229)
> at 
> org.apache.commons.vfs2.cache.OnCallRefreshFileObject.isWriteable(OnCallRefreshFileObject.java:156)
> at 
> org.apache.commons.vfs2.provider.AbstractFileObject.moveTo(AbstractFileObject.java:1857)
> at 
> org.apache.commons.vfs2.impl.DecoratedFileObject.moveTo(DecoratedFileObject.java:241)
> at 
> org.apache.commons.vfs2.cache.OnCallRefreshFileObject.moveTo(OnCallRefreshFileObject.java:184)
> ...
> {code}
> Technically the connection was alive because the session had a configured 
> timeout and the jcraft code kept sending keepalive SSH_MSG_GLOBAL_REQUEST 
> messages, but the thread performing FileObject.moveTo() did not return from 
> moveTo().
> I have changed SftpProviderTestCase to reproduce the problem: 
> testRenameFile() hangs.
> The patch (patch_sftp_tests_hang_no_exec.diff) is attached.
> I traced the problem to the fact that VFS invokes method 
> com.jcraft.jsch.Channel.connect(). This method uses timeout value 0, in which 
> case class com.jcraft.jsch.ChannelExec creates an instance of class 
> com.jcraft.jsch.RequestExec that sends an SSH packet SSH_MSG_CHANNEL_REQUEST 
> with "want reply" set to 0.
> Correspondingly, if the server supports SSH channelExec, it executes the 
> specified command and returns some data.
> But if the server *does not* support SSH channelExec it sends nothing back 
> while jcraft code tries to read something. This is the hang I am observing.
> The fix would be to invoke com.jcraft.jsch.Channel.connect(int 
> connectTimeout).
> As a result jcraft sends an SSH packet SSH_MSG_CHANNEL_REQUEST with "want 
> reply" set to 1 *and* it waits for an answer *and* it reacts to the answer.
> Correspondingly, if the server supports SSH channelExec, it sends an SSH 
> packet SSH_MSG_CHANNEL_SUCCESS and the executes the specified command and 
> returns some data.
> If the server *does not* support SSH channelExec it sends an SSH packet 
> SSH_MSG_CHANNEL_FAILURE.
> jcraft reacts on either of this messages because if waits for one of them. If 
> it receives SSH_MSG_CHANNEL_SUCCESS it goes further and reads the response of 
> the executed command.
> If it receives SSH_MSG_CHANNEL_FAILURE it immediately reports this by 
> throwing JSchException with message "failed to send channel request".
> There is no hang whatsoever. Instead all tests from ProviderRenameTests fail 
> with errors like
> {code}
> Could not determine if file "sftp://testtest@localhost:50036/write-tests; is 
> writeable.
> {code}
> The test suite actually hangs at the end, but this is caused by 
> https://issues.apache.org/jira/browse/VFS-588
> I have patched VFS classes to always open jcraft's channels with timeouts. In 
> addition the patch always sets some 

[jira] [Created] (VFS-588) SftpProviderTestCase is not robbust in case a timeout is configured

2015-11-30 Thread L (JIRA)
L created VFS-588:
-

 Summary: SftpProviderTestCase is not robbust in case a timeout is 
configured
 Key: VFS-588
 URL: https://issues.apache.org/jira/browse/VFS-588
 Project: Commons VFS
  Issue Type: Bug
Affects Versions: Nightly Builds
Reporter: L
Priority: Minor


When a timeout is configured via SftpFileSystemConfigBuilder.setTimeout(), the 
test execution of SftpProviderTestCase hangs and does not stop. 

The hang is cause by "stream proxy test suite". Running SftpProviderTestCase 
with disabled "stream proxy test suite" does not hang and JVM stops.

This might look really minor but I am about to file another issue (which is not 
that minor) where timeouts play an important role. Not being able to execute 
tests with timeouts is quite a showstopper for debugging that other issue.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (VFS-588) SftpProviderTestCase is not robbust in case a timeout is configured

2015-11-30 Thread L (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

L updated VFS-588:
--
Attachment: patch_hang_with_tout.diff

The patch that enables timeout configuration.

> SftpProviderTestCase is not robbust in case a timeout is configured
> ---
>
> Key: VFS-588
> URL: https://issues.apache.org/jira/browse/VFS-588
> Project: Commons VFS
>  Issue Type: Bug
>Affects Versions: Nightly Builds
>Reporter: L
>Priority: Minor
> Attachments: patch_hang_with_tout.diff
>
>
> When a timeout is configured via SftpFileSystemConfigBuilder.setTimeout(), 
> the test execution of SftpProviderTestCase hangs and does not stop. 
> The hang is cause by "stream proxy test suite". Running SftpProviderTestCase 
> with disabled "stream proxy test suite" does not hang and JVM stops.
> This might look really minor but I am about to file another issue (which is 
> not that minor) where timeouts play an important role. Not being able to 
> execute tests with timeouts is quite a showstopper for debugging that other 
> issue.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (BSF-42) Exception while executing the javascript from xslt

2015-11-30 Thread sravya (JIRA)
sravya created BSF-42:
-

 Summary: Exception while executing the javascript from xslt
 Key: BSF-42
 URL: https://issues.apache.org/jira/browse/BSF-42
 Project: Commons BSF
  Issue Type: Bug
Reporter: sravya
Priority: Critical


I am gettingjavax.xml.transform.TransformerException: Could not initialize BSF 
Manager exception while executing the javascript from xslt.

I included bfs 2.4.jar,js 1.7R3.jar,xalan 2.7.jar



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (BSF-43) Exception while executing the javascript from xslt

2015-11-30 Thread sravya (JIRA)
sravya created BSF-43:
-

 Summary: Exception while executing the javascript from xslt
 Key: BSF-43
 URL: https://issues.apache.org/jira/browse/BSF-43
 Project: Commons BSF
  Issue Type: Bug
Reporter: sravya
Priority: Critical


I am gettingjavax.xml.transform.TransformerException: Could not initialize BSF 
Manager exception while executing the javascript from xslt.

I included bfs 2.4.jar,js 1.7.jar,xalan 2.7.jar



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)