March 4, 2012
I set up a Tomcat app server on a ‘virtual’ hard drive. The virtual drive is assigned a local hard drive letter. But when a Groovlet attempts to access a local file, the file path used is on the default local drive, C:. How to allow access to the non-local file?
There are probably many ways to do this and of course corresponding security concerns. One of these is to use Universal Naming Convention (UNC) paths. My quick approach is to just use file directory symbolic links. These are supported in most windows versions. On Windows 7 the MKLINK command is available.
You want to access the folder w:\a\b\c on the virtual drive. On the “real” drive you create a link:
mklink /D c w:\a\b\c
Now when the app server access the “c” folder via a UNC, \\mymachine\a\b\c, it will find it.
Duplicate post on other blog: Access local drive with UNC and mklink on Windows
September 23, 2010
I was trying to setup an external HTTP server so that I can test SSL connections from my Java app. I’ve done this with Tomcat server before. It was easy, just follow the instructions on Tomcat’s document site. All done.
- Windows XP Professional
- Tomcat 6.0.29
- Java 1.6
Not this time. A host of problems:
1. javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
2. SEVERE: Error initializing endpoint
java.lang.Exception: No Certificate file specified or invalid file format
at org.apache.tomcat.jni.SSLContext.setCertificate(Native Method)
3. SEVERE: Error starting endpoint
java.lang.Exception: Socket bind failed:  Only one usage of each socket address (protocol/network address/port) is normally permitted.
The last issue above is very weird. I ran netstat and no other apps are using the ports that Tomcat is trying to use.
I won’t bore you with the details, suffice to say, I just removed the native library, tcnative-1.dll, from the Tomcat folder and everything works.
Well, not everything, I’m still getting,
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
But, that is more tractable.
Copy of this post: http://octodecillion.com/blog/setup-ssl-issues-on-tomcat/