]
Van Halbert updated TEIID-4806:
-------------------------------
Fix Version/s: 9.3
Infinispan DSL Resource Adapter: NullPointerException when Admin
user/password not provided
-------------------------------------------------------------------------------------------
Key: TEIID-4806
URL:
https://issues.jboss.org/browse/TEIID-4806
Project: Teiid
Issue Type: Bug
Components: JDG Connector
Affects Versions: 8.12.9.6_3
Reporter: Jan Stastny
Assignee: Van Halbert
Fix For: 9.3, 8.12.x-6.4
Infinispan DSL Resource adapter properties AdminUserName and AdminPassword are not
defined as required. If they are not configured it results in NullpointerException during
metadata load of a vdb which uses the connector.
Creation of such resource-adapter shouldn't have succeeded, if the properties are
required.
{code:xml}
<resource-adapter id="jdg-protobuf-customer-report">
<module slot="main"
id="org.jboss.teiid.resource-adapter.infinispan.dsl"/>
<transaction-support>LocalTransaction</transaction-support>
<connection-definitions>
<connection-definition
class-name="org.teiid.resource.adapter.infinispan.dsl.InfinispanManagedConnectionFactory"
jndi-name="java:/teiid4709-pro-ds" enabled="true"
use-java-context="true" pool-name="jdg-protobuf-customer-report">
<config-property name="MessageDescriptor">
org.jboss.qe.jdg.remote.protobuf.CustomerReport
</config-property>
<config-property name="AuthApplicationRealm">
ApplicationRealm
</config-property>
<config-property name="MessageMarshallers">
org.jboss.qe.jdg.pojo.CustomerReport:org.jboss.qe.jdg.remote.marshaller.CustomerReportMarshaller
</config-property>
<config-property name="AuthUserName">
teiidUser
</config-property>
<config-property name="AuthServerName">
hostsecured
</config-property>
<config-property name="AuthSASLMechanism">
DIGEST-MD5
</config-property>
<config-property name="AuthPassword">
password
</config-property>
<config-property name="Module">
org.jboss.qe.jdg.pojos
</config-property>
<config-property name="RemoteServerList">
hostname:11323
</config-property>
<config-property name="ProtobufDefinitionFile">
/org/jboss/qe/jdg/remote/protobuf/CustomerReport.proto
</config-property>
<config-property name="CacheTypeMap">
sec-cache:org.jboss.qe.jdg.pojo.CustomerReport;customerId
</config-property>
</connection-definition>
</connection-definitions>
</resource-adapter>
{code}
{code}
13:34:21,156 WARN [org.teiid.RUNTIME] (teiid-async-threads - 2) TEIID50036 VDB
teiid4709-pro.1 model "Source" metadata failed to load.
Reason:java.lang.NullPointerException: org.teiid.translator.TranslatorException:
java.lang.NullPointerException
at
org.teiid.resource.adapter.infinispan.dsl.InfinispanConnectionImpl.getCacheContainer(InfinispanConnectionImpl.java:363)
at
org.teiid.resource.adapter.infinispan.dsl.InfinispanConnectionImpl.getDescriptor(InfinispanConnectionImpl.java:189)
at
org.teiid.resource.adapter.infinispan.dsl.InfinispanConnectionImpl.getDescriptor(InfinispanConnectionImpl.java:180)
at
org.teiid.translator.infinispan.dsl.metadata.ProtobufMetadataProcessor.process(ProtobufMetadataProcessor.java:103)
at
org.teiid.translator.infinispan.dsl.metadata.ProtobufMetadataProcessor.process(ProtobufMetadataProcessor.java:77)
at org.teiid.translator.ExecutionFactory.getMetadata(ExecutionFactory.java:950)
[teiid-api-8.12.10.6_3.jar:8.12.10.6_3]
at
org.teiid.query.metadata.NativeMetadataRepository.getMetadata(NativeMetadataRepository.java:96)
[teiid-engine-8.12.10.6_3.jar:8.12.10.6_3]
at
org.teiid.query.metadata.NativeMetadataRepository.loadMetadata(NativeMetadataRepository.java:62)
[teiid-engine-8.12.10.6_3.jar:8.12.10.6_3]
at
org.teiid.query.metadata.ChainingMetadataRepository.loadMetadata(ChainingMetadataRepository.java:55)
[teiid-engine-8.12.10.6_3.jar:8.12.10.6_3]
at org.teiid.jboss.VDBService$6.run(VDBService.java:395)
[teiid-jboss-integration-8.12.10.6_3.jar:8.12.10.6_3]
at org.teiid.jboss.VDBService$7.run(VDBService.java:446)
[teiid-jboss-integration-8.12.10.6_3.jar:8.12.10.6_3]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[rt.jar:1.8.0_111]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[rt.jar:1.8.0_111]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_111]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: javax.resource.ResourceException: java.lang.NullPointerException
at
org.teiid.resource.adapter.infinispan.dsl.InfinispanConnectionImpl.createRemoteCache(InfinispanConnectionImpl.java:537)
at
org.teiid.resource.adapter.infinispan.dsl.InfinispanConnectionImpl.createRemoteCacheFromServerList(InfinispanConnectionImpl.java:477)
at
org.teiid.resource.adapter.infinispan.dsl.InfinispanConnectionImpl.createCacheContainer(InfinispanConnectionImpl.java:390)
at
org.teiid.resource.adapter.infinispan.dsl.InfinispanConnectionImpl.getCacheContainer(InfinispanConnectionImpl.java:361)
... 14 more
Caused by: java.lang.NullPointerException
at
org.teiid.resource.adapter.infinispan.dsl.InfinispanConnectionImpl.createRemoteCache(InfinispanConnectionImpl.java:500)
... 17 more
{code}