Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HttpProxy cannot set setURLStreamHandlerFactory when Prospero is used under a modular environment. #210

Open
yersan opened this issue Sep 22, 2023 · 0 comments

Comments

@yersan
Copy link
Contributor

yersan commented Sep 22, 2023

When Prospero runs in a modular environment HttpProxy will generate always a warning since JBoss Modules already configures the URL.setURLStreamHandlerFactory

This is shown for example when Prospero is used under the server integration, where the update command generates the following warning:

17:36:45,715 WARN  [org.wildfly.channel.proxy.HttpProxy] (management-handler-thread - 1) Unable to URL.setURLStreamHandlerFactory: java.lang.Error: factory already defined
	at java.base/java.net.URL.setURLStreamHandlerFactory(URL.java:1232)
	at org.jboss.prospero//org.wildfly.channel.proxy.HttpProxy.setup(HttpProxy.java:74)
	at org.jboss.prospero//org.wildfly.channel.ChannelMapper.<clinit>(ChannelMapper.java:69)
	at org.jboss.prospero//org.wildfly.prospero.model.ProsperoConfig.readConfig(ProsperoConfig.java:77)
	at org.jboss.prospero//org.wildfly.prospero.api.InstallationMetadata.loadInstallation(InstallationMetadata.java:93)
	at org.jboss.prospero//org.wildfly.prospero.actions.UpdateAction.<init>(UpdateAction.java:57)
	at org.jboss.prospero//org.wildfly.prospero.spi.ProsperoInstallationManager$ActionFactory.getUpdateAction(ProsperoInstallationManager.java:321)
	at org.jboss.prospero//org.wildfly.prospero.spi.ProsperoInstallationManager.findUpdates(ProsperoInstallationManager.java:120)
	at [email protected]//org.wildfly.core.instmgr.InstMgrListUpdatesHandler$1.execute(InstMgrListUpdatesHandler.java:134)
	at [email protected]//org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:1065)
	at [email protected]//org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:786)
	at [email protected]//org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:477)
	at [email protected]//org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1450)
	at [email protected]//org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:449)
	at [email protected]//org.jboss.as.controller.ModelControllerImpl.lambda$executeForResponse$0(ModelControllerImpl.java:259)
	at [email protected]//org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:304)
	at [email protected]//org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:270)
	at [email protected]//org.jboss.as.controller.ModelControllerImpl.executeForResponse(ModelControllerImpl.java:259)
	at [email protected]//org.jboss.as.controller.ModelControllerImpl.executeOperation(ModelControllerImpl.java:253)
	at [email protected]//org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:236)
	at [email protected]//org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.doExecute(ModelControllerClientOperationHandler.java:239)
	at [email protected]//org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:161)
	at [email protected]//org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:157)
	at [email protected]//org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:328)
	at [email protected]//org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:285)
	at [email protected]//org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:254)
	at [email protected]//org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:225)
	at [email protected]//org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.execute(ModelControllerClientOperationHandler.java:157)
	at [email protected]//org.jboss.as.protocol.mgmt.ManagementRequestContextImpl$1.doExecute(ManagementRequestContextImpl.java:70)
	at [email protected]//org.jboss.as.protocol.mgmt.ManagementRequestContextImpl$AsyncTaskRunner.run(ManagementRequestContextImpl.java:160)
	at [email protected]//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
	at [email protected]//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
	at [email protected]//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
	at [email protected]//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
	at java.base/java.lang.Thread.run(Thread.java:834)
	at [email protected]//org.jboss.threads.JBossThread.run(JBossThread.java:513)

This issue could be affecting the behaviour added by #208

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant