• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

code derbry network driver

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the process and what needs to be done
to connect from multiple JVM's apache derby network client driver.

My app builds the DB (schoolofdb) and I (right or wrong) told the app to put the DB in the
(server) which is in the dir of the %DERBY_INSTALL% dir .

how do get the code to start apache derby client network?


error :

CLASS
public cclass StartDerbyNetwork {:
--> in public void start() {<--
: jdbc:derby://localhost:1527// : schoolofdb var : protocol+AND+dbName :

CLASS
public cclass StartDerbyNetwork {:
--> in public void start() {<--
: jdbc:derby://localhost:1527//schoolofdb var : host :

CLASS
public cclass StartDerbyNetwork {:
--> in public void start() {<--
: admin : admin var : username+AND+password :

TABLE NAMES : /////////////////////////////////////////: :

error message is: : No suitable driver found for jdbc:derby://localhost:1527//schoolofdb : AT// CLASS
public cclass StartDerbyNetwork {:
: : :

error message is: No suitable driver found for jdbc:derby://localhost:1527//schoolofdb
TABLE NAMES : 10.6.2.1 - (999685): :

TABLE NAMES : Apache Derby: :

TABLE NAMES : Apache Derby Embedded JDBC Driver: :

TABLE NAMES : 10.6.2.1 - (999685): :

TABLE NAMES : /////////////////////////////////////////: :

TABLE NAMES : ADMIN: :

TABLE NAMES : ADMIN_AVAILABLE: :

TABLE NAMES : BOOKING: :

TABLE NAMES : BOOKING_TOTALS: :

TABLE NAMES : BOOKING_TOTALS_STORAGE: :

TABLE NAMES : INSTRUCTOR: :

TABLE NAMES : INSTRUCTOR_INSTRUMENT: :

TABLE NAMES : INSTRUCTOR_STUDENT_MAPPING: :

TABLE NAMES : INSTRUMENT: :

TABLE NAMES : INSTR_AVAILABLE: :

TABLE NAMES : LOCATION: :

TABLE NAMES : LOCATION_AVAILABLE: :

TABLE NAMES : NORM_AVAILABLE: :

TABLE NAMES : PAYEE: :

TABLE NAMES : PAYEE_AVAILABLE: :

TABLE NAMES : PAYEE_STUDENT_MAPPING: :

TABLE NAMES : PAYMENT: :

TABLE NAMES : PAYMENT_STORAGE: :

TABLE NAMES : PAYROLL: :

TABLE NAMES : STUDENT: :

TABLE NAMES : STUDENT_AVAILABLE: :

TABLE NAMES : STUDENT_INSTRUMENT: :

TABLE NAMES : UNENROLLED: :

TABLE NAMES : USER_: :

TABLE NAMES : USER_GROUP: :



DERBY_INSTALL : DIR
Volume in drive C has no label.
Volume Serial Number is DA5B-72C1

Directory of C:\db-derby-10.11.1.1-bin

09/18/2014 11:33 PM <DIR> .
09/18/2014 11:33 PM <DIR> ..
09/17/2014 07:27 AM <DIR> bin
09/15/2014 03:10 AM <DIR> demo
09/18/2014 11:33 PM 475 derby.log
09/15/2014 03:10 AM <DIR> docs
08/01/2014 06:25 AM 4,993 index.html
09/15/2014 03:10 AM <DIR> javadoc
08/07/2014 10:17 AM 39,891 KEYS
09/17/2014 07:28 AM <DIR> lib
08/07/2014 10:17 AM 11,560 LICENSE
08/07/2014 10:17 AM 13,272 NOTICE
08/07/2014 10:17 AM 66,020 RELEASE-NOTES.html
09/18/2014 11:33 PM <DIR> schoolofdb
09/15/2014 03:10 AM <DIR> test
6 File(s) 136,211 bytes
9 Dir(s) 900,386,172,928 bytes free

DERBY_INSTALL :


/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package view;

import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import model.ModelUtils;

/**
*
* @author Steves
*/
public class StartDerbyNetwork {

///sys//////////////////////////////////////////////////////////////////////
///sys//////////////////////////////////////////////////////////////////////
private static String AND = (" : ");
private static String BL = "CLASS \n";
private static String c = (" , ");
private static String blank = "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
private static String C = BL + "public cclass StartDerbyNetwork {:\n";
private static String keyStr = "keyStr\n" + C + "\nXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX !MARK! XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\nXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX !MARK! XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\nXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX !MARK! XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\nXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX !MARK! XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\nXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX !MARK! XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\nXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX !MARK! XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
private static String xBreak = (" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ");
private static String yBreak = (" YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY ");

/*
* driver = "org.apache.derby.jdbc.ClientDriver";
...
Class.forName(driver).newInstance();
*
* protocol = "jdbc:derby://localhost:1527/";
...
conn = DriverManager.getConnection(protocol + "derbyDB;create=true", props);

That connection URL, fully constructed, looks like this:

jdbc:derby://localhost:1527/derbyDB;create=true
*
* Stop the Network server by executing the stopNetworkServer.bat (Windows) or stopNetworkServer.ksh
*
*
* C:\> cd %DERBY_INSTALL%\bin
C:\Apache\db-derby-10.4.1.3-bin\bin> setNetworkServerCP.bat
C:\Apache\db-derby-10.4.1.3-bin\bin> stopNetworkServer.bat
*

*
*
*
* XML PROPERTIES FOR THE EMBEDDED AND NETWORK CONFIG
* <!--
Derby embedded no network Config
******************************************************************************************************** config-->
<entry key="derbyDriver">org.apache.derby.jdbc.EmbeddedDriver</entry>
<entry key="derbyURL">jdbc:derby:</entry>
-->
<!--
Derby Config network
******************************************************************************************************** config-->

<entry key="derbyDriverNetwork">org.apache.derby.jdbc.ClientDriver</entry>
<entry key="networkProtocol">jdbc:derby://localhost:1527//</entry>
<entry key="musicSysDB">schoolofdb</entry>

<!-- ************************************************************************************
actually I do not have a username or password for the apache derby server
*****************************************************************************************-->
<entry key="derbyNetworkPassword">admin</entry>
<entry key="derbyNetworkUserName">admin</entry>


*/
 
Steve Howerton Howerton
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
[Code]

public String protocol;
public String dbName;
public String host = protocol + dbName;
public String username;
public String password;

public void start() {
String M = (" --> in public void start() {<-- \n");
System.out.println(M);

try {
protocol = ModelUtils.getXMLResource("networkProtocol");
dbName = ModelUtils.getXMLResource("musicSysDB");
host = protocol + dbName;
username = ModelUtils.getXMLResource("derbyNetworkUserName");
password = ModelUtils.getXMLResource("derbyNetworkPassword");

//print some resources gathered:
System.out.println(C + M + AND + protocol + AND + dbName + " var : protocol+AND+dbName : \n");
System.out.println(C + M + AND + host + " var : host : \n");
System.out.println(C + M + AND + username + AND + password + " var : username+AND+password : \n");

} catch (IOException e) {
String x = e.getMessage();
System.out.println("error message is: " + AND + x + AND + " AT// " + C + M + AND + ": : \n");
System.out.println("error message is: " + x);
ViewUtils vu = new ViewUtils();
//vu.addExceptionMessage(x);

}

try {

Connection con = DriverManager.getConnection(host, username, password);



} catch (SQLException e) {
String x = e.getMessage();
System.out.println("error message is: " + AND + x + AND + " AT// " + C + AND + ": : \n");
System.out.println("error message is: " + x);
ViewUtils vu = new ViewUtils();
//vu.addExceptionMessage(x);
}

}
}






[\Code]
 
Steve Howerton Howerton
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So how do you connect to the host using a protocol that requires the name of database that is not there yet?
 
Steve Howerton Howerton
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah I know google ain ` t got nothing right? Why they only tell how to connect with a db name when we know the db isn`t there. I said I want to connect to server create a data base and thenconnect to it.
 
Steve Howerton Howerton
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah I know google ain ` t got nothing right? Why they only tell how to connect with a db name when we know the db isn`t there. I said I want to connect to server create a data base and thenconnect to it.
 
Steve Howerton Howerton
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The professor at the college has these answers. One day they will realize that they can sell all the questions and all the answers with professionally written lecture notes for 3 times the tuition. Of any university. The market for the Getting THE ANSWERS dwarfs the google marketing forums feeding on a failed educational system.

Can someone google using a instance of a derby network connection for me?
 
I claim this furniture in the name of The Ottoman Empire! You can keep this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic