Wldeploy ant task hangs at [ServerConnectionImpl.close():332] : Closing DM
Hi All
I am trying to deploy\undeploy a WAR file on weblogic server 10.3.5 using ANT wldeploy task, but no matter what i do it always hangs at the below and doesn't complete (although deployment and undeployment is successful)
[wldeploy] [BasicOperation.execute():445] : Initiating deploy operation for app, ABCD, on targets:
[wldeploy] [BasicOperation.execute():447] : osb_server1
[wldeploy] Task 38 initiated: [Deployer:149026]deploy application ABCD on osb_server1.
[wldeploy] Task 38 completed: [Deployer:149026]deploy application ABCD on osb_server1.
[wldeploy] Target state: deploy completed on Server osb_server1
[wldeploy]
[wldeploy] Target Assignments:
[wldeploy] + ABCD osb_server1
[wldeploy] [ServerConnectionImpl.close():332] : Closing DM connection
Below are the targets used in ANT script. Please help!
<target name="undeploy" depends="buildWar">
<wldeploy action="undeploy" name="ABCD" user="${username}" password="${password}" debug="true" verbose="true" adminurl="t3://${adminhost}:${adminport}" targets="${target}" failonerror="false"/>
</target>
<target name="deploy" depends="undeploy">
<wldeploy action="deploy" name="ABCD" source="${basedir}/ABCD.war" user="${username}" password="${password}" upload="true" debug="true" stage="true" verbose="true" adminurl="t3://${adminhost}:${adminport}" targets="${target}"/>
</target>
Infact it does complete, if i let it go on but it takes around 7 minutes more just to close the DM connection
[wldeploy] [ServerConnectionImpl.close():352] : Unregistered all listeners
[wldeploy] [ServerConnectionImpl.closeJMX():372] : Closed JMX connection
[wldeploy] [ServerConnectionImpl.closeJMX():384] : Closed Runtime JMX connection
[wldeploy] [ServerConnectionImpl.closeJMX():396] : Closed Edit JMX connection
BUILD SUCCESSFUL
Total time: 7 minutes 15 seconds
is anybody facing this issue? Why is closing DM Connection and Unregistered all listeners taking so much time to complete for a WAR i.e. just a few KBs.
Please Help! Thanks!
Similar Messages
-
Changing the wldeploy ant task behaviour
wldeploy ant task while deploying the application deploys it under <configured weblogic upload dir>/<application name>/app/ application name.
Is there any way we can change this behaviour as we couldnt find the options in ant task to change itThat is all you should have to do, the ant tasks are sitting inside the
weblogic.jar.
Cheers
mbg
"Shane Witbeck" <[email protected]> wrote in message
news:[email protected]..
Rob Bennett <[email protected]> wrote in message
news:<[email protected]>...
What is required for the wldeploy ant task to function properly? I am
able to use it when I run ant from the command line and use the version
of ant that came with Weblogic 8 (I have the platform beta, not the
release version). When I try to use it inside of eclipse (which uses
its own copy of ant), the task fails.. it looks like it is trying to
generate RMI stubs. If anyone can shed light on what I am missing from
the eclipse environment, I would appreciate it.
-RobI actually just got it to work by adding the weblogic.jar to my
classpath. (Im using WL 8.1).
-Shane -
WL8.1 wldeploy Ant Task seems to be fairly slow...
We currently have a clustered environment with 4 machines. When we try to hot deploy
using the wldeploy Ant Task it takes about 3-5 minutes to re-deploy the ~30mb
ear file. While this ear is being deployed users can not access the system. Is
there anything I can do to increase these times?
Thanks,
FranzRob,
Thanks for your reply.
My build.xml file exits and kills the server instance......do you know any means
to rsolve it.
iam not sure if i can use "fork" or something like that ????
Please advise.
-sangita
Rob Woollen <[email protected]> wrote:
Have a look at the Avitek Medical Records example that ships with WLS
8.1. It shows you how to use wldeploy.
-- Rob
sangita wrote:
if you don't mind, can you share your build.xml file here on this forum?
iam trying to do exact same thing, but as my knowledge of ANT is little,iam having
trouble. if you can share this xml file, then i would learn a littlefaster on
how to deploy application on wls8.1 using ANT.
i have read the document though .....but i wanted to see actual xmlfile as yours
.........thanks !!!!!
"Franz Garsombke" <[email protected]> wrote:
We currently have a clustered environment with 4 machines. When we
try
to hot deploy
using the wldeploy Ant Task it takes about 3-5 minutes to re-deploythe
~30mb
ear file. While this ear is being deployed users can not access thesystem.
Is
there anything I can do to increase these times?
Thanks,
Franz -
Wldeploy Ant task deploys app in 'New' state
I am trying to deploy a web application in WL 10.0 using the wldeploy Ant task. However, everytime the application is deployed, the consolidated state is 'New' (or deferred deployment). I have to bounce the servers everytime to bring the app in the Active state.
Here is my code:
<target name="undeployWeb">
<!-- Undeploy the existing deployment -->
<wldeploy action="undeploy" verbose="true" debug="false" name="${deploymentName}" user="${weblogicUsername}" password="${weblogicPassword}" adminurl="${weblogicAdminURL}" targets="${weblogicTargetServers}" failonerror="false" />
</target>
<!-- Deploy .WAR to a target server -->
<target name="deployWeb">
<!-- Deploy the application remotely -->
<wldeploy action="deploy" stage="stage" usenonexclusivelock="true" source="${weblogicDeploymentLocation}/${deploymentName}.war" remote="true" name="${deploymentName}" upload="false" user="${weblogicUsername}" password="${weblogicPassword}" verbose="true" adminurl="${weblogicAdminURL}" debug="true" targets="${weblogicTargetServers}" />
</target>
Is there any way to avoid the bounce of the target servers? I wish to activate the web app straightaway. Please help.
~hartbrekkThanks user10939158, for looking into this.
Reason I am saying network is not an issue here because the artifact copy to the remote servers and deployment happens fast, it is just at the step of closing DM connection, it is waiting for a long time (>5 mins). I am guessing that the Deployment Manager message exchanges with the server (internally) has something to do with LAN vs WAN. And, I would expect deployment over WAN take a minute extra as opposed to 5-9 minutes extra what we are seeing now.
Yes, I tried running the wlst script on the remote server and it is fast as well.
Just to clarify, I do not have a local server. I run the plain simple ant script on a build box(lean linux box) which is in the US.
Thanks for your help again.
- Kris
Edited by: kris_2000 on May 25, 2010 2:08 PM -
Is wldeploy ANT task just always says "BUILD SUCCESFUL" ?
Hi All,
Iam using ANT and my build.xml file looks something like this:
<target name="deploy-now">
<echo message="...........This is the developmenet
box...deploying......"/>
<wldeploy action="${deploy.utility}" upload="true"
source="${source}" user="system" password="weblogic" nostage="true" verbo
se="true" adminurl="${bedlam-t.admin.url}" debug="true"
targets="${cmApplication.target}"/>
</target>
<target name="deploy-cm-testnet">
<antcall target="deploy-now"> <param name="source"
value="${cm1Application.source}"/>
</antcall>
<antcall target="deploy-now"> <param name="source"
value="${cm2Application.source}"/>
</antcall>
<antcall target="deploy-now"> <param name="source"
value="${cm3Application.source}"/>
</antcall>
</target>
So, basically iam calling my target "deploy-now" three times by using
<antcall>. Now my question is: iam getting BUILD SUCCESFUL although the
output looks like:
deploy-now: [echo] ...........This is the developmenet
box...deploying...... [wldeploy] weblogic.Deployer -debug -nostage -verbose -upload
-noexit -source
/export/home/beamon/applications/clientmanager/CMA_TW_333.war -targets UPSCAP
-adminurl http://bedlam-t.ams1907.com:8001 -user
system -password ******** -deploy
[wldeploy] DeploymentData : Delete Files:false [wldeploy] Timeout
:3600000 [wldeploy] Targets: [wldeploy] Files: [wldeploy] null
[wldeploy] Initiated Task: [87] [Deployer:149026]Deploy application
CMA_TW_333 on UPSCAP. [wldeploy] Application CMA_TW_333 preparing on
server upscap_bedlam1t_s1. [wldeploy] Module CMA_TW_333 failed to transition
from unprepared to prepared on server upscap_bedlam1t_s1. [wldeploy]
Application CMA_TW_333 failed on server upscap_bedlam1t_s1. [wldeploy]
Task 87 failed: [Deployer:149026]Deploy application CMA_TW_333 on UPSCAP.
[wldeploy] Deployment failed on Cluster UPSCAP [wldeploy] dumping
ApplicationException message
[wldeploy] Exception:weblogic.management.ApplicationException: prepare
failed for CMA_TW_333 [wldeploy] Module: CMA_TW_333 Error: Context path
'/CMA/US' is already in use by the module: CM_NO_333 application:
CM_NO_333
[wldeploy] dumping ApplicationException message
[wldeploy] Exception:weblogic.management.ApplicationException: prepare
failed for CMA_TW_333 [wldeploy] Module: CMA_TW_333 Error: Context path
'/CMA/US' is already in use by the module: CM_NO_333 application:
CM_NO_333
[wldeploy] Unpexpected Error Initializing Deployer:
weblogic.Deployer$DeployerException: Deployment exit status=1
deploy-now: [echo] ...........This is the developmenet
box...deploying...... [wldeploy] weblogic.Deployer -debug -nostage -verbose -upload
-noexit -source
/export/home/beamon/applications/clientmanager/CMA_NO_333.war -targets UPSCAP
-adminurl http://bedlam-t.ams1907.com:8001 -user
system -password ******** -deploy
[wldeploy] DeploymentData : Delete Files:false [wldeploy] Timeout
:3600000 [wldeploy] Targets: [wldeploy] Files: [wldeploy] null
[wldeploy] Initiated Task: [88] [Deployer:149026]Deploy application
CMA_NO_333 on UPSCAP. [wldeploy] Application CMA_NO_333 preparing on
server upscap_bedlam1t_s1. [wldeploy] Module CMA_NO_333: active to prepared
on server upscap_bedlam1t_s1. [wldeploy] Module CMA_NO_333: active to
prepared on server upscap_bedlam1t_s1. [wldeploy] Module CMA_NO_333:
prepared to unprepared on server upscap_bedlam1t_s1. [wldeploy] Module
CMA_NO_333: prepared to unprepared on server upscap_bedlam1t_s1.
[wldeploy] Module CMA_NO_333: unprepared to prepared on server
upscap_bedlam1t_s1. [wldeploy] Module CMA_NO_333: unprepared to prepared on server
upscap_bedlam1t_s1. [wldeploy] Application CMA_NO_333 prepared on server
upscap_bedlam1t_s1. [wldeploy] Application CMA_NO_333 activating on server
upscap_bedlam1t_s1. [wldeploy] Module CMA_NO_333: prepared to active on
server upscap_bedlam1t_s1. [wldeploy] Module CMA_NO_333: prepared to
active on server upscap_bedlam1t_s1. [wldeploy] Application CMA_NO_333
activated on server upscap_bedlam1t_s1. [wldeploy] Task 88 completed:
[Deployer:149026]Deploy application CMA_NO_333 on UPSCAP. [wldeploy]
Deployment completed on Cluster UPSCAP
BUILD SUCCESSFUL
Please advise ......how can i show that the BUILD is NOT succesful as
there were EXCEPTIONS generated.....is ANT just always says "BUILD
SUCCESFUL"Infact it does complete, if i let it go on but it takes around 7 minutes more just to close the DM connection
[wldeploy] [ServerConnectionImpl.close():352] : Unregistered all listeners
[wldeploy] [ServerConnectionImpl.closeJMX():372] : Closed JMX connection
[wldeploy] [ServerConnectionImpl.closeJMX():384] : Closed Runtime JMX connection
[wldeploy] [ServerConnectionImpl.closeJMX():396] : Closed Edit JMX connection
BUILD SUCCESSFUL
Total time: 7 minutes 15 seconds
is anybody facing this issue? Why is closing DM Connection and Unregistered all listeners taking so much time to complete for a WAR i.e. just a few KBs.
Please Help! Thanks! -
ClassCastException using Subant and wldeploy ant task
Hi!
I'm using subant to call all diffrent build.xml files located in subdirectories. The buildfile looks like this:
<project name="extern.call" default="callall">
<target name="callall">
<fileset id="buildfile.set" dir=".." includes="*2/build.xml">
<exclude name="Br*2/*"/>
</fileset>
<subant target="deploy-local" inheritall ="false" failonerror="true">
<fileset refid="buildfile.set"/>
</subant>
</target>
</project>
The first called build.xml files works fine ... but the execution of the second build.xml (it's not important which file is the second one, it's crash always at the second call), stop with a "java.lang.ClassCastException".
See Stacktrace:
[subant] weblogic.Deployer -debug -nowait -verbose -upload -noexit -name ClarifyRead -source \build\ClarifyRead\delivery\ClarifyRead.ear -targets myserver -adminurl t3://localhost:7001 -user weblogic -password ******** -deploy
[subant] dumping Exception stack
[subant] java.lang.ClassCastException
[subant] at weblogic.management.deploy.utils.DeployerHelper.uploadSource(DeployerHelper.java:586)
[subant] at weblogic.Deployer.runBodyWithAuthenticatedSubject(Deployer.java:824)
[subant] at weblogic.Deployer.runBody(Deployer.java:711)
[subant] at weblogic.utils.compiler.Tool.run(Tool.java:146)
[subant] at weblogic.utils.compiler.Tool.run(Tool.java:103)
[subant] at weblogic.Deployer.runMain(Deployer.java:566)
[subant] at weblogic.Deployer.mainWithExceptions(Deployer.java:576)
[subant] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[subant] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[subant] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[subant] at java.lang.reflect.Method.invoke(Method.java:324)
[subant] at weblogic.ant.taskdefs.management.WLDeploy.invokeMain(WLDeploy.java:264)
[subant] at weblogic.ant.taskdefs.management.WLDeploy.execute(WLDeploy.java:204)
[subant] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
[subant] at org.apache.tools.ant.Task.perform(Task.java:364)
[subant] at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:65)
[subant] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
[subant] at org.apache.tools.ant.Task.perform(Task.java:364)
[subant] at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:340)
[subant] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
[subant] at org.apache.tools.ant.Task.perform(Task.java:364)
[subant] at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:65)
[subant] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
[subant] at org.apache.tools.ant.Task.perform(Task.java:364)
[subant] at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:340)
[subant] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
[subant] at org.apache.tools.ant.Task.perform(Task.java:364)
[subant] at org.apache.tools.ant.Target.execute(Target.java:301)
[subant] at org.apache.tools.ant.Target.performTasks(Target.java:328)
[subant] at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
[subant] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:383)
[subant] at org.apache.tools.ant.taskdefs.SubAnt.execute(SubAnt.java:182)
[subant] at org.apache.tools.ant.taskdefs.SubAnt.execute(SubAnt.java:112)
[subant] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
[subant] at org.apache.tools.ant.Task.perform(Task.java:364)
[subant] at org.apache.tools.ant.Target.execute(Target.java:301)
[subant] at org.apache.tools.ant.Target.performTasks(Target.java:328)
[subant] at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
[subant] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:379)
[subant] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:135)
There is no diffrent between using ant in eclipse environment or as standalone, the result it the same.
Do someone else have the same problem?
Kind regards
JosephHi
I got the same message and I couldn't resolve it too, I am wordering if you got the key to the problem?
Thanks
Daivd Huang -
Wldeploy ant task and WLS 7?
I'm trying to set up an ant task for WLDeploy in WLS 7. To docs reference the class as:
<taskdef name="wldeploy" classname="weblogic.ant.taskdefs.management.WLDeploy">
But where is that class? It's not in weblogic.jar.
TIA,
JonJust a followup: this ant task does not exist in early service packs. I'm not sure where it first shows up, but it does exist in SP 7.
-
Wldeploy/wlserver Ant tasks & cruisecontrol output
Hi,
We are using the wlserver and wldeploy Ant tasks with cruisecontrol. We have found that the output from these tasks in included in the cruise email which is sent out, and are looking for a way to redirect this output to a file so that cruise doesn't think that this is warning output from the JVM. Currently, with all the deploy messages weblogic publishes cruise thinks that our code has 500 warnings.
I would expect that this should be easy, but can't figure out for the life of me how to do it.
RegardsI'm coming back a few month later, and don't remember how I solved this problem. Today, I'm sure it is resolved, the task looks like this :
<wldeploy action="deploy"
source="${weblogic.deploy.dir}/${module.name}.ear"
name="${module.name}"
user="${weblogic.user}"
password="${weblogic.password}"
verbose="true"
adminurl="${weblogic.adminurl}"
debug="true"
targets="${weblogic.servers.name}" />
It should work since I've upgraded from WL 8.1 SP2 to WL 8.1 SP4.
Regards
Bernard -
How to build ear files for ADF application using Ant task
How to build ear files for ADF applications using Ant. The ojdeploy ant task can not find application-level deployment profiles. I am trying to automated build and release for ADF application.
Any help is highly appreciated.
Thanks
ShivaHi Timo
Thanks for your reply.
I have successfully created ear file using ojdeploy on jenkins. however when am trying to auto deploy using WLDeploy ant task am getting the following
error :
weblogic.application.ModuleException: :oracle.mds.config.MDSConfigurationException:MDS-01335: namespace "/oracle/webcenter/quicklinks/scopedMD" mapped to metadata-store-usage "WebCenterFileMetadataStore" but its definition was not found in MDS configuration
Please advise how to handle this.
As am a newbie to ADF, could you please advise if it is possible for the ADF application deployments can be automated for different environments using jenkins due to this MDS dependencies.
Appreciate your help.
Thanks
Shiva -
We sometimes see this failure intermitently when using the FlexUnit Ant task to run tests in a CI environment. The Ant task throws this exception:
java.util.concurrent.ExecutionException: could not close client/server socket
I have seen this for a while now, and still see it with the latest 4.1 RC versions.
Here is the console output seen along with the above exception:
FlexUnit player target: flash
Validating task attributes ...
Generating default values ...
Using default working dir [C:\DJTE\commons.formatter_swc\d3flxcmn32\extracted\Source\Flex]
Using the following settings for the test run:
FLEX_HOME: [C:\dev\vert-d3flxcmn32\302100.41.0.20110323122739_d3flxcmn32]
haltonfailure: [false]
headless: [false]
display: [99]
localTrusted: [true]
player: [flash]
port: [1024]
swf: [C:\DJTE\commons.formatter_swc\d3flxcmn32\extracted\build\commons.formatter.tests.unit.sw f]
timeout: [1800000ms]
toDir: [C:\DJTE\commons.formatter_swc\d3flxcmn32\reports\xml]
Setting up server process ...
Entry [C:\DJTE\commons.formatter_swc\d3flxcmn32\extracted\build] already available in local trust file at [C:\Users\user\AppData\Roaming\Macromedia\Flash Player\#Security\FlashPlayerTrust\flexUnit.cfg].
Executing 'rundll32' with arguments:
'url.dll,FileProtocolHandler'
'C:\DJTE\commons.formatter_swc\d3flxcmn32\extracted\build\commons.formatter.tests.unit.swf '
The ' characters around the executable and arguments are
not part of the command.
Starting server ...
Opening server socket on port [1024].
Waiting for client connection ...
Client connected.
Setting inbound buffer size to [262144] bytes.
Receiving data ...
Sending acknowledgement to player to start sending test data ...
Stopping server ...
End of test data reached, sending acknowledgement to player ...
When the problem occurs, it is not always during the running of any particular test (that I am aware of). Recent runs where this failure was seen had the following number of tests executed (note: the total number that should be run is 45677): 18021, 18, 229.
Here is a "good" run when the problem does not occur:
Setting inbound buffer size to [262144] bytes.
Receiving data ...
Sending acknowledgement to player to start sending test data ...
Stopping server ...
End of test data reached, sending acknowledgement to player ...
Closing client connection ...
Closing server on port [1024] ...
Analyzing reports ...
Suite: com.formatters.help.TestGeographicSiteUrls
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.008 sec
Suite: com.formatters.functionalUnitTest.testCases.TestNumericUDF
Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.071 sec
Results :
Tests run: 45,677, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 201.186 sec
Has anyone else ran across this problem?
Thanks,
TrevorI am not sure if this information will help everyone, but here goes...
For us, these problems with FlexUnit tests crashing the Flash Player appear to be related to couple of factors. Recently, we moved up from Flex 3.2 to Flex 4.1 as our development baseline. Many people complained that their development environment (Flash Builder, etc.) was much more unstable. Apparently, 4.1 produces SWFs that require more memory to run than 3.2 does? Anyway, we still had Flash Player 10.1 as our runtime baseline. Apparently, that version of the player was not as capable of running larger FlexUnit test SWFs, and would crash (as I posted months earlier). I upgraded to the latest 10.3 standalone player versions, and the crashes have now ceased. It would be nice to know exactly what was causing the crashes, but memory management (or lack of) is my best guess.
So, if you are seeing these issues, try upgrading to the latest Flash Player version.
Regards,
Trevor -
Weblogic 9.1 Deployment errors using the ANT task wldeploy
I am not able to deploy applicatons using the ANT task. The same works with Weblogic 8.1. It is throwing a NoClassDefFoundError. It is looking for a class by name javax/management/InvalidAttributeValueException.
This class file is shipped as part of jmx.jar. I tried to include it and then there was another NoClassDefFoundError that occured.
The problem is I don't want to keep adding these different jars to make the ant deployment work. Can anyone please let me know what could be the problem.
I am using a Windows XP OS and 1.4.2_10 as java version.
I have added all the jars in the weblogic91\server\lib directory to the classpath.
Also I have my apache ant tasks set in the classpath.
Thanks
Shankar ChandrasekaranHave had a bit of these CLASSPATH issues when jumping versions.
Have had the best success when I create a different profile for each one, making sure the version you want is the only one defined. the main thing my profile sets is
unset PATH
unset CLASSPATH
unset JAVA_HOME
then
export PATH=
export CLASSPATH= the weblogic 9 one
export JAVA_HOME= the one with 9
or however they do it in windows, but make sure you CLASSPATH is only refencing the 9 jars -
Is there an ant task on FlexUnit to open browser with swf embedded?
Here is the same (unanswered) question asked by someone else: http://forums.adobe.com/thread/740495?tstart=0#740495
Basically I need to open my flex app in a browser window from ant, and the FlexUnit task apparently does not support this.
I have downloaded a sample from FlexMonkey. When they (sample writers) execute flexunit in this sample, one of the arguments to FU is "url". However, I can find no evidence of this version of FU (that uses that "url" argument) existing anywhere. Using the swf argument doesn't work as documented in the previous question above. So I don't know if my problem is Flex version, or it's just not supported by FlexUnit.
I'm using the Flex sdk 3.2.0 and the FU libraries below:
flexunit-4.1.0-33-as3_3.5.0.12683.swc
flexunit-4.1.0-33-flex_3.5.0.12683.swc
flexunit-cilistener-4.1.0-33-3.5.0.12683.swc
flexunit-uilistener-4.1.0-33-3.5.0.12683.swc
flexUnitTasks-4.1.0-33.jar
Please tell me if this issue has been solved and if so what libraries I need to implement it. If it is done for Flex 4.x, but not for Flex 3.2, perhaps you could guide me to the java source for the ant task for Flex 4.x so that I can implement this for Flex 3.2 or Flex 3.x.
thanks,
Phil@Linden - Have not heard of this side effect from anyone as of yet, but good to know. Sounds like the file lock is coming from the Flash Player and causing the spawning process (rundll32.exe) to hang around as well. The FlexUnit team runs on Hudson using the FlexUnit Ant task, but we don't seem to encounter the same issue. What's the longest interval you've tried to use with the sleep task? Does the FP ever release its handle to the test SWF on your development machines?
Not sure this is a problem with the FlexUnit Ant task, but in 4.2 we could try to explicitly kill the rundll32 process since we'll have the PID when the task launches it. Head on over to JIRA and file a feature request for us and I'll see what I can do in the new year. In the short term though, maybe try upgrading your version of the stand alone debug flash player to see if that helps. Has anyone else seen this issue? Could you possible just move the clean target to be called before the xci-test target is run? Just some suggestions.
-Brian -
Built-in wlst ant task does not work in weblogic 10.3.1
Hi,
We have an installer script that deploys an ear file to a weblogic managed server. The script also invokes the build-tin wlst ant task to bounce the managed server. However, in version 10.3.1 the wlst task seems to be broken. I get this error:
[echo] [wlst] sys-package-mgr: can't create package cache dir, '/u00/webadmin/product/10.3.1/WLS/wlserver_10.3/server/lib/weblogic.jar/./java
tmp/wlstTemp/packages'
[echo] [wlst] java.io.IOException: No such file or directory
[echo] [wlst] at java.io.UnixFileSystem.createFileExclusively(Native Method)
[echo] [wlst] at java.io.File.checkAndCreate(File.java:1704)
[echo] [wlst] at java.io.File.createTempFile(File.java:1792)
[echo] [wlst] at java.io.File.createTempFile(File.java:1828)
[echo] [wlst] at com.bea.plateng.domain.script.jython.WLST_offline.getWLSTOfflineInitFilePath(WLST_offline.java:240)
[echo] [wlst] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[echo] [wlst] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[echo] [wlst] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[echo] [wlst] at java.lang.reflect.Method.invoke(Method.java:597)
[echo] [wlst] at weblogic.management.scripting.utils.WLSTUtil.getOfflineWLSTScriptPath(WLSTUtil.java:63)
[echo] [wlst] at weblogic.management.scripting.utils.WLSTUtil.setupOffline(WLSTUtil.java:214)
[echo] [wlst] at weblogic.management.scripting.utils.WLSTInterpreter.<init>(WLSTInterpreter.java:133)
[echo] [wlst] at weblogic.management.scripting.utils.WLSTInterpreter.<init>(WLSTInterpreter.java:75)
[echo] [wlst] at weblogic.ant.taskdefs.management.WLSTTask.execute(WLSTTask.java:103)
[echo] [wlst] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
Obviously that is not a valid directory...so I am wondering what it is trying to do, and why. The wlst task worked perfectly in 10.3.0. No changes were made when attempting to run the script against 10.3.0 and 10.3.1, which tells me that something is different with the 10.3.1 setup. Here is the ant code I am running:
<target name="init-taskdefs">
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath>
<pathelement location="ant-ext/ant-contrib.jar" />
</classpath>
</taskdef>
<taskdef name="wldeploy" classname="weblogic.ant.taskdefs.management.WLDeploy" />
<taskdef name="wlst" classname="weblogic.ant.taskdefs.management.WLSTTask" />
</target>
<macrodef name="wlShutdownServer">
<attribute name="adminUser" default="${deploy.admin.username}" />
<attribute name="adminPassword" default="${deploy.admin.password}" />
<attribute name="adminUrl" default="${deploy.admin.url}" />
<attribute name="serverTarget" />
<sequential>
<trycatch property="server.error">
<try>
<wlst failonerror="true"
arguments="@{adminUser} @{adminPassword} @{adminUrl} @{serverTarget}">
<script>
adminUser=sys.argv[0]
adminPassword=sys.argv[1]
adminUrl=sys.argv[2]
serverTarget=sys.argv[3]
connect(adminUser,adminPassword,adminUrl)
target=getMBean("/Servers/"+serverTarget)
if target == None:
target=getMBean("/Clusters/"+serverTarget)
type="Cluster"
else:
type="Server"
print 'Shutting down '+serverTarget+'...'
shutdown(serverTarget,type,'true',15,force='true')
print serverTarget+' was shut down successfully.'
</script>
</wlst>
<!-- setDomainEnv.sh must have been called to set DOMAIN_HOME. Remove all leftover .lok files to allow server
to start back up again. -->
<echo message="Deleting any lok files that have not been removed..." />
<delete failonerror="false">
<fileset dir="${env.DOMAIN_HOME}/servers/@{serverTarget}" includes="**/*.lok"/>
</delete>
</try>
<catch>
<fail message="@{serverTarget} shutdown failed. ${server.error}" />
</catch>
<finally/>
</trycatch>
</sequential>
</macrodef>
Any help would be appreciated. Thanks!Well, it looks like passing something like "-Djava.io.tmpdir=/var/tmp/javatmp/`date +%Y%m%d`" to ant did the trick. I had to make sure that directory existed first, otherwise it threw a java ioexception.
I still don't understand what changes between 10.3.0 and 10.3.1 to necessitate this change. -
flexunit 4.1 B3 Ant task fails to run Air-based tests
Folks,
I am using FlexUnit4.1 Beta 3 and am seeing the <flexunit> Ant task fail when running tests that use the Air libraries. The project in question used to test just fine with version 4.0 earlier this year, but I just dusted it off after a branch change and tried re-running with 4.1and started seeing the failure.Here is the relevant console output:
[com.djte.library:flexunit] Validating task attributes ...
[com.djte.library:flexunit] Generating default values ...
[com.djte.library:flexunit] Using default working dir [C:\EclipseWorkspace3.5\report.renderer_tests_2\Source\Flex]
[com.djte.library:flexunit] Using the following settings for the test run:
[com.djte.library:flexunit] FLEX_HOME: [C:\iFABS_DE\dev\vert-d3flxcmn24\204100.32.0.20100926233508_d3flxcmn24]
[com.djte.library:flexunit] haltonfailure: [false]
[com.djte.library:flexunit] headless: [false]
[com.djte.library:flexunit] display: [99]
[com.djte.library:flexunit] localTrusted: [true]
[com.djte.library:flexunit] player: [air]
[com.djte.library:flexunit] port: [1024]
[com.djte.library:flexunit] swf: [C:\EclipseWorkspace3.5\report.renderer_tests_2\build\report.renderer.tests.unit.swf]
[com.djte.library:flexunit] timeout: [1800000ms]
[com.djte.library:flexunit] toDir: [C:\EclipseWorkspace3.5\report.renderer_tests_2\build\reports\xml]
[com.djte.library:flexunit] Setting up server process ...
[com.djte.library:flexunit] Starting server ...
[com.djte.library:flexunit] OS: [Windows]
[com.djte.library:flexunit] Opening server socket on port [1024].
[com.djte.library:flexunit] Waiting for client connection ...
[com.djte.library:flexunit] Launching player:
[com.djte.library:flexunit] Found AIR version: 1.5
BUILD FAILED
C:\public\JavaTools\DJTE\latest\DjteLibrary\library.xml:57: The following error occurred while executing this line:
: Error launching the test runner.
The error message is not very specific... The last output seen before the failure is "Found AIR version: 1.5". This makes me wonder if the problem is related to how I have Air installed on my Windows XP machine. Come to think of it, I am not sure exactly how the host machine should be configured to run FlexUnit tests that require Air. Do I really need Air to be installed? I have Air 2.0.3.13070 installed, but the <flexunit> task thinks it found version 1.5 - hmmm... I also have the debug Flash 10 player, and SWF appplications are configued to run using this player. Flex tests run fine, just not Air tests. What am I missing?
I see that 4.1 RC1 is now out, so I will grab that and give it a try.
If anyone who tests air more often has any advice - I am all ears!
Thanks,
TrevorThanks for your responses, Brian!
Yes, I think I see the immediate problem. The problem is that there is no Air runtime in our customized Flex SDK (based on 3.2), even though it appears to have the Air compile libraries. I had been attempting to use this custom SDK to run FlexUnit with, and I think that needs to change.
Why was I doing this?
Well, I had tripped over some problems with 4.1 earlier on when I attempted to run it without having FLEX_HOME set in the environment. So, now I have been setting FLEX_HOME programmatically in my code before calling the <flexunit> task. And I had figured that it would be a good idea to set FLEX_HOME to the same SDK that the tests had been built with, i.e. our customized one. Now I am thinking that this is not necessary, since our end users will never have access to this SDK. I now think that I should be able to install a new stock Adobe Flex SDK on my CI server, install the Air runtime into it, and then use that location when I set FLEX_HOME. Is that how others are doing it? If anyone could validate this approach, I would be grateful.
One question that arises in my mind now: How does the Air runtime get into the Flex SDK? I have installed the Air runtime using the installer from Adobe some time ago, so I am not quite sure what all that did. I assume the Air installer finds all the Flex SDKs on your machine and inserts the runtime in each location appropriately? Again, pardon my ignorance...
I have just tried out the above idea, i.e. setting FLEX_HOME to a different SDK that has Air runtime, and the <flexunit> task worked when I ran it! An Air window opened, the tests ran, and reports were generated. So, it would appear my problem is solved! Cool beans!
Brian, you made some comments about another possible issue with the "custom app descriptor". I am not sure if that applies to me or not. How would I know whether or not we need that support? Again, I know it would help if I was the developer who had actually written the Flex tests, but I am not...
Anyway, I hope this thread helps other folks who are having similar issues. I am going to reinstall a fresh Adobe SDK and the Air installer on a clean machine next, and see if the tests will run there.
Before ending this thread, I do want to point out that the ant task might have need of improvement in the case in which the user attempts to run the air "player" but the Air runtime is not setup in the SDK. On Windows, the ant process simply hung at this point, apparently thinking that the launch of the player had been successful, but in reality, the message about the air runtime being not found had occurred. It might be nice if it exited gracefully with a warning message instead of hanging. Just a suggestion...
Brian, as always, thanks again for your help with this issue.You guys are doing a great job with this project. Please keep it up!
Thanks,
Trevor -
Flexunit ant task on CI Server - rundll32.exe causing problems
My team is using flexunit and a CI server running Hudson. On a development system, everything runs fine, and we get the reports just like we need them. It also works fine on the CI server when just the flexunit task is run, but the build fails when the CI server tries to run a full build - the build tries to run the tests and clean to prepare for the next build, but the clean fails because there is a "rundll32.exe" process using one of the files and it can't be deleted. We tracked this process down to the one run by the flexunit task.
Our task is:
<target name="xci-test" depends="set-flex-coverage-home, prepare-domain-metadata-to-war, prepare-sounds-to-war, prepare-domain-metadata-for-testing, compile-unit-test-flex">
<echo>**** The flexunit target requires that you have the standalone flash player installed and configured to run .swf files automatically! ****</echo>
<mkdir dir="${dir.flexgui.test.output}"/>
<!-- Execute TestRunner.swf as FlexUnit tests and publish reports -->
<!-- Please see http://docs.flexunit.org/index.php?title=Ant_Task -->
<flexunit workingDir="${dir.flexgui.test.output}"
swf="${dir.flexgui.build.war}/${flex.swf.name}test.swf"
toDir="${dir.flexgui.test.output}"
haltonfailure="false" verbose="true" localTrusted="true"
port="11028" timeout="40000"/>
<!-- Generate readable JUnit-style reports -->
<junitreport todir="${dir.flexgui.test.output}">
<fileset dir="${dir.flexgui.test.output}">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="${dir.flexgui.test.output}/"/>
</junitreport>
<sleep seconds="10"/>
</target>
I can reproduce this behavior on my dev machine by running "ant xci-test clean". We tried putting a sleep in to give the process time to shut down, no change. We attempted to use the 'command' option to the flexunit task to bypass the use of rundll32.exe, but then the flash player just hangs onto the file and the clean still fails. Since "ant xci-test" followed by "ant clean" works, we also tried running ant from within ant in order to force the process to stop, but that also didn't work. Any help on this would be greatly appreciated.
Thanks for your time,
Linden@Linden - Have not heard of this side effect from anyone as of yet, but good to know. Sounds like the file lock is coming from the Flash Player and causing the spawning process (rundll32.exe) to hang around as well. The FlexUnit team runs on Hudson using the FlexUnit Ant task, but we don't seem to encounter the same issue. What's the longest interval you've tried to use with the sleep task? Does the FP ever release its handle to the test SWF on your development machines?
Not sure this is a problem with the FlexUnit Ant task, but in 4.2 we could try to explicitly kill the rundll32 process since we'll have the PID when the task launches it. Head on over to JIRA and file a feature request for us and I'll see what I can do in the new year. In the short term though, maybe try upgrading your version of the stand alone debug flash player to see if that helps. Has anyone else seen this issue? Could you possible just move the clean target to be called before the xci-test target is run? Just some suggestions.
-Brian
Maybe you are looking for
-
Final Cut Pro 6 on Mac OS Snow Leopard installation problem HELP!!!
After 2 - 3 hours of installing all 10 FCS 2.0 discs and Software Updates, I can't seem to launch Final Cut Pro 6.0.6. I get *"...software maybe damaged or not installed.."* So I removed all of them and only custom-installed Final Cut Pro 6.0.6. It w
-
Help converting a bigint to a DateTime in Crystal Reports 2008
The data in a table contains a bigint which needs to be displayed in DateTime in the Crystal Reports. Can someone please describe what I would need to do within the Formula to make this happen? thank you.
-
Hi, In particular scenario 1 request is in red (error) .Above error record there are 5 green (success) request are there and below also 5 green requests are there.If I delete red request in infocube and DSO?What will happen?What procedure have to ado
-
Premier Elements 10 has crashed (again) Usually I follow the procedure and recover the work. This time I cannot recover either the original or the Copy. The crash happened when I tried to restore the monitor from a separate monitor. I pressed Windows
-
HT4993 How to get default iphone 5 background that says iphone on lock screen
?Also is anyone elses blueetooth not working