Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
Getting LLIllegalOperationException get(name) not implemented for this datatype when tying to uploa
S_Swaminathan_(maninfoadmin_-_(deleted))
I am trying to use LAPI Java to upload documents in to Livelink. I am using the bleow code. I am using input stream to upload the document. It is giving the error. Both adddocument and create version methods are giving error. I am using LAPI 9.1.3 sp3. Also, I am giving full path of the file which I am trying to upload.get(name) not implemented for this datatypecom.opentext.api.LLIllegalOperationException: get(name) not implemented for this datatype. Below is the code.LLValue objectInfo = (new LLValue()).setAssocNotSet(); LLValue createInfo = (new LLValue()).setAssocNotSet(); LLValue versionInfo = (new LLValue()).setAssocNotSet();docCreateStatus = doc.AddDocument(folderVolId, folderObjId, fileName, filePathStr,fileStream,fileSize, createInfo,versionInfo,objectInfo);Any Livelink person can answer to my problem? Is this a bug in LAPI? Cant I use input stream to upload documents?Pls help.
Find more posts tagged with
Comments
eLink User
Message from Nair, Krishnankutty N. via eLinkThe 91SP3 documentation does not have the stream input methodAre you sure you have the right documentation ?I think the new methods are part of 9.5?Thanks MuchKrishnankutty N NairWork 918-661-5824 Fax:918-661-9206Learn more about EDMS powered by Livelink at
http://edms.conoco.net/edms.htm-----Original
Message-----From: eLink Discussion: LAPI Discussion[mailto:lapi@elinkkc.opentext.com] Sent: Friday, May 20, 2005 9:11 AMTo: eLink RecipientSubject: Getting LLIllegalOperationException get(name) not implementedfor this datatype when tying to upload file using Input stream Java.Getting LLIllegalOperationException get(name) not implemented for thisdatatype when tying to upload file using Input stream Java.Posted by Swaminathan, S on 05/20/2005 10:05 AMI am trying to use LAPI Java to upload documents in to Livelink. I amusing the bleow code. I am using input stream to upload the document. Itis giving the error. Both adddocument and create version methods aregiving error. I am using LAPI 9.1.3 sp3. Also, I am giving full path ofthe file which I am trying to upload.get(name) not implemented for this datatypecom.opentext.api.LLIllegalOperationException: get(name) not implementedfor this datatype. Below is the code.LLValue objectInfo = (new LLValue()).setAssocNotSet(); LLValue createInfo = (new LLValue()).setAssocNotSet(); LLValue versionInfo = (new LLValue()).setAssocNotSet();docCreateStatus = doc.AddDocument(folderVolId, folderObjId, fileName,filePathStr,fileStream,fileSize, createInfo,versionInfo,objectInfo);Any Livelink person can answer to my problem? Is this a bug in LAPI?Cant I use input stream to upload documents?Pls help.[To reply to this thread, use your normal E-mail reply function.]============================================================Discussion: LAPI Discussion
https://knowledge.opentext.com/knowledge/livelink.exe?func=ll&objId=765428&objAction=viewLivelink
Server:
https://knowledge.opentext.com/knowledge/livelink.exe
S_Swaminathan_(maninfoadmin_-_(deleted))
hi,thanks a lot. In my builder documentation, I am able to see add documentation using input stream. i think this is 9.1.3 sp3 documentation only.i have seen in LAPI_DOCUMENT class also (i have demompiled the class) , it has support for adding document using input stream . If it is not there, then at compile time itself i will get error.I am getting error at run time. Not able to understand what to do. I have seen by putting a break point in builder, when I use input stream, it is not getting the file attributes and it is giving error at some point. But when I user filepath, it is getting file attributes and adding the document into Livelink.Not able to understand what to do. Pls help.
S_Swaminathan_(maninfoadmin_-_(deleted))
I have found the problem.I am using jsp to get the input stream from the submitted page. It has ENCTYPE="multipart/form-data" in the form tag. I was using request.getInputStream() function. It was not getting the stream properly as I have not used multipart functionalities to fetch the input stream properly. I was thinking that just by doing request.getInputStream will give the file contents and other details to me. I am absloutely wrong there. I have to use multi part fetch funcionalities to get the proper input stream of the file. I have downloaded multi part classes from www.servlets.com , kept them under my tomcat/my application directory/web-inf/classes directory. Correct class path needs to be given in the system classpath. it shoud be till classes directory under your application directory under tomcat.I am attaching a file which has 3 different codes in that .(i am not able to attach 3 different files seperately to this reply)First code: CallingJsp.jsp calls the UploadDocuments.jsp . Second code: UploadDocuments.jsp. In this I have used MultipartRequest. This will store the file in the webserver hard disk, in the specified directory. I have kept the file in tomcat temp directory. From here, it is as simple as doing the file operations on local machine. I have found the file size, took the input stream of the file and passed that to java method. This jsp calls the java class. Inputs to this class method are file path,input stream, file name, file size. Third code: test.java . PLEASE REMEMBER DO NOT PRINT THE CONTENT OF THE INPUT STREM BEFORE YOU PASS THAT INTO THE ADDDOCUMENT METHOD. input stream is not retained once we do a read on that and print. If we read the input stream and print that, after this if we pass that inputstream into the AddDocument method, I got LLIllegegalException, get(name) not implemented on this method error.Hope the code helps somebody. If anybody has better approach pls let me know.