db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cdarling <cdarl...@126.com>
Subject prob. report in tutorial: space in classpath cause prob. in windows8
Date Thu, 04 Jul 2013 06:52:05 GMT
Hi,
I'm new to derby and I'm tring out its amazing features (under the guidance of "http://docs.oracle.com/javadb/10.8.2.2/getstart/getstartderby.pdf").
I've encountered a problem and I‘ve (fortunately) get over it. I'm writing to share my experience
and hoping (possiblly) to improve the pdf document.

I'm using windows 8 and doing activity 3/4, my classpath of derbyrun/derbyclient contains
a space as "Program Files" folder contains one. In such case the program can be compiled but
complaints when running it. Details as follows:

C:\Users\Delin\Documents\MATLABprog\derbytutor>set classpath="c:\Program Files\J
ava\jdk1.7.0_21\db\lib\derbyclient.jar";.

C:\Users\Delin\Documents\MATLABprog\derbytutor>java WwdClient
ClassNotFoundException: org.apache.derby.jdbc.ClientDriver

    >>> Please check your CLASSPATH variable   <<<

 . . . exception thrown:

---SQLException Caught---

SQLState:   08001
Severity: 0
Message:  No suitable driver found for jdbc:derby://localhost:1527/jdbcDemoDB;cr
eate=true
java.sql.SQLException: No suitable driver found for jdbc:derby://localhost:1527/
jdbcDemoDB;create=true
        at java.sql.DriverManager.getConnection(DriverManager.java:604)
        at java.sql.DriverManager.getConnection(DriverManager.java:243)
        at WwdClient.main(WwdClient.java:72)
Getting Started With Derby JDBC program ending.

And so I copied the jar files to my personal folder and it works. Details as follows:

C:\Users\Delin\Documents\MATLABprog\derbytutor>set classpath=c:\Users\Delin\Docu
ments\MATLABprog\derbytutor\lib\derbyclient.jar;.

C:\Users\Delin\Documents\MATLABprog\derbytutor>javac WwdClient.java

C:\Users\Delin\Documents\MATLABprog\derbytutor>java WwdClient
org.apache.derby.jdbc.ClientDriver loaded.
Connected to database jdbcDemoDB
 . . . . creating table WISH_LIST
Enter wish-list item (enter exit to end):
Manual for Loving Couples
  __________________________________________________
On 2013-07-04 14:36:21.231 I wished for Manual for Loving Couples
  __________________________________________________
Enter wish-list item (enter exit to end):
Guide for Dayly Living
  __________________________________________________
On 2013-07-04 14:36:21.231 I wished for Manual for Loving Couples
On 2013-07-04 14:36:37.191 I wished for Guide for Dayly Living
  __________________________________________________
Enter wish-list item (enter exit to end):
exit
Closed connection
Getting Started With Derby JDBC program ending.
Hoping this help others.
And if there are any better work around for this issue please kindly let me know.

Thanks

Delin
Mime
View raw message