0 Replies Latest reply on Aug 28, 2009 8:22 AM by arjun purushothaman

    Mail Provider in Jboss ESB using imap

    arjun purushothaman Newbie

      Hi All,

      We were trying to configure Mail Provider (imap) in our ESB. Below is the conf details.

      <?xml version = "1.0" encoding = "UTF-8"?>
      <jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd"
       parameterReloadSecs="5">
      
       <providers>
       <jms-provider name="JBossMessaging" connection-factory="ConnectionFactory"
       jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
       jndi-URL="localhost">
       <jms-bus busid="esb-channel">
       <jms-message-filter dest-type="QUEUE" dest-name="queue/esb_jca_mail_qs_channel" />
       </jms-bus>
       </jms-provider>
       </providers>
      
       <services>
       <service category="QS_JCA_MailGateway"
       name="SimpleListener"
       description="Hello JCA Email World">
       <listeners>
       <jca-gateway name="JMS-JCA-MailGateway"
       adapter="mail-ra.rar"
       endpointClass="org.jboss.soa.esb.listeners.jca.MailEndpoint">
       <activation-config>
       <property name="mailServer" value="mail.server.com"/>
       <property name="mailFolder" value="INBOX"/>
       <property name="storeProtocol" value="imap"/>
       <property name="debug" value="false"/>
       <property name="port" value="143"/>
       <property name="userName" value="username"/>
       <property name="password" value="password"/>
       </activation-config>
       </jca-gateway>
       <jms-listener name="JMS-ESBListener" busidref="esb-channel" maxThreads="1" />
       </listeners>
       <actions>
       <action name="printaction" class="org.jboss.soa.esb.actions.SystemPrintln"/>
       </actions>
       </service>
       </services>
      
      </jbossesb>


      And also we added two class files along with the .ESB (MailEndpoint.class, PackageMailMessageContents) since this were not available in the "org.jboss.soa.esb.listeners.gateway" & "org.jboss.soa.esb.listeners.jca" packages.

      Once we deploy our .esb to JBoss AS 4.2 (JBoss ESB 4.4), we are getting the below error on console.
      java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy9.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
      tScanner.java:421)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
      canner.java:634)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      doScan(AbstractDeploymentScanner.java:263)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      loop(AbstractDeploymentScanner.java:274)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      run(AbstractDeploymentScanner.java:225)
      Caused by: org.jboss.deployment.DeploymentException: Error for ActivationSpec cl
      ass org.jboss.resource.adapter.mail.inflow.MailActivationSpec as JavaBean; - nes
      ted throwable: (java.beans.IntrospectionException: No property found for: debug
      on JavaBean: MailActivationSpec(mailServer=mailhost, storeProtocol=imap, mailFol
      der=null, pollingInterval=60000, messageSelector=null, userName=null, maxMessage
      s=1))
       at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException
      (DeploymentException.java:53)
       at org.jboss.resource.deployment.ActivationSpecFactory.createActivationS
      pec(ActivationSpecFactory.java:135)
       at org.jboss.resource.deployment.RARDeployment.createActivationSpec(RARD
      eployment.java:254)
       at org.jboss.resource.deployment.RARDeployment.internalInvoke(RARDeploym
      ent.java:218)
       at org.jboss.system.ServiceDynamicMBeanSupport.invoke(ServiceDynamicMBea
      nSupport.java:156)
       at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:1
      64)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.soa.esb.listeners.jca.JBoss42ActivationBridge.activate(JBos
      s42ActivationBridge.java:124)
       ... 53 more
      Caused by: java.beans.IntrospectionException: No property found for: debug on Ja
      vaBean: MailActivationSpec(mailServer=mailhost, storeProtocol=imap, mailFolder=n
      ull, pollingInterval=60000, messageSelector=null, userName=null, maxMessages=1)
       at org.jboss.util.propertyeditor.PropertyEditors.mapJavaBeanProperties(P
      ropertyEditors.java:350)
       at org.jboss.util.propertyeditor.PropertyEditors.mapJavaBeanProperties(P
      ropertyEditors.java:281)
       at org.jboss.resource.deployment.ActivationSpecFactory.createActivationS
      pec(ActivationSpecFactory.java:129
      )


      We wanted to know whether Mail provider functionality is no more supported in JBoss ESB 4.4? (In earlier versions, Quick Start sample for mail provider existed)

      Please help us in resolving this issue as this is blocking our development progress.

      Thanks in Advance,
      Arjun