Solved

Setting classpath and java.lang.ClassNotFoundException

Posted on 2006-06-24
7
755 Views
Last Modified: 2013-11-23
Hi,

I am trying to use cloudscape db and after setting classpath, I still get this error.

java.lang.ClassNotFoundException: COM.cloudscape.core.JDBCDriver
      at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:164)
      at StudentInfo.getConnect(StudentInfo.java:86)
      at StudentInfo.main(StudentInfo.java:109)

++++++++++++++
This is my classpath:

>echo %classpath%
.;C:\jakarta-tomcat-5.5.4\common\lib\servlet-api.jar; C:\jakarta-tomcat-5.5.4\co
mmon\lib\jsp-api.jar; C:\Sun\AppServer\lib\j2ee.jar; C:\jakarta-tomcat-5.5.4\web
apps\~dkim18\WEB-INF\classes.;C:\proj5\xerces.jar;C:\bea81\weblogic81\server\lib
\weblogic.jar;C:\cloudscape36\lib\cloudscape.jar;C:\cloudscape36\lib\client.jar
+++++++++++++
This is my code:

try {
                     
          String jdbcDriver = "COM.cloudscape.core.JDBCDriver";
                String dbURL = "jdbc:cloudscape:TextDB";
                String username = "username";
                      String passwd = "password";
      
                Class.forName(jdbcDriver).newInstance();      
           
                 conn = DriverManager.getConnection(dbURL, username, passwd);
               }
++++++++++++
Any clue?

thanks!
0
Comment
Question by:dkim18
  • 4
  • 3
7 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 16976343
Make sure

COM.cloudscape.core.JDBCDriver

is prefectly correct (case too)
0
 

Author Comment

by:dkim18
ID: 16976450
I believe it is correct.

try {
                   
         String jdbcDriver = "COM.cloudscape.core.JDBCDriver";
...
...
...
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 16976453
Can you post the output of

jar tf C:\cloudscape36\lib\cloudscape.jar

?
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:dkim18
ID: 16976463
COM/cloudscape/aggregates/AggregateDefinition.class
COM/cloudscape/aggregates/Aggregator.class
COM/cloudscape/authentication/Interface/AuthenticationException.clas
COM/cloudscape/authentication/Interface/AuthenticationScheme.class
COM/cloudscape/authentication/util/SimpleAuthenticationScheme.class
COM/cloudscape/core/AbstractDataSource.class
COM/cloudscape/core/BaseConnectionHandle.class
COM/cloudscape/core/BasicDataSource.class
COM/cloudscape/core/BootStrap.class
COM/cloudscape/core/CloudscapeServer.class
COM/cloudscape/core/CloudscapeServerTie.class
COM/cloudscape/core/DataSourceFactory.class
COM/cloudscape/core/GetUniqueIDInterface.class
COM/cloudscape/core/JDBCBoot.class
COM/cloudscape/core/JDBCDriver.class
COM/cloudscape/core/LocalConnectionPoolDataSource.class
COM/cloudscape/core/LocalPooledConnection.class
COM/cloudscape/core/modules.properties
COM/cloudscape/core/MonitorBoot.class
COM/cloudscape/core/MonitorLog.class
COM/cloudscape/core/PrintStreamMonitorLog.class
COM/cloudscape/core/RemoteXaDataSource.class
COM/cloudscape/core/RmiJdbcDriver.class
COM/cloudscape/core/WebLogicCloudscapeServerTie.class
COM/cloudscape/core/XaDataSource.class
COM/cloudscape/database/ConnectionInfo.class
COM/cloudscape/database/ConsistencyChecker.class
COM/cloudscape/database/Database.class
COM/cloudscape/database/Factory.class
COM/cloudscape/database/JavaSQLException.class
COM/cloudscape/database/JBMSException.class
COM/cloudscape/database/OptimizerTrace.class
COM/cloudscape/database/PropertyInfo.class
COM/cloudscape/database/TriggerExecutionContext.class
COM/cloudscape/database/UserUtility.class
COM/cloudscape/info/DBMS.properties
COM/cloudscape/info/license.properties
COM/cloudscape/info/LocaleNames.class
COM/cloudscape/info/ProductGenusNames.class
COM/cloudscape/info/ProductVersionHolder.class
COM/cloudscape/info/ProductVersionHolderJava2.class
COM/cloudscape/info/PropertyNames.class
COM/cloudscape/info/sysinfo.properties
COM/cloudscape/system/System.class
COM/cloudscape/system/UUIDFactory.class
COM/cloudscape/tools/dbclasses.class
COM/cloudscape/tools/FileExport.class
COM/cloudscape/tools/FileImport.class
COM/cloudscape/tools/ImportExportSQLException.class
COM/cloudscape/tools/sysinfo.class
COM/cloudscape/types/AliasInfo.class
COM/cloudscape/types/DatabaseInstant.class
COM/cloudscape/types/DefaultInfo.class
COM/cloudscape/types/DependableFinder.class
COM/cloudscape/types/ErrorInfo.class
COM/cloudscape/types/IndexDescriptor.class
COM/cloudscape/types/Inspectable.class
COM/cloudscape/types/JBMSExceptionSeverity.class
COM/cloudscape/types/ReferencedColumnsDescriptor.clas
COM/cloudscape/types/RunTimeStatistics.class
COM/cloudscape/types/TypeDescriptor.class
COM/cloudscape/types/TypeFactory.class
COM/cloudscape/types/UUID.class
COM/cloudscape/util/BitUtil.class
COM/cloudscape/util/DBClassLoad.class
COM/cloudscape/util/DriverUtil.class
COM/cloudscape/util/KeyGen.class
COM/cloudscape/vti/CloudscapeLogReader.class
COM/cloudscape/vti/ConglomerateNumToContainerId.class
COM/cloudscape/vti/ConglomerateNumToContainerIdHelper
COM/cloudscape/vti/ConglomerateNumToContainerIdMetaDa
COM/cloudscape/vti/ConglomInfo.class
COM/cloudscape/vti/ContainerIdToConglomerateNum.class
COM/cloudscape/vti/ContainerIdToConglomerateNumHelper
COM/cloudscape/vti/ContainerIdToConglomerateNumMetaDa
COM/cloudscape/vti/ErrorMessages.class
COM/cloudscape/vti/ErrorMessagesMetaData.class
COM/cloudscape/vti/ExternalQuery.class
COM/cloudscape/vti/GetProcColsMetaData.class
COM/cloudscape/vti/GetProcedureColumns.class
COM/cloudscape/vti/LockTable.class
COM/cloudscape/vti/LockTableMetaData.class
COM/cloudscape/vti/LogReaderMetaData.class
COM/cloudscape/vti/SpaceTable.class
COM/cloudscape/vti/SpaceTableMetaData.class
COM/cloudscape/vti/StatementDuration.class
COM/cloudscape/vti/StatementDurationMetaData.class
COM/cloudscape/vti/TransactionTable.class
COM/cloudscape/vti/TransactionTableMetaData.class
COM/cloudscape/vti/TriggerNewTransitionRows.class
COM/cloudscape/vti/TriggerOldTransitionRows.class
COM/cloudscape/vti/UpdatableVTITemplate.class
COM/cloudscape/vti/VTICosting.class
COM/cloudscape/vti/VTIEnvironment.class
COM/cloudscape/vti/VTIException.class
COM/cloudscape/vti/VTIMetaDataTemplate.class
COM/cloudscape/vti/VTITemplate.class
COM/cloudscape/vti20/UpdatableVTITemplate.class
COM/cloudscape/vti20/VTIMetaDataTemplate.class
COM/cloudscape/vti20/VTITemplate.class
COM/objectspace/jgl/Allocator.class
COM/objectspace/jgl/ArrayAdapter.class
COM/objectspace/jgl/BidirectionalIterator.class
COM/objectspace/jgl/BinaryFunction.class
COM/objectspace/jgl/BinaryPredicate.class
COM/objectspace/jgl/ArrayAdapter.class
COM/objectspace/jgl/BidirectionalIterator.class
COM/objectspace/jgl/BinaryFunction.class
COM/objectspace/jgl/BinaryPredicate.class
COM/objectspace/jgl/Comparing.class
COM/objectspace/jgl/Container.class
COM/objectspace/jgl/Counting.class
COM/objectspace/jgl/DList$DListNode.class
COM/objectspace/jgl/DList.class
COM/objectspace/jgl/DListIterator.class
COM/objectspace/jgl/EqualTo.class
COM/objectspace/jgl/Finding.class
COM/objectspace/jgl/ForwardIterator.class
COM/objectspace/jgl/HashComparator.class
COM/objectspace/jgl/Hashing.class
COM/objectspace/jgl/InputIterator.class
COM/objectspace/jgl/InsertIterator.class
COM/objectspace/jgl/IntArray.class
COM/objectspace/jgl/IntIterator.class
COM/objectspace/jgl/InvalidOperationException.class
COM/objectspace/jgl/MinusNumber.class
COM/objectspace/jgl/NumberHelper.class
COM/objectspace/jgl/OutputIterator.class
COM/objectspace/jgl/Pair.class
COM/objectspace/jgl/PlusNumber.class
COM/objectspace/jgl/Printing.class
COM/objectspace/jgl/Queue.class
COM/objectspace/jgl/RandomAccessIterator.class
COM/objectspace/jgl/Replacing.class
COM/objectspace/jgl/Sequence.class
COM/objectspace/jgl/SList$SListNode.class
COM/objectspace/jgl/SList.class
COM/objectspace/jgl/SListIterator.class
COM/objectspace/jgl/Sorting.class
COM/objectspace/jgl/UnaryPredicate.class
c8e/a/b.class
c8e/a/c.class
c8e/a/d.class
c8e/aa/a.class
c8e/aa/b.class
c8e/aa/c.class
c8e/ab/a.class
c8e/ab/b.class
c8e/ab/c.class
c8e/ab/d.class
c8e/ab/e.class
c8e/ab/f.class
c8e/ab/g.class
c8e/ab/h.class
c8e/ab/i.class
c8e/ab/j.class
c8e/ab/k.class
..
...
...
c8e/z/metadata.properties
c8e/z/n.class
c8e/z/o.class
c8e/z/p.class
c8e/z/q.class
c8e/z/r.class
c8e/z/s.class
0
 
LVL 86

Accepted Solution

by:
CEHJ earned 300 total points
ID: 16976465
That's in order. Please post the command you're using to run
0
 

Author Comment

by:dkim18
ID: 16976502
the problem has been solved. i was running this app by using eclipse and didn't set classpath. my bad...
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 16976507
:-)
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now