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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:49:53+00:00 2026-05-15T23:49:53+00:00

I am just getting started with Spring (MVC,Webflow etc etc) and I am trying

  • 0

I am just getting started with Spring (MVC,Webflow etc etc) and I am trying to write my own small web application. As a database I am using Apache Derby which I set up though the Eclipse Database Developer plug-ins.

Now my problem: Everytime I fire queries through the JDBCTemplate I get an “Invalid cursor state” exception at runtime. These are queries that work when they are manually tested (aka ask the database through the SQL Scrapbook.

This is my simplest DAO method:

public List<Player> getAllPlayers() {
    JdbcTemplate select = new JdbcTemplate(dataSource);
    List<Player> result = select.query(
                        "SELECT ID , Name , TeamID " +
                        "FROM PLAYERS " , new PlayerExtractor());
    return result;
}

And this is the corresponging ResultSetExtractor:

@Override
public Object extractData(ResultSet rs) throws SQLException,
        DataAccessException {

    Player player = new Player();
    player.setId(Integer.valueOf(rs.getString(1)));
    player.setName(rs.getString(2));
    TeamDAO t_dao = new TeamDAOImpl();
    Team team = t_dao.getTeamByKey( Integer.valueOf(rs.getString(3)) );
    player.setTeam(team);

    return player;
}

As soon as rs.getString(1) the “invalid cursor state”. What is the problem? I have a feeling that it is a configuration problem..

Here is my JDBC configuration in my ApplicationContext:

<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="org.apache.derby.jdbc.Driver169"/>
<property name="url" value="jdbc:derby:C:\Dokumente und Einstellungen\araptarc\MyDB"/>
<property name="username" value="APP"/>
<property name="password" value="test"/>

Any ideas?

Thanks!

  • 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-15T23:49:54+00:00Added an answer on May 15, 2026 at 11:49 pm

    I see you specified value=”org.apache.derby.jdbc.Driver169″. Are you trying to run in a J2ME configuration? Can you set up a test where you run your application using an embedded Derby configuration with a full JDK, and see if your program works correctly in that case?

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

Sidebar

Related Questions

i am just getting started with ASP.NET MVC and i'm using NHibernate for my
I'm using Spring MVC and SimpleJdbcInsert to insert objects into a MySQL database. I'd
Just started working with .NET and MVC(1). I'm having a problem wherein in my
I'm using Hibernate for a Java-based Web Application and want to add full-text search
Just getting started with jQuery, and I've had some success so far. I've created
I im developing a web application, its a servlet which basically acts as a
I am having a really hard time reconciling IoC, interfaces, and events. Let's see
I'm fairly new to programming and new to java, but I'd like to jump
Has anyone seen JavaMail not sending proper MimeMessages to an SMTP server, depending on

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.