Ok, thanks. I try clearing elasticsearch using this command: curl -X DELETE 'http://localhost:9200/_all'
2018-10-17T18:00:31,912 | ERROR | Timer-4 | ElasticSearchPersistenceServiceImpl | 168 - org.apache.unomi.persistence-elasticsearch-core - 1.3.0.incubating | Error while executing in class loaderjava.lang.Exception: Error loading itemType=org.apache.unomi.api.PropertyType query={"match_all" : {"boost" : 1.0}} sortBy=rankat org.apache.unomi.persistence.elasticsearch.ElasticSearchPersistenceServiceImpl$20.execute(ElasticSearchPersistenceServiceImpl.java:1434) [168:org.apache.unomi.persistence-elasticsearch-core:1.3.0.incubating]at org.apache.unomi.persistence.elasticsearch.ElasticSearchPersistenceServiceImpl$20.execute(ElasticSearchPersistenceServiceImpl.java:1325) [168:org.apache.unomi.persistence-elasticsearch-core:1.3.0.incubating]at org.apache.unomi.persistence.elasticsearch.ElasticSearchPersistenceServiceImpl$InClassLoaderExecute.executeInClassLoader(ElasticSearchPersistenceServiceImpl.java:1833) [168:org.apache.unomi.persistence-elasticsearch-core:1.3.0.incubating]at org.apache.unomi.persistence.elasticsearch.ElasticSearchPersistenceServiceImpl$InClassLoaderExecute.catchingExecuteInClassLoader(ElasticSearchPersistenceServiceImpl.java:1844) [168:org.apache.unomi.persistence-elasticsearch-core:1.3.0.incubating]at org.apache.unomi.persistence.elasticsearch.ElasticSearchPersistenceServiceImpl.query(ElasticSearchPersistenceServiceImpl.java:1444) [168:org.apache.unomi.persistence-elasticsearch-core:1.3.0.incubating]at org.apache.unomi.persistence.elasticsearch.ElasticSearchPersistenceServiceImpl.getAllItems(ElasticSearchPersistenceServiceImpl.java:618) [168:org.apache.unomi.persistence-elasticsearch-core:1.3.0.incubating]at Proxy329fc026_449a_4b2d_8596_e3cb38cc0394.getAllItems(Unknown Source) [?:?]at org.apache.unomi.services.services.ProfileServiceImpl.loadPropertyTypesFromPersistence(ProfileServiceImpl.java:269) [179:org.apache.unomi.services:1.3.0.incubating]at org.apache.unomi.services.services.ProfileServiceImpl.access$000(ProfileServiceImpl.java:45) [179:org.apache.unomi.services:1.3.0.incubating] On Tue, Oct 16, 2018 at 2:55 AM Serge Huber <shu...@apache.org> wrote: > Hello Michael, > > You shouldn’t have any of those property types errors. If it’s possible at > this point I would suggest clearing the ElasticSearch data and re-starting > Unomi. Otherwise we will need to investigate more precisely but it might > take more time. Also please don’t hesitate to post longer log entries as > stack traces can be very useful to understand where the problem is coming > from. > > Regards, > Serge… > > On 16 Oct 2018, at 00:13, Michael Ghen <m...@mikeghen.com> wrote: > > Serge, good suggestion! I removed that line, still 204. > > I went into karaf.log and see a lot of these messages: > > 2018-10-15T22:05:01,912 | ERROR | Timer-4 | > ElasticSearchPersistenceServiceImpl | 168 - > org.apache.unomi.persistence-elasticsearch-core - 1.3.0.incubating | Error > while executing in class loaderjava.lang.Exception: Error loading > itemType=org.apache.unomi.api.PropertyType query={ > > 2018-10-15T22:05:01,915 | ERROR | Timer-4 | ProfileServiceImpl | 179 - > org.apache.unomi.services - 1.3.0.incubating | Error loading property types > from persistence service > > These seem to be happening every 10 seconds. I'm not sure if this is > related to the request I am making or not. Any advice? I'm trying to just > test out how the goals functionality works. > > > On Mon, Oct 15, 2018 at 4:47 AM Serge Huber <shu...@apache.org> wrote: > >> Oh and just looking at your query, try removing the >> "propertyValuesDateExpr": [], >> line. >> >> Regards, >> Serge... >> On Mon, Oct 15, 2018 at 10:45 AM Serge Huber <shu...@apache.org> wrote: >> > >> > Hello Michael, >> > >> > Did you check the Unomi logs in data/log/karaf.log ? Usually it should >> > tell you what's going on. >> > >> > I usually use the log:tail command in the the Karaf shell when working >> > on requests. And you could also set CXF to debug if it's rejecting >> > some malformed JSON. >> > >> > Regards, >> > Serge... >> > >> > On Mon, Oct 15, 2018 at 4:28 AM Michael Ghen <m...@mikeghen.com> wrote: >> > > >> > > When I start using a new part of the API, I keep running into 204 >> errors (no content). Sometimes I can resolve them by reformatting my JSON. >> > > >> > > After comparing my JSON request to the API docs line by line, I'm at >> a loss for how to create a goal. >> > > >> > > I'm trying to create a goal using this Python code, is something >> wrong with this JSON? >> > > >> > > import requests >> > > from pprint import pprint >> > > import json >> > > >> > > r = requests.post('http://x.x.x.x:8181/cxs/goals/', >> > > auth=('karaf', 'karaf'), >> > > json={ >> > > "itemId":"1", >> > > "itemType":"goal", >> > > "version": None, >> > > "metadata": { >> > > "readOnly": False, >> > > "name": "Test Goal", >> > > "id": "1", >> > > "scope": "reach", >> > > "enabled": True, >> > > "tags":[], >> > > "systemTags": [], >> > > "description": "Triggered when someone turns 18.", >> > > "missingPlugins": False, >> > > "hidden": False >> > > }, >> > > "startEvent": None, >> > > "targetEvent": { >> > > "type": "profilePropertyCondition", >> > > "parameterValues": { >> > > "propertyValuesDateExpr": [], >> > > "propertyName": "properties.age", >> > > "comparisonOperator": "greaterThan", >> > > "propertyValueInteger": "18" >> > > } >> > > } >> > > }) >> > > >> > > pprint(r) >> > > pprint(r.content) >> > > >> > > Result: >> > > >> > > <Response [204]> >> > > >> > > b'' >> > > >> > > >> > >