You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2023/09/11 09:40:39 UTC
[Bug 67340] New: errorproperty getting set eventhough db import is successful
https://bz.apache.org/bugzilla/show_bug.cgi?id=67340
Bug ID: 67340
Summary: errorproperty getting set eventhough db import is
successful
Product: Ant
Version: unspecified
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: Core tasks
Assignee: notifications@ant.apache.org
Reporter: ravinpatil2006@gmail.com
Target Milestone: ---
Created attachment 39005
--> https://bz.apache.org/bugzilla/attachment.cgi?id=39005&action=edit
DB import log
I am importing oracle database using command impdp, even though db import is
successfully, console output is getting set in errorproperty,
on successful execution or on no error ,errorproperty should be empty or should
not be set but only for impdp command is behaving strange ,my outproperty is
coming as empty
db log is completely getting set in errorproperty
here is my exec Task
<exec executable="cmd" failonerror="false"
errorproperty="errorproperty" outputproperty="outpropertycmd"
output="@{directory}\\stdOutput\\@{filePrefix}_Output.log">
<arg value="/c"/>
<arg value="@{command}"/>
</exec>
and this is my db import command which i am passing to this task
system/*****@XE schemas=M1 directory=IMPORT_ASIS_DB_DUMP_DIR
DUMPFILE=DUMP_TRE.DMP logfile=asis_db_import_log.log
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 67340] errorproperty getting set eventhough db import is successful
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=67340
Stefan Bodewig <bo...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
OS| |All
Resolution|--- |WORKSFORME
--- Comment #1 from Stefan Bodewig <bo...@apache.org> ---
outputproperty gets what the executed process sends to its "standard output",
sometimes known as stdout or sysout and is where Java's System-out writes to.
errorproperty gets what the executed process sends to its "standard error
output" - syserr/stderr/System.err . These are two different output streams.
Whether a process writes to stderr or not is a decision of the process and is
not related to the question whether an error occured or not. It is very common
to send extra diagnostic output to stderr and "what the user is really
interested in" to stdout.
What I'm trying to say is if errorproperty is set this means impdp has written
something (the log in your case) to syserr - becuase this is how impdp works.
This is not unusual but the expected behavior of the program (I assume, I
haven't got any experience with impdp).
If you want to base the success/failure decision on any property this should be
resultproperty which get the status code of the executed program.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 67340] errorproperty getting set eventhough db import is successful
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=67340
--- Comment #3 from Stefan Bodewig <bo...@apache.org> ---
the term "error" in errorproperty really comes from "error output" for stderr
which likely is older than 50 years. There are lots of processes that write to
it even if no error occurs and people expect to be able to capture this output
in either case.
The name may be misleading and if you know a way we can document this better
I'll be happy to update the manual.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 67340] errorproperty getting set eventhough db import is successful
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=67340
--- Comment #2 from Ravindra Patil <ra...@gmail.com> ---
Thanks Stefan for answer. Yes resultproperty gives me 0 or 1 for success and
failure respectively..
But with naming convection, errorproperty/error should log only when something
wrong. I was checking with attribute "error",it works same as
errorproperty,eventhough resultproperty returns 0 it redirects output to error
file :(
To be honest,errorproperty or error should be set only when resultproperty is 1
Anyways i can proceed with resultproperty Thanks
--
You are receiving this mail because:
You are the assignee for the bug.