Bug 880422 - NPE when no activation-config provided with jca-gateway
Summary: NPE when no activation-config provided with jca-gateway
Keywords:
Status: NEW
Alias: None
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: Configuration
Version: 5.2
Hardware: i686
OS: Linux
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-27 00:06 UTC by David van Balen
Modified: 2020-04-27 01:33 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)

Description David van Balen 2012-11-27 00:06:04 UTC
Description of problem: Adding <activation-config> element within jca-gateway in JBossESB configuration isn't enforced in JBoss Tools or in the xsd, but not providing it results in a NullPointerException on deployment.


Version-Release number of selected component (if applicable): Using SOA Platform 5.2.0 from CSP


How reproducible: Always


Steps to Reproduce:
1. Create ESB project in JBDS/Eclipse
2. Add jboss-esb.xml file in META-INF (New->ESB File->Next->Set name/version->Finish). Configure it to use schema version 1.3.0 (although it looks like 1.3.1 probably has the same issue).
3. Add a service to the created file and add a JCA Gateway to the service (Listeners->New->JCA Gateway...). You will be prompted only to provide name, adapter and endpointClass
4. Add SystemPrintln action (or other action if preferred) to the service's action pipeline
5. Build and deploy service
6. See NPE from line 60 of JcaGatewayMapper.java when it tries to serialize what I assume is a null activation config
  
Actual results: Code attempts to serialize null activation config, resulting in NPE


Expected results: If activation config is required, it should be enforced through the XSD and JBoss Tools wizard for adding a JCA Gateway. Otherwise, there should be a null check so the code doesn't try to serialize something that's null.


Additional info: Stack trace I see when I deploy my service:

19:32:10,327 ERROR [AbstractKernelController] Error installing to Create: name=jboss.esb.vfszip:/home/jboss/server/soa-p/jboss-soa-p-5.2.0.GA/jboss-as/server/default/deploy/test-esb-1.0.esb/ state=Configured
java.lang.NullPointerException
	at org.jboss.soa.esb.listeners.config.mappers130.MapperUtil.serialize(MapperUtil.java:151)
	at org.jboss.soa.esb.listeners.config.mappers130.JcaGatewayMapper.map(JcaGatewayMapper.java:60)
	at org.jboss.soa.esb.listeners.config.mappers130.GatewayGenerator.addGatewayConfig(GatewayGenerator.java:132)
	at org.jboss.soa.esb.listeners.config.mappers130.GatewayGenerator.generate(GatewayGenerator.java:110)
	at org.jboss.soa.esb.listeners.config.mappers130.XMLBeansModel.generateGatewayConfig(XMLBeansModel.java:506)
	at org.jboss.soa.esb.listeners.config.model.Model130SchemaParser$Model130Adapter.generateGatewayConfig(Model130SchemaParser.java:138)
	at org.jboss.soa.esb.listeners.config.ModelUtil.getListenerGroups(ModelUtil.java:53)
	at org.jboss.soa.esb.listeners.config.WebGatewayBuilder.build(WebGatewayBuilder.java:115)
	at org.jboss.soa.esb.listeners.deployers.mc.EsbDeployment.create(EsbDeployment.java:191)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
	at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
	at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
	at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:243)
	at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
	at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:111)
	at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:72)
	at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)
	at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
	at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
	at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
	at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
	at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652)
	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938)
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988)
	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:778)
	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:543)
	at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:125)
	at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:52)
	at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
	at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55)
	at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179)
	at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1454)
	at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1172)
	at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1193)
	at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1113)
	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652)
	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938)
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988)
	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:826)
	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:556)
	at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:789)
	at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:699)
	at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
	at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:409)
	at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:294)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:679)
19:32:10,333 WARN  [HDScanner] Failed to process changes


Note You need to log in before you can comment on or make changes to this bug.