Questions Tagged With repositoryhttps://answers.axonivy.com/tags/repository/?type=rss&user=trungdvquestions tagged <span class="tag">repository</span>enTue, 29 Aug 2017 03:47:58 -0400Can not connect to Elasticsearch serverhttps://answers.axonivy.com/questions/2831/can-not-connect-to-elasticsearch-server<p>hi all</p> <p>I'm using Axon ivy 6.3 on Linux server. Sometime i get this exception (after deployment somehow):</p> <pre><code> Caused by: ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.ElasticsearchException: Cannot reach Elasticsearch server at ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.JestOperation.execute(JestOperation.java:44) at ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.JestSearcher.search(JestSearcher.java:32) at ch.ivyteam.ivy.business.data.store.search.internal.ResultImpl.execute(ResultImpl.java:36) at ch.ivyteam.ivy.business.data.store.search.internal.QueryImpl.raw(QueryImpl.java:135) at ch.ivyteam.ivy.business.data.store.search.internal.QueryImpl.executeQuery(QueryImpl.java:179) at ch.ivyteam.ivy.business.data.store.search.internal.ExecutorImpl.execute(ExecutorImpl.java:18) at ch.ivyteam.ivy.business.data.store.search.internal.QueryImpl.execute(QueryImpl.java:115) at ch.axonivy.fintech.standard.dossier.DossierIdGenerator.initializeSeed(DossierIdGenerator.java:64) at ch.axonivy.fintech.standard.dossier.DossierIdGenerator.nextId(DossierIdGenerator.java:43) at ch.axonivy.fintech.abs.dossier.AbsDossierService.generateCobId(AbsDossierService.java:57) at sun.reflect.GeneratedMethodAccessor9141.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at ch.ivyteam.ivy.scripting.internal.types.IvyJavaMethod.invokeImpl(IvyJavaMethod.java:73) ... 211 more Caused by: io.searchbox.client.config.exception.CouldNotConnectException: Could not connect to <a href="http://localhost:19200">http://localhost:19200</a> at io.searchbox.client.http.JestHttpClient.execute(JestHttpClient.java:59) at ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.JestOperation.execute(JestOperation.java:37) ... 224 more Caused by: org.apache.http.conn.HttpHostConnectException: Connect to localhost:19200 [localhost/127.0.0.1] failed: Connection refused at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:158) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107) at io.searchbox.client.http.JestHttpClient.executeRequest(JestHttpClient.java:109) at io.searchbox.client.http.JestHttpClient.execute(JestHttpClient.java:56) ... 225 more Caused by: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:74) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:141) ... 236 more </code></pre> <p>After restarting server, it's seem to work again.</p> <p>The exception is clear but we don't know rootcause yet. Does anyone get same issue? and do you have any hints for it?</p> <p>Updated: i have deployed several ivy engine on same physical server, i think there is some instance of elasticservers as well. Could it be a confliction there?</p> <p>Thanks in advance</p>trungdvTue, 29 Aug 2017 03:47:58 -0400https://answers.axonivy.com/questions/2831/can-not-connect-to-elasticsearch-serveraxonivy6.3elasticsearchrepositoryCan we persist Elastic Search data to Business Data table?https://answers.axonivy.com/questions/2799/can-we-persist-elastic-search-data-to-business-data-table<p>hi ivyteam</p> <p>As far as i know, when we use ivy.repo() from ivy, data will be stored to table IWA.BusinessData and indexed to Elastic Search cluster. Normally ivy will create that index from that table when it start by this command: <code>DiCore.getGlobalInjector().getInstance(ElasticSearchServerManager.class).startIndexRecreation();</code></p> <p>In my case, i want to do it in opposite way that collecting data from index table then persist to IWA.BusinessData, just imagine that table has lost data for some reasons so i want to recover it. Can i do it in ivy?</p> <p>Thanks</p>trungdvTue, 08 Aug 2017 06:58:47 -0400https://answers.axonivy.com/questions/2799/can-we-persist-elastic-search-data-to-business-data-tablebusiness-datarepositoryCan not use ivy.repo in ResfulAPIhttps://answers.axonivy.com/questions/2777/can-not-use-ivy-repo-in-resfulapi<p>hi all</p> <p>I'm now using Ivy 6.3. When i create ResfulAPI by java (not use ivy element) and in that api i try to use ivy.repo() to store some data, it throw two exception: <img alt="alt text" src="http://answers.axonivy.com/upfiles/img1.png"> and <img alt="alt text" src="http://answers.axonivy.com/upfiles/img2.png"> I guess that because with pure java api, there is no task and case created but why we need them? as my understanding ivy.repo will store data to Ivy System DB and it's different from ivy process data which highly-related to ivy task&amp;case.</p> <p>Anybody can explain ? Thanks a lot</p>trungdvTue, 25 Jul 2017 06:16:41 -0400https://answers.axonivy.com/questions/2777/can-not-use-ivy-repo-in-resfulapicasebusiness-datarepositoryHow to upgrade elasticsearch engine on designer?https://answers.axonivy.com/questions/2713/how-to-upgrade-elasticsearch-engine-on-designer<p>Hi ivyteam</p> <p>Currently i use Axonivy 6.3 and it embed elasticsearch with version 2.3.4, it's quite old version so i want to upgrade to new version in order to apply new api or module being supported by elasticsearch (kibana/xpack,...) On server i can configure the setting in system property, but how can i do it on designer? </p> <p>Thanks</p>trungdvTue, 27 Jun 2017 05:19:14 -0400https://answers.axonivy.com/questions/2713/how-to-upgrade-elasticsearch-engine-on-designerelasticsearchrepositoryCan not persist Business Data to Repo after changing data typehttps://answers.axonivy.com/questions/2606/can-not-persist-business-data-to-repo-after-changing-data-type<p>Hi all</p> <p>I'm using Ivy 6.3 and use ivy.repo api to persist data. When i persits data as this JSON:</p> <pre><code>"qualificationMessageResults": [ { "code": "amount", "severity": "ORANGE", "message": { "descriptor": { "content": "/ch/axonivy/fintech/soba/Message/PreQualification/Amount/amountBetweenMinAmountAndMaxAmountForReplacement", "type": "URI" }, "paramDescriptors": [ { "descriptor": { "content": "500000", "type": "PLAIN_TEXT", "placeHolder": "{minAmount}" }, "paramDescriptors": [] } ] } } ] }, </code></pre> <p>The api say:</p> <pre><code> [errorId=15BCE2ED377AD1E0, request=HTTP POST ch/axonivy/fintech/soba/showcase/DemoSobaPersistence/DemoSobaPersistenceProcess.mod/15A1694DAA1C0A9F(9907.9907.17.0), session=1, task=9907, application=102, requestId=4093, executionContext=1, pmv=Portal$soba_test$2, hd=ch.axonivy.fintech.soba.showcase.DemoSobaPersistence, processElement=15A168DC648B6158-f9] Caused by: ch.ivyteam.ivy.persistence.PersistencyException: Could not create BusinessData. at ch.ivyteam.ivy.business.data.store.internal.ElasticSystemDbPersistence.execute(ElasticSystemDbPersistence.java:115) at ch.ivyteam.ivy.business.data.store.internal.ElasticSystemDbPersistence.execute(ElasticSystemDbPersistence.java:104) at ch.ivyteam.ivy.business.data.store.internal.ElasticSystemDbPersistence.create(ElasticSystemDbPersistence.java:89) at ch.ivyteam.ivy.business.data.store.internal.BusinessDataRepositoryImpl.persist(BusinessDataRepositoryImpl.java:112) at ch.ivyteam.ivy.business.data.store.internal.BusinessDataRepositoryImpl.save(BusinessDataRepositoryImpl.java:96) at ch.axonivy.fintech.standard.dossier.persistence.BaseDossierPersistence.persist(BaseDossierPersistence.java:35) at ch.axonivy.fintech.soba.dossier.service.SobaDossierService.persist(SobaDossierService.java:155) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at ch.ivyteam.ivy.scripting.internal.types.IvyJavaMethod.invokeImpl(IvyJavaMethod.java:73) ... 208 more [errorId=15BCE2ED377AD1E0, request=HTTP POST ch/axonivy/fintech/soba/showcase/DemoSobaPersistence/DemoSobaPersistenceProcess.mod/15A1694DAA1C0A9F(9907.9907.17.0), session=1, task=9907, application=102, requestId=4093, executionContext=1, pmv=Portal$soba_test$2, hd=ch.axonivy.fintech.soba.showcase.DemoSobaPersistence, processElement=15A168DC648B6158-f9] Caused by: ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.ElasticsearchException: Elasticsearch update index of document failed because of: {"root_cause":[{"type":"mapper_parsing_exception","reason":"failed to parse [onlineMortgageProgress.qualificationMessageResults.message]"}],"type":"mapper_parsing_exception","reason":"failed to parse [onlineMortgageProgress.qualificationMessageResults.message]","caused_by":{"type":"illegal_argument_exception","reason":"unknown property [descriptor]"}} at ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.JestOperation.checkStatusAndThrow(JestOperation.java:61) at ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.JestOperation.execute(JestOperation.java:39) at ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.JestIndexSynchronizer.execute(JestIndexSynchronizer.java:165) at ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.JestIndexSynchronizer.updateIndex(JestIndexSynchronizer.java:64) at ch.ivyteam.ivy.business.data.store.search.internal.ElasticBusinessDataSearchIndex.update(ElasticBusinessDataSearchIndex.java:30) at ch.ivyteam.ivy.business.data.store.internal.ElasticSystemDbPersistence.lambda$1(ElasticSystemDbPersistence.java:96) at ch.ivyteam.ivy.persistence.base.AbstractPersistencyService.execute(AbstractPersistencyService.java:177) at ch.ivyteam.ivy.persistence.base.AbstractPersistencyService.execute(AbstractPersistencyService.java:240) at ch.ivyteam.ivy.persistence.base.ClassPersistencyService.execute(ClassPersistencyService.java:694) at </code></pre> <p>My object QualificationMessageResult has list of Object A, and object A has two properties: a object <strong>descriptor</strong> and a list of Object A (looped Object) with name: <strong>paramDescriptors</strong>. </p> <p>Can anyone suggest me something?</p> <p>Thanks</p>trungdvWed, 03 May 2017 09:41:52 -0400https://answers.axonivy.com/questions/2606/can-not-persist-business-data-to-repo-after-changing-data-typerepository