ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Sliwkowski" <asl...@bea.com>
Subject RE: using Ant to order WebLogic Startup classes
Date Tue, 30 Oct 2001 23:29:10 GMT
You might check the manifest.mf file of weblogic.jar to see if it could be
causing conflicts...
It is defintely a parser conflict..
sorry I couldn't be more detailed.
/drew

-----Original Message-----
From: Matt Lyon [mailto:matt@stargus.com]
Sent: Tuesday, October 30, 2001 5:06 PM
To: Ant-User (E-mail)
Subject: using Ant to order WebLogic Startup classes


Hi,

This e-mail could easily serve as evidence that we are trying to do
things with Ant that go way beyond the authors' original intent.
Furthermore, it could also be argued that this post might be better
confined to a Bea mailing list. All disclaimers aside, however, I
thought that I would run this issue up the flagpole here first.
Hopefully I won't ruffle anybody's feathers too much with this post.

WebLogic 6.0 SP2 does not allow one to order the loading of Startup
classes (apparently WebLogic 6.1 resolves this issue, but we are trying
to go as far as possible with WebLogic 6.0 first), so we thought we
would try to use Ant to do it. Our theory was that we would define a
WebLogic Startup class named "Ant" (org.apache.tools.ant.Main)and pass
it a buildfile as an argument:

    <StartupClass Arguments="-file
C:\bea\wlserver6.0\config\starman\startup.xml"
        ClassName="org.apache.tools.ant.Main" FailureIsFatal="false"
        Name="Ant" Targets="star"/>

We then define the %ANT_HOME% variable in our startWebLogic.cmd file and
set ant.jar on the WebLogic %CLASSPATH% in the same script as well.
Next, we wrote a buildfile named 'startup.xml' which looks something
like the following example:

<project name="startup" basedir="." default="launch">
    <target name="launch">
        <java classname="Main1">
            <classpath>
                <pathelement path="${java.class.path}"/>
            </classpath>
            <arg value="Hello world" />
        </java>
        <java classname="Main2">
            <classpath>
                <pathelement path="${java.class.path}"/>
            </classpath>
        </java>
    </target>
</project>

We replaced the Main1, Main2, etc. with the correct WebLogic Startup
class names and the <arg> parameter with their provided args for
WebLogic. However, when we start Web Logic, the result is always the
same:

C:\bea\wlserver6.0\config\starman\startup.xml:4: Config file is not of
expected XML type
	at
org.apache.tools.ant.ProjectHelper.parse(ProjectHelper.java:135)
	at
org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:8
5)
	at org.apache.tools.ant.Main.runBuild(Main.java:439)
	at org.apache.tools.ant.Main.start(Main.java:153)
	at org.apache.tools.ant.Main.main(Main.java:176)
	at java.lang.reflect.Method.invoke(Native Method)
	at weblogic.t3.srvr.ClassRunner.invokeMain(ClassRunner.java:69)
	at
weblogic.t3.srvr.StartupClassRunner.invokeClass(StartupClassRunner.java:
95)
	at
weblogic.t3.srvr.StartupClassRunner.run(StartupClassRunner.java:61)
	at java.lang.Thread.run(Thread.java:484)

In theory it seems like this should work, however. We even used the
<antstructure> task to generate a DTD for our startup.xml buildfile to
no avail. Any thoughts? Could this be a SAX parser conflict with the
crappy old SAX Parser that WebLogic 6.0 bundles into weblogic.jar? The
only similar error I found in the Ant User Archives was a couple of
posts that suggested Ant throws a wobbler if the first tag it encounters
in a buildfile is not a <project> tag, but that is not the case here.
Sure, we can write a servlet or something to handle ordering Startup
classes for WebLogic, but I thought that this was a cool solution and
would love to see it through.

Cheers,

Matt

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>



--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message