• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Axis2 - Hibernate problem: cannot handle large pojo

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am building a webservice in eclipse using Axis2-1.4. the webservice works fine if the POJO is at a certain number of fields, but if i increase
the number of fields in my POJO, it kills my eclipse while i am testing and running my webservice in Eclipse.
I tried my webservice with 40 fields in my POJO , the webservice works perfectly excellent but when i increased the
number of fields in my POJO to 95 then my webservice kills the eclipse. There fore even when I generate the client and call the client it gives
java Memory heap error. As we know the webserrvice only use Array and cannot handle List, there for I convert the ArrayList returned
by the hibernate to an array before sending it back to webservice. The following is the code


========== Hibernate DAO code called by the web service ============================
public PositionView[] getPositionList() throws DataAccessException {

HibernateUtil util = new HibernateUtil();
Session session = util.getSessionFactory().getCurrentSession();
session.beginTransaction();
ArrayList<PositionView> resultList = (ArrayList<PositionView>) session.createQuery("from PositionView").list();
PositionView[] dataArray = (PositionView[]) resultList.toArray(new PositionView[resultList.size()]);

session.getTransaction().commit();
return dataArray;

}

========================= the following code is the webservice getting data from the DAO ================

public PositionView[] getData() {

private PositionView[] dataArray;

RiskDao rd = new RiskDAOImpl();
dataArray = rd.getPositionList();
return dataArray;
}
===================================================================================


Please help me this is an urgent requirement. client need a Large POJOwith 100 fields to be passed from the webservice
but for some reason axis2-eclipse cannot handle large POJO and gives a Java Memory Heap Error and kills the Ecliipse while
testing and running the webservice in eclipse....... I tried every thing increasing heap size in Tomcat but nothing seems to help.

 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please void posting in uppercase; read this for more information.

I have removed the all-uppercase from your subject.
 
Syed Ali
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
please help me with the above problem , is very urgent production issue...... thanks
 
reply
    Bookmark Topic Watch Topic
  • New Topic