[
https://issues.apache.org/jira/browse/AMQ-9405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17791071#comment-17791071
]
Jean-Baptiste Onofré commented on AMQ-9405:
-------------------------------------------
This is due to a change in Jetty 11. Now, SslContextFactory is an abstract
class. You have to use the Server inner class which is an implementation.
It means the following bean:
{code:java}
<bean id="SecureConnector" class="org.eclipse.jetty.server.ServerConnector">
<constructor-arg ref="Server" />
<constructor-arg>
<bean id="handlers"
class="org.eclipse.jetty.util.ssl.SslContextFactory$Server">
<property name="keyStorePath" value="${activemq.conf}/broker.ks" />
<property name="keyStorePassword" value="password" />
</bean>
</constructor-arg>
<property name="port" value="8162" />
</bean> {code}
The properties are the same.
I'm updating the sample/snippet in ActiveMQ conf/examples folders.
> Supplied jetty.xml fails to load if ssl is enabled
> --------------------------------------------------
>
> Key: AMQ-9405
> URL: https://issues.apache.org/jira/browse/AMQ-9405
> Project: ActiveMQ
> Issue Type: Bug
> Components: Web Console
> Affects Versions: 6.0.0
> Environment: EL7
> java-latest-openjdk-18.0.2.0.9-1.rolling.el7.x86_64
> Reporter: JJ
> Assignee: Jean-Baptiste Onofré
> Priority: Major
> Fix For: 6.0.1, 6.1.0
>
> Attachments: Jetty SSL Error.txt
>
>
> Using a fresh download of the current AMQ 6.0.0 if you enable SSL within
> jetty.xml the server fails to loads and provides the attached error.
> {{<bean id="SecureConnector"
> class="org.eclipse.jetty.server.ServerConnector">}}
> {{ <constructor-arg ref="Server" />}}
> {{ <constructor-arg>}}
> {{ <bean id="handlers"
> class="org.eclipse.jetty.util.ssl.SslContextFactory">}}
> {{ <property name="keyStorePath" value="${activemq.conf}/broker.ks"
> />}}
> {{ <property name="keyStorePassword" value="password" />}}
> {{ </bean>}}
> {{ </constructor-arg>}}
> {{ <property name="port" value="8162" />}}
> {{</bean>}}
>
> ERROR | Failed to load: class path resource [activemq.xml], reason: Error
> creating bean with name 'invokeConnectors' defined in class path resource
> [jetty.xml]: Cannot create inner bean 'SecureConnector' of type
> [org.eclipse.jetty.server.ServerConnector] while setting bean property
> 'arguments' with key [1] (Full error attached)
> This works as expected in previous versions.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)