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 7051217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:14:14+00:00 2026-05-28T03:14:14+00:00

I’ve read all System resource exceeded posts, but this is nothing like them. I’ve

  • 0

I’ve read all “System resource exceeded” posts, but this is nothing like them.
I’ve spend the last 3 hours searching for a solution.
I don’t have many connections / statements / resultsets and I always close all of them.
My code used to work but now I get the “System resource exceeded” exception, not during queries, but WHEN I TRY TO CONNECT.
I didn’t change a thing from my code, however it doesn’t work at the moment, except 1 out of 10 times I try it. I tried to change some things in it but no difference.
My Access files are 15 – 50 MB.
My code is:

private String accessFilePath;
private Connection myConnection;
public boolean connectToAccess(String myAccessFilePath) {
    accessFilePath = myAccessFilePath;
    //Get connection to database
    try {
        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
        // set properties for unicode
        Properties myProperties = new Properties();
        myProperties.put("charSet", "windows-1253");
        myConnection = DriverManager.getConnection("jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};DBQ=" + accessFilePath, myProperties); // I get the exception here
    } catch (Exception ex) {
        System.out.println("Failed to connect to " + accessFilePath + " database\n" + ex.getMessage());
        return false;
    }
    return true;
}

What is now different from other times? Do Access files keep previous connections open? What can be wrong here?

  • 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-05-28T03:14:14+00:00Added an answer on May 28, 2026 at 3:14 am

    OK, I found the solution.
    At first I started a new java project and copied the same codelines there.
    I successfully connected to my files every time I tried it in my new project.
    So it struck me. I looked at my VM settings.
    In my original program I ASSIGNED TOO MUCH MEMORY TO THE VIRTUAL MACHINE so there was no memory left even for a single connection to the files.

    My settings were –> VM Options: -Xmx1536m -Xms768m (a little bit excessive)

    I changed it to –> VM Options: -Xmx512m -Xms256m

    And it worked. Thank you for your comments.
    I hope this helps other people, because I spend many hours to find it.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have some data like this: 1 2 3 4 5 9 2 6
this is what i have right now Drawing an RSS feed into the php,
I would like to count the length of a string with PHP. The string
I've got a string that has curly quotes in it. I'd like to replace
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have a French site that I want to parse, but am running into
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I need to clean up various Word 'smart' characters in user input, including but

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.