ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Bullington <shockr...@yahoo.com>
Subject Re: using Ant to order WebLogic Startup classes
Date Wed, 31 Oct 2001 16:05:14 GMT
We have used Weblogic 6.0 as well, and the parsers ARE incompatible.
I would ask questions on this list first as well.  The BEA list does
not have as many active people.

One thing (One BEA person to another) is to be VERY careful of the ant
that is included with Weblogic 6.1.  The startup batch file has a bug
in how it handles command line arguments.

--Jim

--- Matt Lyon <matt@stargus.com> wrote:
> 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>
> 


=====
"Those who live in the shelter of the Most High will find rest in the shadow of the Almighty.
This I declare of the Lord:  He alone is my refuge, my place of safety; he is my God, and
I am trusting himů"

Psalms 91:1-2 (New Living Translation)

__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com

--
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