Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Exception in thread "main" java.lang.NoClassDefFoundError: client/ui/RecorderMainFrame  RSS feed

 
preethi Ayyappan
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have downloaded call recorder software from "https://sourceforge.net/projects/wiserecorder" and installed jdk1.6.0_03, winpcap 4.0.2, and mysql connector.jar. Now i tried to run the start recorder.bat.I am getting the following error:


C:\Documents and Settings\peopleTech\Desktop\KSPZS05-2004\KSPZS05-2004\Call Reco
rder>"Start Recorder.bat"

C:\Documents and Settings\peopleTech\Desktop\KSPZS05-2004\KSPZS05-2004\Call Reco
rder>cd classes

C:\Documents and Settings\peopleTech\Desktop\KSPZS05-2004\KSPZS05-2004\Call Reco
rder\classes>java -Djava.library.path=lib -classpath .;lib\lpcbase.jar;lib\mysql
-connector-java-3.1.7-bin.jar client.ui.RecorderMainFrame
Exception in thread "main" java.lang.NoClassDefFoundError: client/ui/RecorderMai
nFrame
C:\Documents and Settings\peopleTech\Desktop\KSPZS05-2004\KSPZS05-2004\Call Reco
rder\classes>



The following are the instructions given in the deployment document.

Deployment / Installation Guide

Platform and Library Requirements:
JRE 1.3+
Winpcap/Libpcap (tcpdump)
MySql


Deployment:

Create a database on a MYSQL database server and run the scripts in the folder DB\Scripts to create the appropriate tables in the database, update the names of the database server, database, user credentials for a user authorized to access the database mentioned in the callsDb.prop and the Db.prop file in the classes folder.

Running:
Run the Start Recorder. bat file in the folder to run the system. If there is a VOIP setup then use the recorder for capturing live calls by integrating it with the IDS interface else use already provided capture files in the Captures folder.




Please help me to solve this.
Thanks
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check that one of the jar files that you added to the classpath actually contains this class; you can use the "jar -tf" command for that.
 
preethi Ayyappan
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when i tried that command, the console displays the following


C:\Documents and Settings\peopleTech>jar -tf
Usage: jar {ctxui}[vfm0Me] [jar-file] [manifest-file] [entry-point] [-C dir] fil
es ...
Options:
-c create new archive
-t list table of contents for archive
-x extract named (or all) files from archive
-u update existing archive
-v generate verbose output on standard output
-f specify archive file name
-m include manifest information from specified manifest file
-e specify application entry point for stand-alone application
bundled into an executable jar file
-0 store only; use no ZIP compression
-M do not create a manifest file for the entries
-i generate index information for the specified jar files
-C change to the specified directory and include the following file
If any file is a directory then it is processed recursively.
The manifest file name, the archive file name and the entry point name are
specified in the same order as the 'm', 'f' and 'e' flags.

Example 1: to archive two class files into an archive called classes.jar:
jar cvf classes.jar Foo.class Bar.class
Example 2: use an existing manifest file 'mymanifest' and archive all the
files in the foo/ directory into 'classes.jar':
jar cvfm classes.jar mymanifest -C foo/ .


 
Swastik Dey
Rancher
Posts: 1815
15
Android Eclipse IDE Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to specify the achieve(jar) file name with that command.

jar -tf <nameofthejarfile>
 
preethi Ayyappan
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have set the class path as follows:

C:\Program Files\Java\jre1.6.0_03;C:\Program Files\Java\jdk1.6.0_03\lib\tools.jar


Should i execute jar -tf command for tools.jar?
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have set the class path as follows:

C:\Program Files\Java\jre1.6.0_03;C:\Program Files\Java\jdk1.6.0_03\lib\tools.jar

Neither of those should be in the classpath. The first part doesn't even make sense, since that directory does not contain loose class files.

Should i execute jar -tf command for tools.jar?

No, you should run it for all the jar files that you downloaded from the "wiserecorder" project. One of those should contain the class you're missing; if none does, then you didn't get all required jar files.

Lastly, I think it's advisable to use the provided scripts to run this application. Why are you trying to run it with an explicit "java" invocation?
 
preethi Ayyappan
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have tested all the jars.But there is no RecorderMainFrame.class in any other jar file. I tried to run the batch file Start Recorder.bat file straightly from the folder. But it displays the same error and disappeared immediately.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe ask on the developer list/forum if the class is nowhere to be found.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!