This issue has been created
There are 6 updates.
 
 
URL Mapping / cid:jira-generated-image-avatar-9b6671fc-b3ff-454f-afbf-29de70ab1877 URLMAP-3 Closed

ClassCastException when prefix is specified several times in configuration

 
View issue   ·   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-00a5f38c-0f15-48ac-ba7c-ec20a583d869 Raphaël Jakse created this issue on 22/Nov/24 12:15
 
Summary: ClassCastExcerption when prefix is specified several times in configuration
Issue Type: cid:jira-generated-image-avatar-9b6671fc-b3ff-454f-afbf-29de70ab1877 Bug
Affects Versions: 0.0.2
Assignee: Unassigned
Components: Main
Created: 22/Nov/24 12:15
Priority: cid:jira-generated-image-static-major-7f28e56d-829d-45b2-92e2-8654e1d85a0f Major
Reporter: Raphaël Jakse
Description:

This is because we don't force getting a string from the configuration, so we get a list when the configuration is present several times.

 
 

6 updates

 
cid:jira-generated-image-avatar-00a5f38c-0f15-48ac-ba7c-ec20a583d869 Changes by Raphaël Jakse on 22/Nov/24 12:16
 
Summary: ClassCastExcerption ClassCastException when prefix is specified several times in configuration
Fix Version: 0.0.3
Description: This is because we don't force getting a string from the configuration, so we get a list when the configuration is present several times.

{code}
class java.util.ArrayList cannot be cast to class java.lang.String (java.util.ArrayList and java.lang.String are in module java.base of loader 'bootstrap')
class java.lang.ClassCastException: class java.util.ArrayList cannot be cast to class java.lang.String (java.util.ArrayList and java.lang.String are in module java.base of loader 'bootstrap')
    at org.xwiki.contrib.urlmapping.DefaultURLMappingConfiguration.getPrefix(DefaultURLMappingConfiguration.java:130)
    at org.xwiki.contrib.urlmapping.AbstractURLMappingPrefixHandler.getPrefix(AbstractURLMappingPrefixHandler.java:127)
    at org.xwiki.contrib.urlmapping.internal.URLPrefixHandlerRegistrationListener.registerHandler(URLPrefixHandlerRegistrationListener.java:134)
    at org.xwiki.contrib.urlmapping.internal.URLPrefixHandlerRegistrationListener.onEvent(URLPrefixHandlerRegistrationListener.java:102)
    at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:338)
    at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:303)
    at org.xwiki.component.internal.StackingComponentEventManager.sendEvent(StackingComponentEventManager.java:151)
    at org.xwiki.component.internal.StackingComponentEventManager.flushEvents(StackingComponentEventManager.java:92)
    at org.xwiki.extension.jar.internal.handler.JarExtensionHandler.loadComponents(JarExtensionHandler.java:261)
    at org.xwiki.extension.jar.internal.handler.JarExtensionHandler.install(JarExtensionHandler.java:183)
    at org.xwiki.extension.jar.internal.handler.JarExtensionHandler.initialize(JarExtensionHandler.java:144)
    at org.xwiki.extension.handler.internal.DefaultExtensionHandlerManager.initialize(DefaultExtensionHandlerManager.java:154)
    at org.xwiki.extension.handler.internal.DefaultExtensionInitializer.initializeExtensionInNamespace(DefaultExtensionInitializer.java:175)
    at org.xwiki.extension.handler.internal.DefaultExtensionInitializer.initializeExtensionInNamespace(DefaultExtensionInitializer.java:148)
    at org.xwiki.extension.handler.internal.DefaultExtensionInitializer.initializeExtension(DefaultExtensionInitializer.java:126)
    at org.xwiki.extension.handler.internal.DefaultExtensionInitializer.initialize(DefaultExtensionInitializer.java:104)
    at org.xwiki.extension.jar.internal.handler.JarExtensionJobFinishingListener.initializeExtensions(JarExtensionJobFinishingListener.java:244)
    at org.xwiki.extension.jar.internal.handler.JarExtensionJobFinishingListener.onJobFinishedEvent(JarExtensionJobFinishingListener.java:263)
    at org.xwiki.extension.jar.internal.handler.JarExtensionJobFinishingListener.onEvent(JarExtensionJobFinishingListener.java:223)
    at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:338)
    at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:303)
    at org.xwiki.job.AbstractJob.jobFinished(AbstractJob.java:297)
    at org.xwiki.extension.job.internal.AbstractExtensionJob.jobFinished(AbstractExtensionJob.java:134)
    at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:251)
    at org.xwiki.job.AbstractJob.run(AbstractJob.java:223)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:840)
{code}
Assignee: Raphaël Jakse
Resolution: Fixed
Status: Open Closed