Win a copy of Head First Android this week in the Android forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

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: 67595
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
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic