tag:blogger.com,1999:blog-8745745886722714957.post7383287262904782838..comments2023-05-15T07:45:38.542-07:00Comments on Andriy Redko {devmind}: OSGi: the gateway into micro-services architectureAndriy Redkohttp://www.blogger.com/profile/16473725484333171169noreply@blogger.comBlogger14125tag:blogger.com,1999:blog-8745745886722714957.post-49822921129582226642015-12-24T01:48:32.908-08:002015-12-24T01:48:32.908-08:00Hi Andriy,
Thanks for reply. I have got it worked...Hi Andriy,<br /><br />Thanks for reply. I have got it worked ! I believe it was problem of Jar conflict. Above mentioned classcastExceptiion went away once I reinstall JDK-8. Earlier I have JDK-7 and JDK-8 two Java installed on my box. I have un installed both and then reinstalled JDK-8 then it started working... Thanks Andriy for your help and time. Keep posting !! Good stuff.<br /><br />Regards,<br /><br />Bharatkumar PatelBharatkumar Patelhttps://www.blogger.com/profile/02928545959962255113noreply@blogger.comtag:blogger.com,1999:blog-8745745886722714957.post-63736515115193367512015-12-16T04:30:57.934-08:002015-12-16T04:30:57.934-08:00Hi Bharatkumar,
Sure, the only difference between...Hi Bharatkumar,<br /><br />Sure, the only difference between plain Karaf and Talend installation, I skipped <b>feature:repo-add cxf 3.1.4</b> and used the default one, which is 3.1.3. But this should not cause the transaction manager issues. Here is what I have:<br /><br />pax-jetty | 9.2.10.v20150310 | <br />pax-http-jetty | 4.2.2 | <br />pax-http | 4.2.2 |<br /><br />cxf-specs | 3.1.3 | <br />cxf-jaxb | 3.1.3 |<br />cxf-abdera | 3.1.3 |<br />wss4j | 2.1.3 |<br />cxf-core | 3.1.3 |<br />cxf-commands | 3.1.3 |<br />cxf-wsdl | 3.1.3 | <br />cxf-ws-policy | 3.1.3 | <br />cxf-ws-addr | 3.1.3 | <br />cxf-ws-rm | 3.1.3 | <br />cxf-ws-mex | 3.1.3 | <br />cxf-ws-security | 3.1.3 |<br />cxf-rt-security | 3.1.3 | <br />cxf-rt-security-saml | 3.1.3 |<br />cxf-http | 3.1.3 | <br />cxf-http-jetty | 3.1.3 | <br />cxf-bindings-soap | 3.1.3 | <br />cxf-jaxws | 3.1.3 | <br />cxf-jaxrs | 3.1.3 | <br />cxf-rs-security-xml | 3.1.3 |<br />cxf-databinding-aegis | 3.1.3 |<br />cxf-databinding-jaxb | 3.1.3 |<br />cxf-databinding-xmlbeans | 3.1.3 |<br />cxf-features-clustering | 3.1.3 |<br />cxf-features-logging | 3.1.3 |<br />cxf-features-throttling | 3.1.3 |<br />cxf-features-metrics | 3.1.3 |<br />cxf-bindings-corba | 3.1.3 |<br />cxf-bindings-coloc | 3.1.3 | <br />cxf-bindings-object | 3.1.3 |<br />cxf-transports-local | 3.1.3 |<br />cxf-transports-jms | 3.1.3 |<br />cxf-transports-udp | 3.1.3 | <br />cxf-javascript | 3.1.3 | <br />cxf-frontend-javascript | 3.1.3 |<br />cxf-xjc-runtime | 3.1.3 | <br />cxf | 3.1.3 |<br /><br />aries-proxy | 4.0.2 |<br />aries-blueprint | 4.0.2 |<br />feature | 4.0.2 |<br />shell | 4.0.2 | <br />shell-compat | 4.0.2 |<br />deployer | 4.0.2 |<br />bundle | 4.0.2 |<br />config | 4.0.2 |<br />diagnostic | 4.0.2 |<br />instance | 4.0.2 |<br />jaas | 4.0.2 |<br />log | 4.0.2 |<br />package | 4.0.2 |<br />service | 4.0.2 |<br />system | 4.0.2 |<br />http | 4.0.2 | <br />jetty | 9.2.10.v20150310 |<br />kar | 4.0.2 | <br />webconsole | 4.0.2 | <br />ssh | 4.0.2 | <br />management | 4.0.2 |<br />eventadmin | 4.0.2 | <br />jasypt-encryption | 4.0.2 |<br />wrap | 0.0.0 |<br />tesb-aux-common | 6.1.0 |<br />tesb-aux-client-rest | 6.1.0 |<br />transaction-api | 1.2.0 |<br />transaction | 1.3.0 | <br />persistence-api | 2.1.0 |<br />jpa | 2.2.0 | <br />hibernate | 4.3.6.Final |<br />jndi | 4.0.2 | <br />jdbc | 4.0.2 |<br /><br />Hope it helps!<br /><br />Best Regards,<br /> Andriy RedkoAndriy Redkohttps://www.blogger.com/profile/16473725484333171169noreply@blogger.comtag:blogger.com,1999:blog-8745745886722714957.post-42521513575498831282015-12-16T03:31:21.183-08:002015-12-16T03:31:21.183-08:00Hi Andriy,
Thanks ! Is is possible get the list o...Hi Andriy,<br /><br />Thanks ! Is is possible get the list of features with version to turn on/install in talend karaf to run example successfully ? I see you have already specified list of features in your blog and github. Just wondering if different features to turn on/install while running on Talend container. Please let me know which JDK version are you using ? <br />Thank you very much Andriy!Bharatkumar Patelhttps://www.blogger.com/profile/02928545959962255113noreply@blogger.comtag:blogger.com,1999:blog-8745745886722714957.post-2858033925213759032015-12-15T13:42:47.028-08:002015-12-15T13:42:47.028-08:00Hi Bharatkumar,
Sure, give it a try. If you still...Hi Bharatkumar,<br /><br />Sure, give it a try. If you still have the problem nonetheless, it would be great if you could share your Talend / Karaf container with me (dropbox or something), so I can reproduce the issue and help you with that. Not sure it is an option for you though. Please let me know!<br /><br />Thanks and good luck!<br /><br />Best Regards,<br /> Andriy RedkoAndriy Redkohttps://www.blogger.com/profile/16473725484333171169noreply@blogger.comtag:blogger.com,1999:blog-8745745886722714957.post-67968605447082718542015-12-15T13:38:38.538-08:002015-12-15T13:38:38.538-08:00Thanks Andriy, I believe may be I am missing some ...Thanks Andriy, I believe may be I am missing some features to turn on/install in Talend container. Anyways I will give it a try again. Thanks for your help. Bharatkumar Patelhttps://www.blogger.com/profile/02928545959962255113noreply@blogger.comtag:blogger.com,1999:blog-8745745886722714957.post-55325863880402287212015-12-15T13:12:40.837-08:002015-12-15T13:12:40.837-08:00This comment has been removed by the author.Bharatkumar Patelhttps://www.blogger.com/profile/02928545959962255113noreply@blogger.comtag:blogger.com,1999:blog-8745745886722714957.post-90325111636835800442015-12-15T12:02:46.492-08:002015-12-15T12:02:46.492-08:00Hi Bharatkumar,
That's a very weird error, I ...Hi Bharatkumar,<br /><br />That's a very weird error, I have downloaded Talend platform 6.1.0, and tried everything myself, works perfectly fine:<br /><br />karaf@trun()> version<br />4.0.2<br /><br />curl http://localhost:8040/services/api/people -iX POST -d "firstName=Tom&lastName=Knocker&email=a@b.com" --user karaf:karaf<br />HTTP/1.1 201 Created<br />Date: Tue, 15 Dec 2015 19:56:56 GMT<br />Location: http://localhost:8040/services/api/people/a@b.com<br />Date: Tue, 15 Dec 2015 19:56:56 GMT<br />Content-Length: 0<br />Server: Jetty(9.2.10.v20150310)<br /><br />By any chance, does it help to restart the container?<br />Thanks.<br /><br />Best Regards,<br /> Andriy RedkoAndriy Redkohttps://www.blogger.com/profile/16473725484333171169noreply@blogger.comtag:blogger.com,1999:blog-8745745886722714957.post-14287787595460440142015-12-15T03:15:58.928-08:002015-12-15T03:15:58.928-08:00Hi Andriy,
Thanks for the reply. Appreciated. Yes...Hi Andriy,<br /><br />Thanks for the reply. Appreciated. Yes, I see your test code is working perfectly fine in standalone Karaf. As I mentioned I am trying to run same sample code in talend which uses karaf container and facing issue there. I guess there is some conflict with jar dependencies. While running in talend -6.1.0 version, I am getting following error.<br /><br /> C:\>curl http://localhost:8040/services/api/people -iX POST -d "firstName=Tom&lastName=Knocker&email=a@b.com"<br />HTTP/1.1 500 Server Error<br />Date: Tue, 15 Dec 2015 11:07:49 GMT<br />Content-Type: text/html; charset=ISO-8859-1<br />Cache-Control: must-revalidate,no-cache,no-store<br />Content-Length: 4809<br />Connection: close<br />Server: Jetty(9.2.10.v20150310)<br /><br /> Reason:<br /> Server Errorjava.lang.ClassCastException: org.apache.aries.transaction.internal.AriesPlatformTransactionManager cannot be cast to javax.transaction.TransactionManager<br /> at Proxy2ebaa715_bcc4_468f_971a_739c8ae217f6.getStatus(Unknown Source)<br /> at org.apache.aries.transaction.TransactionAttribute$4.begin(TransactionAttribute.java:80)<br /> at org.apache.aries.transaction.TxInterceptorImpl.preCall(TxInterceptorImpl.java:58)<br /> at org.apache.aries.blueprint.proxy.Collaborator.preInvoke(Collaborator.java:76)<br /> at Proxy8622764e_040e_4dbe_8249_fb752055c436.save(Unknown Source)<br /> at Proxyad638f98_1525_4dcd_a752_9f20441987b3.save(Unknown Source)<br /> at com.example.services.impl.PeopleServiceImpl.addPerson(PeopleServiceImpl.java:30)<br /> at Proxy54c8529b_ae85_484a_ab2c_d28e7a3de83c.addPerson(Unknown Source)<br /> at com.example.jaxrs.PeopleRestService.addPerson(PeopleRestService.java:47)<br /> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br /> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)<br /> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br /> at java.lang.reflect.Method.invoke(Method.java:606)<br /><br />Thanks for the help. Good stuff, Keep posting !Bharatkumar Patelhttps://www.blogger.com/profile/02928545959962255113noreply@blogger.comtag:blogger.com,1999:blog-8745745886722714957.post-18100563052153752412015-12-11T15:13:04.720-08:002015-12-11T15:13:04.720-08:00Hi Bharatkumar,
It turns out that moving the proj...Hi Bharatkumar,<br /><br />It turns out that moving the project to Karaf 4.x is a real challenge! Nonetheless, I have created a branch for you, https://github.com/reta/osgi-services/tree/karaf-4.x, which basically adapts the sampleto Karaf 4.x, I tested it on 4.0.2 and 4.0.3, seems to work perfectly. Please give it a try!<br /><br />As a side note, there is new module extracted out from <b>module-data</b>, <b>module-ds</b>. I run into an issue that it is not possible to define datasource and entity manager in the same blueprint :-( But it is not a big deal I think :)<br /><br />Let me know if it works for you!<br />Thanks!<br /><br />Best Regards,<br /> Andriy RedkoAndriy Redkohttps://www.blogger.com/profile/16473725484333171169noreply@blogger.comtag:blogger.com,1999:blog-8745745886722714957.post-31998497203544276692015-12-11T01:42:42.898-08:002015-12-11T01:42:42.898-08:00Hi Andriy,
Thank you for quick reply.I am using ...Hi Andriy, <br /><br />Thank you for quick reply.I am using talend 6.1.0 community edition which has karaf version 4.0.2. I have deployed example bundles without any error and started successfully but when try to find endpoints karaf command service:list-endpoints / calling services via browser, getting 'No Services Found'. Please find snippet as below. Thank you very much !<br /><br /> ______ __ __<br /> /_ __/__ _/ /__ ___ ___/ /<br /> / / / _ `/ / -_) _ \/ _ /<br /> /_/ \_,_/_/\__/_//_/\_,_/<br /> (version 6.1.0)<br /><br />Hit '' for a list of available commands<br />and '[cmd] --help' for help on a specific command.<br />Hit '' or 'system:shutdown' to shutdown the TRUN.<br /><br />karaf@trun()> version<br />4.0.2Bharatkumar Patelhttps://www.blogger.com/profile/02928545959962255113noreply@blogger.comtag:blogger.com,1999:blog-8745745886722714957.post-40083864050294862592015-12-10T13:48:06.850-08:002015-12-10T13:48:06.850-08:00Hi Bharatkumar,
Thanks a lot for your comment. Su...Hi Bharatkumar,<br /><br />Thanks a lot for your comment. Sure, it would be my pleasure to help you out. Could you please post a version of Karaf you are using?<br />Thanks!<br /><br />Best Regards,<br /> Andriy RedkoAndriy Redkohttps://www.blogger.com/profile/16473725484333171169noreply@blogger.comtag:blogger.com,1999:blog-8745745886722714957.post-47430136165031475842015-12-10T06:37:57.106-08:002015-12-10T06:37:57.106-08:00Hi, Thanks for such a nice and simple tutorial. I...Hi, Thanks for such a nice and simple tutorial. I have tried same example to deploy on Talend which uses karaf container, for some reason I am not able to see the services. Could you please let me know if you have any idea please. Thanking you in advance.Bharatkumar Patelhttps://www.blogger.com/profile/02928545959962255113noreply@blogger.comtag:blogger.com,1999:blog-8745745886722714957.post-57827668193472303632014-09-11T14:49:50.425-07:002014-09-11T14:49:50.425-07:00Thanks a lot, Guillaume! I am very glad you found ...Thanks a lot, Guillaume! I am very glad you found it interesting! It would be my pleasure to assist you if you have any questions or need help!<br /><br />Best Regards,<br /> Andriy RedkoAndriy Redkohttps://www.blogger.com/profile/16473725484333171169noreply@blogger.comtag:blogger.com,1999:blog-8745745886722714957.post-89474724094787636722014-09-11T10:52:22.887-07:002014-09-11T10:52:22.887-07:00Great post! Didn't even know about OSGi. Very ...Great post! Didn't even know about OSGi. Very interesting, I'll definitely try this out.<br />Cheer!Anonymoushttps://www.blogger.com/profile/01977762660764932715noreply@blogger.com