Hi
I downloaded the snapshot today and ran my app. I have now an error in persist :


[12:04:04.657] {http--8000-8} mp_db_pool.1.3:exn-setString(java.sql.SQLException: Parameter index out of range (26 > number of parameters, which is 25).) java.lang.IllegalStateException: java.sql.SQLException: Parameter index out of range (26 > number of parameters, which is 25). at com.caucho.amber.manager.AmberConnection.persist(AmberConnection.java:218) at com.caucho.amber.manager.EntityManagerProxy.persist(EntityManagerProxy.java:67)
        at mppages.Subscribe.process(Subscribe.java:139)
        at mp.Publicaction.service(Publicaction.java:30)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:91)
at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:103) at com.caucho.server.cache.CacheFilterChain.doFilter(CacheFilterChain.java:164) at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:187) at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:266) at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:270)
        at com.caucho.server.port.TcpConnection.run(TcpConnection.java:678)
        at com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:721)
        at com.caucho.util.ThreadPool$Item.run(ThreadPool.java:643)
        at java.lang.Thread.run(Thread.java:613)

You'll find enclosed my entity bean. I run on macosx 10.4.11 java 1.5.0_13

Thanks

--
Très cordialement,

Riccardo Cohen
-------------------------------------------
Articque
http://www.articque.com
149 av Général de Gaulle
37230 Fondettes - France
tel : 02-47-49-90-49
fax : 02-47-49-91-49
package mpentities;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import mp.Globalaction;

@Entity
@Table(name="userinfo")
public class Userinfo implements Serializable
{
  private static final long serialVersionUID = 5095907815052473789L;
  
  @Id @Column(name="id") @GeneratedValue int id;
  @Basic @Column(name="fullname") String fullname;
  @Basic @Column(name="email") String email;
  @Basic @Column(name="telephone") String telephone;
  @Basic @Column(name="contactinfo") String contactinfo;
  @Basic @Column(name="address") String address;
  @Basic @Column(name="postcode") String postcode;
  @Basic @Column(name="state") String state;
  @Basic @Column(name="city") String city;
  @Basic @Column(name="id_country") String id_country;
  @Basic @Column(name="id_region") String id_region;
  @Basic @Column(name="latitude") double latitude;
  @Basic @Column(name="longitude") double longitude;
  @Basic @Column(name="mapzoom") int mapzoom;
  @Basic @Column(name="studytitle") String studytitle;
  @Basic @Column(name="studytext") String studytext;
  @Basic @Column(name="experttitle") String experttitle;
  @Basic @Column(name="experttext") String experttext;
  @Basic @Column(name="composerflag") boolean composerflag;
  @Basic @Column(name="playerflag") boolean playerflag;
  @Basic @Column(name="authorflag") boolean authorflag;
  @Basic @Column(name="studentflag") boolean studentflag;
  @Basic @Column(name="leisureflag") boolean leisureflag;
  @Basic @Column(name="semiproflag") boolean semiproflag;
  @Basic @Column(name="proflag") boolean proflag;
  @Basic @Column(name="practiceyears") int practiceyears;
  
  //ADL
  public void fillempty()
  {
    id=0;
    fullname="";
    email="";
    telephone="";
    contactinfo="";
    address="";
    postcode="";
    city="";
    state="";
    id_country="";
    id_region="";
    latitude=0;
    longitude=0;
    mapzoom=11;
    studytitle="";
    studytext="";
    experttitle="";
    experttext="";
    composerflag=false;
    playerflag=false;
    authorflag=false;
    studentflag=false;
    leisureflag=false;
    semiproflag=false;
    proflag=false;
    practiceyears=0;
  }
  
  //ADL
  public void copy_from_client(Userinfo user)
  {
    setFullname(user.getFullname());
    setEmail(user.getEmail());
    setTelephone(user.getTelephone());
    setContactinfo(user.getContactinfo());
    setAddress(user.getAddress());
    setPostcode(user.getPostcode());
    setCity(user.getCity());
    setState(user.getState());
    setId_country(user.getId_country());
    setId_region(user.getId_region());
    setLatitude(user.getLatitude());
    setLongitude(user.getLongitude());
    setMapzoom(user.getMapzoom());
    if (mapzoom==0)
      setMapzoom(11);
    setStudytitle(user.getStudytitle());
    setStudytext(user.getStudytext());
    setExperttitle(user.getExperttitle());
    setExperttext(user.getExperttext());
    setComposerflag(user.isComposerflag());
    setPlayerflag(user.isPlayerflag());
    setAuthorflag(user.isAuthorflag());
    setStudentflag(user.isStudentflag());
    setLeisureflag(user.isLeisureflag());
    setSemiproflag(user.isSemiproflag());
    setProflag(user.isProflag());
    setPracticeyears(user.getPracticeyears());
  }
  
  //ADL
  public String get_gm_Link(String curlang,String text)
  {
    StringBuffer ret=new StringBuffer();
    if (latitude>0 && longitude>0)
    {
      ret.append("<a href='http://maps.google.com/maps?f=q&hl=";);
      ret.append(curlang);
      ret.append("&geocode=&q=");
      ret.append(latitude);
      ret.append(",");
      ret.append(longitude);
      ret.append("&ie=UTF8&z=");
      ret.append(mapzoom);
      ret.append("&iwloc=addr&t=m' target='gm'>");
      ret.append(text);
      ret.append("</a>");
    }
    return(ret.toString());
  }
  
  //ADL
  public String get_musiciantable(HttpServletRequest req,HttpServletResponse 
res)
  {
    StringBuffer ret=new StringBuffer();
    ret.append("<table class='cattable' width='100%'><tr><td>");
    ret.append(playerflag?"<img src='/adl/img/check16.png'>":"&nbsp;");
    ret.append("</td><td");
    ret.append(playerflag?" class='cattablein'":" class='cattableout'");
    ret.append(">");
    ret.append(Globalaction._("usrhome_player",req,res));
    ret.append("</td></tr><tr><td>");
    ret.append(composerflag?"<img src='/adl/img/check16.png'>":"&nbsp;");
    ret.append("</td><td");
    ret.append(composerflag?" class='cattablein'":" class='cattableout'");
    ret.append(">");
    ret.append(Globalaction._("usrhome_composer",req,res));
    ret.append("</td></tr><tr><td>");
    ret.append(authorflag?"<img src='/adl/img/check16.png'>":"&nbsp;");
    ret.append("</td><td");
    ret.append(authorflag?" class='cattablein'":" class='cattableout'");
    ret.append(">");
    ret.append(Globalaction._("usrhome_author",req,res));
    ret.append("</td></tr></table>");
    return(ret.toString());
  }
  
  //ADL
  public String get_protable(HttpServletRequest req,HttpServletResponse res)
  {
    StringBuffer ret=new StringBuffer();
    ret.append("<table class='cattable' width='100%'><tr><td>");
    ret.append(studentflag?"<img src='/adl/img/check16.png'>":"&nbsp;");
    ret.append("</td><td");
    ret.append(studentflag?" class='cattablein'":" class='cattableout'");
    ret.append(">");
    ret.append(Globalaction._("usrhome_student",req,res));
    ret.append("</td></tr><tr><td>");
    ret.append(leisureflag?"<img src='/adl/img/check16.png'>":"&nbsp;");
    ret.append("</td><td");
    ret.append(leisureflag?" class='cattablein'":" class='cattableout'");
    ret.append(">");
    ret.append(Globalaction._("usrhome_leisure",req,res));
    ret.append("</td></tr><tr><td>");
    ret.append(semiproflag?"<img src='/adl/img/check16.png'>":"&nbsp;");
    ret.append("</td><td");
    ret.append(semiproflag?" class='cattablein'":" class='cattableout'");
    ret.append(">");
    ret.append(Globalaction._("usrhome_semipro",req,res));
    ret.append("</td></tr><tr><td>");
    ret.append(proflag?"<img src='/adl/img/check16.png'>":"&nbsp;");
    ret.append("</td><td");
    ret.append(proflag?" class='cattablein'":" class='cattableout'");
    ret.append(">");
    ret.append(Globalaction._("usrhome_pro",req,res));
    ret.append("</td></tr></table>");
    return(ret.toString());
  }
  
  public int getId()
  {
    return id;
  }
  public void setId(int id)
  {
    this.id = id;
  }
  public String getFullname()
  {
    return fullname;
  }
  public void setFullname(String fullname)
  {
    this.fullname = fullname;
  }
  public String getEmail()
  {
    return email;
  }
  public void setEmail(String email)
  {
    this.email = email;
  }
  public String getTelephone()
  {
    return telephone;
  }
  public void setTelephone(String telephone)
  {
    this.telephone = telephone;
  }
  public String getContactinfo()
  {
    return contactinfo;
  }
  public void setContactinfo(String contactinfo)
  {
    this.contactinfo = contactinfo;
  }
  public String getAddress()
  {
    return address;
  }
  public void setAddress(String address)
  {
    this.address = address;
  }
  public String getPostcode()
  {
    return postcode;
  }
  public void setPostcode(String postcode)
  {
    this.postcode = postcode;
  }
  public String getState()
  {
    return state;
  }
  public void setState(String state)
  {
    this.state = state;
  }
  public String getCity()
  {
    return city;
  }
  public void setCity(String city)
  {
    this.city = city;
  }
  public String getId_country()
  {
    return id_country;
  }
  public void setId_country(String id_country)
  {
    this.id_country = id_country;
  }
  public String getId_region()
  {
    return id_region;
  }
  public void setId_region(String id_region)
  {
    this.id_region = id_region;
  }
  public double getLatitude()
  {
    return latitude;
  }
  public void setLatitude(double latitude)
  {
    this.latitude = latitude;
  }
  public double getLongitude()
  {
    return longitude;
  }
  public void setLongitude(double longitude)
  {
    this.longitude = longitude;
  }
  public String getStudytitle()
  {
    return studytitle;
  }
  public void setStudytitle(String studytitle)
  {
    this.studytitle = studytitle;
  }
  public String getStudytext()
  {
    return studytext;
  }
  public void setStudytext(String studytext)
  {
    this.studytext = studytext;
  }
  public String getExperttitle()
  {
    return experttitle;
  }
  public void setExperttitle(String experttitle)
  {
    this.experttitle = experttitle;
  }
  public String getExperttext()
  {
    return experttext;
  }
  public void setExperttext(String experttext)
  {
    this.experttext = experttext;
  }
  public boolean isComposerflag()
  {
    return composerflag;
  }
  public void setComposerflag(boolean composerflag)
  {
    this.composerflag = composerflag;
  }
  public boolean isPlayerflag()
  {
    return playerflag;
  }
  public void setPlayerflag(boolean playerflag)
  {
    this.playerflag = playerflag;
  }
  public boolean isAuthorflag()
  {
    return authorflag;
  }
  public void setAuthorflag(boolean authorflag)
  {
    this.authorflag = authorflag;
  }
  public boolean isStudentflag()
  {
    return studentflag;
  }
  public void setStudentflag(boolean studentflag)
  {
    this.studentflag = studentflag;
  }
  public boolean isLeisureflag()
  {
    return leisureflag;
  }
  public void setLeisureflag(boolean leisureflag)
  {
    this.leisureflag = leisureflag;
  }
  public boolean isSemiproflag()
  {
    return semiproflag;
  }
  public void setSemiproflag(boolean semiproflag)
  {
    this.semiproflag = semiproflag;
  }
  public boolean isProflag()
  {
    return proflag;
  }
  public void setProflag(boolean proflag)
  {
    this.proflag = proflag;
  }
  public int getPracticeyears()
  {
    return practiceyears;
  }
  public void setPracticeyears(int practiceyears)
  {
    this.practiceyears = practiceyears;
  }

  public int getMapzoom()
  {
    return mapzoom;
  }

  public void setMapzoom(int mapzoom)
  {
    this.mapzoom = mapzoom;
  }
}
_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to