views:

81

answers:

1

Hello, I am creating dependent drop downs using Struts2 jquery. The problem is that getLobList() method inside action class is causing hibernate to fetch all data for a lob. If I remove that getter method, those logs are not created. Why is this happening any way to fix it?

JSP page

<s:url id="remoteurl" action="getLists"/> 
<sj:select 
 href="%{remoteurl}" 
 id="lob" 
 onChangeTopics="reloadsecondlist" 
 name="lobId" 
 list="lobList"
 listKey="lobId"
 listValue="lobDescription"
 headerKey="-1" 
 headerValue="Please Select a Line of Business"
/>

Action Class

public class CreateRequest extends BaseAction {

 private List<Lob> lobList;
 private Integer lobId;

 public String execute() {
  lobList = services.getLobs();
  return SUCCESS;
 }

 public void setLobId(Integer lobId) {
  this.lobId = lobId;
 }
 /* PROBLEM */
 public List<Lob> getLobList() {
  return lobList;
 }

}

Lob.java

@Entity
@Table(name = "lob")
public class Lob implements java.io.Serializable {

 private Integer lobId;
 private String lobDescription;
 private List<Application> applications;

 public Lob() {
 }

 public Lob(String lobDescription) {
  this.lobDescription = lobDescription;
 }

 @Id
 @GeneratedValue(strategy = IDENTITY)
 @Column(name = "lob_id", unique = true, nullable = false)
 public Integer getLobId() {
  return this.lobId;
 }

 public void setLobId(Integer lobId) {
  this.lobId = lobId;
 }

 @Column(name = "lob_description", nullable = false, length = 100)
 public String getLobDescription() {
  return this.lobDescription;
 }

 public void setLobDescription(String lobDescription) {
  this.lobDescription = lobDescription;
 }

 @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "lob")
 public List<Application> getApplications() {
  return this.applications;
 }

 public void setApplications(List<Application> applications) {
  this.applications = applications;
 }
}

Application.java

@Entity
@Table(name = "application")
public class Application implements java.io.Serializable {

    private Integer applicationId;
    private Lob lob;
    private String applicationMnemonic;
    private String applicationName;
    private List<Cta> ctas;
    private List<Request> requests;
    private List<Environment> environments;

    public Application() {
    }

    public Application(Lob lob, String applicationMnemonic, String applicationName) {
        this.lob = lob;
        this.applicationMnemonic = applicationMnemonic;
        this.applicationName = applicationName;
    }

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "application_id", unique = true, nullable = false)
    public Integer getApplicationId() {
        return this.applicationId;
    }

    public void setApplicationId(Integer applicationId) {
        this.applicationId = applicationId;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "lob_id", nullable = false)
    public Lob getLob() {
        return this.lob;
    }

    public void setLob(Lob lob) {
        this.lob = lob;
    }

    @Column(name = "application_mnemonic", nullable = false, length = 10)
    public String getApplicationMnemonic() {
        return this.applicationMnemonic;
    }

    public void setApplicationMnemonic(String applicationMnemonic) {
        this.applicationMnemonic = applicationMnemonic;
    }

    @Column(name = "application_name", nullable = false, length = 100)
    public String getApplicationName() {
        return this.applicationName;
    }

    public void setApplicationName(String applicationName) {
        this.applicationName = applicationName;
    }

    @ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
    @JoinTable(name = "application_cta", catalog = "etech", joinColumns = {
        @JoinColumn(name = "application_id", nullable = false, updatable = false)}, inverseJoinColumns = {
        @JoinColumn(name = "cta_id", nullable = false, updatable = false)})
    public List<Cta> getCtas() {
        return this.ctas;
    }

    public void setCtas(List<Cta> ctas) {
        this.ctas = ctas;
    }

    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "application")
    public List<Request> getRequests() {
        return this.requests;
    }

    public void setRequests(List<Request> requests) {
        this.requests = requests;
    }

    @ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
    @JoinTable(name = "application_environment", catalog = "etech", joinColumns = {
        @JoinColumn(name = "application_id", nullable = false, updatable = false)}, inverseJoinColumns = {
        @JoinColumn(name = "environment_id", nullable = false, updatable = false)})
    public List<Environment> getEnvironments() {
        return this.environments;
    }

    public void setEnvironments(List<Environment> environments) {
        this.environments = environments;
    }
}

Server Log

2010-07-30 23:10:36,340 INFO  [STDOUT] (http-localhost%2F127.0.0.1-8080-1) Hibernate: select applicatio0_.lob_id as lob4_1_, applicatio0_.application_id as applicat1_1_, applicatio0_.application_id as applicat1_4_0_, applicatio0_.application_mnemonic as applicat2_4_0_, applicatio0_.application_name as applicat3_4_0_, applicatio0_.lob_id as lob4_4_0_ from etech.application applicatio0_ where applicatio0_.lob_id=?
2010-07-30 23:10:36,350 INFO  [STDOUT] (http-localhost%2F127.0.0.1-8080-1) Hibernate: select ctas0_.application_id as applicat1_1_, ctas0_.cta_id as cta2_1_, cta1_.cta_id as cta1_7_0_, cta1_.cta_description as cta2_7_0_ from etech.application_cta ctas0_ left outer join etech.cta cta1_ on ctas0_.cta_id=cta1_.cta_id where ctas0_.application_id=?
2010-07-30 23:10:36,351 INFO  [STDOUT] (http-localhost%2F127.0.0.1-8080-1) Hibernate: select environmen0_.application_id as applicat1_1_, environmen0_.environment_id as environm2_1_, environmen1_.environment_id as environm1_6_0_, environmen1_.environment_description as environm2_6_0_ from etech.application_environment environmen0_ left outer join etech.environment environmen1_ on environmen0_.environment_id=environmen1_.environment_id where environmen0_.application_id=?
2010-07-30 23:10:36,352 INFO  [STDOUT] (http-localhost%2F127.0.0.1-8080-1) Hibernate: select requests0_.application_id as applicat5_1_, requests0_.request_id as request1_1_, requests0_.request_id as request1_1_0_, requests0_.application_id as applicat5_1_0_, requests0_.cta_id as cta6_1_0_, requests0_.date_completed as date2_1_0_, requests0_.date_created as date3_1_0_, requests0_.assignee_employee_id as assignee7_1_0_, requests0_.assigner_emploee_id as assigner8_1_0_, requests0_.creator_employee_id as creator9_1_0_, requests0_.request_status as request10_1_0_, requests0_.statement_of_work as statement4_1_0_ from etech.request requests0_ where requests0_.application_id=?
2010-07-30 23:10:36,353 INFO  [STDOUT] (http-localhost%2F127.0.0.1-8080-1) Hibernate: select ctas0_.application_id as applicat1_1_, ctas0_.cta_id as cta2_1_, cta1_.cta_id as cta1_7_0_, cta1_.cta_description as cta2_7_0_ from etech.application_cta ctas0_ left outer join etech.cta cta1_ on ctas0_.cta_id=cta1_.cta_id where ctas0_.application_id=?
2010-07-30 23:10:36,354 INFO  [STDOUT] (http-localhost%2F127.0.0.1-8080-1) Hibernate: select environmen0_.application_id as applicat1_1_, environmen0_.environment_id as environm2_1_, environmen1_.environment_id as environm1_6_0_, environmen1_.environment_description as environm2_6_0_ from etech.application_environment environmen0_ left outer join etech.environment environmen1_ on environmen0_.environment_id=environmen1_.environment_id where environmen0_.application_id=?
2010-07-30 23:10:36,355 INFO  [STDOUT] (http-localhost%2F127.0.0.1-8080-1) Hibernate: select requests0_.application_id as applicat5_1_, requests0_.request_id as request1_1_, requests0_.request_id as request1_1_0_, requests0_.application_id as applicat5_1_0_, requests0_.cta_id as cta6_1_0_, requests0_.date_completed as date2_1_0_, requests0_.date_created as date3_1_0_, requests0_.assignee_employee_id as assignee7_1_0_, requests0_.assigner_emploee_id as assigner8_1_0_, requests0_.creator_employee_id as creator9_1_0_, requests0_.request_status as request10_1_0_, requests0_.statement_of_work as statement4_1_0_ from etech.request requests0_ where requests0_.application_id=?
2010-07-30 23:10:36,356 INFO  [STDOUT] (http-localhost%2F127.0.0.1-8080-1) Hibernate: select ctas0_.application_id as applicat1_1_, ctas0_.cta_id as cta2_1_, cta1_.cta_id as cta1_7_0_, cta1_.cta_description as cta2_7_0_ from etech.application_cta ctas0_ left outer join etech.cta cta1_ on ctas0_.cta_id=cta1_.cta_id where ctas0_.application_id=?
2010-07-30 23:10:36,356 INFO  [STDOUT] (http-localhost%2F127.0.0.1-8080-1) Hibernate: select environmen0_.application_id as applicat1_1_, environmen0_.environment_id as environm2_1_, environmen1_.environment_id as environm1_6_0_, environmen1_.environment_description as environm2_6_0_ from etech.application_environment environmen0_ left outer join etech.environment environmen1_ on environmen0_.environment_id=environmen1_.environment_id where environmen0_.application_id=?
2010-07-30 23:10:36,357 INFO  [STDOUT] (http-localhost%2F127.0.0.1-8080-1) Hibernate: select requests0_.application_id as applicat5_1_, requests0_.request_id as request1_1_, requests0_.request_id as request1_1_0_, requests0_.application_id as applicat5_1_0_, requests0_.cta_id as cta6_1_0_, requests0_.date_completed as date2_1_0_, requests0_.date_created as date3_1_0_, requests0_.assignee_employee_id as assignee7_1_0_, requests0_.assigner_emploee_id as assigner8_1_0_, requests0_.creator_employee_id as creator9_1_0_, requests0_.request_status as request10_1_0_, requests0_.statement_of_work as statement4_1_0_ from etech.request requests0_ where requests0_.application_id=?
2010-07-30 23:10:36,358 INFO  [STDOUT] (http-localhost%2F127.0.0.1-8080-1) Hibernate: select ctas0_.application_id as applicat1_1_, ctas0_.cta_id as cta2_1_, cta1_.cta_id as cta1_7_0_, cta1_.cta_description as cta2_7_0_ from etech.application_cta ctas0_ left outer join etech.cta cta1_ on ctas0_.cta_id=cta1_.cta_id where ctas0_.application_id=?
2010-07-30 23:10:36,359 INFO  [STDOUT] (http-localhost%2F127.0.0.1-8080-1) Hibernate: select environmen0_.application_id as applicat1_1_, environmen0_.environment_id as environm2_1_, environmen1_.environment_id as environm1_6_0_, environmen1_.environment_description as environm2_6_0_ from etech.application_environment environmen0_ left outer join etech.environment environmen1_ on environmen0_.environment_id=environmen1_.environment_id where environmen0_.application_id=?
2010-07-30 23:10:36,360 INFO  [STDOUT] (http-localhost%2F127.0.0.1-8080-1) Hibernate: select requests0_.application_id as applicat5_1_, requests0_.request_id as request1_1_, requests0_.request_id as request1_1_0_, requests0_.application_id as applicat5_1_0_, requests0_.cta_id as cta6_1_0_, requests0_.date_completed as date2_1_0_, requests0_.date_created as date3_1_0_, requests0_.assignee_employee_id as assignee7_1_0_, requests0_.assigner_emploee_id as assigner8_1_0_, requests0_.creator_employee_id as creator9_1_0_, requests0_.request_status as request10_1_0_, requests0_.statement_of_work as statement4_1_0_ from etech.request requests0_ where requests0_.application_id=?
2010-07-30 23:10:36,361 INFO  [STDOUT] (http-localhost%2F127.0.0.1-8080-1) Hibernate: select ctas0_.application_id as applicat1_1_, ctas0_.cta_id as cta2_1_, cta1_.cta_id as cta1_7_0_, cta1_.cta_description as cta2_7_0_ from etech.application_cta ctas0_ left outer join etech.cta cta1_ on ctas0_.cta_id=cta1_.cta_id where ctas0_.application_id=?
2010-07-30 23:10:36,361 INFO  [STDOUT] (http-localhost%2F127.0.0.1-8080-1) Hibernate: select environmen0_.application_id as applicat1_1_, environmen0_.environment_id as environm2_1_, environmen1_.environment_id as environm1_6_0_, environmen1_.environment_description as environm2_6_0_ from etech.application_environment environmen0_ left outer join etech.environment environmen1_ on environmen0_.environment_id=environmen1_.environment_id where environmen0_.application_id=?
2010-07-30 23:10:36,362 INFO  [STDOUT] (http-localhost%2F127.0.0.1-8080-1) Hibernate: select requests0_.application_id as applicat5_1_, requests0_.request_id as request1_1_, requests0_.request_id as request1_1_0_, requests0_.application_id as applicat5_1_0_, requests0_.cta_id as cta6_1_0_, requests0_.date_completed as date2_1_0_, requests0_.date_created as date3_1_0_, requests0_.assignee_employee_id as assignee7_1_0_, requests0_.assigner_emploee_id as assigner8_1_0_, requests0_.creator_employee_id as creator9_1_0_, requests0_.request_status as request10_1_0_, requests0_.statement_of_work as statement4_1_0_ from etech.request requests0_ where requests0_.application_id=?
2010-07-30 23:10:36,363 INFO  [STDOUT] (http-localhost%2F127.0.0.1-8080-1) Hibernate: select ctas0_.application_id as applicat1_1_, ctas0_.cta_id as cta2_1_, cta1_.cta_id as cta1_7_0_, cta1_.cta_description as cta2_7_0_ from etech.application_cta ctas0_ left outer join etech.cta cta1_ on ctas0_.cta_id=cta1_.cta_id where ctas0_.application_id=?
2010-07-30 23:10:36,363 INFO  [STDOUT] (http-localhost%2F127.0.0.1-8080-1) Hibernate: select environmen0_.application_id as applicat1_1_, environmen0_.environment_id as environm2_1_, environmen1_.environment_id as environm1_6_0_, environmen1_.environment_description as environm2_6_0_ from etech.application_environment environmen0_ left outer join etech.environment environmen1_ on environmen0_.environment_id=environmen1_.environment_id where environmen0_.application_id=?
2010-07-30 23:10:36,364 INFO  [STDOUT] (http-localhost%2F127.0.0.1-8080-1) Hibernate: select requests0_.application_id as applicat5_1_, requests0_.request_id as request1_1_, requests0_.request_id as request1_1_0_, requests0_.application_id as applicat5_1_0_, requests0_.cta_id as cta6_1_0_, requests0_.date_completed as date2_1_0_, requests0_.date_created as date3_1_0_, requests0_.assignee_employee_id as assignee7_1_0_, requests0_.assigner_emploee_id as assigner8_1_0_, requests0_.creator_employee_id as creator9_1_0_, requests0_.request_status as request10_1_0_, requests0_.statement_of_work as statement4_1_0_ from etech.request requests0_ where requests0_.application_id=?
2010-07-30 23:10:36,364 INFO  [STDOUT] (http-localhost%2F127.0.0.1-8080-1) Hibernate: select ctas0_.application_id as applicat1_1_, ctas0_.cta_id as cta2_1_, cta1_.cta_id as cta1_7_0_, cta1_.cta_description as cta2_7_0_ from etech.application_cta ctas0_ left outer join etech.cta cta1_ on ctas0_.cta_id=cta1_.cta_id where ctas0_.application_id=?
2010-07-30 23:10:36,365 INFO  [STDOUT] (http-localhost%2F127.0.0.1-8080-1) Hibernate: select environmen0_.application_id as applicat1_1_, environmen0_.environment_id as environm2_1_, environmen1_.environment_id as environm1_6_0_, environmen1_.environment_description as environm2_6_0_ from etech.application_environment environmen0_ left outer join etech.environment environmen1_ on environmen0_.environment_id=environmen1_.environment_id where environmen0_.application_id=?
2010-07-30 23:10:36,365 INFO  [STDOUT] (http-localhost%2F127.0.0.1-8080-1) Hibernate: select requests0_.application_id as applicat5_1_, requests0_.request_id as request1_1_, requests0_.request_id as request1_1_0_, requests0_.application_id as applicat5_1_0_, requests0_.cta_id as cta6_1_0_, requests0_.date_completed as date2_1_0_, requests0_.date_created as date3_1_0_, requests0_.assignee_employee_id as assignee7_1_0_, requests0_.assigner_emploee_id as assigner8_1_0_, requests0_.creator_employee_id as creator9_1_0_, requests0_.request_status as request10_1_0_, requests0_.statement_of_work as statement4_1_0_ from etech.request requests0_ where requests0_.application_id=?
2010-07-30 23:10:36,366 INFO  [STDOUT] (http-localhost%2F127.0.0.1-8080-1) Hibernate: select ctas0_.application_id as applicat1_1_, ctas0_.cta_id as cta2_1_, cta1_.cta_id as cta1_7_0_, cta1_.cta_description as cta2_7_0_ from etech.application_cta ctas0_ left outer join etech.cta cta1_ on ctas0_.cta_id=cta1_.cta_id where ctas0_.application_id=?
2010-07-30 23:10:36,366 INFO  [STDOUT] (http-localhost%2F127.0.0.1-8080-1) Hibernate: select environmen0_.application_id as applicat1_1_, environmen0_.environment_id as environm2_1_, environmen1_.environment_id as environm1_6_0_, environmen1_.environment_description as environm2_6_0_ from etech.application_environment environmen0_ left outer join etech.environment environmen1_ on environmen0_.environment_id=environmen1_.environment_id where environmen0_.application_id=?
2010-07-30 23:10:36,367 INFO  [STDOUT] (http-localhost%2F127.0.0.1-8080-1) Hibernate: select requests0_.application_id as applicat5_1_, requests0_.request_id as request1_1_, requests0_.request_id as request1_1_0_, requests0_.application_id as applicat5_1_0_, requests0_.cta_id as cta6_1_0_, requests0_.date_completed as date2_1_0_, requests0_.date_created as date3_1_0_, requests0_.assignee_employee_id as assignee7_1_0_, requests0_.assigner_emploee_id as assigner8_1_0_, requests0_.creator_employee_id as creator9_1_0_, requests0_.request_status as request10_1_0_, requests0_.statement_of_work as statement4_1_0_ from etech.request requests0_ where requests0_.application_id=?
2010-07-30 23:10:36,367 INFO  [STDOUT] (http-localhost%2F127.0.0.1-8080-1) Hibernate: select ctas0_.application_id as applicat1_1_, ctas0_.cta_id as cta2_1_, cta1_.cta_id as cta1_7_0_, cta1_.cta_description as cta2_7_0_ from etech.application_cta ctas0_ left outer join etech.cta cta1_ on ctas0_.cta_id=cta1_.cta_id where ctas0_.application_id=?
2010-07-30 23:10:36,368 INFO  [STDOUT] (http-localhost%2F127.0.0.1-8080-1) Hibernate: select environmen0_.application_id as applicat1_1_, environmen0_.environment_id as environm2_1_, environmen1_.environment_id as environm1_6_0_, environmen1_.environment_description as environm2_6_0_ from etech.application_environment environmen0_ left outer join etech.environment environmen1_ on environmen0_.environment_id=environmen1_.environment_id where environmen0_.application_id=?
2010-07-30 23:10:36,368 INFO  [STDOUT] (http-localhost%2F127.0.0.1-8080-1) Hibernate: select requests0_.application_id as applicat5_1_, requests0_.request_id as request1_1_, requests0_.request_id as request1_1_0_, requests0_.application_id as applicat5_1_0_, requests0_.cta_id as cta6_1_0_, requests0_.date_completed as date2_1_0_, requests0_.date_created as date3_1_0_, requests0_.assignee_employee_id as assignee7_1_0_, requests0_.assigner_emploee_id as assigner8_1_0_, requests0_.creator_employee_id as creator9_1_0_, requests0_.request_status as request10_1_0_, requests0_.statement_of_work as statement4_1_0_ from etech.request requests0_ where requests0_.application_id=?
2010-07-30 23:10:36,369 INFO  [STDOUT] (http-localhost%2F127.0.0.1-8080-1) Hibernate: select ctas0_.application_id as applicat1_1_, ctas0_.cta_id as cta2_1_, cta1_.cta_id as cta1_7_0_, cta1_.cta_description as cta2_7_0_ from etech.application_cta ctas0_ left outer join etech.cta cta1_ on ctas0_.cta_id=cta1_.cta_id where ctas0_.application_id=?
2010-07-30 23:10:36,369 INFO  [STDOUT] (http-localhost%2F127.0.0.1-8080-1) Hibernate: select environmen0_.application_id as applicat1_1_, environmen0_.environment_id as environm2_1_, environmen1_.environment_id as environm1_6_0_, environmen1_.environment_description as environm2_6_0_ from etech.application_environment environmen0_ left outer join etech.environment environmen1_ on environmen0_.environment_id=environmen1_.environment_id where environmen0_.application_id=?
2010-07-30 23:10:36,370 INFO  [STDOUT] (http-localhost%2F127.0.0.1-8080-1) Hibernate: select requests0_.application_id as applicat5_1_, requests0_.request_id as request1_1_, requests0_.request_id as request1_1_0_, requests0_.application_id as applicat5_1_0_, requests0_.cta_id as cta6_1_0_, requests0_.date_completed as date2_1_0_, requests0_.date_created as date3_1_0_, requests0_.assignee_employee_id as assignee7_1_0_, requests0_.assigner_emploee_id as assigner8_1_0_, requests0_.creator_employee_id as creator9_1_0_, requests0_.request_status as request10_1_0_, requests0_.statement_of_work as statement4_1_0_ from etech.request requests0_ where requests0_.application_id=?
2010-07-30 23:10:36,370 INFO  [STDOUT] (http-localhost%2F127.0.0.1-8080-1) Hibernate: select applicatio0_.lob_id as lob4_1_, applicatio0_.application_id as applicat1_1_, applicatio0_.application_id as applicat1_4_0_, applicatio0_.application_mnemonic as applicat2_4_0_, applicatio0_.application_name as applicat3_4_0_, applicatio0_.lob_id as lob4_4_0_ from etech.application applicatio0_ where applicatio0_.lob_id=?
2010-07-30 23:10:36,371 INFO  [STDOUT] (http-localhost%2F127.0.0.1-8080-1) Hibernate: select applicatio0_.lob_id as lob4_1_, applicatio0_.application_id as applicat1_1_, applicatio0_.application_id as applicat1_4_0_, applicatio0_.application_mnemonic as applicat2_4_0_, applicatio0_.application_name as applicat3_4_0_, applicatio0_.lob_id as lob4_4_0_ from etech.application applicatio0_ where applicatio0_.lob_id=?
2010-07-30 23:10:36,371 INFO  [STDOUT] (http-localhost%2F127.0.0.1-8080-1) Hibernate: select applicatio0_.lob_id as lob4_1_, applicatio0_.application_id as applicat1_1_, applicatio0_.application_id as applicat1_4_0_, applicatio0_.application_mnemonic as applicat2_4_0_, applicatio0_.application_name as applicat3_4_0_, applicatio0_.lob_id as lob4_4_0_ from etech.application applicatio0_ where applicatio0_.lob_id=?
2010-07-30 23:10:36,372 INFO  [STDOUT] (http-localhost%2F127.0.0.1-8080-1) Hibernate: select applicatio0_.lob_id as lob4_1_, applicatio0_.application_id as applicat1_1_, applicatio0_.application_id as applicat1_4_0_, applicatio0_.application_mnemonic as applicat2_4_0_, applicatio0_.application_name as applicat3_4_0_, applicatio0_.lob_id as lob4_4_0_ from etech.application applicatio0_ where applicatio0_.lob_id=?
2010-07-30 23:10:36,374 INFO  [STDOUT] (http-localhost%2F127.0.0.1-8080-1) Hibernate: select applicatio0_.lob_id as lob4_1_, applicatio0_.application_id as applicat1_1_, applicatio0_.application_id as applicat1_4_0_, applicatio0_.application_mnemonic as applicat2_4_0_, applicatio0_.application_name as applicat3_4_0_, applicatio0_.lob_id as lob4_4_0_ from etech.application applicatio0_ where applicatio0_.lob_id=?
2010-07-30 23:10:36,374 INFO  [STDOUT] (http-localhost%2F127.0.0.1-8080-1) Hibernate: select applicatio0_.lob_id as lob4_1_, applicatio0_.application_id as applicat1_1_, applicatio0_.application_id as applicat1_4_0_, applicatio0_.application_mnemonic as applicat2_4_0_, applicatio0_.application_name as applicat3_4_0_, applicatio0_.lob_id as lob4_4_0_ from etech.application applicatio0_ where applicatio0_.lob_id=?
2010-07-30 23:10:36,375 INFO  [STDOUT] (http-localhost%2F127.0.0.1-8080-1) Hibernate: select applicatio0_.lob_id as lob4_1_, applicatio0_.application_id as applicat1_1_, applicatio0_.application_id as applicat1_4_0_, applicatio0_.application_mnemonic as applicat2_4_0_, applicatio0_.application_name as applicat3_4_0_, applicatio0_.lob_id as lob4_4_0_ from etech.application applicatio0_ where applicatio0_.lob_id=?
+1  A: 

I've encountered the same issue.

This happens because the JSON plugin, responsible for the creation of your JSON result, tries to serialize the entire object, with all its relationships.

To prevent this, I suggest you create a wrapper for your data (that is, you create a LobJSONWrapper class containing ONLY the key and the value you want to use), and return a list of wrapper instances instead of Lob instances.

You can also prevent the JSON plugin from serializing a field: See "excluding properties" here

Samuel_xL
Thanks a lot, Samuel!
Nishant
You're welcome :)
Samuel_xL