6 Replies Latest reply on Feb 21, 2013 11:42 AM by rhopp

    Simple HelloWorld connector/translator

    rhopp Newbie

      Hi,

      I'm trying to write simple HelloWorld connector/translator. Desired behavior is that it seems to be allways connected and to any query return "Hello World".

      I followed developers guide with peeking to other connectors/translators (file, gdocs, ...). I managed to deploy connector and create JBoss AS translator module.

      But when I try to deploy my test VDB i got this error:

       

      0:11:00,373 WARN  [org.teiid.RUNTIME] (teiid-async-threads - 1) TEIID50036 VDB Test.1 model "Test" metadata failed to load. Reason:org.teiid.resource.spi.WrappedConnectionFactory cannot be cast to org.jboss.teiid.connector.helloworld.HelloWorldManagedConnectionFactory: java.lang.ClassCastException: org.teiid.resource.spi.WrappedConnectionFactory cannot be cast to org.jboss.teiid.connector.helloworld.HelloWorldManagedConnectionFactory

              at org.jboss.teiid.connectors.HelloWorldExecutionFactory.getConnection(HelloWorldExecutionFactory.java:14)

              at org.teiid.query.metadata.NativeMetadataRepository.loadMetadata(NativeMetadataRepository.java:46) [teiid-engine-8.3.0.Beta2-SNAPSHOT.jar:8.3.0.Beta2-SNAPSHOT]

              at org.teiid.query.metadata.ChainingMetadataRepository.loadMetadata(ChainingMetadataRepository.java:55) [teiid-engine-8.3.0.Beta2-SNAPSHOT.jar:8.3.0.Beta2-SNAPSHOT]

              at org.teiid.jboss.VDBService$6.run(VDBService.java:384) [teiid-jboss-integration-8.3.0.Beta2-SNAPSHOT.jar:8.3.0.Beta2-SNAPSHOT]

              at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33)

              at org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:801)

              at org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45)

              at org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:821)

              at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_10]

              at org.jboss.threads.JBossThread.run(JBossThread.java:122)

      WrappedConnectionFactory is set as connectionfactory-impl-class in ra.xml (as it is in other connectors i saw).