I'm trying to express the rule "at least two foos followed by two bars within 2 seconds" in EPL. I've tried using both patterns and match_recognize, and I can't get the semantics I want. I've modified the StockTick example from the online EPL tool to illustrate what I'm doing.
I've tried the two patterns below:
select g[0].seq, g[1].seq, g[2].seq, g[3].seq, y[0].seq, y[1].seq from pattern [
every ([2:] g=StockTick(symbol = 'GE') until timer:interval(2 sec)) -> not timer:interval(2 sec) and every [2] y=StockTick(symbol = 'YHOO')
];
and
select * from StockTick match_recognize (
measures g[0].seq as g0_seq, g[1].seq as g1_seq, g[2].seq as g2_seq, g[3].seq as g3_seq, y[0].seq as y0_seq, y[1].seq as y1_seq
pattern (g{2,} y{2})
interval 2 sec
define
g as g.symbol = 'GE',
y as y.symbol = 'YHOO'
);
for the following event definition:
create schema StockTick(seq int, symbol string);
on the following input:
StockTick={seq=1, symbol='GE'}
t=t.plus(200 msec)
StockTick={seq=2, symbol='GE'}
t=t.plus(200 msec)
StockTick={seq=3, symbol='GE'}
t=t.plus(200 msec)
StockTick={seq=4, symbol='GE'}
t=t.plus(200 msec)
StockTick={seq=5, symbol='YHOO'}
t=t.plus(200 msec)
StockTick={seq=6, symbol='GE'}
t=t.plus(200 msec)
StockTick={seq=7, symbol='GE'}
t=t.plus(200 msec)
StockTick={seq=8, symbol='GE'}
t=t.plus(200 msec)
StockTick={seq=9, symbol='YHOO'}
t=t.plus(200 msec)
StockTick={seq=10, symbol='YHOO'}
t=t.plus(200 msec)
StockTick={seq=11, symbol='GE'}
t=t.plus(200 msec)
StockTick={seq=12, symbol='YHOO'}
t=t.plus(200 msec)
StockTick={seq=13, symbol='YHOO'}
t=t.plus(200 msec)
StockTick={seq=14, symbol='YHOO'}
t=t.plus(200 msec)
StockTick={seq=15, symbol='GE'}
t=t.plus(200 msec)
StockTick={seq=16, symbol='GE'}
t=t.plus(200 msec)
StockTick={seq=17, symbol='GE'}
t=t.plus(200 msec)
StockTick={seq=18, symbol='GE'}
t=t.plus(200 msec)
StockTick={seq=19, symbol='GE'}
t=t.plus(200 msec)
StockTick={seq=20, symbol='YHOO'}
t=t.plus(200 msec)
StockTick={seq=21, symbol='GE'}
t=t.plus(200 msec)
StockTick={seq=22, symbol='YHOO'}
t=t.plus(200 msec)
StockTick={seq=23, symbol='GE'}
t=t.plus(200 msec)
StockTick={seq=24, symbol='GE'}
t=t.plus(200 msec)
StockTick={seq=25, symbol='GE'}
t=t.plus(200 msec)
StockTick={seq=26, symbol='GE'}
and got the following output:
At: 2001-01-01 08:00:02.400
Statement: Stmt-2
Insert
Stmt-2-output={g[0].seq=1, g[1].seq=2, g[2].seq=3, g[3].seq=4, y[0].seq=12, y[1].seq=13}
At: 2001-01-01 08:00:03.000
Statement: Stmt-3
Insert
Stmt-3-output={g0_sec=6, g1_sec=7, g2_sec=8, g3_seq=(null), y0_seq=9, y1_seq=10}
At: 2001-01-01 08:00:03.800
Statement: Stmt-2
Insert
Stmt-2-output={g[0].seq=1, g[1].seq=2, g[2].seq=3, g[3].seq=4, y[0].seq=14, y[1].seq=20}
I understand with with the first EPL statement, the until timer:interval(2 sec) does not match the logic I actually intended, but I'm not sure how else to express it.
I have tried attaching windows (#time(2 sec)) to the patterns without the output changing.
I am looking to get matches with the following sequence numbers:
(1, 2, 3, 4, 5, 9)
(1, 2, 3, 4, 9, 10)
(2, 3, 4, 6, 9, 10)
etc.
such that the rule is evaluated for each 2 second window, and I get maximally long sequences of g in each of these windows.
The "interval" in match-recognize has a different meaning. What you want is this:
select * from StockTick#time(2 sec) match_recognize...
The doc link is http://espertech.com/esper/release-6.1.0/esper-reference/html_single/index.html#match-recognize-datawindow
Related
I wrote a code with Swift 2 and I converted it to Swift 3. Unfortunately, it doesn't work anymore.
Here is the incriminated code:
func loadImage( url: String?, completionHandler: #escaping( UIImage?, NSError? ) -> Void ) {
var theSrc: String?
if let src = url {
theSrc = src
} else {
theSrc = placeHolderImg
}
let url = URL( string: theSrc! )!
let request = NSMutableURLRequest( url: url )
URLSession.shared.dataTask( with: request as URLRequest ) { data, response, error in
if error == nil {
let image = UIImage( data:data! )
completionHandler( image, nil )
} else {
completionHandler( nil, error as NSError? )
}
}.resume()
}
This function is called like this:
WordPressWebServices.sharedInstance.loadImage( url: theImgUrl, completionHandler: { ( image, error ) -> Void in
DispatchQueue.main.async( execute: {
//Some code
} )
} )
Here is what I get from the debug console:
2016-10-19 06:40:15.458 tdr-ios-prototype[652:8825] -[_SwiftValue unsignedIntegerValue]: unrecognized selector sent to instance 0x6000000586f0
2016-10-19 06:40:15.478 tdr-ios-prototype[652:8825] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[_SwiftValue unsignedIntegerValue]: unrecognized selector sent to instance 0x6000000586f0'
*** First throw call stack:
(
0 CoreFoundation 0x000000010dac634b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010d52721e objc_exception_throw + 48
2 CoreFoundation 0x000000010db35f34 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x000000010da4bc15 ___forwarding___ + 1013
4 CoreFoundation 0x000000010da4b798 _CF_forwarding_prep_0 + 120
5 UIFoundation 0x0000000114e81953 -[NSHTMLReader _loadUsingWebKit] + 1329
6 UIFoundation 0x0000000114e82f15 -[NSHTMLReader attributedString] + 22
7 UIFoundation 0x0000000114e1945c _NSReadAttributedStringFromURLOrData + 5779
8 UIFoundation 0x0000000114e17d35 -[NSAttributedString(NSAttributedStringUIFoundationAdditions) initWithData:options:documentAttributes:error:] + 115
9 tdr-ios-prototype 0x000000010ceae80d _TTOFE5UIKitCSo18NSAttributedStringcfzT4dataV10Foundation4Data7optionsGVs10DictionarySSP__18documentAttributesGSqGVs33AutoreleasingUnsafeMutablePointerGSqCSo12NSDictionary____S0_ + 173
10 tdr-ios-prototype 0x000000010ceae6c4 _TFE5UIKitCSo18NSAttributedStringCfzT4dataV10Foundation4Data7optionsGVs10DictionarySSP__18documentAttributesGSqGVs33AutoreleasingUnsafeMutablePointerGSqCSo12NSDictionary____S0_ + 100
11 tdr-ios-prototype 0x000000010ceae14f _TFE17tdr_ios_prototypeSSCfT17htmlEncodedStringSS_GSqSS_ + 751
12 tdr-ios-prototype 0x000000010cea4191 _TFFFFC17tdr_ios_prototype11PostManager14getTheLastPostFT_T_U_FTGSqGSaGVs10DictionarySSPs9AnyObject____GSqCSo7NSError__T_U_FTGSqCSo7UIImage_GSqS3___T_U_FT_T_ + 545
13 tdr-ios-prototype 0x000000010cea55c0 _TPA__TFFFFC17tdr_ios_prototype11PostManager14getTheLastPostFT_T_U_FTGSqGSaGVs10DictionarySSPs9AnyObject____GSqCSo7NSError__T_U_FTGSqCSo7UIImage_GSqS3___T_U_FT_T_ + 512
14 tdr-ios-prototype 0x000000010ce7b827 _TTRXFo___XFdCb___ + 39
15 libdispatch.dylib 0x00000001119e9980 _dispatch_call_block_and_release + 12
16 libdispatch.dylib 0x0000000111a130cd _dispatch_client_callout + 8
17 libdispatch.dylib 0x00000001119f38d6 _dispatch_main_queue_callback_4CF + 406
18 CoreFoundation 0x000000010da8a4f9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
19 CoreFoundation 0x000000010da4ff8d __CFRunLoopRun + 2205
20 CoreFoundation 0x000000010da4f494 CFRunLoopRunSpecific + 420
21 GraphicsServices 0x0000000113903a6f GSEventRunModal + 161
22 UIKit 0x000000010e8e8f34 UIApplicationMain + 159
23 tdr-ios-prototype 0x000000010cea64ff main + 111
24 libdyld.dylib 0x0000000111a5f68d start + 1
25 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
I searched on the Internet and found some posts about this kind of error but I couldn't find a solution. Is it a problem of type casting or am I using completion handlers the wrong way?
From what I found, the following line seems to be the problem. Or at least, it is the point where the application crashes.
completionHandler( image, nil )
The method loadImage is part of a process called LoadTheLastPost. I am working with the Wordpress REST API V2. Basically an object called PostManager is created in AppDelegate (didFinishLaunchingWithOptions). This object will call the method getTheLastPost included in a class named WordPressWebServices which is a singleton. The method loadImage is called through getTheLasPost. Maybe there is something wrong with that? What do you think?
Maybe I can add that I, after I collected the data, I create a Post object like this:
let theLastPost = Post( id: postID!, title: String( htmlEncodedString: title! ), content: String( htmlEncodedString: content! ), imageId: imgID!, imageUrl: theImgUrl, image: theImg )
Here is a quick view of my Post class :
class Post: NSObject, NSCoding {
var id: Int
var title: String?
var content: String?
var imageId: Int
var imageUrl: String?
var image: UIImage?
init?( id: Int, title: String?, content: String?, imageId: Int, imageUrl: String?, image: UIImage? ) {
self.id = id
self.title = title
self.content = content
self.imageId = imageId
self.imageUrl = imageUrl
self.image = image
super.init()
if id < 1 {
return nil
}
}
}
Any help would be much appreciated! Many thanks!
EDIT
It seems that I was wrong about the origin of my problem. The problem comes from this line:
let theLastPost = Post( id: postID!, title: String( htmlEncodedString: title! ), content: String( htmlEncodedString: content! ), imageId: imgID!, imageUrl: theImgUrl, image: theImg )
The String( htmlEncodedString: title! ) and the String( htmlEncodedString: content! ) cause the error.
Here is my String extension:
extension String {
init?( htmlEncodedString: String ) {
let encodedData = htmlEncodedString.data( using: String.Encoding.utf8 )!
let attributedOptions: [ String: AnyObject ] = [ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType as AnyObject, NSCharacterEncodingDocumentAttribute: String.Encoding.utf8 as AnyObject ]
var attributedString: NSAttributedString?
do {
attributedString = try NSAttributedString( data: encodedData, options: attributedOptions, documentAttributes: nil )
} catch {
print( error )
}
self.init( attributedString!.string )
}
}
SOLUTION
The problem came from my String extension. Thanks to this post https://stackoverflow.com/a/39644620/1826332, which I saw from the beginning but thought it was something else, I managed to find a solution.
I had to edit the line
let attributedOptions: [ String: AnyObject ] = [ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType as AnyObject, NSCharacterEncodingDocumentAttribute: String.Encoding.utf8 as AnyObject ]
...like this :
let attributedOptions: [ String: AnyObject ] = [ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType as AnyObject, NSCharacterEncodingDocumentAttribute: NSNumber(value: String.Encoding.utf8.rawValue) as AnyObject ]
I have two models:
class Transaction < ActiveRecord::Base
self.table_name = 'DEPOSIT_TRANSACTIONS'
belongs_to :deposit_account
scope :not_test, -> { includes(:deposit_account).where("deposit_accounts.is_test_account is null or deposit_accounts.is_test_account != 1").references(:deposit_account) }
...
end
class DepositAccount < ActiveRecord::Base
has_many :transactions, -> { order(:creation_date => :desc) }
default_scope { where(:purpose => 'COUNTERFEIT') }
scope :not_test, -> { where("is_test_account != 1") }
...
end
I tried to eager load the both tables with:
irb(main):008:0> request_transactions = Transaction.eager_load(:deposit_account)
**I polish the following output**
SQL (6390.0ms) SELECT "DEPOSIT_TRANSACTIONS"."ID" AS t0_r0,
"DEPOSIT_TRANSACTIONS"."DEPOSIT_ACCOUNT_ID" AS t0_r1,
"DEPOSIT_TRANSACTIONS"."TRANSACTION_TYPE" AS t0_r2,
"DEPOSIT_TRANSACTIONS"."TRACKING_ID" AS t0_r3,
"DEPOSIT_TRANSACTIONS"."AMOUNT" AS t0_r4,
"DEPOSIT_TRANSACTIONS"."STATUS" AS t0_r5,
"DEPOSIT_TRANSACTIONS"."TRANSACTION_COMMENT" AS t0_r6,
"DEPOSIT_TRANSACTIONS"."NOTIFICATION_EMAILS" AS t0_r7,
"DEPOSIT_TRANSACTIONS"."CREATED_BY" AS t0_r8,
"DEPOSIT_TRANSACTIONS"."CREATION_DATE" AS t0_r9,
"DEPOSIT_TRANSACTIONS"."LAST_UPDATED_BY" AS t0_r10,
"DEPOSIT_TRANSACTIONS"."LAST_UPDATED_DATE" AS t0_r11,
"DEPOSIT_TRANSACTIONS"."FINISH_DATE" AS t0_r12,
"DEPOSIT_TRANSACTIONS"."PAYMENT_DATE" AS t0_r13,
"DEPOSIT_TRANSACTIONS"."MATCH_TYPE" AS t0_r14,
"DEPOSIT_TRANSACTIONS"."ADDITIONAL_INFO" AS t0_r15,
"DEPOSIT_ACCOUNTS"."ID" AS t1_r0,
"DEPOSIT_ACCOUNTS"."SELLER_ID" AS t1_r1,
"DEPOSIT_ACCOUNTS"."MARKETPLACE_ID" AS t1_r2,
"DEPOSIT_ACCOUNTS"."PURPOSE" AS t1_r3,
"DEPOSIT_ACCOUNTS"."TOTAL_DEPOSIT_BALANCE" AS t1_r4,
"DEPOSIT_ACCOUNTS"."OUTSTANDING_DEPOSIT_REQUEST" AS t1_r5,
"DEPOSIT_ACCOUNTS"."OUTSTANDING_REFUND_REQUEST" AS t1_r6,
"DEPOSIT_ACCOUNTS"."CREATED_BY" AS t1_r7,
"DEPOSIT_ACCOUNTS"."CREATION_DATE" AS t1_r8,
"DEPOSIT_ACCOUNTS"."LAST_UPDATED_BY" AS t1_r9,
"DEPOSIT_ACCOUNTS"."LAST_UPDATED_DATE" AS t1_r10,
"DEPOSIT_ACCOUNTS"."IS_TEST_ACCOUNT" AS t1_r11,
"DEPOSIT_ACCOUNTS"."RECORD_VERSION_NUMBER" AS t1_r12,
"DEPOSIT_ACCOUNTS"."OUTSTANDING_CONFISCATE_REQUEST" AS t1_r13
FROM "DEPOSIT_TRANSACTIONS"
LEFT OUTER JOIN "DEPOSIT_ACCOUNTS"
ON "DEPOSIT_ACCOUNTS"."ID" = "DEPOSIT_TRANSACTIONS"."DEPOSIT_ACCOUNT_ID"
AND "DEPOSIT_ACCOUNTS"."PURPOSE" = 'COUNTERFEIT'
DepositAccount Load (235.0ms) SELECT "DEPOSIT_ACCOUNTS".* FROM "DEPOSIT_ACCOUNTS" WHERE "DEPOSIT_ACCOUNTS"."PURPOSE" = 'COUNTERFEIT' AND "DEPOSIT_ACCOUNTS"."ID" = 143 AND ROWNUM <= 1
DepositAccount Load (535.0ms) SELECT "DEPOSIT_ACCOUNTS".* FROM "DEPOSIT_ACCOUNTS" WHERE "DEPOSIT_ACCOUNTS"."PURPOSE" = 'COUNTERFEIT' AND "DEPOSIT_ACCOUNTS"."ID" = 143 AND ROWNUM <= 1
DepositAccount Load (471.0ms) SELECT "DEPOSIT_ACCOUNTS".* FROM "DEPOSIT_ACCOUNTS" WHERE "DEPOSIT_ACCOUNTS"."PURPOSE" = 'COUNTERFEIT' AND "DEPOSIT_ACCOUNTS"."ID" = 147 AND ROWNUM <= 1
DepositAccount Load (237.0ms) SELECT "DEPOSIT_ACCOUNTS".* FROM "DEPOSIT_ACCOUNTS" WHERE "DEPOSIT_ACCOUNTS"."PURPOSE" = 'COUNTERFEIT' AND "DEPOSIT_ACCOUNTS"."ID" = 138 AND ROWNUM <= 1
...
But it generates so many SQL, which means rails doesn't load eagerly I think. I expected the first clause is enough. Please help to eager load the tables. Thanks.
My environment:
jruby 1.7
rails 4.0
EDIT1:
I tried to run the same code on ruby 1.9 rails 4.0, the eager load works fine. So I guess this is caused by JRuby. Does anyone else have this problem?
Don't know if it matters, I use activerecord-oracle_enhanced-adapter in ruby 1.9 env, but JDBC driver in
JRuby. The database it oracle.
The problem is solved by upgrading activerecord from activerecord-4.0.9 to activerecord-4.1.5. BTW, I use activerecord-jdbc-adapter-1.3.7 as the adapter.
I have a list of urls to be played from an avqueueplayer . I am loading the tracks and playable keys and adding the AVplayeritems into the Queue player one by one after each Item has finished playing.
Iam handling the buffering states of the player using the following code
for (NSValue *time in player.currentItem.loadedTimeRanges)
{
CMTimeRange range;
[time getValue:&range];
CGFloat seekTimeInSeconds = [self playerTimeToSeek];
CMTime timeSeek = CMTimeMakeWithSeconds(seekTimeInSeconds, NSEC_PER_SEC);
bufferReady = CMTimeRangeContainsTime(range, timeSeek);
NSLog(#"%f , %f ",CMTimeGetSeconds(range.start), CMTimeGetSeconds(range.duration));
if (CMTimeGetSeconds(range.duration)==0)
{
[self.player seekToTime: CMTimeMakeWithSeconds(seekTimeInSeconds, NSEC_PER_SEC) ];
}
if ((seekTimeInSeconds) >= CMTimeGetSeconds(self.player.currentItem.duration)) //
{
bufferReady = YES;
}
if (bufferReady)
{
//if (self.bufferEmptyOccured || change|| self.bufferNeedsUpdate)
{
[self manageBufferSufficientState];
self.bufferNeedsUpdate = NO;
}
self.bufferEmptyOccured = NO;
break;
}
}
if (!player.currentItem && self.nowPlayingAudioRecord[#"AudioItem"])
{
{
bufferReady = YES;
//if (self.bufferEmptyOccured||change || self.bufferNeedsUpdate)
{
[self manageBufferSufficientState];
self.bufferNeedsUpdate = NO;
}
self.bufferEmptyOccured = NO;
}
}
if (self.nowPlayingAudioRecord &&! self.nowPlayingAudioRecord[#"AudioItem"])
{
bufferReady = NO;
}
if (!bufferReady)
{
//if (!self.bufferEmptyOccured || change || self.bufferNeedsUpdate)
{
[self manageBufferEmptyState];
if (self.bufferNeedsUpdate)
{
self.bufferNeedsUpdate = NO;
}
}
self.bufferEmptyOccured = YES;
}
});
and 'playertimetoseek' method determines the time to which the player has to seek in case buffer is ready. This is because each of my urls need to be played at a predefined time to be played.
This method is called regularly once every 0.6 secs by using a timer to verify the buffering status
It works well normally , but for some reason , a few urls never get buffered ( each audio is of 10-20 sec duration) within the duration of the audio and the log gets printed as
2013-11-21 18:51:02.404 myapp[523:1000b] 1.009063 , 0.000000
2013-11-21 18:51:03.003 myapp[523:1000b] 1.608808 , 0.000000
2013-11-21 18:51:03.606 myapp[523:1000b] 2.208690 , 0.000000
2013-11-21 18:51:04.203 myapp[523:1000b] 2.811525 , 0.000000
2013-11-21 18:51:04.804 myapp[523:1000b] 3.408591 , 0.000000
2013-11-21 18:51:05.403 myapp[523:1000b] 4.009229 , 0.000000
2013-11-21 18:51:06.003 myapp[523:1000b] 4.608602 , 0.000000
2013-11-21 18:51:06.604 myapp[523:1000b] 5.208743 , 0.000000
2013-11-21 18:51:07.204 myapp[523:1000b] 5.809145 , 0.000000
2013-11-21 18:51:07.803 myapp[523:1000b] 6.409183 , 0.000000
2013-11-21 18:51:08.404 myapp[523:1000b] 7.008626 , 0.000000
2013-11-21 18:51:09.003 myapp[523:1000b] 7.609262 , 0.000000
2013-11-21 18:51:09.604 myapp[523:1000b] 8.208768 , 0.000000
2013-11-21 18:51:10.203 myapp[523:1000b] 8.809213 , 0.000000
2013-11-21 18:51:10.804 myapp[523:1000b] 9.408639 , 0.000001
2013-11-21 18:51:11.404 myapp[523:1000b] 9.408639 , 0.000001
2013-11-21 18:51:12.007 myapp[523:1000b] 10.579592 , 0.000000
Note that I am on a decent network and the audio bitrate is 128Kbps. Why could this be happening ? Is there any specific reason for this ?
EDIT:: In a few other cases the logs are as below :
2013-11-21 20:53:33.970 myApp[819:605b] 2.358489 , 0.000000
2013-11-21 20:53:34.570 myApp[819:605b] 2.958184 , 0.000000
2013-11-21 20:53:35.170 myApp[819:605b] 3.558097 , 0.000000
2013-11-21 20:53:35.770 myApp[819:605b] 4.158253 , 0.000000
2013-11-21 20:53:36.371 myApp[819:605b] 4.758271 , 0.000000
2013-11-21 20:53:36.970 myApp[819:605b] 5.358620 , 0.000000
2013-11-21 20:53:37.570 myApp[819:605b] 5.958164 , 0.000000
2013-11-21 20:53:38.170 myApp[819:605b] 6.558318 , 0.000000
2013-11-21 20:53:38.770 myApp[819:605b] 7.158033 , 0.000000
2013-11-21 20:53:39.371 myApp[819:605b] 7.758199 , 0.000009
2013-11-21 20:53:39.971 myApp[819:605b] 7.758199 , 0.417969
2013-11-21 20:53:40.571 myApp[819:605b] 7.758199 , 9.247356
2013-11-21 20:53:41.171 myApp[819:605b] 9.978836 , 19.095449
2013-11-21 20:53:41.770 myApp[819:605b] 9.978836 , 19.095449
2013-11-21 20:53:42.371 myApp[819:605b] 9.978836 , 19.095449
2013-11-21 20:53:42.971 myApp[819:605b] 9.978836 , 19.095449
2013-11-21 20:53:43.573 myApp[819:605b] 9.978836 , 19.095449
2013-11-21 20:53:44.171 myApp[819:605b] 9.978836 , 19.095449
How does this happen . It hasn't buffered anything until 20:53:39.971 and buffered almost everything within 0.6 seconds . How exactly does buffering work ?
I'm using Neo4j-community-1.9.M04, connecting with python rest client (py2neo 1.4.5).
When I try to add a long text to an index, the server returns 500 Internal Server Error.
Using the py2neo client, I something like:
everything_idx = gdb.get_or_create_index(neo4j.Node, "everything", config={"type": "fulltext"})
everything_idx.add("everything", long_text, recommendation_node)
Where long_text is a variable containing text parsed from a URL and recommendation_node is the Node instance I want to index.
This is what I have in the py2neo log:
INFO 2013-03-05 11:47:17,855 rest 11104 1108 POST /db/data/index/node/everything {'Content-Type': 'application/json', 'X-Stream': 'true', 'Accept': 'application/json', 'User-Agent': 'py2neo/1.4.6 (win32; python/2.7.2)'} (47486 bytes)
INFO 2013-03-05 11:47:17,894 rest 11104 1108 500 Internal Server Error {'content-length': '0', 'server': 'Jetty(6.1.25)'}
In Neo4j logs I have the following:
console.log:
11:47:19.733 [1695422617#qtp-1319007734-22] WARN org.mortbay.log - header full: java.lang.ArrayIndexOutOfBoundsException
11:47:19.734 [1695422617#qtp-1319007734-22] ERROR org.mortbay.log - /db/data/index/node/everything
javax.ws.rs.WebApplicationException: null
at org.neo4j.server.rest.repr.OutputFormat$1.write(OutputFormat.java:156) ~[neo4j-server-1.9.M04.jar:1.9.M04]
at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:71) ~[jersey-core-1.9.jar:1.9]
at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:57) ~[jersey-core-1.9.jar:1.9]
at com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:306) ~[jersey-server-1.9.jar:1.9]
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1437) ~[jersey-server-1.9.jar:1.9]
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349) ~[jersey-server-1.9.jar:1.9]
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339) ~[jersey-server-1.9.jar:1.9]
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) ~[jersey-server-1.9.jar:1.9]
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537) ~[jersey-server-1.9.jar:1.9]
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699) ~[jersey-server-1.9.jar:1.9]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) ~[servlet-api-2.5-20081211.jar:na]
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) ~[jetty-6.1.25.jar:6.1.25]
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390) ~[jetty-6.1.25.jar:6.1.25]
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) [jetty-6.1.25.jar:6.1.25]
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) [jetty-6.1.25.jar:6.1.25]
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) [jetty-6.1.25.jar:6.1.25]
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) [jetty-6.1.25.jar:6.1.25]
at org.mortbay.jetty.Server.handle(Server.java:326) [jetty-6.1.25.jar:6.1.25]
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) [jetty-6.1.25.jar:6.1.25]
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:943) [jetty-6.1.25.jar:6.1.25]
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756) [jetty-6.1.25.jar:6.1.25]
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) [jetty-6.1.25.jar:6.1.25]
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) [jetty-6.1.25.jar:6.1.25]
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410) [jetty-6.1.25.jar:6.1.25]
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) [jetty-util-6.1.25.jar:6.1.25]
and in neo4j.0.0.log:
Mar 5, 2013 11:47:19 AM com.sun.jersey.server.impl.application.WebApplicationImpl _handleRequest
SEVERE: The response of the WebApplicationException cannot be utilized as the response is already committed. Re-throwing to the HTTP container
javax.ws.rs.WebApplicationException
at org.neo4j.server.rest.repr.OutputFormat$1.write(OutputFormat.java:156)
at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:71)
at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:57)
at com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:306)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1437)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:943)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
I thought the problem could be the rest client I'm using, so I changed it (I tried neo4jrestclient first).
Any Ideas?
Turns out that the reason adding this node to the fulltext index fails is that it is not executed in a transaction.
I tried with the following code, using neo4jrestclient with a transaction and it works:
import urllib2, logging, logging.config, pdb, traceback
from neo4jrestclient.client import GraphDatabase, Node, Relationship
gdb = GraphDatabase("http://localhost:7474/db/data/")
everything_idx = gdb.nodes.indexes.create("everything_", type="fulltext", provider="lucene")
node = gdb.node(name="Node1")
with gdb.transaction() as tx:
try:
request = urllib2.urlopen("http://www.tripadvisor.com/Restaurant_Review-g35805-d451303-Reviews-Ramova_Grill-Chicago_Illinois.html")
if request.getcode() == 200:
long_text = unicode(request.read(), "utf-8")
everything_idx["everything"][long_text] = node
except Exception as e:
pdb.set_trace()
I am using omniauth for my Rails 3 / Ruby 1.9 app and it is working well for Twitter and Facebook. However, I am trying to add Google OpenId and I am facing an issue.
I have the following code in initializers/omniauth.rbfor Google OpenId:
Rails.application.config.middleware.use OmniAuth::Builder do
require 'openid/store/filesystem'
provider :openid,
OpenID::Store::Filesystem.new('./tmp'),
:name => 'google',
:identifier => 'https://www.google.com/accounts/o8/id'
When I go to http://localhost:3000/auth/google, I get the following error in terminal and the server quits. I am not sure if using a server certificate will solve the issue. The same error occurs for any openid service, so this issue is not restricted to Google. Thanks.
WARNING: making https request to https://www.google.com/accounts/o8/ud without verifying server certificate; no CA path was specified.
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/ruby-openid-2.1.8/lib/openid/dh.rb:60: [BUG] cfp consistency error - call0
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.1.0]
-- control frame ----------
c:0062 p:---- s:0352 b:0352 l:000200 d:000200 CFUNC :next
c:0061 p:---- s:0350 b:0350 l:000343 d:000349 IFUNC
c:0060 p:---- s:0348 b:0348 l:000347 d:000347 CFUNC :bytes
c:0059 p:---- s:0346 b:0346 l:000345 d:000345 CFUNC :each
c:0058 p:---- s:0344 b:0344 l:000343 d:000343 CFUNC :zip
c:0057 p:0105 s:0340 b:0340 l:000339 d:000339 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/ruby-openid-2.1.8/lib/openid/dh.rb:60
c:0056 p:0069 s:0333 b:0333 l:000332 d:000332 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/ruby-openid-2.1.8/lib/openid/dh.rb:40
c:0055 p:0124 s:0324 b:0324 l:000323 d:000323 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/ruby-openid-2.1.8/lib/openid/consumer/associationmanager.rb:45
c:0054 p:0320 s:0316 b:0316 l:000315 d:000315 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/ruby-openid-2.1.8/lib/openid/consumer/associationmanager.rb:331
c:0053 p:0059 s:0305 b:0305 l:000304 d:000304 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/ruby-openid-2.1.8/lib/openid/consumer/associationmanager.rb:196
c:0052 p:0035 s:0296 b:0296 l:000295 d:000295 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/ruby-openid-2.1.8/lib/openid/consumer/associationmanager.rb:130
c:0051 p:0074 s:0289 b:0289 l:000288 d:000288 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/ruby-openid-2.1.8/lib/openid/consumer/associationmanager.rb:118
c:0050 p:0019 s:0285 b:0285 l:000284 d:000284 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/ruby-openid-2.1.8/lib/openid/consumer.rb:243
c:0049 p:0103 s:0277 b:0277 l:000276 d:000276 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/ruby-openid-2.1.8/lib/openid/consumer.rb:228
c:0048 p:0152 s:0270 b:0270 l:000269 d:000269 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/rack-openid-1.3.1/lib/rack/openid.rb:123
c:0047 p:0138 s:0256 b:0256 l:000255 d:000255 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/rack-openid-1.3.1/lib/rack/openid.rb:102
c:0046 p:0048 s:0247 b:0247 l:000246 d:000246 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/oa-openid-0.3.0/lib/omniauth/strategies/open_id.rb:70
c:0045 p:0020 s:0242 b:0242 l:000241 d:000241 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/oa-openid-0.3.0/lib/omniauth/strategies/open_id.rb:65
c:0044 p:0177 s:0239 b:0239 l:000238 d:000238 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/oa-core-0.3.0/lib/omniauth/strategy.rb:58
c:0043 p:0177 s:0235 b:0235 l:000234 d:000234 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/oa-core-0.3.0/lib/omniauth/strategy.rb:41
c:0042 p:0019 s:0231 b:0231 l:000230 d:000230 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/oa-core-0.3.0/lib/omniauth/strategy.rb:30
c:0041 p:0241 s:0227 b:0227 l:000226 d:000226 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/oa-core-0.3.0/lib/omniauth/strategy.rb:44
c:0040 p:0019 s:0223 b:0223 l:000222 d:000222 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/oa-core-0.3.0/lib/omniauth/strategy.rb:30
c:0039 p:0241 s:0219 b:0219 l:000218 d:000218 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/oa-core-0.3.0/lib/omniauth/strategy.rb:44
c:0038 p:0019 s:0215 b:0215 l:000214 d:000214 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/oa-core-0.3.0/lib/omniauth/strategy.rb:30
c:0037 p:0044 s:0211 b:0211 l:000210 d:000210 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/oa-core-0.3.0/lib/omniauth/builder.rb:30
c:0036 p:0015 s:0207 b:0207 l:000206 d:000206 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/actionpack-3.0.10/lib/action_dispatch/middleware/best_standards_support.rb:1
c:0035 p:0093 s:0200 b:0200 l:000199 d:000199 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/actionpack-3.0.10/lib/action_dispatch/middleware/head.rb:14
c:0034 p:0155 s:0193 b:0193 l:000192 d:000192 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/rack-1.2.4/lib/rack/methodoverride.rb:24
c:0033 p:0046 s:0187 b:0187 l:000186 d:000186 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/actionpack-3.0.10/lib/action_dispatch/middleware/params_parser.rb:21
c:0032 p:0054 s:0182 b:0182 l:000181 d:000181 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/actionpack-3.0.10/lib/action_dispatch/middleware/flash.rb:182
c:0031 p:0027 s:0175 b:0175 l:000174 d:000174 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/actionpack-3.0.10/lib/action_dispatch/middleware/session/abstract_store.rb:1
c:0030 p:0015 s:0164 b:0164 l:000163 d:000163 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/actionpack-3.0.10/lib/action_dispatch/middleware/cookies.rb:302
c:0029 p:0014 s:0156 b:0156 l:000250 d:000155 BLOCK /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/activerecord-3.0.10/lib/active_record/query_cache.rb:32
c:0028 p:0019 s:0154 b:0154 l:000153 d:000153 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/activerecord-3.0.10/lib/active_record/connection_adapters/abstract/query_cac
c:0027 p:0051 s:0150 b:0150 l:000149 d:000149 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/activerecord-3.0.10/lib/active_record/query_cache.rb:12
c:0026 p:0019 s:0146 b:0146 l:000250 d:000250 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/activerecord-3.0.10/lib/active_record/query_cache.rb:31
c:0025 p:0015 s:0142 b:0142 l:000141 d:000141 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/activerecord-3.0.10/lib/active_record/connection_adapters/abstract/connectio
c:0024 p:0029 s:0138 b:0138 l:001720 d:000137 BLOCK /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/actionpack-3.0.10/lib/action_dispatch/middleware/callbacks.rb:46
c:0023 p:0155 s:0136 b:0136 l:000135 d:000135 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:416
c:0022 p:0011 s:0126 b:0126 l:001720 d:001720 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/actionpack-3.0.10/lib/action_dispatch/middleware/callbacks.rb:44
c:0021 p:0015 s:0122 b:0122 l:000121 d:000121 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/rack-1.2.4/lib/rack/sendfile.rb:106
c:0020 p:0049 s:0112 b:0112 l:000111 d:000111 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/actionpack-3.0.10/lib/action_dispatch/middleware/remote_ip.rb:48
c:0019 p:0017 s:0108 b:0108 l:000107 d:000107 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/actionpack-3.0.10/lib/action_dispatch/middleware/show_exceptions.rb:47
c:0018 p:0027 s:0100 b:0100 l:000099 d:000099 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/railties-3.0.10/lib/rails/rack/logger.rb:13
c:0017 p:0032 s:0096 b:0096 l:000095 d:000095 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/rack-1.2.4/lib/rack/runtime.rb:17
c:0016 p:0052 s:0087 b:0087 l:000086 d:000086 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/activesupport-3.0.10/lib/active_support/cache/strategy/local_cache.rb:72
c:0015 p:0014 s:0083 b:0083 l:000077 d:000082 BLOCK /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/rack-1.2.4/lib/rack/lock.rb:11
c:0014 p:0019 s:0081 b:0081 l:000080 d:000080 METHOD <internal:prelude>:10
c:0013 p:0054 s:0078 b:0078 l:000077 d:000077 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/rack-1.2.4/lib/rack/lock.rb:11
c:0012 p:0193 s:0073 b:0073 l:000072 d:000072 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/actionpack-3.0.10/lib/action_dispatch/middleware/static.rb:30
c:0011 p:0032 s:0066 b:0066 l:000065 d:000065 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/railties-3.0.10/lib/rails/application.rb:168
c:0010 p:0021 s:0062 b:0062 l:000061 d:000061 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/railties-3.0.10/lib/rails/application.rb:77
c:0009 p:---- s:0057 b:0057 l:000056 d:000056 FINISH
c:0008 p:0015 s:0055 b:0055 l:000054 d:000054 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/railties-3.0.10/lib/rails/rack/log_tailer.rb:14
c:0007 p:0015 s:0050 b:0050 l:000049 d:000049 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/rack-1.2.4/lib/rack/content_length.rb:13
c:0006 p:0338 s:0042 b:0042 l:000041 d:000041 METHOD /Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/rack-1.2.4/lib/rack/handler/webrick.rb:52
c:0005 p:0257 s:0030 b:0030 l:000029 d:000029 METHOD /Users/ankit/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/webrick/httpserver.rb:111
c:0004 p:0393 s:0020 b:0020 l:000019 d:000019 METHOD /Users/ankit/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/webrick/httpserver.rb:70
c:0003 p:0126 s:0009 b:0009 l:001338 d:000008 BLOCK /Users/ankit/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/webrick/server.rb:183
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:---- s:0002 b:0002 l:000001 d:000001 TOP
---------------------------
-- Ruby level backtrace information ----------------------------------------
/Users/ankit/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
/Users/ankit/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
/Users/ankit/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/rack-1.2.4/lib/rack/handler/webrick.rb:52:in `service'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/rack-1.2.4/lib/rack/content_length.rb:13:in `call'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/railties-3.0.10/lib/rails/rack/log_tailer.rb:14:in `call'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/railties-3.0.10/lib/rails/application.rb:77:in `method_missing'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/railties-3.0.10/lib/rails/application.rb:168:in `call'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/actionpack-3.0.10/lib/action_dispatch/middleware/static.rb:30:in `call'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/rack-1.2.4/lib/rack/lock.rb:11:in `call'
<internal:prelude>:10:in `synchronize'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/rack-1.2.4/lib/rack/lock.rb:11:in `block in call'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/activesupport-3.0.10/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/rack-1.2.4/lib/rack/runtime.rb:17:in `call'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/railties-3.0.10/lib/rails/rack/logger.rb:13:in `call'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/actionpack-3.0.10/lib/action_dispatch/middleware/show_exceptions.rb:47:in `call'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/actionpack-3.0.10/lib/action_dispatch/middleware/remote_ip.rb:48:in `call'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/rack-1.2.4/lib/rack/sendfile.rb:106:in `call'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/actionpack-3.0.10/lib/action_dispatch/middleware/callbacks.rb:44:in `call'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:416:in `_run_call_callbacks'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/actionpack-3.0.10/lib/action_dispatch/middleware/callbacks.rb:46:in `block in call'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/activerecord-3.0.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:354:in `call'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/activerecord-3.0.10/lib/active_record/query_cache.rb:31:in `call'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/activerecord-3.0.10/lib/active_record/query_cache.rb:12:in `cache'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/activerecord-3.0.10/lib/active_record/connection_adapters/abstract/query_cache.rb:28:in `cache'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/activerecord-3.0.10/lib/active_record/query_cache.rb:32:in `block in call'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/actionpack-3.0.10/lib/action_dispatch/middleware/cookies.rb:302:in `call'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/actionpack-3.0.10/lib/action_dispatch/middleware/session/abstract_store.rb:149:in `call'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/actionpack-3.0.10/lib/action_dispatch/middleware/flash.rb:182:in `call'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/actionpack-3.0.10/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/rack-1.2.4/lib/rack/methodoverride.rb:24:in `call'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/actionpack-3.0.10/lib/action_dispatch/middleware/head.rb:14:in `call'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/actionpack-3.0.10/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/oa-core-0.3.0/lib/omniauth/builder.rb:30:in `call'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/oa-core-0.3.0/lib/omniauth/strategy.rb:30:in `call'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/oa-core-0.3.0/lib/omniauth/strategy.rb:44:in `call!'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/oa-core-0.3.0/lib/omniauth/strategy.rb:30:in `call'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/oa-core-0.3.0/lib/omniauth/strategy.rb:44:in `call!'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/oa-core-0.3.0/lib/omniauth/strategy.rb:30:in `call'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/oa-core-0.3.0/lib/omniauth/strategy.rb:41:in `call!'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/oa-core-0.3.0/lib/omniauth/strategy.rb:58:in `request_call'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/oa-openid-0.3.0/lib/omniauth/strategies/open_id.rb:65:in `request_phase'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/oa-openid-0.3.0/lib/omniauth/strategies/open_id.rb:70:in `start'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/rack-openid-1.3.1/lib/rack/openid.rb:102:in `call'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/rack-openid-1.3.1/lib/rack/openid.rb:123:in `begin_authentication'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/ruby-openid-2.1.8/lib/openid/consumer.rb:228:in `begin'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/ruby-openid-2.1.8/lib/openid/consumer.rb:243:in `begin_without_discovery'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/ruby-openid-2.1.8/lib/openid/consumer/associationmanager.rb:118:in `get_association'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/ruby-openid-2.1.8/lib/openid/consumer/associationmanager.rb:130:in `negotiate_association'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/ruby-openid-2.1.8/lib/openid/consumer/associationmanager.rb:196:in `request_association'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/ruby-openid-2.1.8/lib/openid/consumer/associationmanager.rb:331:in `extract_association'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/ruby-openid-2.1.8/lib/openid/consumer/associationmanager.rb:45:in `extract_secret'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/ruby-openid-2.1.8/lib/openid/dh.rb:40:in `xor_secret'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/ruby-openid-2.1.8/lib/openid/dh.rb:60:in `strxor'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/ruby-openid-2.1.8/lib/openid/dh.rb:60:in `zip'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/ruby-openid-2.1.8/lib/openid/dh.rb:60:in `each'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/ruby-openid-2.1.8/lib/openid/dh.rb:60:in `bytes'
/Users/ankit/.rvm/gems/ruby-1.9.2-p290#rails3/gems/ruby-openid-2.1.8/lib/openid/dh.rb:60:in `next'
-- C level backtrace information -------------------------------------------
0 libruby.1.9.1.dylib 0x000000010509451e rb_vm_bugreport + 110
1 libruby.1.9.1.dylib 0x0000000104f88533 report_bug + 259
2 libruby.1.9.1.dylib 0x0000000104f886a1 rb_bug + 161
3 libruby.1.9.1.dylib 0x000000010508fea0 vm_call0 + 1248
4 libruby.1.9.1.dylib 0x0000000105082f23 rb_iterate + 179
5 libruby.1.9.1.dylib 0x000000010508306d rb_block_call + 45
6 libruby.1.9.1.dylib 0x0000000104f81586 enum_zip + 294
7 libruby.1.9.1.dylib 0x00000001050823e6 call_cfunc + 102
8 libruby.1.9.1.dylib 0x0000000105086972 vm_call_method + 738
9 libruby.1.9.1.dylib 0x0000000105089dce vm_exec_core + 11214
10 libruby.1.9.1.dylib 0x000000010508deae vm_exec + 94
11 libruby.1.9.1.dylib 0x000000010508fb83 vm_call0 + 451
12 libruby.1.9.1.dylib 0x0000000105086fa2 vm_call_method + 2322
13 libruby.1.9.1.dylib 0x0000000105089dce vm_exec_core + 11214
14 libruby.1.9.1.dylib 0x000000010508deae vm_exec + 94
15 libruby.1.9.1.dylib 0x00000001050871b1 rb_vm_invoke_proc + 161
16 libruby.1.9.1.dylib 0x000000010509abdb thread_start_func_2 + 283
17 libruby.1.9.1.dylib 0x0000000105097be4 thread_start_func_1 + 116
18 libsystem_c.dylib 0x00007fff87b128bf _pthread_start + 335
19 libsystem_c.dylib 0x00007fff87b15b75 thread_start + 13
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
Abort trap: 6