-
1. Re: How to deploy a VDB created with Teiid Designer as Teiid Embedded?
rareddy Oct 13, 2015 11:54 AM (in response to parrotola)1 of 1 people found this helpfulAs error is indicating, the Embeeded engine is not started. You need to do
es.start(config);
before call the deploy method.
-
2. Re: How to deploy a VDB created with Teiid Designer as Teiid Embedded?
parrotola Oct 14, 2015 6:52 AM (in response to rareddy)Thanks for your fast reply.
I have improved my application but I have still an error:
This is my code:
EmbeddedServer es=new EmbeddedServer();
EmbeddedConfiguration ec=new EmbeddedConfiguration();
MySQL5ExecutionFactory mysql=new MySQL5ExecutionFactory();
mysql.setSupportsDirectQueryProcedure(true);
mysql.start();
es.addTranslator("mysql5",mysql);
es.start(ec);
URL vdburl=new File("vdbinsurance.vdb").toURI().toURL();
es.deployVDBZip(vdburl);
Connection c=es.getDriver().connect("jdbc:teiid:vdbinsurance", null);
execute(c, "select * from ANAG_CLIENTI limit 10", false);
The stack trace is :
AVVERTENZA: TEIID30020 Processing exception for request ccVC+adb3UD7.0 'TEIID30498 Capabilities for mysqlins were not available. The command could not be planned properly.'. Originally QueryPlannerException 'Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial' NamingManager.java:662. Enable more detailed logging to see the entire stacktrace.
org.teiid.jdbc.TeiidSQLException: TEIID30498 Capabilities for mysqlins were not available. The command could not be planned properly.
at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:135)
at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:71)
at org.teiid.jdbc.StatementImpl.postReceiveResults(StatementImpl.java:700)
at org.teiid.jdbc.StatementImpl.access$100(StatementImpl.java:64)
at org.teiid.jdbc.StatementImpl$2.onCompletion(StatementImpl.java:539)
at org.teiid.client.util.ResultsFuture.addCompletionListener(ResultsFuture.java:148)
at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:535)
at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:1068)
at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:320)
at com.teiid.embed.Vdb_Example.execute(Vdb_Example.java:29)
at com.teiid.embed.Vdb_Example.main(Vdb_Example.java:89)
Do you think I'm missing some Class or instruction?
For excel example, I've found this extra instruction:
FileManagedConnectionFactory managedconnectionFactory = new FileManagedConnectionFactory();
managedconnectionFactory.setParentDirectory("data");
server.addConnectionFactory("java:/excel-file", managedconnectionFactory.createConnectionFactory());
Is there a similar instruction for DBMS?
Using VDB with multiple datasource, how can I work?
Thanks a lot. Best regards.
Francesco Paparella
-
3. Re: How to deploy a VDB created with Teiid Designer as Teiid Embedded?
rareddy Oct 14, 2015 8:51 AM (in response to parrotola)1 of 1 people found this helpfulYes, you are missing the physical connection to your mysql data source. See this example https://github.com/teiid/teiid-embedded-examples/blob/master/embedded-portfolio/src/main/java/org/teiid/example/TeiidEmbeddedPortfolio.java
Ramesh..
-
4. Re: How to deploy a VDB created with Teiid Designer as Teiid Embedded?
parrotola Oct 15, 2015 3:28 AM (in response to rareddy)Thank you very much.
I have risolved my problem successfully.
Bye