blueprint-osgi

java.lang.ClassCastException: [B cannot be cast to java.lang.String

混江龙づ霸主 提交于 2020-02-27 22:40:03
问题 I have written an entitity class with Field LoginId and Password. Iam encrypting the passwrd and stoiring it in the db using the AES_ENCRYPT. I want to retrive only the password which is decrypted. so, im using AES_DECRYPT using NAtiveQueryis in OPen JPA 2.0. Query i have written is : Query q = em.createNativeQuery("select AES_DECRYPT(l.password,?2) from loginDetails l where l.loginID = ?1"); q.setParameter(1, loginId); q.setParameter(2, getKey()); String s = q.getSingleResult(); But im

Is Apache Aries running in Felix?

社会主义新天地 提交于 2020-01-13 07:00:28
问题 I'm trying to build a Blueprint bundle to run in Apache Felix. I tried to make it running but I didn't succeed. The blueprint bundle works fine in Karaf but not in Felix. Is it any documentation or a running example on the web to explain how to run a Blueprint bundle only with plain Felix. I suppose I have to manually add Aries to Felix platform but it didn't seem to work. To be more precise, I want a simple service to see that it's loaded from a blueprint.xml XML config file as a Blueprint

Transaction rollback in OSGi

被刻印的时光 ゝ 提交于 2020-01-02 08:17:34
问题 I have an OSGi bundle in which I declare a service and inject into it a transaction with blueprint: <bean id="MyServiceImpl" class="com.test.impl.MyServiceImpl"> <jpa:context property="em" unitname="mypu" /> <tx:transaction method="*" value="Required" /> </bean> <service id="MyService" ref="MyServiceImpl" interface="com.test.api.MyService" /> In this service I have two methods each one of which is writing data in the database, something like the following: public void createParent() throws

OSGi: Does Blueprint replace Declarative Services?

别等时光非礼了梦想. 提交于 2020-01-01 01:17:06
问题 The new R4.2 spec for OSGi describes the Blueprint service, for dependency injection and service wiring. Does Blueprint replace Declarative Services (which is still part of the spec, as well), or are they intended to work together? Is Blueprint already available for the popular implementations (Felix and Equinox)? 回答1: I asked myself the same question and while discussing this with others involved in the topic, the tenor was that although the two are overlapping to some degree, the use case

CXF in Karaf: how to configure bean validation on subresources (preferably using Blueprint)?

淺唱寂寞╮ 提交于 2019-12-22 11:33:54
问题 I'm using Dinamics Features of CXF in Karaf and faced with the issue that Bean Validation does not work for subresources. E.g. in the following code: @Path("services") public interface Service { @Path("{id}/orders") public Order getOrderForService(@PathParam("id") int serviceId); } @Path("orders") public interface Order { @POST Product getProduct(@NotNull @Valid Product product); } when Order is root resource, bean validation works fine, but when it is invoked as a subresource of Service,

Reading enviroment variable in osgi blueprint

谁都会走 提交于 2019-12-13 06:07:02
问题 I'm building some camel routes deployed in OSGi (JBoss Fuse) I'm reading my properties file using this: <ext:property-placeholder id="propiedades"> <ext:location>file:/C:/TestBed/sucursal.propiedades</ext:location> </ext:property-placeholder> But now I want change "file:/C:TestBed/" for some placeholder with some path (like KARAF_ETC). I know this enviroment variable exists because when I use it in the route, it works ok from(URI_IN) .log("{{env:KARAF_ETC}}") //Output is: C:\jboss-fuse-6.2.0

ServiceMix / Blueprint / JPA Integration

江枫思渺然 提交于 2019-12-13 05:51:51
问题 I have been spending the week attempting to integrate JPA / ServiceMix 4.5.1 / camel-jpa 2.10.4 / Blueprint together. I'm currently using OpenJPA, but am not tied to it. The version of aries jpa used by servicemix is 0.3.0. The stack trace I cannot get past is: org.osgi.service.blueprint.container.ComponentDefinitionException: Error when instanciating bean workoutEntity of class class [...].WorkoutEntity at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:271)[10

Karaf Pax Exam fails with Unknown protocol: wrap

做~自己de王妃 提交于 2019-12-11 19:12:18
问题 Hi my pax exam fails with the error Unknown protocol: wrap org.apache.karaf.features.internal.util.MultiException: Error at org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader.<init>(MavenDownloadManager.java:84)[9:org.apache.karaf.features.core:4.0.4] at org.apache.karaf.features.internal.download.impl.MavenDownloadManager.createDownloader(MavenDownloadManager.java:72)[9:org.apache.karaf.features.core:4.0.4] at org.apache.karaf.features.internal.region

OSGi ConfigurationAdmin Service

不羁的心 提交于 2019-12-11 15:08:01
问题 There seem to be 2 ways to get the Configuration Admin service from the OSGi service registry. One by instantiating BundleContext, then getting ServiceReference from that, then ConfigurationAdmin from that: BundleContext bc = FrameworkUtil.getBundle(ManagedService.class).getBundleContext(); ServiceReference ca = bc.getServiceReference(ConfigurationAdmin.class); ConfigurationAdmin configAdmin = (ConfigurationAdmin) context.getService(ca); Another by using Blueprint and simply creating a