I'm using postgresql
I created the db called pio..using the created pio command...

Not sure why the event table is not being created when I send the post
request though ....

On 31 Jan 2017 17:10, "Tom Chan" <[email protected]> wrote:

> I don't have an answer from the top of my head, hope someone can chime in
> and help.
>
> To help others debugging this, which database are you using (PostgreSQL,
> MySQL or elasticsearch)?
>
> Tom
>
> On Tue, Jan 31, 2017 at 1:47 PM, Saarthak Chandra <
> [email protected]> wrote:
>
>> Hi,
>>
>> I did create a new app, and used the access key when doing a post to the
>> event server.
>> When i run pio app list, I do see the app that I created here
>>
>> [INFO] [App$]                MpApp |    1 | -my-access-key | (all)
>>
>>
>> Post request I made from my terminal :
>>
>> curl -i -X POST http://localhost:7070/events.j
>> son\?accessKey\=-my-access-key \
>>
>> -H "Content-Type: application/json" \
>>
>> -d '{
>>
>>   "event" : "$set",
>>
>>   "entityType" : "user",
>>
>>   "entityId" : "u0"
>>
>> }'
>>
>>
>> Response I get :
>>
>> HTTP/1.1 500 Internal Server Error
>>
>> Server: spray-can/1.3.3
>>
>> Date: Tue, 31 Jan 2017 21:46:24 GMT
>>
>> Content-Type: application/json; charset=UTF-8
>>
>> Content-Length: 76
>>
>>
>> {"message":"ERROR: relation \"pio_event_1\" does not exist\n  Position:
>> 20"}*%*
>>
>> On a side note : I also checked to see that the event server was up :
>> localhost:7070 : Shows the JSON {"status":"alive"}
>>
>>
>>
>> On Tue, Jan 31, 2017 at 4:39 PM, Tom Chan <[email protected]> wrote:
>>
>>> As a quick check, did you do
>>>
>>> pio app new MyApp1
>>>
>>> and what's the output when you run
>>>
>>> pio app list
>>>
>>> ? and what's the POST request you're trying that returned error 500?
>>>
>>> Tom
>>>
>>> On Tue, Jan 31, 2017 at 12:48 PM, Saarthak Chandra <
>>> [email protected]> wrote:
>>>
>>>> Hi,
>>>>
>>>> I am currently using Postgresql , as my storage repo for event data.
>>>>
>>>> However, when i do a POST using curl, to the event server at
>>>> 'localhost:7070', I get a Http 500 error saying :
>>>>
>>>> {"message":"ERROR: relation \"pio_event_1\" does not exist\n  Position:
>>>> 20"}
>>>> Shouldn't the table/relation be created automatically, and then the
>>>> data I posted be inserted ??
>>>>
>>>> I was following along the tutorials here : http://predictionio.incubato
>>>> r.apache.org/templates/javaecommercerecommendation/quickstart/
>>>>
>>>> Thanks for your help !!
>>>>
>>>
>>>
>>
>>
>> --
>> Saarthak Chandra ,
>> Masters in Computer Science,
>> Cornell University.
>>
>
>

Reply via email to