Java 在eclipse中设置服务器时找不到weblogic_home

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/23158933/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-13 21:06:48  来源:igfitidea点击:

Cannot find weblogic_home when setting up server in eclipse

javaeclipsejakarta-eeweblogicweblogic12c

提问by TheCatWhisperer

I am trying to get my java ee development environment setup but am running into issues when trying to add a new server in eclipse.

我正在尝试设置我的 java ee 开发环境,但在尝试在 eclipse 中添加新服务器时遇到问题。

I have the oracle java ee version of eclipse, I also downloaded weblogic 12.1.2 and got it setup and running without issues (I can access the console fine). I got the development version of weblogic and unzipped it to "C:\wls12120". When I try to add a weblogic server in eclipse I try setting it to "C:\wls12120" but it gives me the following message: The path "C:\wls12120" does not contain a valid WebLogic Server install.

我有 eclipse 的 oracle java ee 版本,我还下载了 weblogic 12.1.2 并安装和运行没有问题(我可以正常访问控制台)。我拿到了weblogic的开发版,解压到“C:\wls12120”。当我尝试在 Eclipse 中添加 weblogic 服务器时,我尝试将其设置为“C:\wls12120”,但它给了我以下消息:路径“C:\wls12120”不包含有效的 WebLogic Server 安装。

I have also tried various other paths within the folder but without success, does anyone know what I am doing wrong?

我也在文件夹中尝试了各种其他路径,但没有成功,有谁知道我做错了什么?

Thanks in advance!

提前致谢!

回答by Carles Figuera

Maybe your unzipped server not contains this file: C:\wls12120\registry.xml

也许您解压后的服务器不包含此文件:C:\wls12120\registry.xml

http://java.dzone.com/articles/using-intellij-idea-12

http://java.dzone.com/articles/using-intellij-idea-12

回答by John Collins

If if is a fresh installation, you will need to open a shell, set JAVA_HOME, and run the config.bat/config.sh. It should start up an listen on port 7001. You can connect to the instance that starts up via the admin console link. For Eclipse you will need to point to the instance you created (e.g. x:\wls12130\wlserver)

如果是全新安装,则需要打开一个shell,设置JAVA_HOME,然后运行config.bat/config.sh。它应该在端口 7001 上启动侦听。您可以连接到通过管理控制台链接启动的实例。对于 Eclipse,您需要指向您创建的实例(例如 x:\wls12130\wlserver)

回答by user3762813

The server is WL_HOME\server\lib\weblogic.jar

服务器为WL_HOME\server\lib\weblogic.jar

Based on that workout what the WL_HOME is; and that is the solution to the issue raised. Just note that this matter is INDEPENDENT of the domains - i.e where specific projects are located.

基于那个锻炼,WL_HOME 是什么;这就是所提出问题的解决方案。请注意,这件事与域无关 - 即特定项目所在的位置。

回答by sudhir patel

please run configure.cmdfile for first time configuration. Then follow add server configuration steps as per you steps.

首次配置请运行configure.cmd文件。然后按照您的步骤添加服务器配置步骤。

回答by The PowerHouse

I was facing the same issue.to resolve this issue you don't have to reinstallyour weblogic server.Do the following steps to resolve the issue.

我遇到了同样的问题。要解决此问题,您不必重新安装weblogic 服务器。请执行以下步骤来解决此问题。

  1. Open the server view in your Eclipse and create a new server.
  2. From the server type select the correct version of weblogic.
  3. Click on Configure run time environment.Another popup will open.
  4. Select your weblogic server and click on Edit button.
  5. click on browse button available at the last weblogic home Textbox
  6. Point out your weblogic home like < Your Drive >:\Oracle\Middleware\wlserver_< Version >
  1. 在 Eclipse 中打开服务器视图并创建一个新服务器。
  2. 从服务器类型中选择正确版本的 weblogic。
  3. 单击配置运行时环境。将打开另一个弹出窗口。
  4. 选择您的 weblogic 服务器并单击编辑按钮。
  5. 单击最后一个 weblogic 主页文本框中可用的浏览按钮
  6. 指出您的 weblogic 主页,例如 < Your Drive >:\Oracle\Middleware\wlserver_< Version >

回答by hariprasad

First try, if you have proper installation and that your WS is instaled and configured properly. If not, check installation documentation. Very important is to have set the environmental variables JAVA_HOME and MV_HOME. For example in my case on Linux i have in .profile

首先尝试,如果您安装正确并且您的 WS 安装和配置正确。如果没有,请检查安装文档。非常重要的是设置环境变量JAVA_HOME和MV_HOME。例如,在我在 Linux 上的情况下,我有.profile

export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 export

MW_HOME=/opt/weblogic/wls12130

导出 JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 导出

MW_HOME=/opt/weblogic/wls12130

Than start intitial scripts.

比启动初始脚本。

. .$MW_HOME/configure.sh

. $MW_HOME/wlserver/server/bin/setWLSEnv.sh

. .$MW_HOME/configure.sh

. $MW_HOME/wlserver/server/bin/setWLSEnv.sh

Than start:

比开始:

$MW_HOME/user_projects/domains/mydomain/startWebLogic.sh

$MW_HOME/user_projects/domains/mydomain/startWebLogic.sh

The last lines looks like:

最后几行看起来像:

<Sep 29, 2015 1:25:25 PM CEST> <Notice> <Security> <BEA-090169> <Loading trusted certificates from the jks keystore file /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/security/cacerts.> 
<Sep 29, 2015 1:25:25 PM CEST> <Notice> <Server> <BEA-002613> <Channel "Default[4]" is now listening on 127.0.0.1:9001 for protocols iiop, t3, ldap, snmp, http.> 
<Sep 29, 2015 1:25:25 PM CEST> <Notice> <Server> <BEA-002613> <Channel "DefaultSecure[4]" is now listening on 127.0.0.1:9002 for protocols iiops, t3s, ldaps, https.> 
<Sep 29, 2015 1:25:25 PM CEST> <Notice> <Server> <BEA-002613> <Channel "DefaultSecure" is now listening on 127.0.1.1:9002 for protocols iiops, t3s, ldaps, https.> 
<Sep 29, 2015 1:25:25 PM CEST> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 127.0.1.1:9001 for protocols iiop, t3, ldap, snmp, http.> 
<Sep 29, 2015 1:25:25 PM CEST> <Notice> <Server> <BEA-002613> <Channel "Default[2]" is now listening on fe80:0:0:0:204:76ff:fe22:a0d:9001 for protocols iiop, t3, ldap, snmp, http.> 
<Sep 29, 2015 1:25:25 PM CEST> <Notice> <Server> <BEA-002613> <Channel "DefaultSecure[2]" is now listening on fe80:0:0:0:204:76ff:fe22:a0d:9002 for protocols iiops, t3s, ldaps, https.> 
<Sep 29, 2015 1:25:25 PM CEST> <Notice> <Server> <BEA-002613> <Channel "DefaultSecure[3]" is now listening on 0:0:0:0:0:0:0:1:9002 for protocols iiops, t3s, ldaps, https.> 
<Sep 29, 2015 1:25:25 PM CEST> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on 192.168.0.2:9001 for protocols iiop, t3, ldap, snmp, http.> 
<Sep 29, 2015 1:25:25 PM CEST> <Notice> <Server> <BEA-002613> <Channel "Default[3]" is now listening on 0:0:0:0:0:0:0:1:9001 for protocols iiop, t3, ldap, snmp, http.> 
<Sep 29, 2015 1:25:25 PM CEST> <Notice> <Server> <BEA-002613> <Channel "DefaultSecure[1]" is now listening on 192.168.0.2:9002 for protocols iiops, t3s, ldaps, https.> 
<Sep 29, 2015 1:25:25 PM CEST> <Notice> <WebLogicServer> <BEA-000331> <Started the WebLogic Server Administration Server "myserver" for domain "mydomain" running in development mode.> 
<Sep 29, 2015 1:25:25 PM CEST> <Notice> <WebLogicServer> <BEA-000360> <The server started in RUNNING mode.> 
<Sep 29, 2015 1:25:25 PM CEST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING.> 

If WebLogic is started, than do ^Cto stop it and begin to integrate to Eclipse. First you must have installed Oracle OEPE plug-in. Than right click in Servers tab and choose new->Server Oracle-> Proper version of WS (in my case 12.1.3). In server host name fill proper IP address (in my case I used 192.168.1.0.2. not localhost) and proper port (default is 7001, but if it has conflict, change it using WebLogic Console before integration to the Eclipse. ERROR: Oracle Weblogic Server port is already in useMostly, even if it is there conflict, console works, if not, do it manually to edit config.xmlin your domain/configdirectory. Proper way to the WS is $MW_HOME/wlserver (i.e. /opt/weblogic/wls12130/wlserver).

如果 WebLogic 已启动,则^C停止它并开始集成到 Eclipse。首先,您必须已安装 Oracle OEPE 插件。然后右键单击 Servers 选项卡并选择 new->Server Oracle-> Proper version of WS(在我的情况下为 12.1.3)。在服务器主机名中填写正确的 IP 地址(在我的例子中我使用 192.168.1.0.2。不是本地主机)和正确的端口(默认为 7001,但如果有冲突,请在集成到 Eclipse 之前使用 WebLogic 控制台更改它。错误: Oracle Weblogic Server 端口已被使用大部分情况下,即使有冲突,console 也能工作,如果没有,请手动config.xml在您的domain/config目录中编辑。WS 的正确方法是 $MW_HOME/wlserver(即 /opt/weblogic/wls12130 /wlserver)。

回答by user3030484

Go to Windows/Preferences/Servers and use the Search button and set the folder where you know that there is a server. It will find out the configuration settings. It worked for me.

转到 Windows/Preferences/Servers 并使用 Search 按钮并设置您知道有服务器的文件夹。它将找出配置设置。它对我有用。