Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

H2 "custom build tool" not working behind proxy #195

Closed
aadrian opened this issue Oct 22, 2015 · 12 comments
Closed

H2 "custom build tool" not working behind proxy #195

aadrian opened this issue Oct 22, 2015 · 12 comments

Comments

@aadrian
Copy link
Contributor

aadrian commented Oct 22, 2015

The build doesn't seem to work behind a proxy on windows :(.

Maven, Gradle, Grunt, Gulp, Lein, SBT, and other build tools all work correctly behind a proxy on the machines I've tested H2.

Trying to build H2 from source however, I'm getting the following error:

c:\projects\h2database\h2>build.bat download
Target: download
mvn.bat org.apache.maven.plugins:maven-dependency-plugin:2.1:get -DrepoUrl=http://repo1.maven.org/maven2 -Dart
ifact=org/apache/lucene:lucene-core:3.0.2
Could not download using Maven: java.lang.RuntimeException: java.io.IOException: Cannot run program "mvn.bat":
 CreateProcess error=2, The system cannot find the file specified
Downloading http://repo1.maven.org/maven2/org/apache/lucene/lucene-core/3.0.2/lucene-core-3.0.2.jar
Exception in thread "main" java.lang.RuntimeException: Error downloading http://repo1.maven.org/maven2/org/apa
che/lucene/lucene-core/3.0.2/lucene-core-3.0.2.jar to ext/lucene-core-3.0.2.jar
        at org.h2.build.BuildBase.download(BuildBase.java:626)
        at org.h2.build.BuildBase.downloadUsingMaven(BuildBase.java:582)
        at org.h2.build.Build.downloadOrVerify(Build.java:321)
        at org.h2.build.Build.downloadOrVerify(Build.java:294)
        at org.h2.build.Build.download(Build.java:287)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.h2.build.BuildBase.invoke(BuildBase.java:243)
        at org.h2.build.BuildBase.runTarget(BuildBase.java:208)
        at org.h2.build.BuildBase.run(BuildBase.java:189)
        at org.h2.build.Build.main(Build.java:34)
Caused by: java.net.UnknownHostException: repo1.maven.org
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:589)
        at java.net.Socket.connect(Socket.java:538)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:211)
        at sun.net.www.http.HttpClient.New(HttpClient.java:308)
        at sun.net.www.http.HttpClient.New(HttpClient.java:326)
        at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1168)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1104)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:998)
        at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:932)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1512)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440)
        at java.net.URL.openStream(URL.java:1038)
        at org.h2.build.BuildBase.download(BuildBase.java:608)
        ... 12 more
@grandinj
Copy link
Contributor

What version are you using?
I fixed this a few weeks ago (Notice the -Djava.net.useSystemProxies=true) in the build.bat file.

@aadrian
Copy link
Contributor Author

aadrian commented Oct 22, 2015

What version are you using?

Just did a fresh git clone ... a few minutes ago before posting this stacktrace.

...Notice the -Djava.net.useSystemProxies=true

Yes I noticed that it's there, but it still does not work :(.

Any chance moving to a standard build system? e.g. Gradle? :).

@grandinj
Copy link
Contributor

And you're sure you have your system proxies correctly configured? What operating system is this?

Because it's working for me on Windows. (I'm behind a proxy)

@aadrian
Copy link
Contributor Author

aadrian commented Oct 22, 2015

And you're sure you have your system proxies correctly configured?

I have no control over the proxy settings since they're domain controlled, but everything works, except the "h2 custom build" tool :).

What operating system is this?

I'm using Windows 7 (with JDK 8)

@grandinj
Copy link
Contributor

So other java programs (like gradle) are working on your machine with JDK8?

What does your proxy setup in Internet Explorer look like? i.e. the Internet Properties -> Connections -> LAN Settings stuff ?

@thomasmueller
Copy link
Contributor

java.io.IOException: Cannot run program "mvn.bat":
CreateProcess error=2, The system cannot find the file specified

It doesn't look related to proxy.

On Thursday, October 22, 2015, aadrian notifications@github.com wrote:

And you're sure you have your system proxies correctly configured?

I have no control over the proxy settings since they're domain controlled,
but everything works, except the "h2 custom build" tool :).

What operating system is this?

I'm using Windows 7 (with JDK 8)


Reply to this email directly or view it on GitHub
#195 (comment)
.

@aadrian
Copy link
Contributor Author

aadrian commented Oct 22, 2015

So other java programs (like gradle) are working on your machine with JDK8?

Of course. Not just Gradle but all other tools I mentioned above, and also many more Java based can get updates or download required resources without problems.

What does your proxy setup in Internet Explorer look like?

I don't have the rights to see it as everything is grayed out there. This is a common practice in most corporate environments.

@aadrian
Copy link
Contributor Author

aadrian commented Oct 22, 2015

java.io.IOException: Cannot run program "mvn.bat":
CreateProcess error=2, The system cannot find the file specified

It doesn't look related to proxy.

Maven is however working correctly on the machine and it's in the path too:

c:\>where mvn
c:\Programs\maven-3.3.3\bin\mvn
c:\Programs\maven-3.3.3\bin\mvn.cmd

@grandinj
Copy link
Contributor

Aaah, it looks like the latest version of Maven has moved from using a ".bat" file to using a ".cmd" file, which is why we are not finding it.

Is it possible you could ask your sysadmin how your proxy is being configured?
Is it an NTLM proxy, by any chance? If so, what version of NTLM?

@grandinj
Copy link
Contributor

Also, I note that gradle appears to need some kind of configuration before it uses a proxy - what (if any) properties have you added to the gradle.properties file for this?

@aadrian
Copy link
Contributor Author

aadrian commented Oct 22, 2015

Is it possible you could ask your sysadmin how your proxy is being configured?

Unfortunately not :(.

@grandinj
Copy link
Contributor

Fixed the maven issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants