1

我有一个带有 weblogic-maven-plugin 的 maven 项目(groupid com.oracle.weblogic,版本 12.1.3-0-0)。

当我通过 HTTP 协议运行 weblogic:list-apps 时,它工作正常:

[DEBUG] Configuring mojo 'com.oracle.weblogic:weblogic-maven-plugin:12.1.3-0-0:list-apps' with basic configurator -->
[DEBUG]   (f) adminurl = t3://host:port
[DEBUG]   (f) advanced = false
[DEBUG]   (f) debug = true
[DEBUG]   (f) examples = false
[DEBUG]   (f) failOnError = true
[DEBUG]   (f) noversion = false
[DEBUG]   (f) password = password
[DEBUG]   (f) remote = false
[DEBUG]   (f) timeout = -1
[DEBUG]   (f) user = username
[DEBUG]   (f) verbose = true
[DEBUG]   (f) version = false
[DEBUG] -- end configuration --
[INFO] Command flags are: -adminurl t3://host:port
weblogic.Deployer invoked with options:  -noexit -listapps -user weblogic -debug -verbose -adminurl t3://host:port
app1
app2
Number of Applications Found : 2

今天我设置了域范围的管理端口(并且托管服务器的本地管理端口也被覆盖)

运行相同的命令,包括授权细节并转换为 HTTPS 协议。变化:

  • 切换到 t3s://host:adminport
  • 添加

    -Dweblogic.security.SSL.ignoreHostnameVerification=true -Dweblogic.security.TrustKeyStore=CustomTrust -Dweblogic.security.CustomTrustKeyStoreFileName=trust.jks -Dweblogic.security.CustomTrustKeyStoreType=JKS -Dweblogic.security.CustomTrustKeyStorePassPhrase=password

没有其他改变。调试日志:

[ServerConnectionImpl.getMBeanServer():246] : Connecting to MBeanServer at service:jmx:t3s://host:adminport/jndi/weblogic.management.mbeanservers.domainruntime
[ServerConnectionImpl.getMBeanServer():246] : Connecting to MBeanServer at service:jmx:t3s://host:adminport/jndi/weblogic.management.mbeanservers.runtime
[DomainManager.resetDomain():36] : Getting new domain
[DomainManager.resetDomain():39] : Using pending domain: false
[MBeanCache.addNotificationListener():96] : Adding notification listener for weblogic.deploy.api.spi.deploy.mbeans.TargetCache@6e03db1f
[MBeanCache.addNotificationListener():107] : Disabling mbean caching due to: java.io.InvalidClassException: weblogic.deploy.api.spi.deploy.mbeans.TargetCache; local class incompatible: stream classdesc serialVersionUID = -355364455225633633, local class serialVersionUID = -6063846258165761631
[MBeanCache.addNotificationListener():96] : Adding notification listener for weblogic.deploy.api.spi.deploy.mbeans.ModuleCache@38b3f208
[MBeanCache.addNotificationListener():103] : Added notification listener for weblogic.deploy.api.spi.deploy.mbeans.ModuleCache@38b3f208
[ServerConnectionImpl.initialize():178] : Connected to WLS domain: ProjectName
[ServerConnectionImpl.init():168] : Initializing ServerConnection : weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl@65a9ea3c
[WebLogicDeploymentManagerImpl.getTargets():519] : Return target AdminServer_ProjectName
[WebLogicDeploymentManagerImpl.getTargets():519] : Return target ProjectName-auth-1
[WebLogicDeploymentManagerImpl.getTargets():519] : Return target ProjectName-auth-2
[WebLogicDeploymentManagerImpl.getTargets():519] : Return target ProjectName-pub-1
[WebLogicDeploymentManagerImpl.getTargets():519] : Return target ProjectName-pub-2
[WebLogicDeploymentManagerImpl.getTargets():519] : Return target ProjectName-auth-cluster
[WebLogicDeploymentManagerImpl.getTargets():519] : Return target ProjectName-pub-cluster
[WebLogicDeploymentManagerImpl.getAvailableModules():576] : getting all available modules of type ear
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Auth#1.9.2-SNAPSHOT-145, 0
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Public#1.9.2-SNAPSHOT-145, 0
[WebLogicDeploymentManagerImpl.getAvailableModules():576] : getting all available modules of type ejb
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Auth#1.9.2-SNAPSHOT-145, 1
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Public#1.9.2-SNAPSHOT-145, 1
[WebLogicDeploymentManagerImpl.getAvailableModules():576] : getting all available modules of type car
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Auth#1.9.2-SNAPSHOT-145, 2
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Public#1.9.2-SNAPSHOT-145, 2
[WebLogicDeploymentManagerImpl.getAvailableModules():576] : getting all available modules of type rar
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Auth#1.9.2-SNAPSHOT-145, 3
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Public#1.9.2-SNAPSHOT-145, 3
[WebLogicDeploymentManagerImpl.getAvailableModules():576] : getting all available modules of type war
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Auth#1.9.2-SNAPSHOT-145, 4
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Public#1.9.2-SNAPSHOT-145, 4
[WebLogicDeploymentManagerImpl.getAvailableModules():576] : getting all available modules of type unknown
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Auth#1.9.2-SNAPSHOT-145, 323
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Public#1.9.2-SNAPSHOT-145, 323
[WebLogicDeploymentManagerImpl.getAvailableModules():576] : getting all available modules of type jms
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Auth#1.9.2-SNAPSHOT-145, 324
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Public#1.9.2-SNAPSHOT-145, 324
[WebLogicDeploymentManagerImpl.getAvailableModules():576] : getting all available modules of type jdbc
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Auth#1.9.2-SNAPSHOT-145, 325
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Public#1.9.2-SNAPSHOT-145, 325
[WebLogicDeploymentManagerImpl.getAvailableModules():576] : getting all available modules of type intercept
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Auth#1.9.2-SNAPSHOT-145, 326
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Public#1.9.2-SNAPSHOT-145, 326
[WebLogicDeploymentManagerImpl.getAvailableModules():576] : getting all available modules of type config
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Auth#1.9.2-SNAPSHOT-145, 327
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Public#1.9.2-SNAPSHOT-145, 327
[WebLogicDeploymentManagerImpl.getAvailableModules():576] : getting all available modules of type submodule
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Auth#1.9.2-SNAPSHOT-145, 328
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Public#1.9.2-SNAPSHOT-145, 328
[WebLogicDeploymentManagerImpl.getAvailableModules():576] : getting all available modules of type wldf
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Auth#1.9.2-SNAPSHOT-145, 329
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Public#1.9.2-SNAPSHOT-145, 329
[WebLogicDeploymentManagerImpl.getAvailableModules():576] : getting all available modules of type webservice
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Auth#1.9.2-SNAPSHOT-145, 330
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Public#1.9.2-SNAPSHOT-145, 330
[WebLogicDeploymentManagerImpl.getAvailableModules():576] : getting all available modules of type sca composite
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Auth#1.9.2-SNAPSHOT-145, 331
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Public#1.9.2-SNAPSHOT-145, 331
[WebLogicDeploymentManagerImpl.getAvailableModules():576] : getting all available modules of type sca java
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Auth#1.9.2-SNAPSHOT-145, 332
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Public#1.9.2-SNAPSHOT-145, 332
[WebLogicDeploymentManagerImpl.getAvailableModules():576] : getting all available modules of type sca spring
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Auth#1.9.2-SNAPSHOT-145, 333
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Public#1.9.2-SNAPSHOT-145, 333
[WebLogicDeploymentManagerImpl.getAvailableModules():576] : getting all available modules of type sca bpel
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Auth#1.9.2-SNAPSHOT-145, 334
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Public#1.9.2-SNAPSHOT-145, 334
[WebLogicDeploymentManagerImpl.getAvailableModules():576] : getting all available modules of type sca extension
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Auth#1.9.2-SNAPSHOT-145, 335
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Public#1.9.2-SNAPSHOT-145, 335
[WebLogicDeploymentManagerImpl.getAvailableModules():576] : getting all available modules of type coherence cluster
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Auth#1.9.2-SNAPSHOT-145, 336
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Public#1.9.2-SNAPSHOT-145, 336
[WebLogicDeploymentManagerImpl.getAvailableModules():576] : getting all available modules of type gar
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.validateTargets():561] : Validating targets
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Auth#1.9.2-SNAPSHOT-145, 337
[ServerConnectionImpl.getModulesForTargets():630] : checking tmid, ProjectName-Public#1.9.2-SNAPSHOT-145, 337
[WebLogicDeploymentManagerImpl.getTargets():519] : Return target AdminServer_ProjectName
[WebLogicDeploymentManagerImpl.getTargets():519] : Return target ProjectName-auth-1
[WebLogicDeploymentManagerImpl.getTargets():519] : Return target ProjectName-auth-2
[WebLogicDeploymentManagerImpl.getTargets():519] : Return target ProjectName-pub-1
[WebLogicDeploymentManagerImpl.getTargets():519] : Return target ProjectName-pub-2
[WebLogicDeploymentManagerImpl.getTargets():519] : Return target ProjectName-auth-cluster
[WebLogicDeploymentManagerImpl.getTargets():519] : Return target ProjectName-pub-cluster
java.lang.NullPointerException
    at weblogic.deploy.api.tools.deployer.ListappsOperation.getActiveState(ListappsOperation.java:83)
    at weblogic.deploy.api.tools.deployer.ListappsOperation.report(ListappsOperation.java:60)
    at weblogic.deploy.api.tools.deployer.Deployer.perform(Deployer.java:140)
    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:74)
    at weblogic.Deployer.mainWithExceptions(Deployer.java:63)
    at weblogic.tools.maven.plugins.deploy.ListAppsMojo.execute(ListAppsMojo.java:165)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
[ServerConnectionImpl.close():341] : Closing DM connection
[ServerConnectionImpl.close():361] : Unregistered all listeners
[ServerConnectionImpl.closeJMX():381] : Closed JMX connection
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15.906 s
[INFO] Finished at: 2019-01-30T16:43:08+01:00
[ServerConnectionImpl.closeJMX():393] : Closed Runtime JMX connection
[ServerConnectionImpl.closeJMX():405] : Closed Edit JMX connection
[INFO] Final Memory: 23M/274M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.oracle.weblogic:weblogic-maven-plugin:12.1.3-0-0:list-apps (default-cli) on project ProjectName: java.lang.NullPointerException
[ERROR] at weblogic.deploy.api.tools.deployer.ListappsOperation.getActiveState(ListappsOperation.java:83)
[ERROR] at weblogic.deploy.api.tools.deployer.ListappsOperation.report(ListappsOperation.java:60)
[ERROR] at weblogic.deploy.api.tools.deployer.Deployer.perform(Deployer.java:140)
[ERROR] at weblogic.deploy.api.tools.deployer.Deployer.runBody(Deployer.java:88)
[ERROR] at weblogic.utils.compiler.Tool.run(Tool.java:158)
[ERROR] at weblogic.utils.compiler.Tool.run(Tool.java:115)
[ERROR] at weblogic.Deployer.run(Deployer.java:74)
[ERROR] at weblogic.Deployer.mainWithExceptions(Deployer.java:63)
[ERROR] at weblogic.tools.maven.plugins.deploy.ListAppsMojo.execute(ListAppsMojo.java:165)
[ERROR] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
[ERROR] at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
[ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
[ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
[ERROR] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
[ERROR] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
[ERROR] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
[ERROR] at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:498)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[ERROR] at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
[ERROR] -> [Help 1]

其他目标运行良好,没有任何问题。如果我停用管理端口(模式),该命令将再次开始工作。

为什么我需要管理端口?目前通过以下步骤创建在线部署:分发应用程序 -> 启动管理模式 -> 测试 -> 启动/取消部署。但是在新版本启动几次迭代后,旧版本将处于退役状态。并希望自动删除/取消部署它们。(清除任务不这样做)。

感谢帮助。

4

0 回答 0