[ 
https://issues.apache.org/jira/browse/XERCESC-1658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12618974#action_12618974
 ] 

rajachandar edited comment on XERCESC-1658 at 8/1/08 4:24 AM:
---------------------------------------------------------------

thanks Alberto. i have downloaded the fix  for 2.7 and compiled. managed to 
gone thru that error. but getting new error.

 Type:RuntimeException, Message:The primary document entity could not be 
opened. Id=. So, Returning back to caller

 Details
-------------
runConfigure -psolaris -cCC -xCC -b64
since using  CC Compiler : Sun C++ 5.9. i have changed -xarch=v9 to -m64 option.
but  getting same error  if i use original runConfigure with -xarch=v9 also

      was (Author: rajachandar):
    thanks Alberto. i have downloaded the fix  for 2.7 and compiled. managed to 
gone thru that error. but getting new error.

 Type:RuntimeException, Message:The primary document entity could not be 
opened. Id=. So, Returning back to caller

 Details
-------------
runConfigure -psolaris -cCC -xCC -b64
since using  CC Compiler : Sun C++ 5.9. i have changed -xarch=v9 to -m64 option.
  
> Inaccurate error message "Type:XMLPlatformException, Message:Could not close 
> the file"
> --------------------------------------------------------------------------------------
>
>                 Key: XERCESC-1658
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1658
>             Project: Xerces-C++
>          Issue Type: Improvement
>          Components: Validating Parser (XML Schema)
>    Affects Versions: 2.7.0
>         Environment: Solaris 10
>            Reporter: Paul Fee
>            Assignee: Alberto Massari
>
> XMLPlatformUtils::openFile() in SolarisPlatformUtils.cpp:227 directly returns 
> the result of the open(2) system call.
> This can return -1 on error, such as "File not found".  However other parts 
> of Xerces take this return could without further validation.  Also, when an 
> error occurs, valuable information is available for a short time in errno, 
> this information (i.e. the reason why -1 was return) is not captured for use 
> in error messages.
> An example of when the return is stored is in 
> BinFileInputStream::BinFileInputStream(const XMLCh* const fileName, 
> MemoryManager* const manager)
> Here fSource can end up with a value of -1, which in turn means that the 
> destructor for BinFileInputStream will fail.
> BinFileInputStream::~BinFileInputStream()
> {
>   if (fSource)
>     XMLPlatformUtils::closeFile(fSource, fMemoryManager);
> }
> It detects that fSource is non-zero and tries to close the file, but -1 is 
> not a valid file descriptor.
> Hence we end up with the inaccurate error message "Could not close the file".
> Error checking surrounding XMLPlatformUtils::openFile() should be improved.
> Thank you,
> Paul

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to