We have a stateless session bean running in WAS 3.5.6 server and we are running into a problem. The problem is as follows First the App server JVM is throwing OutofMemoryError from the EJB container and later on when ever we try to call Home.create() EJB Container is throwing the NullPonterException from the EJS implementation of the home interface and WebContainer is never throwing the OutOfmemoryError. We have the ejb min pool as 10 and max pool as 20. How the memory allocation gets allocated between WebContainer and EJBContainer in WAS 3.5 server? Please help me to understand why the WAS 3.5 EJB container is throwing these NullPointerExceptions?
The containers share the same memory space. They don't "allocate" it between the two at all (it's not divided up). If you're getting an out-of-memory error in your JVM you are hosed, period. You need to find out why your memory leak (the most likely problem) is occurring and fix that. You may want to start the JVM for WebSphere using verbose garbage collection in order to gain some insight into why this is happening. The results should enlighten you. After that you may want to use JProbe or another memory profiling tool to discover what is causing the memory leak. Kyle
I hope I am not overstepping here, but when I think of profiling I tend to think of the JVMPI (Java Virtual Machine Profiling Interface), which is at this time a de facto standard (if you will), from Sun, and is used for profiling in the current tooling available from IBM. I would suspect that your organization is considering migration strategies which might be headed in the direction of WebSphere Application Server version 5.x. If this is the case then the good news is the awesome tool-to-tool integration available between the WebSphere Studio family of products and the more current versions of WebSphere Application Server. You may stil be using VisualAge for Java, but do not despair. When you are able, in the not too distant future, to move on to the new and improved IDE's available from IBM, you will find that you have a single souce for tooling that is better integrated than those of the past. My 2 cents. [ November 12, 2003: Message edited by: Howard Kushner ]
Howard Kushner<br />IBM Certified Enterprise Developer - WebSphere Studio Application Developer V5.0<br />IBM Certified Advanced System Administrator - WebSphere Application Server V5.0<br />IBM Certified Solution Developer - Web Services with WebSphere Studio V5.1<br /><a href="http://www.amazon.com/exec/obidos/tg/detail/-/1931182108/" target="_blank" rel="nofollow">Developing J2EE Applications with WebSphere Studio</a> my Certification Study Guide for IBM Test 287
posted 16 years ago
Thank you Kyle. Even though WAS3.5 server has both EJBcontainer and WebContainer in one JVM . The reason why I was looking separate memory allocation between EJBContainer and WebContainer, somany times I got this outofmemory error ( more than 30 times ) interestingly all the time I'm getting the error from EJBContainer and not from WebContainer. And do you know why the EJBContainer is throwing NULLPointerException after getting the OutOfMemoryError? and interestingly once we receive the NullpointerException there are no more OutofMemoryErrors! and ultimately we have to restart the clone to get rid of this NullPointerException and OutofMemoryError I'm working on enabling the verbose garbage collection.
posted 16 years ago
The OutOfMemory error is the problem. The Null pointer exception is red herring. Don't worry about it -- it's a symptom, not the root problem. The problem is that you've run out of memory, and that it happens to be during something that is happening in the EJB container. So, are you using Stateful session beans? How about singletons used by EJB's? Are you using a lot (hundreds) of Entity Beans? A bug in code of these types could lead to out of memory errors while running EJB's. Kyle
Yes, I understand that "The OutOfMemory error is the root problem ". What I'm not able to understand is 1) Why only EJB container is throwing OutofMemoryError ( OME ) 2) Why the NullpointerException is coming, If JVM is ran out of memory then it will not have memory to create any object ( including NullPointerException object ) I have singletons (Double-checked locking ) used by EJB's, How this could lead to OME? 2 Stateless Session beans No entity beans ( thank god ) Thank you Kyle for your reply Regards, VN