glassfish
  1. glassfish
  2. GLASSFISH-3704

Incorrect ActiviationSpec passed to ResourceAdapter implementation

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 9.1pe
    • Fix Version/s: 9.1peur1
    • Component/s: jca
    • Labels:
      None
    • Environment:

      Operating System: Solaris
      Platform: Sun

    • Issuezilla Id:
      3,704

      Description

      I have written a JCA Adapter, which contains a single <outbound-resourceadapter>
      element and a single <inbound-resourceadapter> element. When I deploy the
      adapter (call it RA), it deploys fine. I can also deploy an EJB Application
      (call it EJBApp1) which contains a MDB that implements the interface defined by
      the JCA adapter. It deploys fine, and operates fine. The MDB looks like

      @MessageDriven(
      name="TreEventBean",
      messageListenerInterface=TreEventListener.class,
      activationConfig=

      { @ActivationConfigProperty(propertyName="ServerName",propertyValue="wallaby"), @ActivationConfigProperty(propertyName="PortNumber",propertyValue="10551"), @ActivationConfigProperty(propertyName="UserName",propertyValue="tpsysadm"), @ActivationConfigProperty(propertyName="Password",propertyValue="tpsysadm"), @ActivationConfigProperty(propertyName="AsyncEvents",propertyValue="true"), @ActivationConfigProperty(propertyName="EventPatterns",propertyValue="myPattern") }

      )
      public class TreEventBean implements TreEventListener {

      ...

      And the ra.xml portion is defined as

      <inbound-resourceadapter>
      <messageadapter>
      <messagelistener>

      <messagelistener-type>com.intecbilling.connector.TreEventListener</messagelistener-type>
      <activationspec>

      <activationspec-class>com.intecbilling.connector.TreEventActivationSpec</activationspec-class>

      So, I want to write the JCA adapter in order to support multiple types of
      inbound communication. So, I've written a separate ActivationSpec
      implementation, which uses a separate Interface. I have not, in any way,
      modified the original ActivationSpec, or the section of the ra.xml file which
      associates the interface with the spec. The ra.xml file now has two
      <inbound-resourceadapter> elements in it.

      The RA deploys fine. However, when the original EJBApp1 redeploys, exceptions
      are thrown:

      [#|2007-09-27T12:01:49.523+1000|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=16;_ThreadName=httpWorkerThread-4848-0;_RequestID=4b27ed62-4eb2-4bb6-85e6-b604b21ccd36;|javax.resource.spi.ResourceAllocationException:
      Illegal proxy port
      at
      com.intecbilling.connector.SVResourceAdapter.activateTreProxyListener(SVResourceAdapter.java:157)
      at
      com.intecbilling.connector.SVResourceAdapter.endpointActivation(SVResourceAdapter.java:65)
      at
      com.sun.enterprise.connectors.inflow.ConnectorMessageBeanClient.setup(ConnectorMessageBeanClient.java:252)
      at
      com.sun.ejb.containers.MessageBeanContainer.<init>(MessageBeanContainer.java:209)
      at
      com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:280)
      at com.sun.enterprise.server.AbstractLoader.loadEjbs(AbstractLoader.java:535)
      at com.sun.enterprise.server.ApplicationLoader.doLoad(ApplicationLoader.java:188)
      at
      com.sun.enterprise.server.TomcatApplicationLoader.doLoad(TomcatApplicationLoader.java:126)
      at com.sun.enterprise.server.AbstractLoader.load(AbstractLoader.java:243)
      at
      com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:336)
      at
      com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:230)
      at
      com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:203)
      at
      com.sun.enterprise.server.ApplicationManager.applicationEnabled(ApplicationManager.java:763)
      at
      com.sun.enterprise.admin.event.AdminEventMulticaster.invokeApplicationDeployEventListener(AdminEventMulticaster.java:924)
      at
      com.sun.enterprise.admin.event.AdminEventMulticaster.handleApplicationDeployEvent(AdminEventMulticaster.java:902)
      at
      com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:458)
      at
      com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:173)
      at
      com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.sendEnableConfigChangeEventExplicitly(ApplicationsConfigMBean.java:1834)
      at
      com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.enable(ApplicationsConfigMBean.java:1902)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:375)
      at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:358)
      at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:464)
      at
      com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
      at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
      at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90)
      at $Proxy1.invoke(Unknown Source)
      at
      com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304)
      at
      com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174)
      at
      com.sun.enterprise.admin.jmx.remote.server.callers.InvokeCaller.call(InvokeCaller.java:69)
      at
      com.sun.enterprise.admin.jmx.remote.server.MBeanServerRequestHandler.handle(MBeanServerRequestHandler.java:155)
      at
      com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.processRequest(RemoteJmxConnectorServlet.java:122)
      at
      com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.doPost(RemoteJmxConnectorServlet.java:193)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
      at
      org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
      at
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
      at
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
      at
      org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:174)
      at
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
      at
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
      at
      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
      at
      org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
      at
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:624)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
      at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:624)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
      at
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:624)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
      at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:268)
      at
      com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:631)
      at
      com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:562)
      at
      com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:803)
      at
      com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339)
      at
      com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:261)
      at
      com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:212)
      at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
      at
      com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:116)
      Caused by: java.lang.NumberFormatException: null
      at java.lang.Integer.parseInt(Integer.java:415)
      at java.lang.Integer.parseInt(Integer.java:497)
      at
      com.intecbilling.connector.SVResourceAdapter.activateTreProxyListener(SVResourceAdapter.java:155)
      ... 71 more

      #]

      [#|2007-09-27T12:01:49.539+1000|SEVERE|sun-appserver9.1|javax.enterprise.system.container.ejb.mdb|_ThreadID=16;_ThreadName=httpWorkerThread-4848-0;TreEventBean;java.lang.Exception;_RequestID=4b27ed62-4eb2-4bb6-85e6-b604b21ccd36;|MDB00017:
      [TreEventBean]: Exception in creating message-driven bean container:
      [java.lang.Exception]|#]

      [#|2007-09-27T12:01:49.541+1000|SEVERE|sun-appserver9.1|javax.enterprise.system.container.ejb.mdb|_ThreadID=16;_ThreadName=httpWorkerThread-4848-0;_RequestID=4b27ed62-4eb2-4bb6-85e6-b604b21ccd36;|java.lang.Exception
      java.lang.Exception
      at
      com.sun.enterprise.connectors.inflow.ConnectorMessageBeanClient.setup(ConnectorMessageBeanClient.java:261)
      at
      com.sun.ejb.containers.MessageBeanContainer.<init>(MessageBeanContainer.java:209)
      at
      com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:280)
      at com.sun.enterprise.server.AbstractLoader.loadEjbs(AbstractLoader.java:535)
      at com.sun.enterprise.server.ApplicationLoader.doLoad(ApplicationLoader.java:188)
      at
      com.sun.enterprise.server.TomcatApplicationLoader.doLoad(TomcatApplicationLoader.java:126)
      at com.sun.enterprise.server.AbstractLoader.load(AbstractLoader.java:243)
      at
      com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:336)
      at
      com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:230)
      at
      com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:203)
      at
      com.sun.enterprise.server.ApplicationManager.applicationEnabled(ApplicationManager.java:763)
      at
      com.sun.enterprise.admin.event.AdminEventMulticaster.invokeApplicationDeployEventListener(AdminEventMulticaster.java:924)
      at
      com.sun.enterprise.admin.event.AdminEventMulticaster.handleApplicationDeployEvent(AdminEventMulticaster.java:902)
      at
      com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:458)
      at
      com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:173)
      at
      com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.sendEnableConfigChangeEventExplicitly(ApplicationsConfigMBean.java:1834)
      at
      com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.enable(ApplicationsConfigMBean.java:1902)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:375)
      at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:358)
      at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:464)
      at
      com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
      at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
      at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90)
      at $Proxy1.invoke(Unknown Source)
      at
      com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304)
      at
      com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174)
      at
      com.sun.enterprise.admin.jmx.remote.server.callers.InvokeCaller.call(InvokeCaller.java:69)
      at
      com.sun.enterprise.admin.jmx.remote.server.MBeanServerRequestHandler.handle(MBeanServerRequestHandler.java:155)
      at
      com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.processRequest(RemoteJmxConnectorServlet.java:122)
      at
      com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.doPost(RemoteJmxConnectorServlet.java:193)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
      at
      org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
      at
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
      at
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
      at
      org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:174)
      at
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
      at
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
      at
      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
      at
      org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
      at
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:624)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
      at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:624)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
      at
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:624)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
      at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:268)
      at
      com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:631)
      at
      com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:562)
      at
      com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:803)
      at
      com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339)
      at
      com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:261)
      at
      com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:212)
      at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
      at
      com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:116)
      Caused by: javax.resource.spi.ResourceAllocationException: Illegal proxy port
      at
      com.intecbilling.connector.SVResourceAdapter.activateTreProxyListener(SVResourceAdapter.java:157)
      at
      com.intecbilling.connector.SVResourceAdapter.endpointActivation(SVResourceAdapter.java:65)
      at
      com.sun.enterprise.connectors.inflow.ConnectorMessageBeanClient.setup(ConnectorMessageBeanClient.java:252)
      ... 69 more
      Caused by: java.lang.NumberFormatException: null
      at java.lang.Integer.parseInt(Integer.java:415)
      at java.lang.Integer.parseInt(Integer.java:497)
      at
      com.intecbilling.connector.SVResourceAdapter.activateTreProxyListener(SVResourceAdapter.java:155)
      ... 71 more

      #]

      [#|2007-09-27T12:01:49.560+1000|SEVERE|sun-appserver9.1|javax.enterprise.system.container.ejb|_ThreadID=16;_ThreadName=httpWorkerThread-4848-0;java.lang.Exception;_RequestID=4b27ed62-4eb2-4bb6-85e6-b604b21ccd36;|EJB5090:
      Exception in creating EJB container [java.lang.Exception]|#]

      [#|2007-09-27T12:01:49.562+1000|SEVERE|sun-appserver9.1|javax.enterprise.system.container.ejb|_ThreadID=16;_ThreadName=httpWorkerThread-4848-0;_RequestID=4b27ed62-4eb2-4bb6-85e6-b604b21ccd36;|appId=SVConnectorDemo
      moduleName=SVConnectorDemo-ejb_jar ejbName=TreEventBean|#]

      [#|2007-09-27T12:01:49.563+1000|SEVERE|sun-appserver9.1|javax.enterprise.system.core.classloading|_ThreadID=16;_ThreadName=httpWorkerThread-4848-0;_RequestID=4b27ed62-4eb2-4bb6-85e6-b604b21ccd36;|LDR5004:
      UnExpected error occured while creating ejb container
      java.lang.Exception
      at
      com.sun.enterprise.connectors.inflow.ConnectorMessageBeanClient.setup(ConnectorMessageBeanClient.java:261)
      at
      com.sun.ejb.containers.MessageBeanContainer.<init>(MessageBeanContainer.java:209)
      at
      com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:280)
      at com.sun.enterprise.server.AbstractLoader.loadEjbs(AbstractLoader.java:535)
      at com.sun.enterprise.server.ApplicationLoader.doLoad(ApplicationLoader.java:188)
      at
      com.sun.enterprise.server.TomcatApplicationLoader.doLoad(TomcatApplicationLoader.java:126)
      at com.sun.enterprise.server.AbstractLoader.load(AbstractLoader.java:243)
      at
      com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:336)
      at
      com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:230)
      at
      com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:203)
      at
      com.sun.enterprise.server.ApplicationManager.applicationEnabled(ApplicationManager.java:763)
      at
      com.sun.enterprise.admin.event.AdminEventMulticaster.invokeApplicationDeployEventListener(AdminEventMulticaster.java:924)
      at
      com.sun.enterprise.admin.event.AdminEventMulticaster.handleApplicationDeployEvent(AdminEventMulticaster.java:902)
      at
      com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:458)
      at
      com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:173)
      at
      com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.sendEnableConfigChangeEventExplicitly(ApplicationsConfigMBean.java:1834)
      at
      com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.enable(ApplicationsConfigMBean.java:1902)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:375)
      at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:358)
      at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:464)
      at
      com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
      at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
      at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90)
      at $Proxy1.invoke(Unknown Source)
      at
      com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304)
      at
      com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174)
      at
      com.sun.enterprise.admin.jmx.remote.server.callers.InvokeCaller.call(InvokeCaller.java:69)
      at
      com.sun.enterprise.admin.jmx.remote.server.MBeanServerRequestHandler.handle(MBeanServerRequestHandler.java:155)
      at
      com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.processRequest(RemoteJmxConnectorServlet.java:122)
      at
      com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.doPost(RemoteJmxConnectorServlet.java:193)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
      at
      org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
      at
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
      at
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
      at
      org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:174)
      at
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
      at
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
      at
      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
      at
      org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
      at
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:624)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
      at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:624)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
      at
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:624)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
      at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:268)
      at
      com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:631)
      at
      com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:562)
      at
      com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:803)
      at
      com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339)
      at
      com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:261)
      at
      com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:212)
      at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
      at
      com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:116)
      Caused by: javax.resource.spi.ResourceAllocationException: Illegal proxy port
      at
      com.intecbilling.connector.SVResourceAdapter.activateTreProxyListener(SVResourceAdapter.java:157)
      at
      com.intecbilling.connector.SVResourceAdapter.endpointActivation(SVResourceAdapter.java:65)
      at
      com.sun.enterprise.connectors.inflow.ConnectorMessageBeanClient.setup(ConnectorMessageBeanClient.java:252)
      ... 69 more
      Caused by: java.lang.NumberFormatException: null
      at java.lang.Integer.parseInt(Integer.java:415)
      at java.lang.Integer.parseInt(Integer.java:497)
      at
      com.intecbilling.connector.SVResourceAdapter.activateTreProxyListener(SVResourceAdapter.java:155)
      ... 71 more

      #]

      From what I can see, it is passing the new, incorrect ActivationSpec
      implementation to the Resource Adapter during its endpointActivation method call.

      Shouldn't the container be able to use the ActivationSpec implementation based
      on the interface that is defined within the MDB?

      1. ra.xml
        3 kB
        hildo

        Activity

        Hide
        hildo added a comment -

        Created an attachment (id=1179)
        ra.xml file used by the RAR file

        Show
        hildo added a comment - Created an attachment (id=1179) ra.xml file used by the RAR file
        Hide
        hildo added a comment -

        Created an attachment (id=1180)
        Source for the JCA adapter that declares multiple inbound adapters

        Show
        hildo added a comment - Created an attachment (id=1180) Source for the JCA adapter that declares multiple inbound adapters
        Hide
        hildo added a comment -

        Created an attachment (id=1181)
        Source for the EJB application that uses one JCA inbound adapter

        Show
        hildo added a comment - Created an attachment (id=1181) Source for the EJB application that uses one JCA inbound adapter
        Hide
        hildo added a comment -

        It looks like this was caused by how the ra.xml file was defined. Originally,
        the ra.xml had the two inbound adapters defined like this:

        <resourceadapter>
        <resourceadapter-class>com.edh.adapter.MyAdapter</resourceadapter-class>
        <!-- Can define config-property entries here, if you settings that are
        constant across the Resource Adapter-->
        <inbound-resourceadapter>
        <messageadapter>
        <messagelistener>

        <messagelistener-type>com.edh.adapter.ListenerA</messagelistener-type>
        <activationspec>

        <activationspec-class>com.edh.adapter.ActivationSpecImplA</activationspec-class>
        <required-config-property>
        <config-property-name>ServerName</config-property-name>
        </required-config-property>
        <required-config-property>
        <config-property-name>PortNumber</config-property-name>
        </required-config-property>
        <required-config-property>
        <config-property-name>UserName</config-property-name>
        </required-config-property>
        <required-config-property>
        <config-property-name>Password</config-property-name>
        </required-config-property>
        <required-config-property>

        <config-property-name>EventPatterns</config-property-name>
        </required-config-property>
        </activationspec>
        </messagelistener>
        </messageadapter>
        </inbound-resourceadapter>
        <inbound-resourceadapter>
        <messageadapter>
        <messagelistener>

        <messagelistener-type>com.edh.adapter.ListenerB</messagelistener-type>
        <activationspec>

        <activationspec-class>com.edh.adapter.ActivationSpecImplB</activationspec-class>
        <required-config-property>
        <config-property-name>ProxyPort</config-property-name>
        </required-config-property>
        </activationspec>
        </messagelistener>
        </messageadapter>
        </inbound-resourceadapter>
        <security-permission>
        <description>Permissions allowed to My Connector</description>
        <security-permission-spec/>
        </security-permission>
        </resourceadapter>

        So, the <resourceadapter> element had two <inbound-resourceadapter> declarations.

        If I change this to have a single <inbound-resourceadapter> element, like this:

        <resourceadapter>
        <resourceadapter-class>com.edh.adapter.MyAdapter</resourceadapter-class>
        <!-- Can define config-property entries here, if you settings that are
        constant across the Resource Adapter-->
        <inbound-resourceadapter>
        <messageadapter>
        <messagelistener>

        <messagelistener-type>com.edh.adapter.ListenerA</messagelistener-type>
        <activationspec>

        <activationspec-class>com.edh.adapter.ActivationSpecImplA</activationspec-class>
        <required-config-property>
        <config-property-name>ServerName</config-property-name>
        </required-config-property>
        <required-config-property>
        <config-property-name>PortNumber</config-property-name>
        </required-config-property>
        <required-config-property>
        <config-property-name>UserName</config-property-name>
        </required-config-property>
        <required-config-property>
        <config-property-name>Password</config-property-name>
        </required-config-property>
        <required-config-property>

        <config-property-name>EventPatterns</config-property-name>
        </required-config-property>
        </activationspec>
        </messagelistener>
        </messageadapter>
        <messageadapter>
        <messagelistener>

        <messagelistener-type>com.edh.adapter.ListenerB</messagelistener-type>
        <activationspec>

        <activationspec-class>com.edh.adapter.ActivationSpecImplB</activationspec-class>
        <required-config-property>
        <config-property-name>ProxyPort</config-property-name>
        </required-config-property>
        </activationspec>
        </messagelistener>
        </messageadapter>
        </inbound-resourceadapter>
        <security-permission>
        <description>Permissions allowed to My Connector</description>
        <security-permission-spec/>
        </security-permission>
        </resourceadapter>

        Then everything deploys, and the correct ActivationSpec implementation is sent
        to the endpointActivation method.

        So, this looks like I had the ra.xml file defined incorrectly. I hope you
        haven't spent too much time looking into this.

        Show
        hildo added a comment - It looks like this was caused by how the ra.xml file was defined. Originally, the ra.xml had the two inbound adapters defined like this: <resourceadapter> <resourceadapter-class>com.edh.adapter.MyAdapter</resourceadapter-class> <!-- Can define config-property entries here, if you settings that are constant across the Resource Adapter--> <inbound-resourceadapter> <messageadapter> <messagelistener> <messagelistener-type>com.edh.adapter.ListenerA</messagelistener-type> <activationspec> <activationspec-class>com.edh.adapter.ActivationSpecImplA</activationspec-class> <required-config-property> <config-property-name>ServerName</config-property-name> </required-config-property> <required-config-property> <config-property-name>PortNumber</config-property-name> </required-config-property> <required-config-property> <config-property-name>UserName</config-property-name> </required-config-property> <required-config-property> <config-property-name>Password</config-property-name> </required-config-property> <required-config-property> <config-property-name>EventPatterns</config-property-name> </required-config-property> </activationspec> </messagelistener> </messageadapter> </inbound-resourceadapter> <inbound-resourceadapter> <messageadapter> <messagelistener> <messagelistener-type>com.edh.adapter.ListenerB</messagelistener-type> <activationspec> <activationspec-class>com.edh.adapter.ActivationSpecImplB</activationspec-class> <required-config-property> <config-property-name>ProxyPort</config-property-name> </required-config-property> </activationspec> </messagelistener> </messageadapter> </inbound-resourceadapter> <security-permission> <description>Permissions allowed to My Connector</description> <security-permission-spec/> </security-permission> </resourceadapter> So, the <resourceadapter> element had two <inbound-resourceadapter> declarations. If I change this to have a single <inbound-resourceadapter> element, like this: <resourceadapter> <resourceadapter-class>com.edh.adapter.MyAdapter</resourceadapter-class> <!-- Can define config-property entries here, if you settings that are constant across the Resource Adapter--> <inbound-resourceadapter> <messageadapter> <messagelistener> <messagelistener-type>com.edh.adapter.ListenerA</messagelistener-type> <activationspec> <activationspec-class>com.edh.adapter.ActivationSpecImplA</activationspec-class> <required-config-property> <config-property-name>ServerName</config-property-name> </required-config-property> <required-config-property> <config-property-name>PortNumber</config-property-name> </required-config-property> <required-config-property> <config-property-name>UserName</config-property-name> </required-config-property> <required-config-property> <config-property-name>Password</config-property-name> </required-config-property> <required-config-property> <config-property-name>EventPatterns</config-property-name> </required-config-property> </activationspec> </messagelistener> </messageadapter> <messageadapter> <messagelistener> <messagelistener-type>com.edh.adapter.ListenerB</messagelistener-type> <activationspec> <activationspec-class>com.edh.adapter.ActivationSpecImplB</activationspec-class> <required-config-property> <config-property-name>ProxyPort</config-property-name> </required-config-property> </activationspec> </messagelistener> </messageadapter> </inbound-resourceadapter> <security-permission> <description>Permissions allowed to My Connector</description> <security-permission-spec/> </security-permission> </resourceadapter> Then everything deploys, and the correct ActivationSpec implementation is sent to the endpointActivation method. So, this looks like I had the ra.xml file defined incorrectly. I hope you haven't spent too much time looking into this.
        Hide
        Sivakumar Thyagarajan added a comment -

        > So, this looks like I had the ra.xml file defined incorrectly.

        Thanks for letting us know. The verifier bundled with Glassfish can help you
        identify such issues. It could be run standalone - verifier foo.rar or as part
        of deployment - asadmin deploy --verify=true foo.rar

        You would have got an error like this. I understand the error does not point to
        the exact error but I think the error could help you identify the issue faster.

        Line 79 Column 34 – cvc-complex-type.2.4.a: Invalid content was found starting
        with element 'inbound-resourceadapter'. One of
        '

        {"http://java.sun.com/xml/ns/j2ee":adminobject, "http://java.sun.com/xml/ns/j2ee":security-permission}

        ' is expected."
        SEVERE: "DPL8005: Deployment Descriptor parsing failure :
        cvc-complex-type.2.4.a: Invalid content was found starting with element
        'inbound-resourceadapter'. One of
        '

        {"http://java.sun.com/xml/ns/j2ee":adminobject, "http://java.sun.com/xml/ns/j2ee":security-permission}

        ' is expected."

        Show
        Sivakumar Thyagarajan added a comment - > So, this looks like I had the ra.xml file defined incorrectly. Thanks for letting us know. The verifier bundled with Glassfish can help you identify such issues. It could be run standalone - verifier foo.rar or as part of deployment - asadmin deploy --verify=true foo.rar You would have got an error like this. I understand the error does not point to the exact error but I think the error could help you identify the issue faster. Line 79 Column 34 – cvc-complex-type.2.4.a: Invalid content was found starting with element 'inbound-resourceadapter'. One of ' {"http://java.sun.com/xml/ns/j2ee":adminobject, "http://java.sun.com/xml/ns/j2ee":security-permission} ' is expected." SEVERE: "DPL8005: Deployment Descriptor parsing failure : cvc-complex-type.2.4.a: Invalid content was found starting with element 'inbound-resourceadapter'. One of ' {"http://java.sun.com/xml/ns/j2ee":adminobject, "http://java.sun.com/xml/ns/j2ee":security-permission} ' is expected."

          People

          • Assignee:
            Sivakumar Thyagarajan
            Reporter:
            hildo
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: