Hi
I'm trying to port my application from 3.0.18 to 3.0.21. My app uses ejb 3.0
I found a lot to do : new xml file to add for persistency, change manager.find() syntax, change ejb class syntax, change the way the ejb manager is created.
But all is done now. The application compiles fine.

I have a little test application with 4 ejb beans. 3 of them are compiled correctly, but the third has the following error at first connexion :

[15:33:41.411] Amber enhancing class appli_test2.ejb_connection [15:33:42.092] Amber enhancing class appli_test2.ejb_detail [15:33:42.492] Amber enhancing class appli_test2.ejb_data [15:33:43.183] com.caucho.amber.AmberRuntimeException: 'appli_test2.ejb_user' with classloader EnvironmentClassLoader$7056873[web-app:http://localhost:80] is an illegal instance class

Then when I continue to use the application, I reach a "find" call, and I have 
more details :

com.caucho.ejb.EJBExceptionWrapper: com.caucho.amber.AmberException: com.caucho.config.ConfigException: com.caucho.amber.AmberRuntimeException: 'appli_test2.ejb_user' with classloader EnvironmentClassLoader$10044878[web-app:http://localhost:80] is an illegal instance class at com.caucho.amber.manager.AmberConnection.find(AmberConnection.java:232) at com.caucho.amber.manager.EntityManagerProxy.find(EntityManagerProxy.java:101) at appli_test2.applitest2_action.load_user(applitest2_action.java:123)


There is very few difference between this class and the others. Mainly the id is not int autogenerated, but string instead.

I removed all "work" folder to force recompile, removed all ".class" to force recompile etc. but I have always the same error. You'll find enclosed ejb_connection that works, and ejb_user that does not work

does anyone has this problem ? (ps I run outside of eclipse)
Thanks for any info.


--
Très cordialement,

Riccardo Cohen
ligne directe : 02-47-49-63-24
-------------------------------------------
Articque
http://www.articque.com
Moulin des Roches
37230 Fondettes - France
tel : 02-47-49-90-49
fax : 02-47-49-91-49
//|
//| Copyright (C) Articque Informatique
//| All rights reserved. Duplication and distribution prohibited.
//| Les Roches, 37230 Fondettes France
//| Telephone +33 02.47.49.90.49
//| Fax +33 02.47.49.91.49
//| E-Mail: [EMAIL PROTECTED]
//|

package appli_test2;

import javax.persistence.*;
import java.util.*;
import java.sql.Time;

@Entity
@Table(name="connections")
public class ejb_connection
{
  private @Id @Column(name="id") @GeneratedValue int id;
  private @Basic @Column(name="session_id") String session_id;
  private @Basic @Column(name="date") Date date;
  private @Basic @Column(name="time") Time time;
  private @Basic @Column(name="ip_address") String ip_address;
  private @Basic @Column(name="lang") String lang;
  public Date getDate()
  {
    return date;
  }
  public void setDate(Date date)
  {
    this.date = date;
  }
  public int getId()
  {
    return id;
  }
  public void setId(int id)
  {
    this.id = id;
  }
  public String getIp_address()
  {
    return ip_address;
  }
  public void setIp_address(String ip_address)
  {
    this.ip_address = ip_address;
  }
  public String getLang()
  {
    return lang;
  }
  public void setLang(String lang)
  {
    this.lang = lang;
  }
  public String getSession_id()
  {
    return session_id;
  }
  public void setSession_id(String session_id)
  {
    this.session_id = session_id;
  }
  public Time getTime()
  {
    return time;
  }
  public void setTime(Time time)
  {
    this.time = time;
  }
}
//|
//| Copyright (C) Articque Informatique
//| All rights reserved. Duplication and distribution prohibited.
//| Les Roches, 37230 Fondettes France
//| Telephone +33 02.47.49.90.49
//| Fax +33 02.47.49.91.49
//| E-Mail: [EMAIL PROTECTED]
//|

package appli_test2;

import javax.persistence.*;

@Entity
@Table(name="jsp_users")
public class ejb_user
{
  private @Id @Column(name="login")  String login;
  private @Basic @Column(name="firstname") String firstname;
  private @Basic @Column(name="name") String name;
  private @Basic @Column(name="password") String password;
  public String getFirstname()
  {
    return firstname;
  }
  public void setFirstname(String firstname)
  {
    this.firstname = firstname;
  }
  public String getLogin()
  {
    return login;
  }
  public void setLogin(String login)
  {
    this.login = login;
  }
  public String getName()
  {
    return name;
  }
  public void setName(String name)
  {
    this.name = name;
  }
  public String getPassword()
  {
    return password;
  }
  public void setPassword(String password)
  {
    this.password = password;
  }
}
_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to