Posts Tagged ‘DeploymentManagerCreationException’
javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException
Case
I deploy a WAR on a WebLogic server, thanks to Maven’s Weblogic plugin. For any reason, the pom.xml
was modified, to add a dependency to weblogic-maven-plugin:
<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>weblogic-maven-plugin</artifactId> <version>2.9.1</version> <configuration>(...)</configuration> <dependencies> <dependency> <groupId>weblogic</groupId> <artifactId>wlfullclient</artifactId> <version>10.3</version> <scope>provided</scope> </dependency> </dependencies> </plugin>
From then I could not deploy anymore. I get the error:
javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException at weblogic.deploy.api.spi.deploy.WebLogicDeploymentManagerImpl.<init>(WebLogicDeploymentManagerImpl.java:121)
Complete stacktrace
"[ServerConnectionImpl.close():332] : Closing DM connection [ServerConnectionImpl.close():352] : Unregistered all listeners javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException at weblogic.deploy.api.spi.deploy.WebLogicDeploymentManagerImpl.(WebLogicDeploymentManagerImpl.java:121) at weblogic.deploy.api.spi.factories.internal.DeploymentFactoryImpl.getDeploymentManager(DeploymentFactoryImpl.java:86) at weblogic.deploy.api.tools.SessionHelper.getRemoteDeploymentManager(SessionHelper.java:496) at weblogic.deploy.api.tools.deployer.Jsr88Operation.connect(Jsr88Operation.java:297) at weblogic.deploy.api.tools.deployer.Deployer.perform(Deployer.java:137) at weblogic.deploy.api.tools.deployer.Deployer.runBody(Deployer.java:88) at weblogic.utils.compiler.Tool.run(Tool.java:158) at weblogic.utils.compiler.Tool.run(Tool.java:115) at weblogic.Deployer.run(Deployer.java:70) at org.codehaus.mojo.weblogic.DeployMojoBase.executeDeployer(DeployMojoBase.java:510) at org.codehaus.mojo.weblogic.DeployMojo.execute(DeployMojo.java:49) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:454) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:513) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:483) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:331) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:292) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:345) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:132) at org.apache.maven.cli.MavenCli.main(MavenCli.java:290) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: weblogic.deploy.api.spi.exceptions.ServerConnectionException at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.init(ServerConnectionImpl.java:141) at weblogic.deploy.api.spi.deploy.WebLogicDeploymentManagerImpl.getNewConnection(WebLogicDeploymentManagerImpl.java:148) at weblogic.deploy.api.spi.deploy.WebLogicDeploymentManagerImpl.(WebLogicDeploymentManagerImpl.java:118) ... 28 more Caused by: javax.naming.CommunicationException [Root exception is java.net.ConnectException: t3://localhost:7001: Destination unreachable; nested exception is: java.net.ProtocolException: unrecognized response from proxy: 'HTTP/1.1 403 Forbidden'; No available router to destination] at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:40) at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException(WLInitialContextFactoryDelegate.java:787) at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:366) at weblogic.jndi.Environment.getContext(Environment.java:315) at weblogic.jndi.Environment.getContext(Environment.java:285) at weblogic.jndi.Environment.createInitialContext(Environment.java:208) at weblogic.jndi.Environment.getInitialContext(Environment.java:192) at weblogic.jndi.Environment.getInitialContext(Environment.java:170) at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.getContext(ServerConnectionImpl.java:328) at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.getEnvironment(ServerConnectionImpl.java:300) at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.init(ServerConnectionImpl.java:139) ... 30 more Caused by: java.net.ConnectException: t3://localhost:7001: Destination unreachable; nested exception is: java.net.ProtocolException: unrecognized response from proxy: 'HTTP/1.1 403 Forbidden'; No available router to destination at weblogic.rjvm.RJVMFinder.findOrCreateInternal(RJVMFinder.java:216) at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:170) at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:153) at weblogic.jndi.WLInitialContextFactoryDelegate$1.run(WLInitialContextFactoryDelegate.java:345) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147) at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:340) ... 38 more Caused by: java.rmi.ConnectException: Destination unreachable; nested exception is: java.net.ProtocolException: unrecognized response from proxy: 'HTTP/1.1 403 Forbidden'; No available router to destination at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:464) at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:315) at weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(RJVMManager.java:254) at weblogic.rjvm.RJVMManager.findOrCreate(RJVMManager.java:197) at weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(RJVMFinder.java:238) at weblogic.rjvm.RJVMFinder.findOrCreateInternal(RJVMFinder.java:200) ... 44 more weblogic.deploy.api.tools.deployer.DeployerException: Unable to connect to 't3://localhost:7001': Destination unreachable; nested exception is: java.net.ProtocolException: unrecognized response from proxy: 'HTTP/1.1 403 Forbidden'; No available router to destination. Ensure the url represents a running admin server and that the credentials are correct. If using http protocol, tunneling must be enabled on the admin server. at weblogic.deploy.api.tools.deployer.Jsr88Operation.connect(Jsr88Operation.java:316) at weblogic.deploy.api.tools.deployer.Deployer.perform(Deployer.java:137) at weblogic.deploy.api.tools.deployer.Deployer.runBody(Deployer.java:88) at weblogic.utils.compiler.Tool.run(Tool.java:158) at weblogic.utils.compiler.Tool.run(Tool.java:115) at weblogic.Deployer.run(Deployer.java:70) at org.codehaus.mojo.weblogic.DeployMojoBase.executeDeployer(DeployMojoBase.java:510) at org.codehaus.mojo.weblogic.DeployMojo.execute(DeployMojo.java:49) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:454) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:513) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:483) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:331) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:292) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:345) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:132) at org.apache.maven.cli.MavenCli.main(MavenCli.java:290) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException at weblogic.deploy.api.spi.deploy.WebLogicDeploymentManagerImpl.(WebLogicDeploymentManagerImpl.java:121) at weblogic.deploy.api.spi.factories.internal.DeploymentFactoryImpl.getDeploymentManager(DeploymentFactoryImpl.java:86) at weblogic.deploy.api.tools.SessionHelper.getRemoteDeploymentManager(SessionHelper.java:496) at weblogic.deploy.api.tools.deployer.Jsr88Operation.connect(Jsr88Operation.java:297) ... 25 more Caused by: weblogic.deploy.api.spi.exceptions.ServerConnectionException at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.init(ServerConnectionImpl.java:141) at weblogic.deploy.api.spi.deploy.WebLogicDeploymentManagerImpl.getNewConnection(WebLogicDeploymentManagerImpl.java:148) at weblogic.deploy.api.spi.deploy.WebLogicDeploymentManagerImpl.(WebLogicDeploymentManagerImpl.java:118) ... 28 more Caused by: javax.naming.CommunicationException [Root exception is java.net.ConnectException: t3://localhost:7001: Destination unreachable; nested exception is: java.net.ProtocolException: unrecognized response from proxy: 'HTTP/1.1 403 Forbidden'; No available router to destination] at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:40) at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException(WLInitialContextFactoryDelegate.java:787) at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:366) at weblogic.jndi.Environment.getContext(Environment.java:315) at weblogic.jndi.Environment.getContext(Environment.java:285) at weblogic.jndi.Environment.createInitialContext(Environment.java:208) at weblogic.jndi.Environment.getInitialContext(Environment.java:192) at weblogic.jndi.Environment.getInitialContext(Environment.java:170) at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.getContext(ServerConnectionImpl.java:328) at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.getEnvironment(ServerConnectionImpl.java:300) at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.init(ServerConnectionImpl.java:139) ... 30 more Caused by: java.net.ConnectException: t3://localhost:7001: Destination unreachable; nested exception is: java.net.ProtocolException: unrecognized response from proxy: 'HTTP/1.1 403 Forbidden'; No available router to destination at weblogic.rjvm.RJVMFinder.findOrCreateInternal(RJVMFinder.java:216) at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:170) at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:153) at weblogic.jndi.WLInitialContextFactoryDelegate$1.run(WLInitialContextFactoryDelegate.java:345) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147) at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:340) ... 38 more Caused by: java.rmi.ConnectException: Destination unreachable; nested exception is: java.net.ProtocolException: unrecognized response from proxy: 'HTTP/1.1 403 Forbidden'; No available router to destination at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:464) at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:315) at weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(RJVMManager.java:254) at weblogic.rjvm.RJVMManager.findOrCreate(RJVMManager.java:197) at weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(RJVMFinder.java:238) at weblogic.rjvm.RJVMFinder.findOrCreateInternal(RJVMFinder.java:200) ... 44 more [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Exception encountered during artifact start: weblogic.deploy.api.tools.deployer.DeployerException: Unable to connect to 't3://localhost:7001': Destination unreachable; nested exception is: java.net.ProtocolException: unrecognized response from proxy: 'HTTP/1.1 403 Forbidden'; No available router to destination. Ensure the url represents a running admin server and that the credentials are correct. If using http protocol, tunneling must be enabled on the admin server."
Explanation
In weblogic-maven-plugin-2.9.1.pom
, we can find the following dependencies:
<dependency> <groupId>weblogic</groupId> <artifactId>weblogic</artifactId> <version>[9.0,11.0)</version> </dependency> <dependency> <groupId>weblogic</groupId> <artifactId>webservices</artifactId> <version>[9.0,11.0)</version> </dependency>
Since WebLogic client jars are not compatibles between versions 9 and 10, a conflit of JARs appears between my pom’s dependency to weblogic:wlfullclient-10.3.jar
and the plugin pom’s dependencies to weblogic:weblogic-XXX.jar
and weblogic:webservices-XXX.jar
Fix
In the project pom.xml
, remove the dependency to wlfullclient.jar.