The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

import-bot (20211) [Avatar] Offline
#1
[Originally posted by e_sand]

Anthony,

Just got you book and zipped through the first 3 chaps. I got to Example_4_1
and I can't get it to run for nothing. I have Win2k Pro box with NoteR5
client, designer, admin on it. I have domino R5.06a on Win2k Server on the
network. I can get to the server with the clients but I can't from the
standalone app Example_4_1. My CLASSPATH has both the notes.jar and nsco.jar.
My path statement include the jdkin directory. Any ideas? Here is the
error please help:
java.lang.NoClassDefFoundError: lotus/domino/cso/Session
at lotus.domino.NotesFactory.createSession(NotesFactory.java:67)
at Example_4_1.run(Example_4_1.java:10)
at java.lang.Thread.run(Unknown Source)
import-bot (20211) [Avatar] Offline
#2
Re: Stand Alone Apps Example_4_1 problems
[Originally posted by aspatton]

I apologize for the delay.

The error message states the system cannot find the necessary class file(s).
The NCSO.jar file is used for remote access, so Notes.jar is not needed. I
assume you are setting the path/classpath variables via the Win2K System
(Advanced | Environment Variables) from the control panel.

Tony.
import-bot (20211) [Avatar] Offline
#3
Re: Stand Alone Apps Example_4_1 problems
[Originally posted by e_sand]

Here is a copy of my classpath is that right? I know the ncso.jar file is in
this path there.

CsmilieROGRA~1ABRIAM~1JDK11~1.8programs>echo %CLASSPATH%
.;c:lotus
otesdatadominojava
cso.jar

Here is the output when I run the program:
Csmilierogram FilesAbria Merlinjdk1.1.8programs>java Example_4_1
Running
trying
Session s
ID: 4488 -- Name:

Here is the code (the ip is correct and username and pass are in the pers doc):
import lotus.domino.*;
public class Example_4_1 implements Runnable {
public static void main(java.lang.String[] args) {
Example_4_1 t = new Example_4_1();
Thread nt = new Thread((Runnable)t);
nt.start(); }
public void run() {
System.out.println("Running"); //This prints out
try {
System.out.println("trying"); //This prints out
System.out.println("Session s"); //This prints out

//Program does not get past the next line
Session s = NotesFactory.createSession("192.168.1.15","abcdefg","abcdefgh");
System.out.println("Done Session s"); // This line does not print out
System.out.println("Trying Get Platform"); // This line does not print out
String p = s.getPlatform();
String cu = s.getCommonUserName();
String nv = s.getNotesVersion();
String sn = s.getServerName();
String un = s.getUserName();
System.out.println("Platform: " + p); // This line does not print out
s.recycle();
} catch (NotesException n) {
System.out.println("ID: " + n.id + " -- Name: " + n.text); //This prints
} catch (Exception e) {
e.printStackTrace(); } } }

Any help appreciated