ANT XSLT and Proxy settings

Having trouble installing Oxygen? Got a bug to report? Post it all here.
DanP
Posts: 18
Joined: Wed Apr 06, 2011 12:19 pm

ANT XSLT and Proxy settings

Post by DanP »

Hi,

I have an ant script which calls some xslt.
This XSLT has a call to apply-templates on a document() function - document(@url):/*:titles.

Whilst the XSLT will function as expected when run directly in Oxygen, ant fails with an I/O error: Connection reset.

This is specific to Oxygen 16 - no problems of this kind using Oxygen 15.2. The only obvious difference I can see is the ant 'Executing' line which Oxygen displays which has the additional options in Oxygen 16 of "-Dhttp.proxySet=true" "-Dhttp.proxyHost=x.x.x.x" "-Dhttp.proxyPort=8080".

Can you offer any advice?

Thanks.
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: ANT XSLT and Proxy settings

Post by adrian »

Hi,

Are you running both the XSLT and the ANT script from within Oxygen?
Is the stylesheet indeed using remote resources that need the HTTP proxy?

Oxygen always provides the detected or configured proxy information to the ANT script in case the script needs remote HTTP access. There are no differences in this regard between Oxygen v15.2 and v16.0.
However, the HTTP proxy is determined by a setting that might be different in your other version of Oxygen: Options > Preferences, Network Connection Settings > Proxy
By default this is set to Use system settings.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
DanP
Posts: 18
Joined: Wed Apr 06, 2011 12:19 pm

Re: ANT XSLT and Proxy settings

Post by DanP »

Hi Adrian,

Yes - I'm running both the XSLT and the ANT script from within Oxygen.
The stylesheet is NOT using remote resources that need the HTTP proxy. Nor does the url passed to the document() function require the HTTP proxy.

I have the same proxy settings under Options > Preferences, Network Connection Settings > Proxy : both 15.2 and 16 are set to the default 'Use system settings'.

Yet my ANT script runs in 15.2 but not 16...
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: ANT XSLT and Proxy settings

Post by adrian »

Hi,

On what platform are you running Oxygen (Windows, Linux, OS X)?
We know of some proxy detection issues for Java (used by Oxygen) on some distributions of Linux. v15.2 and v16.0 use different versions of Java runtime, so that could explain why they behave differently.

Ignoring the platform, could you please try in v16.0 to set the Proxy settings to "Direct connection" and run the script again? Or if you know the proxy settings, manually configure them?

If the problem persists, could you please send us the ANT transformation output log to support@oxygenxml.com so we can investigate?

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
DanP
Posts: 18
Joined: Wed Apr 06, 2011 12:19 pm

Re: ANT XSLT and Proxy settings

Post by DanP »

I'm using Windows 7...

Works fine when I change the proxy settings to 'Direct Connection'.

Our corporate network has an automated config script which the OS uses for proxy settings - when I extract the necessary information and enter this manually, it also works. The obvious difference here is that the executing ant command now includes the http.proxyUser and http.proxyPassword properties.

Given that, under 15.2, the proxy properties weren't present in the ant execution command could it have been that it was ignoring the proxy settings and assuming a direct connection?
DanP
Posts: 18
Joined: Wed Apr 06, 2011 12:19 pm

Re: ANT XSLT and Proxy settings

Post by DanP »

Sorry - spoke too soon! When defining the proxy settings manually, it HASN'T worked...
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: ANT XSLT and Proxy settings

Post by adrian »

Hi,

I've checked and in v15.2 the proxy automatic configuration script detection did not work, so it was most likely ignoring it. In v16.0 the proxy automatic configuration script is detected and used, but I believe the ANT script launcher doesn't benefit from the same support since it's an external process.

Check if your system has configured both automatic configuration script and manual proxy server in [Control Panel] - [Internet Options], [Connections] tab - [LAN settings]. The ANT script launcher will most likely only pick the manual proxy settings.


What build number of v16.0 are you using (check in Help > About)?
There was a problem in the 201405xxxxbb builds (first two builds) regarding the proxy automatic configuration script that could influence this.
http://www.oxygenxml.com/build_history.html#2014060420
Critical: Startup/Windows/Proxy: If both 'Use automatic configuration script' and 'Proxy server' settings were configured in the Windows 'Internet Options', the application hanged at startup for more than 10 minutes.
If you are running build 2014060420 or later this won't affect you.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
DanP
Posts: 18
Joined: Wed Apr 06, 2011 12:19 pm

Re: ANT XSLT and Proxy settings

Post by DanP »

Thanks Adrian,

I've only got the automatic config script setting enabled in the control panel settings.

I'm using build 2014070913...
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: ANT XSLT and Proxy settings

Post by adrian »

Hi,

I just noticed you mentioned the user and password. When Oxygen is configured to using the proxy system settings, it does not have the ability to determine the user and password, so if authentication is required, these must be specified manually in the Oxygen proxy settings.

It's strange that it didn't work with manual settings, maybe one setting was incorrect.
Anyway, if you don't need Oxygen to have access via the proxy, you can simply set it to "Direct connection" and thus prevent it from attempting to detect and use the proxy system settings.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Micha3l
Posts: 1
Joined: Sat Aug 20, 2016 3:56 pm

Re: ANT XSLT and Proxy settings

Post by Micha3l »

Hello. How to configure it, if i already use proxy from http://advanced.name?
Radu
Posts: 9049
Joined: Fri Jul 09, 2004 5:18 pm

Re: ANT XSLT and Proxy settings

Post by Radu »

Hi,

Have you tried configuring the proxy manually in the Options > Preferences, Network Connection Settings > Proxy preferences page?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply