Home
Extended ECM
API, SDK, REST and Web Services
LAPI & Java SDK set up
Matt_Miranda_(EAFBMattMiranda_(Delete)_2184030)
I'm new to LAPI and have been experimenting with some of the sample code on the Knowledge Center. I'm running into a problem when using Java's SDK as my programming environment. I can set the classpath to what it needs to be, but when I compile, the 'com.opentext.api' package cannot be found. However, when I use Microsoft's J++ and set the class path there, the code compiles fine and I can even run it successfully. Now, if I take the compiled class from J++ and try to run it with the Java SDK, i get the following error: Exception in thread "main" java.lang.NoClassDefFoundError: com/opentext/api/LLConnectHas anyone else experienced this before? Are there any known issues with using the Java SDK? If anyone can tell me how their environment is set up, that would be a great starting place for me! Thanks.Matt
Find more posts tagged with
Comments
eLink User
Message from Nair, Krishnankutty N. via eLinkI use java sdk in for lapi and this is how my classpath setting win2k/xplooks likeCLASSPATH.;C:\Sun\AppServer\jdk\lib\rt.jar;C:\Sun\AppServer\jdk\lib;C:\oracle\ora81\jdbc\lib\classes111.zip;C:\oracle\ora81\jdbc\lib\classes12.zip;C:\oracle\ora81\jdbc\lib\jndi.zip;C:\oracle\ora81\jdbc\lib\jta.zip;C:\oracle\ora81\jdbc\lib\nls_charset11.zip;C:\oracle\ora81\jdbc\lib\nls_charset12.zip;C:\Program Files\Open Text\Livelink API\binas you will see only the current directory("." and C:\Program Files\OpenText\Livelink API\bin should be there in your case for lapi to import the classes.if you will look under \Open Text\Livelink API\binyou can see the com. classes and LLConnect should be there if it is notyour install has a problem.I do not use the microsoft's java hence I do not know how it affectsyour caseThere are some interesting lapi stuff also at this site
http://www.greggriffiths.org/livelinkKrishnankutty
N Nair 918-661-5824-----Original Message-----From: eLink Discussion: LAPI Discussion[mailto:lapi@elinkkc.opentext.com] Sent: Tuesday, June 29, 2004 10:55 AMTo: eLink RecipientSubject: LAPI & Java SDK set upLAPI & Java SDK set upPosted by Miranda, Matt on 06/29/2004 11:54 AMI'm new to LAPI and have been experimenting with some of the sample codeon the Knowledge Center. I'm running into a problem when using Java'sSDK as my programming environment. I can set the classpath to what itneeds to be, but when I compile, the 'com.opentext.api' package cannotbe found. However, when I use Microsoft's J++ and set the class paththere, the code compiles fine and I can even run it successfully. Now,if I take the compiled class from J++ and try to run it with the JavaSDK, i get the following error: Exception in thread "main" java.lang.NoClassDefFoundError:com/opentext/api/LLConnectHas anyone else experienced this before? Are there any known issues withusing the Java SDK? If anyone can tell me how their environment is setup, that would be a great starting place for me! Thanks.Matt[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
Matt_Miranda_(EAFBMattMiranda_(Delete)_2184030)
Message from Miranda Matthew Contr AFFTC/IT <
Matthew.Miranda@edwards.af.mil
> via eLink
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
eLink
I did that and now I can compile with no problems, but when I try to execute the class (java
classname
) I get this error:
Exception in thread "main" java.lang.NoClassDefFoundError: AddDocument
The class is there, it just doesn't see it for whatever reason....
From:
eLink Discussion: LAPI Discussion [mailto:lapi@elinkkc.opentext.com]
Sent:
Tuesday, June 29, 2004 10:44 AM
To:
eLink Recipient
Subject:
RE LAPI & Java SDK set up
RE LAPI & Java SDK set up
Posted by eLink on 06/29/2004 01:44 PM
In reply to:
LAPI & Java SDK set up
Posted by
EAFBMattMiranda
(Miranda, Matt) on 06/29/2004 11:54 AM
Message from Nair, Krishnankutty N. <Krishnankutty.N.Nair@conocophillips.com> via eLink
I use java sdk in for lapi and this is how my classpath setting win2k/xp
looks like
CLASSPATH
;C:\Sun\AppServer\jdk\lib\rt.jar;C:\Sun\AppServer\jdk\lib;C:\oracle\ora
81\jdbc\lib\classes111.zip;C:\oracle\ora81\jdbc\lib\classes12.zip;C:\ora
cle\ora81\jdbc\lib\jndi.zip;C:\oracle\ora81\jdbc\lib\jta.zip;C:\oracle\o
ra81\jdbc\lib\nls_charset11.zip;C:\oracle\ora81\jdbc\lib\nls_charset12.z
ip;C:\Program Files\Open Text\Livelink API\bin
as you will see only the current directory("." and C:\Program Files\Open
Text\Livelink API\bin
should be there in your case for lapi to import the classes.
if you will look under <lapi install path >\Open Text\Livelink API\bin
you can see the com. classes and LLConnect should be there if it is not
your install has a problem.
I do not use the microsoft's java hence I do not know how it affects
your case
There are some interesting lapi stuff also at this site
http://www.greggriffiths.org/livelink
Krishnankutty N Nair 918-661-5824
-----Original Message-----
From: eLink Discussion: LAPI Discussion
[
mailto:lapi@elinkkc.opentext.com
]
Sent: Tuesday, June 29, 2004 10:55 AM
To: eLink Recipient
Subject: LAPI & Java SDK set up
LAPI & Java SDK set up
Posted by Miranda, Matt on 06/29/2004 11:54 AM
I'm new to LAPI and have been experimenting with some of the sample code
on the Knowledge Center. I'm running into a problem when using Java's
SDK as my programming environment. I can set the classpath to what it
needs to be, but when I compile, the 'com.opentext.api' package cannot
be found. However, when I use Microsoft's J++ and set the class path
there, the code compiles fine and I can even run it successfully. Now,
if I take the compiled class from J++ and try to run it with the Java
SDK, i get the following error:
Exception in thread "main" java.lang.NoClassDefFoundError:
com/opentext/api/LLConnect
Has anyone else experienced this before? Are there any known issues with
using the Java SDK? If anyone can tell me how their environment is set
up, that would be a great starting place for me! Thanks.
Matt
[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=7654
28&objAction=view
Livelink Server:
https://knowledge.opentext.com/knowledge/livelink.exe
eLink User
Message from Nair, Krishnankutty N. via eLinkWell java is very much case sensitive and this looks to me likeyou have in your code named your class different from the file namethat you gave to the java file.Hoping this is that simpleif you compiled javac AddDocument.java and your public class declartaionshould also be class AddDocument{main{}}this should yield youAddDocument.class.Check the subtleties for sure.That example is the java lapi bible.Thanks MuchKrishnankutty N Nair 918-661-5824-----Original Message-----From: eLink Discussion: LAPI Discussion[mailto:lapi@elinkkc.opentext.com] Sent: Tuesday, June 29, 2004 3:29 PMTo: eLink RecipientSubject: RE RE LAPI & Java SDK set up
Bill_Cox_(NATRUR012_(Delete)_2422490)
Java SDK is fine (get 1.4.2 if you're not already using that version) . Believe you are having trouble due to classpath settings on execution of your test app's class (you do need to specify the LAPI jar file there too). You don't really need anything besides the lapi.jar file. You don't even need to set your classpath as an environment variable, but you do need to tell the Java SDK where to find the classes both at compile and run time. Here's console of a simple test pgm showing minimal set up. Note that I don't set a classpath env var in this example. Also note that you'll get the error you mention if you don't specify classpath when running the class. Hope this helps.C:\bcox\dev\lltest>path=c:\j2sdk1.4.2_01\binC:\bcox\dev\lltest>echo %path%c:\j2sdk1.4.2_01\binC:\bcox\dev\lltest>echo %classpath%%classpath%C:\bcox\dev\lltest>dir /S Volume in drive C has no label. Volume Serial Number is C86C-3F10 Directory of C:\bcox\dev\lltest06/29/2004 06:03 PM
.06/29/2004 06:03 PM
..06/29/2004 05:45 PM
lib06/29/2004 06:00 PM 2,829 LLTest.java 1 File(s) 2,829 bytes Directory of C:\bcox\dev\lltest\lib06/29/2004 05:45 PM
.06/29/2004 05:45 PM
..10/23/2003 03:55 PM 91,345 lapi.jar 1 File(s) 91,345 bytes Total Files Listed: 2 File(s) 94,174 bytes 5 Dir(s) 43,705,479,168 bytes freeC:\bcox\dev\lltest>javac -classpath .;.\lib\lapi.jar LLTest.javaC:\bcox\dev\lltest>java -classpath .;.\lib\lapi.jar LLTestvolumeID:-2000, nodeID:2000Added document as objId 3981 on Volume -2000main is doneC:\bcox\dev\lltest>
Krishnankutty_Nair
What version of livelink started the jar files We are on 9.1.0 SP3and this does not have jar file rather the java classes.I am interested in new development in the lapi field particularly java.Is this part of new 9.2 software if it is we got only the server CD's or is this part of the web services.Will you reply
Bill_Cox_(NATRUR012_(Delete)_2422490)
The 9.1.0 SP 3.2 version of SDK delivered new LAPI functionality: LAPI classes in a jar file, LAPI web services support. At this point in time, you can ask for 9.1.0.4 or 9.2 (but 9.2 is a bigger leap). We're actually still running 9.0, but I've found that I can interact programmatically with LL 9.0 using the 9.1.0.4 SDK without problems. Simply copy the lapi.jar to appropriate spot in the java build structure (such as a lib directory) for your package. Obviously, don't use functionality that wasn't there earlier. For example, poll objects didn't exist back then. Also, the LAPI doc is better in the newer SDK (still very thin on examples).
eLink User
Message from Nair, Krishnankutty N. via eLinkThanks much for the info .So for the original poster you will have tosee if you have thejar files like the LAPI version like Bill **** does,or if you have aolder lapi version like we do here include the class files in your class path or run itwith the java -cp AddDocument Thanks MuchKrishnankutty N Nair 918-661-5824Livelink-EDMS -----Original Message-----From: eLink Discussion: LAPI Discussion[mailto:lapi@elinkkc.opentext.com] Sent: Wednesday, June 30, 2004 9:01 AMTo: eLink RecipientSubject: LAPI jar delivered starting with version 9.1.0 SP 3.2LAPI jar delivered starting with version 9.1.0 SP 3.2Posted by ****, Bill on 06/30/2004 09:58 AMThe 9.1.0 SP 3.2 version of SDK delivered new LAPI functionality: LAPIclasses in a jar file, LAPI web services support. At this point in time,you can ask for 9.1.0.4 or 9.2 (but 9.2 is a bigger leap). We'reactually still running 9.0, but I've found that I can interactprogrammatically with LL 9.0 using the 9.1.0.4 SDK without problems.Simply copy the lapi.jar to appropriate spot in the java build structure(such as a lib directory) for your package. Obviously, don't usefunctionality that wasn't there earlier. For example, poll objectsdidn't exist back then. Also, the LAPI doc is better in the newer SDK(still very thin on examples). [To reply to this thread, use your normal E-mail reply function.]============================================================Topic: LAPI & Java SDK set up
https://knowledge.opentext.com/knowledge/livelink.exe?func=ll&objId=3576146&objAction=viewDiscussion
: LAPI Discussion
https://knowledge.opentext.com/knowledge/livelink.exe?func=ll&objId=765428&objAction=viewLivelink
Server:
https://knowledge.opentext.com/knowledge/livelink.exe