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

  • Home
  • SEARCH
  • 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 8456075
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:27:13+00:00 2026-06-10T12:27:13+00:00

the full error line from my example is [PersistenceException: org.h2.jdbc.JdbcSQLException: Parameter #1 is not

  • 0

the full error line from my example is “[PersistenceException: org.h2.jdbc.JdbcSQLException: Parameter “#1″ is not set; SQL statement: delete from class4 where (class3_id) in (?) [90012-158]]”

this was occurring in my unit tests, so decided to create a test project to try and reproduce it and it did.

basically I have classes 1-4 each one related with a onetomany i attempt to create them and then delete them in the order 1,2,3,4 4,3,2,1 but I get this error.

the classes are all the same apart from the numbers (and the last class not having a list

@Entity
public class Class1 extends Model{

/**
 * 
 */
private static final long serialVersionUID = 4322329984247299024L;

@Id
@GeneratedValue
public Long id;



@OneToMany(mappedBy="class1",cascade={CascadeType.PERSIST, CascadeType.ALL})
private List<Class2> class2s = new ArrayList<Class2>();

public Class2 add()
{
    Class2 class2 = new Class2(this);
    Class2.create(class2);
    return class2;
}


@play.db.ebean.Transactional 
public static void create(Class1 class1) {
    class1.save();
    }



  @play.db.ebean.Transactional 
 public static void delete(Class1 class1) {
      class1.delete();
    }
}

and my application code which causes the error runs as follows

      Class1 class1 = new Class1();
  Class1.create(class1);
  Class2 class2 = class1.add();
  class1.add();

  Class2.delete(class2);
  Class1.delete(class1);

I have also attached a sample application showing it happening, I would be most greatful if someone could point out what I have done wrong, or if it is a bug with the API if anyone knows how I could work around it.

http://stowelly.co.uk/play-2.0.3-persistence-test.zip

thank you

  • 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-10T12:27:14+00:00Added an answer on June 10, 2026 at 12:27 pm

    Seems this is a bug in Ebean

    http://www.avaje.org/bugdetail-420.html

    anyway, a temporary workaround while this is beign addressed is the following code in each of the classes delete functions

     @play.db.ebean.Transactional 
         public static void delete(Class2 class2)
      {  
         List<Class3> list = class2.getClass3s();
         for(int i = 0; i < list.size(); ++i)
         {
           Class3.delete(list.get(i));
         }  
         list.clear();
         class2.getClass1().getClass2s().remove(class2);
         class2.delete();
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm attempting to print a bitmap from an Espon receipt printer. The full error
you can view full source code here dpaste.com/hold/167199 Error: delete() takes exactly 2 arguments
How do I sort out (distinguish) an error derived from a disk full condition
I am getting the below error for line 8. Learning from ch.11/12 of the
Full error message: You have an error in your SQL syntax; check the manual
The full error I'm getting is this: error: ambiguous overload for ‘operator[]’ in ‘a[boost::_bi::storage4<A1,
This is the full error report that is generated when tried to compile my
See the full error here: http://notesapp.heroku.com/ I'm using DataMapper and dm-validations 0.10.2. No matter
Seems like cuke doesn't show the full error message (at least when problem occurs
okay, the full error is 06-19 01:07:57.421: E/AndroidRuntime(4478): java.lang.RuntimeException: Error receiving broadcast Intent {

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.