teiid / teiid-spring-boot

Teiid Spring Boot is fast way to get to your Data Virtualizations projects using Teiid and Spring Boot
https://teiid.io
Apache License 2.0
46 stars 63 forks source link

NullPointerException with v1.6.0 because TeiidServer.externalSources is null #299

Closed fokko2402 closed 4 years ago

fokko2402 commented 4 years ago

vdb.ddl.txt

Upgrading from v1.5.1 to v1.6.0 I'm experiencing problems with processing the vdb.ddl. Creating the Database and Server is doing fine but once creating a Schema the NPE rises in TeiidServer line 220, where source is null. I'm using an Oracle database with 2 datasources.

rareddy commented 4 years ago

please provide stack trace

fokko2402 commented 4 years ago

Terminal Console.txt

I hope you have a clue

rareddy commented 4 years ago

Did you define the vdb with Oracle jar in 1.5.1?

CREATE SERVER DB_DS TYPE 'ojdbc7-12.1.0.2.jar' FOREIGN DATA WRAPPER oracle;

That will not work, you need to add the following dependency in your pom.xml for the Oracle translator

<dependency>
  <groupId>org.teiid</groupId>
  <artifactid>spring-data-oracle</artifactid>
</dependency>

Then also the dependency for the Oracle jar file, since that is not available in any public repositories like maven central, you need to add to your local maven repo and then add coordinates to that.

fokko2402 commented 4 years ago

Yes, it worked with 1.5.1. I already added the Oracle jar file to our local maven repo. And the extra dependency did the trick! Thank you for your advice and help.