用 ant 启动weblogic
用ant启动weblogic时候,提示如下错误:
[WLServer AdminServer] java.lang.NoClassDefFoundError: weblogic/Server
[WLServer AdminServer] Exception in thread "main"
请问是怎么回事呢?
还有,我搜索过,据说是启动wenblogic的类没有被引用,但在哪里可以引用启动weblogic的类?要引用哪些类?
XML code
<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" /> <taskdef name="wlconfig" classname="weblogic.ant.taskdefs.management.WLConfig" classpathref="lib.weblogic.path" /> <taskdef name="wldeploy" classname="weblogic.ant.taskdefs.management.WLDeploy" classpathref="lib.weblogic.path" /> </target> <target name="start-server" depends="init" > <delete dir="${server.dir}" /> <mkdir dir="${server.dir}" /> <wlserver host="${server.host}" port="${server.port}" username="${server.username}" password="${server.password}" dir="${server.dir}" action="start" weblogichome="${wls_home}" generateConfig="true" servername="${server.name}" domainname="${domain.name}" /> <antcall target="deploy" /> </target>