从IntelliJ IDEA运行WebLogic时找不到`weblogic.Server`

时间:2017-05-04 05:34:27

标签: java maven intellij-idea

/Users/zzw/Middleware/wls1036/domain/startWebLogic.sh
/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/bin/java -Dfile.encoding=UTF-8 -classpath "/Users/zzw/Middleware/wls1036/wlserver/server/lib/weblogic.jar:/Users/zzw/Middleware/wls1036/wlserver/server/lib/wljmxclient.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/weblogicIntegration/lib/weblogicIntegration.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/JavaEE/lib/javaee-impl.jar:/Applications/IntelliJ IDEA.app/Contents/lib/openapi.jar:/Applications/IntelliJ IDEA.app/Contents/lib/util.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/weblogicIntegration/lib/specifics/weblogicSpecifics.jar" com.intellij.javaee.oss.process.JavaeeProcess 49987 com.intellij.javaee.weblogic.agent.WebLogicAgent9
Detected server http port: 7001
.
java version "1.7.0_80"
.
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
JAVA Memory arguments: -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=48m  -XX:MaxPermSize=128m
.
WLS Start Mode=Development
.
CLASSPATH=/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/lib/tools.jar:/wlserver/server/lib/weblogic_sp.jar:/wlserver/server/lib/weblogic.jar:/modules/features/weblogic.server.modules_10.3.6.0.jar:/wlserver/server/lib/webservices.jar:/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar:/wlserver/common/derby/lib/derbyclient.jar:/wlserver/server/lib/xqrl.jar
.
PATH=/wlserver/server/bin:/modules/org.apache.ant_1.7.1/bin:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/bin:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
.
***************************************************
*  To start WebLogic Server, use a username and   *
*  password assigned to an admin-level user.  For *
*  server administration, use the WebLogic Server *
*  console at http://hostname:port/console        *
***************************************************
starting weblogic with Java version:
Starting WLS with line:
/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/bin/java -client   -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=48m  -XX:MaxPermSize=128m -Dweblogic.Name=myserver -Djava.security.policy=/wlserver/server/lib/weblogic.policy -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:50485,suspend=y,server=n  -Xverify:none  -da -Dplatform.home=/wlserver -Dwls.home=/wlserver/server -Dweblogic.home=/wlserver/server   -Dweblogic.management.discover=true  -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole=  weblogic.Server
[2017-05-04 12:05:31,905] Artifact shuangdeng:war: Server is not connected. Deploy is not available.
Connected to the target VM, address: '127.0.0.1:50485', transport: 'socket'
错误: 找不到或无法加载主类 weblogic.Server
Disconnected from the target VM, address: '127.0.0.1:50485', transport: 'socket'
Disconnected from server

错误:无法找到或加载班级weblogic.Server

1 个答案:

答案 0 :(得分:0)

如果您在IDEA之外手动启动服务器,我很确定您会遇到同样的问题,因此它实际上不是IDEA问题。

请检查startWebLogic.sh中的环境变量(PATH和CLASSPATH),显然服务器在指向/Users/zzw/Middleware/...时已移至/wlserver/server/...