You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by d3coder <sa...@gmail.com> on 2018/01/22 07:35:56 UTC

StoreConfig default registry misspelling

I can't enable StoreConfigLifecycleListener with default settings because
of misspelling in class name in default server-registry.xml
XML line 138 - storeFactoryClass="org.apache.catalina.storeconfig.
OpenSSLConfSF"
storeFactoryClass should be org.apache.catalina.storeconfig.SSLHostConfigSF
or SSLHostConfigSF class should be renamed to OpenSSLConfSF.

Re: StoreConfig default registry misspelling

Posted by Rainer Jung <ra...@kippdata.de>.
Am 22.01.2018 um 08:53 schrieb Rémy Maucherat:
> On Mon, Jan 22, 2018 at 8:35 AM, d3coder <sa...@gmail.com> wrote:
> 
>> I can't enable StoreConfigLifecycleListener with default settings because
>> of misspelling in class name in default server-registry.xml
>> XML line 138 - storeFactoryClass="org.apache.catalina.storeconfig.
>> OpenSSLConfSF"
>> storeFactoryClass should be org.apache.catalina.
>> storeconfig.SSLHostConfigSF
>> or SSLHostConfigSF class should be renamed to OpenSSLConfSF.
>>
> 
> You can probably file a BZ, the class seems to be missing from r1805550. As
> a workaround since you're not using OpenSSLConf you should replace that
> store factory with the generic
> org.apache.catalina.storeconfig.StoreFactoryBase.

Sorry for the inconcenience and thanks for letting us/me know. I forgot 
to commit that class and did it just now in r1821932 for TC 9 and 
r1821935 for TC 8.5. They will be part of 9.0.5 resp. 8.5.28 in about a 
month. The class is small though and should be compatible with a wide 
range of TC 8.5 and 9 versions. If you can compile Tomcat yourself, you 
can add this class to the storeconfig folder:

/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */

package org.apache.catalina.storeconfig;

import java.io.PrintWriter;

import org.apache.tomcat.util.net.openssl.OpenSSLConf;
import org.apache.tomcat.util.net.openssl.OpenSSLConfCmd;

/**
  * Store OpenSSLConf
  */
public class OpenSSLConfSF extends StoreFactoryBase {

     /**
      * Store nested OpenSSLConfCmd elements.
      * {@inheritDoc}
      */
     @Override
     public void storeChildren(PrintWriter aWriter, int indent, Object 
aOpenSSLConf,
             StoreDescription parentDesc) throws Exception {
         if (aOpenSSLConf instanceof OpenSSLConf) {
             OpenSSLConf openSslConf = (OpenSSLConf) aOpenSSLConf;
             // Store nested <OpenSSLConfCmd> elements
             OpenSSLConfCmd[] openSSLConfCmds = 
openSslConf.getCommands().toArray(new OpenSSLConfCmd[0]);
             storeElementArray(aWriter, indent + 2, openSSLConfCmds);
         }
     }

}

Regards,

Rainer


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: StoreConfig default registry misspelling

Posted by Rémy Maucherat <re...@apache.org>.
On Mon, Jan 22, 2018 at 8:35 AM, d3coder <sa...@gmail.com> wrote:

> I can't enable StoreConfigLifecycleListener with default settings because
> of misspelling in class name in default server-registry.xml
> XML line 138 - storeFactoryClass="org.apache.catalina.storeconfig.
> OpenSSLConfSF"
> storeFactoryClass should be org.apache.catalina.
> storeconfig.SSLHostConfigSF
> or SSLHostConfigSF class should be renamed to OpenSSLConfSF.
>

You can probably file a BZ, the class seems to be missing from r1805550. As
a workaround since you're not using OpenSSLConf you should replace that
store factory with the generic
org.apache.catalina.storeconfig.StoreFactoryBase.

Rémy