2 Replies Latest reply on Jan 14, 2004 7:01 AM by surajmundada

    MBeanException: Exception in MBean operation 'checkIncomplet

    surajmundada Newbie

      Hi

      I am using JBoss 3.2.0 Tomcat 4.1.24

      I have packaged a Servlet->WAR->EAR to send mails from a servlet.
      When I deploy EAR in JBOSS, it is giving me following :

      14:22:26,296 INFO [MainDeployer] Deployed package: file:/E:/jboss-3.2.0_tomcat-4.1.24/server/default/deploy/jmx-console.war/
      14:22:26,296 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()'
      Cause: Incomplete Deployment listing:
      Packages waiting for a deployer:

      Incompletely deployed packages:

      MBeans waiting for classes:

      MBeans waiting for other MBeans:
      [ObjectName: jboss.mq:service=InvocationLayer,type=HTTP
      state: CONFIGURED
      I Depend On: jboss.mq:service=Invoker
      jboss.web:service=WebServer

      Depends On Me: , ObjectName: jboss.mq.destination:service=Topic,name=testTopic
      state: CONFIGURED
      I Depend On: jboss.mq:service=DestinationManager
      jboss.mq:service=SecurityManager

      Depends On Me: , ObjectName: jboss.mq.destination:service=Topic,name=securedTop
      ic
      state: CONFIGURED
      I Depend On: jboss.mq:service=DestinationManager
      jboss.mq:service=SecurityManager

      Depends On Me: , ObjectName: jboss.mq.destination:service=Topic,name=testDurabl
      eTopic
      state: CONFIGURED
      I Depend On: jboss.mq:service=DestinationManager
      jboss.mq:service=SecurityManager

      Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=testQueue
      state: CONFIGURED
      I Depend On: jboss.mq:service=DestinationManager
      jboss.mq:service=SecurityManager

      Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=A
      state: CONFIGURED
      I Depend On: jboss.mq:service=DestinationManager

      Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=B
      state: CONFIGURED
      I Depend On: jboss.mq:service=DestinationManager

      Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=C
      state: CONFIGURED
      I Depend On: jboss.mq:service=DestinationManager

      Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=D
      state: CONFIGURED
      I Depend On: jboss.mq:service=DestinationManager

      Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=ex
      state: CONFIGURED
      I Depend On: jboss.mq:service=DestinationManager

      Depends On Me: , ObjectName: jboss.mq:service=InvocationLayer,type=JVM
      state: CONFIGURED
      I Depend On: jboss.mq:service=Invoker

      Depends On Me: , ObjectName: jboss.mq:service=InvocationLayer,type=RMI
      state: CONFIGURED
      I Depend On: jboss.mq:service=Invoker

      Depends On Me: , ObjectName: jboss.mq:service=InvocationLayer,type=OIL
      state: CONFIGURED
      I Depend On: jboss.mq:service=Invoker

      Depends On Me: , ObjectName: jboss.mq:service=InvocationLayer,type=UIL
      state: CONFIGURED
      I Depend On: jboss.mq:service=Invoker

      Depends On Me: , ObjectName: jboss.mq:service=InvocationLayer,type=OIL2
      state: CONFIGURED
      I Depend On: jboss.mq:service=Invoker

      Depends On Me: , ObjectName: jboss.mq:service=InvocationLayer,type=UIL2
      state: CONFIGURED
      I Depend On: jboss.mq:service=Invoker

      Depends On Me: , ObjectName: jboss.mq:service=Invoker
      state: CONFIGURED
      I Depend On: jboss.mq:service=TracingInterceptor

      Depends On Me: jboss.mq:service=InvocationLayer,type=HTTP
      jboss.mq:service=InvocationLayer,type=JVM
      jboss.mq:service=InvocationLayer,type=RMI
      jboss.mq:service=InvocationLayer,type=OIL
      jboss.mq:service=InvocationLayer,type=UIL
      jboss.mq:service=InvocationLayer,type=OIL2
      jboss.mq:service=InvocationLayer,type=UIL2
      , ObjectName: jboss.mq:service=TracingInterceptor
      state: CONFIGURED
      I Depend On: jboss.mq:service=SecurityManager

      Depends On Me: jboss.mq:service=Invoker
      , ObjectName: jboss.mq:service=SecurityManager
      state: CONFIGURED
      I Depend On: jboss.mq:service=DestinationManager

      Depends On Me: jboss.mq.destination:service=Topic,name=testTopic
      jboss.mq.destination:service=Topic,name=securedTopic
      jboss.mq.destination:service=Topic,name=testDurableTopic
      jboss.mq.destination:service=Queue,name=testQueue
      jboss.mq:service=TracingInterceptor
      jboss.mq.destination:service=Queue,name=DLQ
      , ObjectName: jboss.mq:service=DestinationManager
      state: CONFIGURED
      I Depend On: jboss.mq:service=PersistenceManager
      jboss.mq:service=StateManager

      Depends On Me: jboss.mq.destination:service=Topic,name=testTopic
      jboss.mq.destination:service=Topic,name=securedTopic
      jboss.mq.destination:service=Topic,name=testDurableTopic
      jboss.mq.destination:service=Queue,name=testQueue
      jboss.mq.destination:service=Queue,name=A
      jboss.mq.destination:service=Queue,name=B
      jboss.mq.destination:service=Queue,name=C
      jboss.mq.destination:service=Queue,name=D
      jboss.mq.destination:service=Queue,name=ex
      jboss.mq:service=SecurityManager
      jboss.mq.destination:service=Queue,name=DLQ
      , ObjectName: jboss.mq:service=PersistenceManager
      state: CONFIGURED
      I Depend On: jboss.mq:service=MessageCache
      jboss.jca:service=LocalTxCM,name=DefaultDS

      Depends On Me: jboss.mq:service=DestinationManager
      , ObjectName: jboss.mq.destination:service=Queue,name=DLQ
      state: CONFIGURED
      I Depend On: jboss.mq:service=DestinationManager
      jboss.mq:service=SecurityManager

      Depends On Me: ]
      14:22:26,625 INFO [URLDeploymentScanner] Started
      14:22:26,687 INFO [MainDeployer] Deployed package: file:/E:/sujboss-3.2.0_tomca
      t-4.1.24/server/default/conf/jboss-service.xml
      14:22:26,687 INFO [Server] JBoss (MX MicroKernel) [3.2.0 (build: CVSTag=JBoss_3
      _2_0 date=200304110033)] Started in 21s:62ms

      -------------------------------------------------------------------------------------

      Code of my servlet is


      import javax.servlet.*;
      import javax.servlet.http.*;
      import java.rmi.RemoteException;
      import java.io.IOException;
      import javax.mail.*;
      import javax.mail.internet.*;
      import java.util.Hashtable;
      import java.util.Date;
      import javax.naming.Context;
      import javax.naming.InitialContext;

      public class MailServ extends HttpServlet
      {
      Hashtable env = null;

      public void init(ServletConfig cf) throws ServletException
      {
      ServletContext ctx = cf.getServletContext();

      env = new Hashtable();
      env.put(Context.INITIAL_CONTEXT_FACTORY,ctx.getInitParameter ("INITIAL_CONTEXT_FACTORY"));
      env.put(Context.PROVIDER_URL, ctx.getInitParameter("PROVIDER_URL"));
      }

      public void doService(HttpServletRequest req, HttpServletResponse res) throws RemoteException,ServletException
      {
      String from = req.getParameter("t1");
      String to = req.getParameter("t2");
      String sub = req.getParameter("t3");
      String mess = req.getParameter("S1");

      try
      {
      javax.mail.Session mailSession = (javax.mail.Session) new InitialContext(env).lookup( "java:comp/env/mail/DefaultMail" );

      javax.mail.Message msg = new MimeMessage( mailSession );
      msg.setFrom( new InternetAddress(from));
      msg.setRecipients( javax.mail.Message.RecipientType.TO, InternetAddress.parse( to, false ));
      msg.setSubject( sub );
      msg.setContent( mess, "text/html" );
      msg.setHeader( "X-Mailer", "JavaMailer" );
      msg.setSentDate( new Date() );
      Transport.send( msg );
      System.out.println("### Mail sent ###");
      }
      catch ( Exception e )
      {
      System.out.println("### Error in sending mail ###");
      e.printStackTrace();
      }
      }

      public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException,IOException
      {
      doService(request,response);
      }
      }

      -------------------------------------------------------------------------------------

      my server/default/deploy/mail-service.xml contains:





      java:/Mail
      nobody
      password




















      -------------------------------------------------------------------------------------
      META-INF/ejb-jar.xml contains followinga addition above
      </enterprise-beans> tab

      <resource-ref>
      <res-ref-name>mail/DefaultMail</res-ref-name>
      <res-type>javax.mail.Session</res-type>
      <res-auth>Container</res-auth>
      </resource-ref>

      -------------------------------------------------------------------------------------
      my jboss.xml contains following addition just above tag.

      <resource-managers>
      <resource-manager>
      <res-name>mail/DefaultMail</res-name>
      <res-jndi-name>java:/Mail</res-jndi-name>
      </resource-manager>
      </resource-managers>
      ------------------------------------------------------------------------------------


      I also tried on jmx-console and clicked service=InvocationLayer,type=HTTP link and then pressed the "Invoke" button for "create()" operation but it didn't work.

      How should I sort this out ?

      Thanks,

      Suraj

        • 1. Re: MBeanException: Exception in MBean operation 'checkIncom
          Adrian Brock Master

          JMS didn't deploy because there is a problem with your datasource
          DefaultDS.

          Look further back in the log for ERRORs

          Regards,
          Adrian

          • 2. Re: MBeanException: Exception in MBean operation 'checkIncom
            surajmundada Newbie

            Hi Adrian,

            Thanks a lot for the reply.....

            I had already removed hsql-ds.xml file from my server/default/deploy folder and added postgres-ds.xml.
            ------------------------------------------------------------------------------------

            <local-tx-datasource>
            <jndi-name>jdbc/PostgresDS</jndi-name>
            <connection-url>jdbc:postgresql://localhost:5432/MAX</connection-url>
            <driver-class>org.postgresql.Driver</driver-class>
            <user-name>postgres</user-name>

            </local-tx-datasource>

            ------------------------------------------------------------------------------------


            but server/default/conf/login-config.xml contains paragraphs like this:

            <!-- Security domains for testing new jca framework -->
            <application-policy name = "HsqlDbRealm">

            <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"
            flag = "required">
            <module-option name = "principal">sa</module-option>
            <module-option name = "userName">sa</module-option>
            <module-option name = "password"></module-option>
            <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=DefaultDS</module-option>
            </login-module>

            </application-policy>

            -----------------------------------------------------------------------------------

            what should I do with this ?

            Also, I modified .xml files in server/default/deploy or server/default/conf folder only.

            Do I need to modify the same files in server/all/deploy or server/all/conf folders also ?

            Thanks & Regards

            Suraj