Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Setting classpath and java.lang.ClassNotFoundException

Posted on 2006-06-24
7
Medium Priority
?
800 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

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 1200 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

730 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