Netbeans Weblogic Mvn插件部署无法连接到服务器t3://localhost:7001
提前谢谢你的帮助 我试图让OracleWebLogicMVN插件在我的机器上正常运行,但我最终在与管理服务器的连接上遇到了困难,插件错误消息在跟踪问题时并不是很有用 概述: 我基本上遵循了以下两页: (a) 在我的本地存储库上安装插件: (b) 配置maven插件 因此,我的配置如下所示:Netbeans Weblogic Mvn插件部署无法连接到服务器t3://localhost:7001,netbeans,deployment,weblogic,weblogic-maven-plugin,Netbeans,Deployment,Weblogic,Weblogic Maven Plugin,提前谢谢你的帮助 我试图让OracleWebLogicMVN插件在我的机器上正常运行,但我最终在与管理服务器的连接上遇到了困难,插件错误消息在跟踪问题时并不是很有用 概述: 我基本上遵循了以下两页: (a) 在我的本地存储库上安装插件: (b) 配置maven插件 因此,我的配置如下所示: <profiles> <profile> <id>weblogicDeploy</id> &l
<profiles>
<profile>
<id>weblogicDeploy</id>
<properties>
<weblogic.server.version>12.1.2.0</weblogic.server.version>
<weblogic.server.adminurl>t3://127.0.0.1:7001</weblogic.server.adminurl>
<weblogic.server.middlewareHome>D:/appservers/weblogic</weblogic.server.middlewareHome>
<weblogic.server.serverName>AdminServer</weblogic.server.serverName>
<weblogic.server.userName>weblogic</weblogic.server.userName>
<weblogic.server.password>welcome1</weblogic.server.password>
</properties>
<dependencies>
<!--dependency>
<groupId>com.oracle.weblogic</groupId>
<artifactId>weblogic-server-pom</artifactId>
<version>${weblogic.server.version}</version>
<type>pom</type>
<scope>provided</scope>
</dependency-->
</dependencies>
<build>
<plugins>
<!--
To have access to this plugin one must follow this guide:
http://docs.oracle.com/cd/E24329_01/web.1211/e24443/maven_deployer.htm#DEPGD383
The plugin is bundled with the web logic server - we cannot get it from the web unless we install it
into our nexus ...
(1) D:\weblogic\wlserver\server\lib>java -jar wljarbuilder.jar -profile weblogic-maven-plugin
(2) jar xvf c:\tmp\weblogic-maven-plugin.jar META-INF/maven/com.oracle.weblogic/weblogic-maven-plugin/pom.xml
(3) mvn install:install-file -Dfile=weblogic-maven-plugin.jar -DpomFile=META-INF/maven/com.oracle.weblogic/weblogic-maven-plugin/pom.xml
-->
<plugin>
<!-- This is the configuration for the weblogic-maven-plugin -->
<groupId>com.oracle.weblogic</groupId>
<artifactId>weblogic-maven-plugin</artifactId>
<version>${weblogic.server.version}</version>
<configuration>
<middlewareHome>${weblogic.server.middlewareHome}</middlewareHome>
</configuration>
<executions>
<!-- Deploy the application to the WebLogic Server in the pre-integration-test phase -->
<execution>
<id>wls-deploy</id>
<!-- Summary Of phase:
process and deploy the package if necessary into an environment where integration tests can be run
-->
<phase>pre-integration-test</phase>
<goals>
<goal>deploy</goal>
</goals>
<configuration>
<!--The admin URL where the app is deployed.
Here use the plugin's default value t3://localhost:7001-->
<adminurl>${weblogic.server.adminurl}</adminurl>
<user>${weblogic.server.userName}</user>
<password>${weblogic.server.password}</password>
<!--The location of the file or directory to be deployed-->
<source>${project.build.directory}/${project.build.finalName}.${project.packaging}</source>
<!--The target servers where the application is deployed. -->
<!--targets>${weblogic.server.serverName}</targets-->
<verbose>true</verbose>
<name>${project.build.finalName}</name>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
我还可以使用WLST连接到服务器:
正在初始化WebLogic脚本工具(WLST)
(c) 上一点显示(a)url,(b)用户名,(c)密码,(d)目标管理服务器。。。基本上是一切
但在运行mvn插件的mvn中,我最终总会遇到以下异常
Failed to execute goal com.oracle.weblogic:weblogic-maven-plugin:12.1.2.0:deploy (wls-deploy) on project whatevermy-war: weblogic.deploy.api.tools.deployer.DeployerException: Unable to connect to 't3://127.0.0.1:7001': weblogic.security.utils.KeyStoreConfiguration. 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. -> [Help 1]
上面的异常消息非常笨拙:
(a) 该插件知道它被提供的url,它知道它没有被告知使用http,这是t3协议
(b) 如果播放url端口并设置无效端口,我确实会收到一个套接字异常,插件发出的异常消息与此完全相同
应该有一个配置方面,我有错误,管理服务器名称,隐藏的安全策略。。。有些东西,但我在这一点上并没有意识到它可能是什么
顺便说一下,我已经对服务器pom上的依赖项进行了注释,因为这是您无法从远程存储库获取的依赖项中的一个,我不知道web逻辑服务器中的哪个jar隐藏了pom。否则,我也会在本地存储库中安装。但我怀疑这是否相关,因为该插件似乎满足于尝试连接到weblogic
非常感谢。按照不同的oracle指南安装maven插件,解决了这个问题 本指南在安装web逻辑插件方面似乎做得更好。 引用《oracle安装指南》的相关部分
Install the Oracle Maven sync plug-in and run the push goal:
Change directory to ORACLE_HOME\oracle_common\plugins\maven\com\oracle\maven\oracle-maven-sync\12.1.3.
mvn install:install-file -DpomFile=oracle-maven-sync-12.1.3.pom -Dfile=oracle-maven-sync-12.1.3.jar.
mvn com.oracle.maven:oracle-maven-sync:push -Doracle-maven-sync.oracleHome=c:\oracle\middleware\oracle_home\.
根据您自己的产品安装路径调整指南,并等待maven push命令成功生成。希望您从本次体验中获得的weblogic插件会比第一本指南中安装的插件更好
在此之后,我唯一需要更改配置的就是插件版本
<weblogic.server.version>12.1.2-0-0</weblogic.server.version>
12.1.2-0-0
瞧,这一次我得到了一个工作插件,而不是一个虚构的玩具。按照不同的oracle指南安装maven插件,解决了这个问题 本指南在安装web逻辑插件方面似乎做得更好。 引用《oracle安装指南》的相关部分
Install the Oracle Maven sync plug-in and run the push goal:
Change directory to ORACLE_HOME\oracle_common\plugins\maven\com\oracle\maven\oracle-maven-sync\12.1.3.
mvn install:install-file -DpomFile=oracle-maven-sync-12.1.3.pom -Dfile=oracle-maven-sync-12.1.3.jar.
mvn com.oracle.maven:oracle-maven-sync:push -Doracle-maven-sync.oracleHome=c:\oracle\middleware\oracle_home\.
根据您自己的产品安装路径调整指南,并等待maven push命令成功生成。希望您从本次体验中获得的weblogic插件会比第一本指南中安装的插件更好
在此之后,我唯一需要更改配置的就是插件版本
<weblogic.server.version>12.1.2-0-0</weblogic.server.version>
12.1.2-0-0
瞧,这一次我得到了一个工作插件,而不是一个假装的玩具。你可以在com.oracle.weblogic.security.encryption_1.0.0.0.jar文件夹/weblogic/weblogic12/wlserver/modules中找到“keystreconfiguration”。
只要把KeyStoreConfiguration.class输入WebLogicMaven插件,一切都很顺利 u可以在com.oracle.weblogic.security.encryption_1.0.0.0.jar中找到“KeyStoreConfiguration”,它位于/weblogic/weblogic12/wlserver/modules文件夹中。
只要把KeyStoreConfiguration.class输入WebLogicMaven插件,一切都很顺利 这与@crimsonwisp给出的答案相同。感谢@DanielHernández的评论。以下是我要摆脱的步骤
Failed to execute goal com.oracle.weblogic:weblogic-maven-plugin:12.1.2.0:deploy (wls-deploy) on project whatevermy-war: weblogic.deploy.api.tools.deployer.DeployerException: Unable to connect to 't3://127.0.0.1:7001': weblogic.security.utils.KeyStoreConfiguration. 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. -> [Help 1]
从wlserver
,找到weblogic.security.encryption jar
$ find . -name com.oracle.weblogic.security.encryption*
./modules/com.oracle.weblogic.security.encryption_2.0.0.0.jar
将此jar的内容复制到weblogic maven plugin.jar
。假设您在INSTALL\u HOME/wlserver/server/lib
目录中
$ mkdir -p /tmp/wlsmaven
$ cp ../../modules/com.oracle.weblogic.security.encryption_2.0.0.0.jar /tmp/wlsmaven/
$ cp weblogic-maven-plugin.jar /tmp/wlsmaven/
$ cd /tmp/wlsmaven
$ jar xvf com.oracle.weblogic.security.encryption_2.0.0.0.jar
# Update jar with classes from weblogic.security.encryption jar
$ jar uvf weblogic-maven-plugin.jar weblogic
$ cd -
$ cp /tmp/wlsmaven/weblogic-maven-plugin.jar .
再次运行以安装maven命令,以便在本地repo或任何您想要的地方安装
$ mvn install:install-file -Dfile=weblogic-maven-plugin.jar -DpomFile=pom.xml
这与@crimsonwisp给出的答案相同。感谢@DanielHernández的评论。以下是我要摆脱的步骤
Failed to execute goal com.oracle.weblogic:weblogic-maven-plugin:12.1.2.0:deploy (wls-deploy) on project whatevermy-war: weblogic.deploy.api.tools.deployer.DeployerException: Unable to connect to 't3://127.0.0.1:7001': weblogic.security.utils.KeyStoreConfiguration. 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. -> [Help 1]
从wlserver
,找到weblogic.security.encryption jar
$ find . -name com.oracle.weblogic.security.encryption*
./modules/com.oracle.weblogic.security.encryption_2.0.0.0.jar
将此jar的内容复制到weblogic maven plugin.jar
。假设您在INSTALL\u HOME/wlserver/server/lib
目录中
$ mkdir -p /tmp/wlsmaven
$ cp ../../modules/com.oracle.weblogic.security.encryption_2.0.0.0.jar /tmp/wlsmaven/
$ cp weblogic-maven-plugin.jar /tmp/wlsmaven/
$ cd /tmp/wlsmaven
$ jar xvf com.oracle.weblogic.security.encryption_2.0.0.0.jar
# Update jar with classes from weblogic.security.encryption jar
$ jar uvf weblogic-maven-plugin.jar weblogic
$ cd -
$ cp /tmp/wlsmaven/weblogic-maven-plugin.jar .
再次运行以安装maven命令,以便在本地repo或任何您想要的地方安装
$ mvn install:install-file -Dfile=weblogic-maven-plugin.jar -DpomFile=pom.xml
谢谢你的回答。虽然有两次被否决,但我尝试了这种方法,并将jar作为依赖项放在POM.xml文件中。我给了你一个观点:D这对我来说太有用了,我正在从Weblogic之外的服务器配置Maven 3.3,所以当我使用Weblogic时,Maven插件给出了这个错误。我只是将那个jar从存储库添加到同一个文件夹中,我必须修改清单来加载那个jar并完成。。。很好的技巧!我认为这是正确的解决办法。由于oracle maven sync:push安装/部署了所需的所有依赖项。您是如何将jar作为依赖项包括在最终项目中还是从Weblogic POM中包括的?@Neo我所做的是修改.jar,因此我在Weblogic插件中添加了所需的所有编译包,谢谢您的回答。虽然有两次被否决,但我尝试了这种方法,并将jar作为依赖项放在POM.xml文件中。我给了你一个观点:D这对我来说太有用了,我正在从Weblogic之外的服务器配置Maven 3.3,所以当我使用Weblogic时,Maven插件给出了这个错误。我只是将那个jar从存储库添加到同一个文件夹中,我必须修改清单来加载那个jar并完成。。。很好的技巧!我认为这是正确的解决办法。自从甲骨文硕士