简体   繁体   中英

Error when getting JPA Entity in JSF bean via EJB SessionBean in GlassFish3.1

I got this exception:

java.rmi.RemoteException: CORBA BAD_OPERATION 1330446343 No; nested exception is: org.omg.CORBA.BAD_OPERATION: WARNING: IOP01210007: Expected typecode kind to be one of [value, valueBox, abstractInterface] but got typecode kind null vmcid: OMG minor code: 7 completed: No

when I'm trying call ejb method in jsf client (backing bean) to get list of Samples List<Sample> l = ejbBean.getSamples();

Here is my JPA Entity:

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
public class Sample implements Serializable {

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

    public Sample() {

    }

    @Id
    @GeneratedValue
    private Long id;
    @Temporal(TemporalType.TIMESTAMP)
    private Date date;
    private String title;
    private String description;
    private String type;


    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public Date getDate() {
        return date;
    }
    public void setDate(Date date) {
        this.date = date;
    }
    public String getTitle() {
        return title;
    }
    public void setTitle(String title) {
        this.title = title;
    }
    public String getDescription() {
        return description;
    }
    public void setDescription(String description) {
        this.description = description;
    }
    public String getType() {
        return type;
    }
    public void setType(String type) {
        this.type = type;
    }

}

Standalone client works good with the same session bean, and also when I change JPA Entity to plain java class without any annotations calling ejb from jsf works well.

It works well if it is in one EAR. I had this in seperate ejb project and dynamic web project in eclipse and on glassfish server.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM