Google Groups Home
Help | Sign in
streamcruncher stockpricecomparision problem
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Satish Setty (HCL Financial Services)  
View profile
 More options Apr 21, 7:37 am
From: "Satish Setty (HCL Financial Services)" <Satish.Se...@hcl.in>
Date: Mon, 21 Apr 2008 17:07:42 +0530
Local: Mon, Apr 21 2008 7:37 am
Subject: streamcruncher stockpricecomparision problem

Hi,

   Thanks for good lightweight CEP product.

  1. Need more information about aggregators, partitions, windows,
$row_status. Any links will be highly useful.

   2. How are streamcruncher queries different from EQL?

   Tried streamcruncher example (StockPriceComparisionTest) with H2 and
Oracle. Get problems

    1. with oracle I get below exception

streamcruncher.api.StreamCruncherException

: java.lang.NullPointerException

at streamcruncher.api.StreamCruncher.parseQuery(

StreamCruncher.java:228)

at com.hcl.mifid.sor.cep.StockPriceComparisionTest.init(

StockPriceComparisionTest.java:74)

at com.hcl.mifid.sor.cep.StockPriceComparisionTest.<init>(

StockPriceComparisionTest.java:45)

at com.hcl.mifid.sor.cep.StockPriceComparisionTest.getInstance(

StockPriceComparisionTest.java:28)

at com.hcl.mifid.sor.feeds.FeedQuote1Thread.process(

FeedQuote1Thread.java:72)

at com.hcl.mifid.sor.feeds.FeedQuote1Thread.run(

FeedQuote1Thread.java:139)

at java.lang.Thread.run(

Thread.java:595)

Caused by:

java.lang.NullPointerException

at
streamcruncher.innards.impl.query.OracleParser.getFirstIdColumnInResultS
QL(

OracleParser.java:108)

at streamcruncher.innards.impl.query.AbstractParser.visit(

AbstractParser.java:240)

at streamcruncher.innards.impl.query.AbstractParser.visit(

AbstractParser.java:433)

at streamcruncher.innards.impl.query.AbstractParser.visit(

AbstractParser.java:433)

at streamcruncher.innards.impl.query.AbstractParser.parse(

AbstractParser.java:192)

at streamcruncher.api.StreamCruncher.parseQuery(

StreamCruncher.java:222)

... 6 more

-

java.lang.NullPointerException

at com.hcl.mifid.sor.cep.StockPriceComparisionTest.writetEvents(

StockPriceComparisionTest.java:138)

at com.hcl.mifid.sor.feeds.FeedQuote1Thread.process(

FeedQuote1Thread.java:73)

at com.hcl.mifid.sor.feeds.FeedQuote1Thread.run(

FeedQuote1Thread.java:139)

at java.lang.Thread.run(

Thread.java:595)

   2. With H2 I get below exception

Apr 21, 2008 1:27:03 PM streamcruncher.util.TimeKeeper start

INFO: Started

streamcruncher.api.StreamCruncherException

: org.apache.commons.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory (Syntax error in SQL statement SET
CREATE_BUILD[*] 70; expected AUTOCOMMIT, IGNORECASE, PASSWORD, SALT,
MODE, COMPRESS_LOB, DATABASE, COLLATION, CLUSTER,
DATABASE_EVENT_LISTENER, ALLOW_LITERALS, DEFAULT_TABLE_TYPE, CREATE,
HSQLDB.DEFAULT_TABLE_TYPE, CACHE_TYPE, FILE_LOCK, STORAGE,
DB_CLOSE_ON_EXIT, ACCESS_MODE_LOG, ASSERT, ACCESS_MODE_DATA, RECOVER,
SCHEMA, DATESTYLE, SEARCH_PATH, SCHEMA_SEARCH_PATH, LOGSIZE [42001-56])

at streamcruncher.api.StreamCruncher.start(

StreamCruncher.java:112)

at com.hcl.mifid.sor.cep.StockPriceComparisionTest.<init>(

StockPriceComparisionTest.java:44)

at com.hcl.mifid.sor.cep.StockPriceComparisionTest.getInstance(

StockPriceComparisionTest.java:28)

at com.hcl.mifid.sor.feeds.FeedQuote1Thread.process(

FeedQuote1Thread.java:72)

at com.hcl.mifid.sor.feeds.FeedQuote1Thread.run(

FeedQuote1Thread.java:139)

at java.lang.Thread.run(

Thread.java:595)

Caused by:

org.apache.commons.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory (Syntax error in SQL statement SET
CREATE_BUILD[*] 70; expected AUTOCOMMIT, IGNORECASE, PASSWORD, SALT,
MODE, COMPRESS_LOB, DATABASE, COLLATION, CLUSTER,
DATABASE_EVENT_LISTENER, ALLOW_LITERALS, DEFAULT_TABLE_TYPE, CREATE,
HSQLDB.DEFAULT_TABLE_TYPE, CACHE_TYPE, FILE_LOCK, STORAGE,
DB_CLOSE_ON_EXIT, ACCESS_MODE_LOG, ASSERT, ACCESS_MODE_DATA, RECOVER,
SCHEMA, DATESTYLE, SEARCH_PATH, SCHEMA_SEARCH_PATH, LOGSIZE [42001-56])

at org.apache.commons.dbcp.BasicDataSource.createDataSource(

BasicDataSource.java:855)

at org.apache.commons.dbcp.BasicDataSource.getConnection(

BasicDataSource.java:540)

at streamcruncher.innards.db.DatabaseInterface.createConnection(

DatabaseInterface.java:243)

at
streamcruncher.innards.db.DatabaseInterface.setupLastStandingConnection(

DatabaseInterface.java:135)

at streamcruncher.innards.db.DatabaseInterface.start(

DatabaseInterface.java:124)

at streamcruncher.boot.Main.initInnards(

Main.java:170)

at streamcruncher.boot.Main.start(

Main.java:88)

at streamcruncher.api.StreamCruncher.start(

StreamCruncher.java:109)

... 5 more

Caused by:

org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement SET
CREATE_BUILD[*] 70; expected AUTOCOMMIT, IGNORECASE, PASSWORD, SALT,
MODE, COMPRESS_LOB, DATABASE, COLLATION, CLUSTER,
DATABASE_EVENT_LISTENER, ALLOW_LITERALS, DEFAULT_TABLE_TYPE, CREATE,
HSQLDB.DEFAULT_TABLE_TYPE, CACHE_TYPE, FILE_LOCK, STORAGE,
DB_CLOSE_ON_EXIT, ACCESS_MODE_LOG, ASSERT, ACCESS_MODE_DATA, RECOVER,
SCHEMA, DATESTYLE, SEARCH_PATH, SCHEMA_SEARCH_PATH, LOGSIZE [42001-56]

at org.h2.message.Message.addSQL(

Message.java:360)

at org.h2.engine.MetaRecord.execute(

MetaRecord.java:69)

at org.h2.engine.Database.open(

Database.java:516)

at org.h2.engine.Database.<init>(

Database.java:179)

at org.h2.engine.Engine.openSession(

Engine.java:49)

at org.h2.engine.Engine.getSession(

Engine.java:92)

at org.h2.engine.Session.createSession(

Session.java:134)

at org.h2.jdbc.JdbcConnection.<init>(

JdbcConnection.java:928)

at org.h2.Driver.connect(

Driver.java:51)

at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(

DriverConnectionFactory.java:37)

at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(

PoolableConnectionFactory.java:290)

at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(

BasicDataSource.java:877)

at org.apache.commons.dbcp.BasicDataSource.createDataSource(

BasicDataSource.java:851)

... 12 more

Caused by:

org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement SET
CREATE_BUILD[*] 70; expected AUTOCOMMIT, IGNORECASE, PASSWORD, SALT,
MODE, COMPRESS_LOB, DATABASE, COLLATION, CLUSTER,
DATABASE_EVENT_LISTENER, ALLOW_LITERALS, DEFAULT_TABLE_TYPE, CREATE,
HSQLDB.DEFAULT_TABLE_TYPE, CACHE_TYPE, FILE_LOCK, STORAGE,
DB_CLOSE_ON_EXIT, ACCESS_MODE_LOG, ASSERT, ACCESS_MODE_DATA, RECOVER,
SCHEMA, DATESTYLE, SEARCH_PATH, SCHEMA_SEARCH_PATH, LOGSIZE [42001-56]

at org.h2.message.Message.getSQLException(

Message.java:84)

at org.h2.message.Message.getSyntaxError(

Message.java:94)

at org.h2.command.Parser.getSyntaxError(

Parser.java:442)

at org.h2.command.Parser.parseSet(

Parser.java:3673)

at org.h2.command.Parser.parsePrepared(

Parser.java:358)

at org.h2.command.Parser.parse(

Parser.java:254)

at org.h2.command.Parser.parse(

Parser.java:230)

at org.h2.command.Parser.prepare(

Parser.java:179)

at org.h2.engine.Session.prepare(

Session.java:159)

at org.h2.engine.Session.prepare(

Session.java:153)

at org.h2.engine.MetaRecord.execute(

MetaRecord.java:64)

... 23 more

-

java.lang.NullPointerException

at com.hcl.mifid.sor.cep.StockPriceComparisionTest.writetEvents(

StockPriceComparisionTest.java:138)

at com.hcl.mifid.sor.feeds.FeedQuote1Thread.process(

FeedQuote1Thread.java:73)

at com.hcl.mifid.sor.feeds.FeedQuote1Thread.run(

FeedQuote1Thread.java:139)

at java.lang.Thread.run(

Thread.java:595)

 Thanks

DISCLAIMER:
--------------------------------------------------------------------------- --------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender immediately. Before opening any mail and
attachments please check them for viruses and defect.

--------------------------------------------------------------------------- --------------------------------------------

  StockPriceComparisionTest.java
8K Download

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ashwin  
View profile
 More options Apr 22, 1:26 am
From: Ashwin <ashwin.jayaprak...@gmail.com>
Date: Mon, 21 Apr 2008 22:26:57 -0700 (PDT)
Local: Tues, Apr 22 2008 1:26 am
Subject: Re: streamcruncher stockpricecomparision problem
I don't see any problems. I just ran the Test case from the command
line and here are the results:

Use the StandAloneDemo.java test and change it to run the
H2StockPriceComparisonTest like this and compile it using
sc_compile_tests.bat and then run it using sc_run_standalone.bat

    public void runATest() throws Exception {
        /*
         * Create an anonymous inner, sub-class because the methods
are
         * protected. Inherit the DB specific TestCase for which the
Test must
         * be run and invoke the test method.
         */
        new H2StockPriceComparisonTest() {
            public void performTest() throws Exception {
                super.init();
                super.test();
                super.discard();
            }
        }.performTest();
    }

Test output:

INFO: Started
Apr 21, 2008 10:23:04 PM streamcruncher.kernel.RowDisposer start
INFO: Started
YHOO 28 2008-04-21 22:23:05.734 1
1000
YHOO 27 2008-04-21 22:23:06.734 2
1000
YHOO 25 2008-04-21 22:23:07.75 3
1000
YHOO 30 2008-04-21 22:23:08.75 4
1000
YHOO 30.5 2008-04-21 22:23:09.75 5
1000
YHOO 29.75 2008-04-21 22:23:10.765 6
1000
YHOO 26 2008-04-21 22:23:11.765 7
1000
YHOO 26 2008-04-21 22:23:12.765 8
1000
YHOO 27 2008-04-21 22:23:13.765 9
1000
YHOO 25.5 2008-04-21 22:23:14.781 10
1000
YHOO 22 2008-04-21 22:23:15.781 11
1000
YHOO 22.5 2008-04-21 22:23:16.796 12
1000
YHOO 24.5 2008-04-21 22:23:17.796 13
1000
YHOO 26.5 2008-04-21 22:23:18.796 14
Got result batch.
Got result batch.
Got result batch.
Got result batch.
Retrying for more results...
Retrying for more results...
Retrying for more results...
Retrying for more results...
Retrying for more results...
--Results--
Batch created at: 2008-04-21 22:23:18.859. Rows: 2
 Batch results
 30.0 25.0
 30.0 27.0
Batch created at: 2008-04-21 22:23:18.859. Rows: 1
 Batch results
 30.5 25.0
Batch created at: 2008-04-21 22:23:18.859. Rows: 2
 Batch results
 24.5 22.0
 24.5 22.5
Batch created at: 2008-04-21 22:23:18.859. Rows: 2
 Batch results
 26.5 22.5
 26.5 24.5
Stopping...RowDisposer

Regards,
Ashwin.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google