Ant启动weblogic的问题 — oracle-tech

    Forum Stats

  • 3,715,603 Users
  • 2,242,809 Discussions
  • 7,845,458 Comments

Discussions

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Ant启动weblogic的问题

685426
685426 Member Posts: 1
edited February 2009 in 中间件
已经有一个配置好的domain,想利用ant启动这个domain,试过用exec直接调用启动脚本,可以实现,但是总觉得太土了!而且由于domain的进程驻留在后台,ant也不会结束。一旦你手动终止了ant,服务虽然不会停止,但是domain的日志就不会输出了,以上是在aix下的效果。
所以尝试用weblogic提供taskdef
Xml代码
*<taskdef name="wlserver" classname="weblogic.ant.taskdefs.management.WLServer" classpathref="lib.weblogic.path" />*

具体xml如下:
Xml代码
*<?xml version="1.0" encoding="utf-8"?>*
*<project name="domain" basedir="." default="start-server">*
*<property name="wls_home" value="D:\bea922\weblogic92" />*
*<path id="lib.weblogic.path">*
*<fileset dir="${wls_home}/server/lib">*
*<include name="*.jar" />*
*</fileset>*
*</path>*
*<exec executable="${wls_home}/server/bin/setWLSEnv.cmd" />*
*<target name="init">*
*<taskdef name="wlserver" classname="weblogic.ant.taskdefs.management.WLServer" classpathref="lib.weblogic.path" />*
*</target>*

*<target name="start-server" depends="init" >*
*<wlserver host="127.0.0.1" port="7001"*
username="weblogic" password="weblogic"
*dir="D:\bea922\user_projects\domains\base_domain" action="start" weblogichome="${wls_home}"*
*generateConfig="false" servername="AdminServer"*
*domainname="base_domain" classpathref="lib.weblogic.path"/>*
*</target>*
*</project>*


但是启动的时候报错:
*java.io.IOException: Cannot bind to URL [weblogic.management.mbeanservers.runtime]: javax.naming.NamingException: PROVIDER_URL not set*
*at javax.management.remote.rmi.RMIConnectorServer.newIOException(RMIConnectorServer.java:804)*
*at javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:417)*
*at weblogic.management.mbeanservers.internal.MBeanServerServiceBase.start(MBeanServerServiceBase.java:201)*
*at weblogic.management.mbeanservers.runtime.internal.RuntimeServerService.start(RuntimeServerService.java:148)*
*at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)*
*at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)*
*at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)*
*Caused by: javax.naming.NamingException: PROVIDER_URL not set*
*at weblogic.jrmp.InitialContextFactory.getContext(InitialContextFactory.java:42)*
*at weblogic.jrmp.InitialContextFactory.getInitialContext(InitialContextFactory.java:25)*
*at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)*
*at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)*
*at javax.naming.InitialContext.init(InitialContext.java:223)*
*at javax.naming.InitialContext.<init>(InitialContext.java:197)*
*at javax.management.remote.rmi.RMIConnectorServer.bind(RMIConnectorServer.java:619)*
*at javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:412)*

这个PROVIDER_URL是干什么的?怎么设置啊?

Answers

This discussion has been closed.