1 Reply Latest reply on Apr 29, 2005 8:42 AM by mrrcave

    Probelm with the default instance of JBoss 4

    sanjuthomas Newbie

      Hi all,

      I have a typical problem with the JBoss 4 default instance. My application is running perfect in the JBoss 4 standard instance. But when I run the application in the J2EE certified instance my application is misbehaving.

      The piece of code that is not working in the default instance. ( This code is perfectly running in the standard instance)

      public Vector getCurrentItems( String sort_field, int start, int count, HashMap props )
      Vector questions = new Vector();
      Question item = null;
      try {
      Enumeration enum = qHome.findBySortedTopicAndPersonalityAndStatus( topic, personality, expert, sort_field, start, count, props );

      while( enum.hasMoreElements() ) {
      item = (Question)enum.nextElement();
      questions.add( item.getModel() );
      catch( Exception e ) {
      Log.log( "There was a problem getting questions", e );
      questions = new Vector();
      return questions;

      Code description

      You must have understood what the code is doing, for more clarity Question is a Bean( Component interface). Here I am getting a collection of Question object from the find method , then trying iterate through it, up to that point its working, when I call a method in the Bean that is item.getModel(), it is throwing this exception.

      19:48:35,375 INFO [STDOUT] Fri Apr 08 19:48:35 GMT+05:30 2005> There was a prob
      lem getting questions
      19:48:35,375 INFO [STDOUT] java.lang.reflect.UndeclaredThrowableException
      19:48:35,375 INFO [STDOUT] at $Proxy464.getModel(Unknown Source)
      19:48:35,375 INFO [STDOUT] at com.askit.knowledge.management.inbox.InboxImp
      19:48:35,375 INFO [STDOUT] at com.askit.web.beans.QuestionListBean.makeInbo
      19:48:35,375 INFO [STDOUT] at com.askit.web.beans.QuestionListBean.setPerso
      19:48:35,375 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(
      Native Method)
      19:48:35,375 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(N
      19:48:35,375 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invo
      19:48:35,375 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:3
      19:48:35,375 INFO [STDOUT] at org.apache.jasper.runtime.JspRuntimeLibrary.h
      19:48:35,375 INFO [STDOUT] at org.apache.jsp.inbox.index_jsp._jspService(in
      19:48:35,375 INFO [STDOUT] at org.apache.jasper.runtime.HttpJspBase.service
      19:48:35,375 INFO [STDOUT] at javax.servlet.http.HttpServlet.service(HttpSe
      19:48:35,375 INFO [STDOUT] at org.apache.jasper.servlet.JspServletWrapper.s

      There is nothing wrong with the code, because it was running in the JBoss 3.2 for a long time, and now too its running , Its running in the JBoss 4. standard instance. But when it comes to default instance (J2EE certified instance) its going down. What is wrong with this, Is it a problem with the JBoss, can I fix this problem with code modification. Please give me an answer. If some body else face this type problem please share your experience.

      with thanx