Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Not able to point to keystore file in embedded jetty

Any reply for this please !!!!!

On Fri, Feb 25, 2011 at 6:24 PM, Mitul Adhia <mituladhia19@xxxxxxxxx> wrote:
Hi Thomas,

My application is working on windows machine ..
Yes the path should be relative to the bundle where jettyconfig bundle.

What should be the value in JETTY_HOME ??? Is the keyword is case sensitive ??? Whether it should be jetty.home or jetty_home ??

Best regards,

On Fri, Feb 25, 2011 at 5:57 PM, Thomas Becker <tbecker@xxxxxxxxxxx> wrote:
Hi Mitul,

sorry, I misunderstood your requirements. I guess in your case the path is relative to where you've started jetty. Can you confirm this? I'm pretty sure that /etc/keystore1 on a linux box will resolve to the absolute path /etc/keystore1 as you would expect.

Have you tried setting a JETTY_HOME environment variable and removing the leading slash from the path? "etc/keystore1" instead of "/etc/keystore1"


On 25/02/2011 10:28, Mitul Adhia wrote:
Hi Thomas,

The requirement is not to set the absolute path which is always possible . I mean if i set the path from the start of directory structure it would definitely work . But what if i wanted to set the path relative to the bundle . My application would be in finally be zipped and shipped . Definetly the customer are not going to unzip the bundles in C directory always can be in any directory .

Best Regards,

On Fri, Feb 25, 2011 at 1:49 PM, Thomas Becker <tbecker@xxxxxxxxxxx> wrote:
Hi Mitul,

as you're on windows have you tried setting the path to:


On 25/02/2011 09:14, Mitul Adhia wrote:
Hi All,

I am using embedded jetty 7.2.2. and wanted to configure SSL in it . For this i have created fragment bundle named jettyconfig which consist of FragmentActivator class and jetty.xml & keystore1 located under folder etc. The fragment bundle is called from jetty.boot bundle .

Attach is the complete jettyconfig fragment bundle for your reference . In jetty.xml file if i set the keystore path as highlighted  below i get the following exception 

jetty.xml entry for SSL 

 <Call name="addConnector">
     <New class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
<Set name="Port">8443</Set>
<Set name="maxIdleTime">30000</Set>
<Set name="Acceptors">2</Set>
<Set name="AcceptQueueSize">100</Set>
<Set name="Keystore"><Property name="jetty.home" default="." />/etc/keystore1</Set>
<Set name="Password">OBF:1igd1igf1igh1idp1idr1idt</Set>
<Set name="KeyPassword">OBF:1igd1igf1igh1idp1idr1idt</Set>
   <Set name="truststore"><Property name="jetty.home" default="." />/etc/keystore1</Set>
<Set name="trustPassword">OBF:1igd1igf1igh1idp1idr1idt</Set>

Exception trace below comes on console when jetty is coming up :

2011-02-25 13:33:43.671:INFO::Started SelectChannelConnector@
2011-02-25 13:33:43.672:WARN::FAILED SslSelectChannelConnector@ C:\Mitul\Software\eclipse-jpaas-helios-SR1-win32\etc\keystore1 (The system cannot find the path specified)
2011-02-25 13:33:43.673:WARN::FAILED org.eclipse.jetty.server.Server@182a70: C:\Mitul\Software\eclipse-jpaas-helios-SR1-win32\etc\keystore1 (The system cannot find the path specified) C:\Mitul\Software\eclipse-jpaas-helios-SR1-win32\etc\keystore1 (The system cannot find the path specified)
at Method)
at org.eclipse.jetty.util.resource.FileResource.getInputStream(
at org.eclipse.jetty.server.ssl.SslSelectChannelConnector.getKeyStore(
at org.eclipse.jetty.server.ssl.SslSelectChannelConnector.getKeyManagers(
at org.eclipse.jetty.server.ssl.SslSelectChannelConnector.createSSLContext(
at org.eclipse.jetty.server.ssl.SslSelectChannelConnector.doStart(
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(
at org.eclipse.jetty.server.Server.doStart(
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(
at org.eclipse.jetty.osgi.boot.internal.serverfactory.ServerInstanceWrapper.start(
at org.eclipse.jetty.osgi.boot.internal.serverfactory.JettyServerServiceTracker.serviceChanged(
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(

If the path is changed to  /newWP1/jettyconfig/etc/ketystore1 then it is able to locate the given file .  Here newWP1 is my eclipse workspace name & jettyconfig is the bundle which is attached .
I wanted to know how can i point to required file without the use of /newWP1/jettyconfig in key store path ???

Best Regards,

_______________________________________________ jetty-users mailing list jetty-users@xxxxxxxxxxx

Back to the top