You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Colm O hEigeartaigh (Jira)" <ji...@apache.org> on 2023/02/20 07:34:00 UTC

[jira] [Closed] (DIRKRB-764) ClassCastException during KerbConf creation

     [ https://issues.apache.org/jira/browse/DIRKRB-764?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Colm O hEigeartaigh closed DIRKRB-764.
--------------------------------------

> ClassCastException during KerbConf creation
> -------------------------------------------
>
>                 Key: DIRKRB-764
>                 URL: https://issues.apache.org/jira/browse/DIRKRB-764
>             Project: Directory Kerberos
>          Issue Type: Bug
>            Reporter: Serge Shikov
>            Assignee: Colm O hEigeartaigh
>            Priority: Major
>             Fix For: 2.0.3
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Groovy code with kerby 2.0.1:
> {code:java}
> File confFile = new File("/etc/krb5.conf")
> KrbConfig conf = new KrbConfig()
> conf.addKrb5Config(confFile){code}
> Completed with exception at line 3:  
> Caught: java.lang.RuntimeException: Failed to load org.apache.kerby.config
> java.lang.RuntimeException: Failed to load org.apache.kerby.config
>     at org.apache.kerby.config.ConfigLoader.load(ConfigLoader.java:43)
>     at org.apache.kerby.config.Conf.addResource(Conf.java:79)
>     at org.apache.kerby.kerberos.kerb.common.Krb5Conf.addKrb5Config(Krb5Conf.java:50)
>     at org.apache.kerby.kerberos.kerb.common.Krb5Conf$addKrb5Config.call(Unknown Source)
>     at SparkRunner.main(kerby.groovy:134)
>     at com.github.igorsuhorukov.groovy.GroovyMain.main(GroovyMain.java:11)
> Caused by: java.lang.ClassCastException: java.util.IdentityHashMap cannot be cast to java.lang.String
>     at org.apache.kerby.config.MapConfigLoader.loadStringMap(MapConfigLoader.java:45)
>     at org.apache.kerby.config.MapConfigLoader.loadConfig(MapConfigLoader.java:35)
>     at org.apache.kerby.config.ConfigLoader.load(ConfigLoader.java:41)
>     ... 5 more
> As I can understand, this exception is a result of this lines in krb5.conf:
> includedir /etc/krb5.conf.d/
> includedir /etc/krb5.include.d/
> Just second line also causes the same exception, even when /etc/krb5.include.d is empty directory.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@directory.apache.org
For additional commands, e-mail: dev-help@directory.apache.org