Hi,

I found the issue.
I have added this to the XML configuration:
                    <property name="indexedTypes">
                        <list>
                            <value>java.lang.Long</value>
                            
<value>org.apache.ignite.examples.model.Person</value>
                        </list>
                    </property>

And it worked!

Thank you


Από: KLEARCHOU Klearchos
Αποστολή: Πέμπτη, 9 Νοεμβρίου 2017 2:55 μμ
Προς: 'user@ignite.apache.org' <user@ignite.apache.org>
Θέμα: Failed to parse query - Table not found

Hi,

I am testing the Ignite native persistence and Spring.
I started from the SpringDataExample and change it.
I created an XML configuration that is analogous to the Java configuration that 
can be found at the SpringAppCfg class.
I attach the XML configuration for your reference.

I start the ExampleNodeStrtup with the attached configuration.
I activate the cluster through the gridgain console.
I run the modified example that:

  1.  connects to the cluster through the Java SpringAppCfg
  2.  Populates the repository
  3.  Executes the findPersons that works fine
  4.  Executes queryRepository and fails with the following error message:

Caused by: javax.cache.CacheException: Failed to execute map query on the node: 
a27311bb-fdac-4dcf-be43-5d7477ed7f15, class 
org.apache.ignite.IgniteCheckedException:Failed to parse SQL query: SELECT
"PersonCache".__Z0._KEY __C0_0,
"PersonCache".__Z0._VAL __C0_1
FROM "PersonCache".PERSON __Z0
WHERE __Z0.FIRSTNAME = ?1

The server's logs:
Caused by: org.h2.jdbc.JdbcSQLException: Table "PERSON" not found; SQL 
statement:
SELECT
"PersonCache".__Z0._KEY __C0_0,
"PersonCache".__Z0._VAL __C0_1
FROM "PersonCache".PERSON __Z0
WHERE __Z0.FIRSTNAME = ?1 [42102-195]

I have started the cluster with -DIGNITE_H2_DEBUG_CONSOLE=true and I have run 
this query at the H2 console:
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA
And the answer is:

E4225FA1-4F00-4C16-8C8B-E5675B399DCB

   ignite-sys-cache

  Unicode

  OFF

  FALSE

  5

E4225FA1-4F00-4C16-8C8B-E5675B399DCB

   PersonCache

  Unicode

  OFF

  FALSE

  6

E4225FA1-4F00-4C16-8C8B-E5675B399DCB

   INFORMATION_SCHEMA

  Unicode

  OFF

  FALSE

  -1

E4225FA1-4F00-4C16-8C8B-E5675B399DCB

   PUBLIC

  Unicode

  OFF

  TRUE



  0



What I have done wrong?

Thank you in advance!
Think before you print. This e-mail, and any files and attachments transmitted 
with it, is confidential. It is intended for the sole use of the named 
recipients(s) only. If you have received this message in error, please 
immediately notify us by replying to this message and then permanently delete 
it. Any views and opinions expressed are those of the individual author/sender 
and are not necessarily shared or endorsed by INTRASOFT International SA or any 
associated or related company. This e-mail transmission is not binding for the 
purposes of forming a contract and does not form a contractual obligation of 
any type.

Reply via email to