-
Notifications
You must be signed in to change notification settings - Fork 13
ProdsFile->write fails on iRODS 4.0 #9
Comments
OK, yet another deprecated api...we'll fix like the last one MC On Fri, Aug 22, 2014 at 4:20 PM, isaacsimmons [email protected]
|
Different error on 4.0.3 php > require_once 'Prods.inc.php';
php > $account = new RODSAccount("consortium.local", 1247, "test1", "test", "test1", "test1-resc");
php > $myfile = new ProdsFile($account, '/test1/home/test1xx/test.xml');
php > $myfile->open("w+", $account->default_resc);
Warning: Uncaught RODSException: [-24000 SYS_INTERNAL_NULL_INPUT_ERR]: RODSConn::openFileDesc has got an error from the server
thrown in /Users/mikeconway/Documents/workspace-release/irods-php/prods/src/RODSConn.class.php on line 1015
php >
will bring up 3.3.1 vm and compare.. |
ok..replicates as reported 3.3.1 thrown in /Users/mikeconway/Documents/workspace-release/irods-php/prods/src/RODSConn.class.php on line 1015
php > require_once 'Prods.inc.php';
php > $account = new RODSAccount("localhost", 2247, "test1", "test", "test1", "test1-resc");
php > $myfile = new ProdsFile($account, '/test1/home/test1/test.xml');
php > $myfile->open("w+", $account->default_resc);
Warning: unpack(): Type N: not enough input, need 4, have 0 in /Users/mikeconway/Documents/workspace-release/irods-php/prods/src/RODSMessage.class.php on line 76
Warning: Uncaught RODSException: [-15000 SYS_PACK_INSTRUCT_FORMAT_ERR]: RODSMessage::unpack failed.1! The header length is unexpected: ''
thrown in /Users/mikeconway/Documents/workspace-release/irods-php/prods/src/RODSMessage.class.php on line 79
php >
php >
|
jargon working version packing instructions for file open 5630 [main] DEBUG org.irods.jargon.core.connection.IRODSMidLevelProtocol - calling irods function with byte array
5630 [main] DEBUG org.irods.jargon.core.connection.IRODSMidLevelProtocol - calling irods function with:<DataObjInp_PI><objPath>/test1/home/test1/jargon-scratch/IRODSFileOutputStreamTest/testWriteByteArray.csv</objPath>
<createMode>33188</createMode>
<openFlags>2</openFlags>
<offset>0</offset>
<dataSize>0</dataSize>
<numThreads>0</numThreads>
<oprType>0</oprType>
<KeyValPair_PI><ssLen>1</ssLen>
<keyWord>destRescName</keyWord>
<svalue>test1-resc</svalue>
</KeyValPair_PI>
</DataObjInp_PI>
5630 [main] DEBUG org.irods.jargon.core.connection.IRODSMidLevelProtocol - api number is:601
5630 [main] DEBUG org.irods.jargon.core.connection.AbstractIRODSMidLevelProtocol - functionID: 601
|
confusing...new 3.3.1 works php > require_once 'Prods.inc.php';
php > $account = new RODSAccount("irods331.irods.org", 1247, "test1", "test", "test1", "test1-resc");
php > $myfile = new ProdsFile($account, '/test1/home/test1/testaaa.xml');
php > $myfile->open("w+", $account->default_resc);
php > $myfile->write("TEST CONTENTS");
php > $myfile->close();
php > quit
|
ok..error is on PRODSFile->write() using the deprecated DataObjWriteInp class RP_dataObjWriteInp extends RODSPacket
{
public function __construct($dataObjInx = -1, $len = 0)
{
$packlets = array("dataObjInx" => $dataObjInx,
'len' => $len);
parent::__construct("dataObjWriteInp_PI", $packlets);
}
}
Jargon is using the OpenedDataObjInp OpenedDataObjInp openedDataObjInp = OpenedDataObjInp
.instanceForFileWrite(fd, offset, length);
|
When trying to write to a new file on an iRODS 4.0.0 server, we are getting an error when parsing the response message from the server.
When run against the 3.3 server, the file is successfully created.
When run against the 4.0.0 server, a zero-size file is created and following message is printed
Test File:
The text was updated successfully, but these errors were encountered: