0 Replies Latest reply on Apr 8, 2005 12:33 PM by sanjuthomas

    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 );
      e.printStackTrace();
      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
      l.getCurrentItems(InboxImpl.java:113)
      19:48:35,375 INFO [STDOUT] at com.askit.web.beans.QuestionListBean.makeInbo
      x(QuestionListBean.java:511)
      19:48:35,375 INFO [STDOUT] at com.askit.web.beans.QuestionListBean.setPerso
      nID(QuestionListBean.java:255)
      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
      ativeMethodAccessorImpl.java:39)
      19:48:35,375 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invo
      ke(DelegatingMethodAccessorImpl.java:25)
      19:48:35,375 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:3
      24)
      19:48:35,375 INFO [STDOUT] at org.apache.jasper.runtime.JspRuntimeLibrary.h
      andleSetProperty(JspRuntimeLibrary.java:663)
      19:48:35,375 INFO [STDOUT] at org.apache.jsp.inbox.index_jsp._jspService(in
      dex_jsp.java:279)
      19:48:35,375 INFO [STDOUT] at org.apache.jasper.runtime.HttpJspBase.service
      (HttpJspBase.java:94)
      19:48:35,375 INFO [STDOUT] at javax.servlet.http.HttpServlet.service(HttpSe
      rvlet.java:810)
      19:48:35,375 INFO [STDOUT] at org.apache.jasper.servlet.JspServletWrapper.s
      more


      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
      sanju