You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by Ron Wheeler <rw...@artifact-software.com> on 2016/01/24 16:40:35 UTC

CSV tutorial ClassNotFound

I downloaded the 1.7-SNAPSHOT and built it as suggested without running 
the tests.

I did try to build it earlier with tests and that generated errors.
While following the instructions on page 
http://calcite.apache.org/docs/tutorial.html
I get the following output

C:\Users\Ron\Documents\workspace-sts-3.6.4.RELEASE\Calcite\example\csv>sqlline.bat
[INFO] Scanning for projects...


[INFO] BUILD SUCCESS
[INFO] 
-----------------------------------------------------------------------
[INFO] Total time: 14.185 s
[INFO] Finished at: 2016-01-23T22:23:43-05:00
[INFO] Final Memory: 14M/210M
[INFO] 
-----------------------------------------------------------------------
sqlline version 1.1.9
sqlline> !connect jdbc:calcite:model=target/test-classes/model.json 
admin admi
Connecting to jdbc:calcite:model=target/test-classes/model.json
java.lang.RuntimeException: Error instantiating JsonCustomSchema(name=SALES)


java.lang.ClassNotFoundException: 
org.apache.calcite.adapter.csv.CsvSchemaFactory

What did I miss.

Ron

-- 
Ron Wheeler
President
Artifact Software Inc
email: rwheeler@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


Re: CSV tutorial ClassNotFound

Posted by Ron Wheeler <rw...@artifact-software.com>.
The problem is that the calcite-example-csv-1.7.0-SNAPSHOT was created 
in the target directory rather than in target/dependencies.

calcite-example-csv-1.7.0-SNAPSHOT-sources
calcite-example-csv-1.7.0-SNAPSHOT-test-sources
were also under target rather than target/dependencies

Not sure if that was my fault or a problem in the tutorial.
I don't see where I went wrong but at least I can do some more testing.

Thanks
Ron



On 24/01/2016 4:45 PM, Julian Hyde wrote:
> I see you're using Windows. I can't get sqlline.bat to fire up (I'm
> not great on Windows). But it works for me using cygwin (invoking
> sqlline from the example/csv directory).
>
> One thing to try: search for all classpath.txt and fullclasspath.txt
> in your source tree and remove them, then start sqlline.bat again.
>
> Julian
>
>
> On Sun, Jan 24, 2016 at 7:40 AM, Ron Wheeler
> <rw...@artifact-software.com> wrote:
>> I downloaded the 1.7-SNAPSHOT and built it as suggested without running the
>> tests.
>>
>> I did try to build it earlier with tests and that generated errors.
>> While following the instructions on page
>> http://calcite.apache.org/docs/tutorial.html
>> I get the following output
>>
>> C:\Users\Ron\Documents\workspace-sts-3.6.4.RELEASE\Calcite\example\csv>sqlline.bat
>> [INFO] Scanning for projects...
>>
>>
>> [INFO] BUILD SUCCESS
>> [INFO]
>> -----------------------------------------------------------------------
>> [INFO] Total time: 14.185 s
>> [INFO] Finished at: 2016-01-23T22:23:43-05:00
>> [INFO] Final Memory: 14M/210M
>> [INFO]
>> -----------------------------------------------------------------------
>> sqlline version 1.1.9
>> sqlline> !connect jdbc:calcite:model=target/test-classes/model.json admin
>> admi
>> Connecting to jdbc:calcite:model=target/test-classes/model.json
>> java.lang.RuntimeException: Error instantiating JsonCustomSchema(name=SALES)
>>
>>
>> java.lang.ClassNotFoundException:
>> org.apache.calcite.adapter.csv.CsvSchemaFactory
>>
>> What did I miss.
>>
>> Ron
>>
>> --
>> Ron Wheeler
>> President
>> Artifact Software Inc
>> email: rwheeler@artifact-software.com
>> skype: ronaldmwheeler
>> phone: 866-970-2435, ext 102
>>


-- 
Ron Wheeler
President
Artifact Software Inc
email: rwheeler@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


Re: CSV tutorial ClassNotFound

Posted by Julian Hyde <jh...@apache.org>.
I see you're using Windows. I can't get sqlline.bat to fire up (I'm
not great on Windows). But it works for me using cygwin (invoking
sqlline from the example/csv directory).

One thing to try: search for all classpath.txt and fullclasspath.txt
in your source tree and remove them, then start sqlline.bat again.

Julian


On Sun, Jan 24, 2016 at 7:40 AM, Ron Wheeler
<rw...@artifact-software.com> wrote:
> I downloaded the 1.7-SNAPSHOT and built it as suggested without running the
> tests.
>
> I did try to build it earlier with tests and that generated errors.
> While following the instructions on page
> http://calcite.apache.org/docs/tutorial.html
> I get the following output
>
> C:\Users\Ron\Documents\workspace-sts-3.6.4.RELEASE\Calcite\example\csv>sqlline.bat
> [INFO] Scanning for projects...
>
>
> [INFO] BUILD SUCCESS
> [INFO]
> -----------------------------------------------------------------------
> [INFO] Total time: 14.185 s
> [INFO] Finished at: 2016-01-23T22:23:43-05:00
> [INFO] Final Memory: 14M/210M
> [INFO]
> -----------------------------------------------------------------------
> sqlline version 1.1.9
> sqlline> !connect jdbc:calcite:model=target/test-classes/model.json admin
> admi
> Connecting to jdbc:calcite:model=target/test-classes/model.json
> java.lang.RuntimeException: Error instantiating JsonCustomSchema(name=SALES)
>
>
> java.lang.ClassNotFoundException:
> org.apache.calcite.adapter.csv.CsvSchemaFactory
>
> What did I miss.
>
> Ron
>
> --
> Ron Wheeler
> President
> Artifact Software Inc
> email: rwheeler@artifact-software.com
> skype: ronaldmwheeler
> phone: 866-970-2435, ext 102
>