Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8480049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T19:11:56+00:00 2026-06-10T19:11:56+00:00

I am trying to connect a database with a java project. After reading some

  • 0

I am trying to connect a database with a java project. After reading some tutorials and the course support, I have understood that I need to make a new data source under the Admin Console.

So, I’ve logged in into the admin console, then navigated to Resources -> JDBC -> Data Sources -> New; filled in the fields and when I am testing the connection, the error I get is this one:

Messages The test connection operation failed for data source MyDB on
server server1 at node RO2CVG6CNode01 with the following exception:
java.sql.SQLNonTransientException: java.net.ConnectException : Error
connecting to server localhost on port 1527 with message Connection
refused: connect.DSRA0010E: SQL State = 08001, Error Code = 40,000.
View JVM logs for further details.

I don’t know where the problem is. Maybe with the Database name: jdbc:derby:D:\MyDB ? Can anyone help me please?
I’ve also tried to use only MyDB, after this tutorial.
But still it doesn’t work.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T19:11:57+00:00Added an answer on June 10, 2026 at 7:11 pm

    Do you have the Derby Server running?

    It’s quite possible that you are trying to connect to a database without the actual server running on Port 1527.

    You could try establishing a connection using the command line / linux shell – depending on what operating system you are using.

    Try this if you like:

    1. Open a command prompt
    2. Navigate to your Derby installation directory
    3. Navigate to the “bin” directory(Note:Navigate Further to networkServer folder if it exists)
    4. Type “startNetworkServer” and press Enter

    You should get a message that says something like this:

    2012-08-29 10:57:16.559 GMT : Security manager installed using the Basic server security policy.
    2012-08-29 10:57:16.809 GMT : Apache Derby Network Server – 10.6.2.1 – (999685) started and ready to accept connections on port 1527

    If you don’t, then maybe you could check your firewall (comments invited here 🙂

    If you do, then you could test your connection using the following method:

    1. Open another command prompt
    2. Navigate to your Derby installation directory
    3. Navigate to the “bin” directory
    4. Type “ij” and press Enter
    5. Type the following:

       connect 'jdbc:derby://localhost:1527/MyDB';
      

      …and press Enter

    If all goes well, you will get the “ij>” prompt back.

    From here you could enter some SQL queries to test the connection further.

    If not, then there might be some other problems.

    If you are creating the database for the first time in derby, then you would have to use this in place of Step 5 above:

         connect 'jdbc:derby://localhost:1527/MyDB;create=true';
    

    …and press Enter

    Hopefully after doing these things, you will get a connection. In the last instance, you will at least get a new database called MyDB that is active on the Derby Server. If your original database (MyDB) is relatively small, then it might be quicker just to reconstruct it again for whatever purpose you need it for.

    Further to this, if you do establish a connection, then you could try other tools that you use for database development, since you have at least eliminated the possibility that the connection is the problem.

    Just be sure to check the port number that is reported from Step 4. This is usually 1527. If not, then change the port number in Step 5 (or its replacement command for a new database) for whatever port is stated in the message from Derby.

    Hope this helps and good luck 🙂

    Wayne Riesterer

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to connect to SQLite database with Ecplise but I have some errors.
I am trying to connect to a remote oracle database server in Java with
I'm trying to write a java program to connect to the same MySQL database
I am trying to connect to a database with two tables. However, after I
I am trying to connect my Java Applet to a MySQL Database. I know
I have created a java SE application that uses the mysql database using mysql
I have been trying to connect netbean service for database explorer with Microsoft SQL
I'm trying to connect to a remote database using the following java code, but
I am trying to connect to MySQL database with Java and I get the
I am trying to connect to HP Operations Manager Database using Java code in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.