0

My company has a web application; we develop on Win7 using NetBeans, and the project runs on tomcat, both in production and for development.

I am trying to determine what it would take to move to eclipse. When I finally get things running in eclipse (or at least it seems I have), I get the following messages at the top of the eclipse console when I tell eclipse to run the app:

Dec 07, 2016 4:46:30 PM org.apache.catalina.startup.SetAllPropertiesRule begin
WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'SSLCertificateFile' to 'C:\Users\rcook\eclipse\workspaceEclipse\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\conf\ssl_crt\mycert\server.crt' did not find a matching property.
Dec 07, 2016 4:46:30 PM org.apache.catalina.startup.SetAllPropertiesRule begin
WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'SSLCertificateKeyFile' to 'C:\Users\rcook\eclipse\workspaceEclipse\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\conf\ssl_crt\mycert\server.key' did not find a matching property.
Dec 07, 2016 4:46:30 PM org.apache.catalina.startup.SetAllPropertiesRule begin
WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'SSLCipherSuite' to 'RC4-SHA:HIGH:!ADH:!SSLv2:@STRENGTH' did not find a matching property.
Dec 07, 2016 4:46:30 PM org.apache.catalina.startup.SetAllPropertiesRule begin
WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'SSLPassword' to 'webapps.accesspointinc.com' did not find a matching property.
Dec 07, 2016 4:46:30 PM org.apache.catalina.startup.SetAllPropertiesRule begin
WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'SSLProtocol' to 'all' did not find a matching property.
Dec 07, 2016 4:46:30 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:salespoint-war' did not find a matching property.
Dec 07, 2016 4:46:30 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.7.0_07\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files\Java\jdk1.7.0_07\jre\bin;C:/Program Files/Java/jre1.8.0_91/bin/server;C:/Program Files/Java/jre1.8.0_91/bin;C:/Program Files/Java/jre1.8.0_91/lib/amd64;C:\ProgramData\Oracle\Java\javapath;c:\local;c:\devTools\apache-maven\bin;C:\Perl64\site\bin;C:\Perl64\bin;c:\Program Files\Java\jdk1.7.0_07\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\WinMerge;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;c:\Program Files\Apache\apache-cxf-3.1.6\bin;C:\Windows\system32;;.
Dec 07, 2016 4:46:30 PM org.apache.coyote.AbstractProtocol init

It appears to me from http://tomcat.apache.org/tomcat-7.0-doc/config/http.html#SSL_Support that we do, in fact, have the property names spelled correctly, and these same settings work when we run the project from NetBeans instead of from eclipse.

The log file goes on, indicating various things that are still being executed; when server init is all done, however, the site won't respond to the browsers. The built-in browser in eclipse says "This page can't be displayed" and suggests I "turn on TLS 1.0-, 1.1 and 1.2"; assuming they mean turning them on in IE, that was already done. From Chrome it says "This site can’t provide a secure connection" and "localhost uses an unsupported protocol".

Can anyone tell me what's wrong here?

arcy
  • 12,845
  • 12
  • 58
  • 103
  • Your config appears to be for Tomcat _Native_ (aka Http11AprProtocol) which uses OpenSSL -- you have separate cert&key files, and cipherlist in OpenSSL format (and several years out of date to boot) -- but that last warning says the Tomcat in Eclipse isn't finding the Native library -- and it wouldn't surprise me if it's not there to be found, because of the hassle of supporting platform-specific code versus Java. Unless you need to dev/test/debug TLS details, you might best convert your cert&key to Java format (JKS or nowadays PKCS12); there are many Qs for that already. – dave_thompson_085 Dec 07 '16 at 22:27

1 Answers1

0

This post showed that it failed because Eclipse and NetBeans set up the SSL cert in different ways. I suggest to search about how to set up SSL cert in eclipse. Try this one.

Community
  • 1
  • 1
Alec Zhang
  • 129
  • 6
  • I used the keytool import suggested on the page in your link, as best I understood it, and get the same result. The console for the server startup still has messages in it saying "did not find a matching property", and when I load any page "http://localhost" or "http://localhost/appName", it says it cannot provide a secure connection. I don't understand why the difference is between eclipse and netbeans when the messages and the configuration all seem to have to do with tomcat, and I don't understand how "did not find a matching property" relates to a security problem. – arcy Dec 08 '16 at 15:28
  • There's a connector in server.xml for the tomcat 7 server I'm adding to the eclipse workspace that specifies an SSLCertificateFile and SSLCertificateKeyFile as well as other things; this is used for the Netbeans case and works. Is there some way to make it work when eclipse runs this server? That's really what I was after. – arcy Dec 08 '16 at 15:30