[
https://issues.jboss.org/browse/TEIIDDES-2929?page=com.atlassian.jira.plu...
]
Van Halbert commented on TEIIDDES-2929:
---------------------------------------
Unfortunately for protobufs, complex data types don't convert to C / C++. So they
recommend to stick with primitive data types [1]. So protobuffer doesn't support
bigdecimal directly, There are 3 options:
1. use all primitive data types
2. implement a marshaller that will handle the conversion
3. create a view that will convert the bigdecimal to a string, then materialize that
view.
[1]
https://groups.google.com/forum/#!topic/protobuf/x5CdkfH9cIE
Dynamic VDB with JDG materialization which contains BigDecimal shows
error
--------------------------------------------------------------------------
Key: TEIIDDES-2929
URL:
https://issues.jboss.org/browse/TEIIDDES-2929
Project: Teiid Designer
Issue Type: Bug
Affects Versions: 10.0.2
Environment: Fedora 24
Reporter: Matej Kralik
Priority: Critical
Attachments: Untitled.zip
When I want to deploy dynamic VDB with JDG materialization, server shows me this error:
The class class java.math.BigDecimal must have a public no-argument constructor.
I have uploaded project with JDG module to the attachment
Stacktrace:
{code:java}
13:04:46,065 WARN [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool]
(teiid-async-threads - 2) IJ000604: Throwable while attempting to get a new connection:
null: javax.resource.ResourceException:
org.infinispan.protostream.annotations.ProtoSchemaBuilderException: The class class
java.math.BigDecimal must have a public no-argument constructor.
at
org.teiid.resource.adapter.infinispan.dsl.InfinispanManagedConnectionFactory.registerToUseAnnotations(InfinispanManagedConnectionFactory.java:198)
at
org.teiid.resource.adapter.infinispan.dsl.InfinispanManagedConnectionFactory.registerWithCacheManager(InfinispanManagedConnectionFactory.java:129)
at
org.teiid.resource.adapter.infinispan.dsl.AbstractInfinispanManagedConnectionFactory.createCacheContainer(AbstractInfinispanManagedConnectionFactory.java:598)
at
org.teiid.resource.adapter.infinispan.dsl.AbstractInfinispanManagedConnectionFactory$1.getConnection(AbstractInfinispanManagedConnectionFactory.java:140)
at
org.teiid.resource.adapter.infinispan.dsl.AbstractInfinispanManagedConnectionFactory$1.getConnection(AbstractInfinispanManagedConnectionFactory.java:132)
at
org.teiid.resource.spi.BasicManagedConnectionFactory.createManagedConnection(BasicManagedConnectionFactory.java:71)
[teiid-api-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at
org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.createConnectionEventListener(SemaphoreArrayListManagedConnectionPool.java:858)
at
org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:413)
at
org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:457)
at
org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:429)
at
org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:344)
at
org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:317)
at
org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:499)
at
org.teiid.resource.spi.WrappedConnectionFactory.getConnection(WrappedConnectionFactory.java:58)
[teiid-api-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.translator.ExecutionFactory.getConnection(ExecutionFactory.java:181)
[teiid-api-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.translator.ExecutionFactory.getConnection(ExecutionFactory.java:202)
[teiid-api-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at
org.teiid.query.metadata.NativeMetadataRepository.getMetadata(NativeMetadataRepository.java:72)
[teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at
org.teiid.query.metadata.NativeMetadataRepository.loadMetadata(NativeMetadataRepository.java:62)
[teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at
org.teiid.query.metadata.ChainingMetadataRepository.loadMetadata(ChainingMetadataRepository.java:55)
[teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.jboss.VDBService$6.run(VDBService.java:395)
[teiid-jboss-integration-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.jboss.VDBService$7.run(VDBService.java:446)
[teiid-jboss-integration-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[rt.jar:1.8.0_91]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[rt.jar:1.8.0_91]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_91]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: org.infinispan.protostream.annotations.ProtoSchemaBuilderException: The class
class java.math.BigDecimal must have a public no-argument constructor.
at
org.infinispan.protostream.annotations.impl.ProtoMessageTypeMetadata.<init>(ProtoMessageTypeMetadata.java:52)
[protostream-3.0.5.Final-redhat-1.jar:3.0.5.Final-redhat-1]
at
org.infinispan.protostream.annotations.impl.ProtoSchemaGenerator.scanAnnotations(ProtoSchemaGenerator.java:174)
[protostream-3.0.5.Final-redhat-1.jar:3.0.5.Final-redhat-1]
at
org.infinispan.protostream.annotations.impl.ProtoMessageTypeMetadata.getProtobufType(ProtoMessageTypeMetadata.java:471)
[protostream-3.0.5.Final-redhat-1.jar:3.0.5.Final-redhat-1]
at
org.infinispan.protostream.annotations.impl.ProtoMessageTypeMetadata.discoverFields(ProtoMessageTypeMetadata.java:333)
[protostream-3.0.5.Final-redhat-1.jar:3.0.5.Final-redhat-1]
at
org.infinispan.protostream.annotations.impl.ProtoMessageTypeMetadata.scanMemberAnnotations(ProtoMessageTypeMetadata.java:130)
[protostream-3.0.5.Final-redhat-1.jar:3.0.5.Final-redhat-1]
at
org.infinispan.protostream.annotations.impl.ProtoSchemaGenerator.generateAndRegister(ProtoSchemaGenerator.java:61)
[protostream-3.0.5.Final-redhat-1.jar:3.0.5.Final-redhat-1]
at
org.infinispan.protostream.annotations.ProtoSchemaBuilder.build(ProtoSchemaBuilder.java:160)
[protostream-3.0.5.Final-redhat-1.jar:3.0.5.Final-redhat-1]
at
org.teiid.resource.adapter.infinispan.dsl.InfinispanManagedConnectionFactory.registerToUseAnnotations(InfinispanManagedConnectionFactory.java:188)
... 24 more
13:04:46,075 WARN [org.teiid.RUNTIME] (teiid-async-threads - 2) TEIID50036 VDB BookMat.1
model "BookCacheSource" metadata failed to load. Reason:TEIID31178 Could not
obtain connection for schema BookCacheSource, but one is required for metadata load. :
org.teiid.translator.TranslatorException: TEIID31178 Could not obtain connection for
schema BookCacheSource, but one is required for metadata load.
at
org.teiid.query.metadata.NativeMetadataRepository.getMetadata(NativeMetadataRepository.java:76)
[teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at
org.teiid.query.metadata.NativeMetadataRepository.loadMetadata(NativeMetadataRepository.java:62)
[teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at
org.teiid.query.metadata.ChainingMetadataRepository.loadMetadata(ChainingMetadataRepository.java:55)
[teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.jboss.VDBService$6.run(VDBService.java:395)
[teiid-jboss-integration-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.jboss.VDBService$7.run(VDBService.java:446)
[teiid-jboss-integration-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[rt.jar:1.8.0_91]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[rt.jar:1.8.0_91]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_91]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: org.teiid.translator.TranslatorException: TEIID60000
javax.resource.ResourceException: IJ000453: Unable to get managed connection for
java:/infinispanRemoteDSL
at org.teiid.translator.ExecutionFactory.getConnection(ExecutionFactory.java:183)
[teiid-api-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.translator.ExecutionFactory.getConnection(ExecutionFactory.java:202)
[teiid-api-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at
org.teiid.query.metadata.NativeMetadataRepository.getMetadata(NativeMetadataRepository.java:72)
[teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
... 8 more
Caused by: javax.resource.ResourceException: IJ000453: Unable to get managed connection
for java:/infinispanRemoteDSL
at
org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:410)
[ironjacamar-core-impl-1.0.37.Final-redhat-1.jar:1.0.37.Final-redhat-1]
at
org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:317)
[ironjacamar-core-impl-1.0.37.Final-redhat-1.jar:1.0.37.Final-redhat-1]
at
org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:499)
[ironjacamar-core-impl-1.0.37.Final-redhat-1.jar:1.0.37.Final-redhat-1]
at
org.teiid.resource.spi.WrappedConnectionFactory.getConnection(WrappedConnectionFactory.java:58)
[teiid-api-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.translator.ExecutionFactory.getConnection(ExecutionFactory.java:181)
[teiid-api-8.12.5.redhat-8.jar:8.12.5.redhat-8]
... 10 more
Caused by: javax.resource.ResourceException: IJ000658: Unexpected throwable while trying
to create a connection: null
at
org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:454)
[ironjacamar-core-impl-1.0.37.Final-redhat-1.jar:1.0.37.Final-redhat-1]
at
org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:457)
[ironjacamar-core-impl-1.0.37.Final-redhat-1.jar:1.0.37.Final-redhat-1]
at
org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:429)
[ironjacamar-core-impl-1.0.37.Final-redhat-1.jar:1.0.37.Final-redhat-1]
at
org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:344)
[ironjacamar-core-impl-1.0.37.Final-redhat-1.jar:1.0.37.Final-redhat-1]
... 14 more
Caused by: javax.resource.ResourceException:
org.infinispan.protostream.annotations.ProtoSchemaBuilderException: The class class
java.math.BigDecimal must have a public no-argument constructor.
at
org.teiid.resource.adapter.infinispan.dsl.InfinispanManagedConnectionFactory.registerToUseAnnotations(InfinispanManagedConnectionFactory.java:198)
at
org.teiid.resource.adapter.infinispan.dsl.InfinispanManagedConnectionFactory.registerWithCacheManager(InfinispanManagedConnectionFactory.java:129)
at
org.teiid.resource.adapter.infinispan.dsl.AbstractInfinispanManagedConnectionFactory.createCacheContainer(AbstractInfinispanManagedConnectionFactory.java:598)
at
org.teiid.resource.adapter.infinispan.dsl.AbstractInfinispanManagedConnectionFactory$1.getConnection(AbstractInfinispanManagedConnectionFactory.java:140)
at
org.teiid.resource.adapter.infinispan.dsl.AbstractInfinispanManagedConnectionFactory$1.getConnection(AbstractInfinispanManagedConnectionFactory.java:132)
at
org.teiid.resource.spi.BasicManagedConnectionFactory.createManagedConnection(BasicManagedConnectionFactory.java:71)
[teiid-api-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at
org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.createConnectionEventListener(SemaphoreArrayListManagedConnectionPool.java:858)
[ironjacamar-core-impl-1.0.37.Final-redhat-1.jar:1.0.37.Final-redhat-1]
at
org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:413)
[ironjacamar-core-impl-1.0.37.Final-redhat-1.jar:1.0.37.Final-redhat-1]
... 17 more
Caused by: org.infinispan.protostream.annotations.ProtoSchemaBuilderException: The class
class java.math.BigDecimal must have a public no-argument constructor.
at
org.infinispan.protostream.annotations.impl.ProtoMessageTypeMetadata.<init>(ProtoMessageTypeMetadata.java:52)
at
org.infinispan.protostream.annotations.impl.ProtoSchemaGenerator.scanAnnotations(ProtoSchemaGenerator.java:174)
at
org.infinispan.protostream.annotations.impl.ProtoMessageTypeMetadata.getProtobufType(ProtoMessageTypeMetadata.java:471)
at
org.infinispan.protostream.annotations.impl.ProtoMessageTypeMetadata.discoverFields(ProtoMessageTypeMetadata.java:333)
at
org.infinispan.protostream.annotations.impl.ProtoMessageTypeMetadata.scanMemberAnnotations(ProtoMessageTypeMetadata.java:130)
at
org.infinispan.protostream.annotations.impl.ProtoSchemaGenerator.generateAndRegister(ProtoSchemaGenerator.java:61)
at
org.infinispan.protostream.annotations.ProtoSchemaBuilder.build(ProtoSchemaBuilder.java:160)
at
org.teiid.resource.adapter.infinispan.dsl.InfinispanManagedConnectionFactory.registerToUseAnnotations(InfinispanManagedConnectionFactory.java:188)
... 24 more
{code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)