Okay to avoid further confusion, I've put up my project here :
https://github.com/nmwael/osgi2versions
just run maven clean install -Dmaven.test.skip
then go in your favorite ide and run the test getHelloService() in
com.netdesign.osgi.examples.rest.endpoint located in the module
webservice_rest_t
This is the result of the commands that i issued in karaf.
karaf@root(feature)> web:list
ID | State | Web-State | Level | Web-ContextPath | Name
271 | Active | Deployed| 80| /osg
I have sample WAR got from internet that need to be deployed on karaf. The
war uses spring also it is written in servlet3 standards, using annotations
both for servlets and spring(viz. no web.xml and other xmls).
When I Deploy the the web application, the web bundle starts without any
erros. But th
Christian,
In that case there is one other (undocumented) setting you should know
about: "hibernate.temp.use_jdbc_metadata_defaults".
The idea is that during the first phase we will access the JDBC Connection
in order to determine capabilities of the underlying JDBC environment[1].
The setting
I just implemented another "solution".
https://github.com/cschneider/jpa-experiments/blob/master/jpa-container/src/main/java/org/apache/aries/jpa/container/impl/PersistenceProviderTracker.java
I call EntityManagerFactory emf =
provider.createContainerEntityManagerFactory(punit, null); with a Dum
A JAAS login is not enough. You also need to call subject.doAs(handler);
Inside this call the AccessControlContext will then contain your subject.
For web there should be a better way to establish a JAAS context. Maybe
you can make pax web or jetty check the authentication and
already establish
I've omitted to said that, sometimes, one or many persistence bundles start
normally, while the others stay in GracePeriod. It seems to be random ...
--
View this message in context:
http://karaf.922171.n3.nabble.com/Karaf-3-0-3-Hibernate-JPA-JPA-bundles-stay-in-GracePeriod-state-tp4040421p4040
Yes it is :
394 | Active | 80 | 2.1.0.v201304241213| Java Persistence API 2.1
karaf@root>bundle:info 394
Java Persistence API 2.1 (394)
--
karaf@root>bundle:diag 394
karaf@root>
Manuel
--
View this message in context:
http://karaf.922171.n3.nabble.com
Can you check that persistence-api bundle (provided by hibernate
feature) is fully installed ?
Regards
JB
On 05/18/2015 05:35 PM, manueld wrote:
JB :
Same problem, it doesn't change anything.
hibernate-osgi is still in "Starting" state and the persistences bundles are
still missing "javax.pers
One thing to clarify the problem:
I'm trying to use authentication and authorization in whiteboard servlet.
There is such a code in doGet for debug:
LoginContext lc = new LoginContext("umrp-realm", callbackHandler);
lc.login();
System.out.println(lc.getSubject().getPrincipals());
Subject subject =
JB :
Same problem, it doesn't change anything.
hibernate-osgi is still in "Starting" state and the persistences bundles are
still missing "javax.persistence.EntityManagerFactory".
--
View this message in context:
http://karaf.922171.n3.nabble.com/Karaf-3-0-3-Hibernate-JPA-JPA-bundles-stay-in-G
Hi Manuel,
can you try hibernate before the jpa feature:
description="usersDAOfeature">
transaction
jndi
pax-jdbc-h2
pax-jdbc-config
pax-jdbc-pool-dbcp2
hibernate
jpa
mvn:com.test.bundle.dao/users/1.1.2
?
Regards
JB
On 05/18/2015 05:19 PM, manueld wrote:
JB :
Maybe i'm missing s
JB :
Maybe i'm missing something but I think it's what I've done.
Here's my feature :
transaction
jndi
pax-jdbc-h2
pax-jdbc-config
pax-jdbc-pool-dbcp2
jpa
hibernate
mvn:com.test.bundle.dao/users/1.1.2
Do you think that include this feature in featuresBoot could fix the problem
?
Tcharl:
What
I think that the start-order should be: hibernate-osgi < aries-jpa
2015-05-18 17:04 GMT+02:00 manueld :
> Thank you for your answer.
>
> What bundle order do you recommand ?
>
> In the hibernate 4.3.X feature, the default start-level for hibernate-osgi
> is 100, so superior to the default start-l
Hi,
you should first install your JPA engine (hibernate, openjpa), so the
hibernate feature first, and after aries jpa.
So you should have your feature describing:
jpa
hibernate
path to my punit bundle
It could be part of the featuresBoot (in etc/org.apache.karaf.features.cfg).
No n
Thank you for your answer.
What bundle order do you recommand ?
In the hibernate 4.3.X feature, the default start-level for hibernate-osgi
is 100, so superior to the default start-level (80). Is that normal ?
"hibernate-osgi" shouldn't be started before all the persistence bundles ?
--
View th
EMF won't be created by Aries as long as your 'hibernate-osgi' bundle will
not be in 'started'/'active' state, and will fail after its service waiting
timeout (grace period).
You can try to tweak the start-levels of your bundles/feature to make them
start in the same order in each environments.
20
Seeing your two manifests would possibly reveal the issue.
At its simplest, your bundle with the interface in it should have:
Export-Package: com.netdesign.osgi.examples.rest.domain
And the bundle with the service implementation should have:
Import-Package: com.netdesign.osgi.examples.rest.doma
I Will try to manually do it.. Currently it runs in an pax exam test..
On May 18, 2015 3:29 PM, wrote:
> Faced a similar ClassCastException some time back. Not sure whether it
> really make sense but just stating it here for your information. I had the
> service interfaces in one bundle (A), impl
Hi, Christian!
I have questions about getting the authentication result in a place
different of where we do authentication.
There is such description of Subject.getSubject method In Javadoc:
*Get the Subject associated with the provided AccessControlContext.
The AccessControlContext may contain m
Hi Jochen,
just update to Karaf 3.0.3, you will have a thread that now encrypt
passwords "on the fly", no need to logon anymore.
Regards
JB
On 05/18/2015 03:42 PM, jkraushaar wrote:
Hi there,
we are using Karaf 3.0.1 and the default authentication with encrypted
passwords for the console. A
Hi,
it's now fixed and will be included in next release cycle (I fix that
last week).
Regards
JB
On 05/18/2015 02:48 PM, ellirael wrote:
Class org.apache.commons.dbcp.BasicDataSource changed its poroperty names:
user -> username.
And there is also a problem with GenericObjectPool constructor
I didn't know the command "bundle:diag". I just executed it on a persistence
bundle, here's the result :
applications :: dao :: users (211)
--
Status: Failure
Blueprint
18/05/15 15:36
Exception:
null
java.util.concurrent.TimeoutException
at
Hi there,
we are using Karaf 3.0.1 and the default authentication with encrypted
passwords for the console. According to the manual (and our own
observations) the password in users.properties becomes encrypted when a
client connects to the console for the first time.
If you start Karaf using bin
info :
karaf@root>bundle:info 207
hibernate-osgi (207)
diag shows nothing:
karaf@root>bundle:diag 207
karaf@root>
--
View this message in context:
http://karaf.922171.n3.nabble.com/Karaf-3-0-3-Hibernate-JPA-JPA-bundles-stay-in-GracePeriod-state-tp4040421p4040431.html
Sen
Faced a similar ClassCastException some time back. Not sure whether it really
make sense but just stating it here for your information. I had the service
interfaces in one bundle (A), implementations in another bundle (B) and a
number of consumers. Noticed the ClassCastException a few times if I
After installing CXF feature I met some problem with datasource recognition
from bundle that uses JPA and registers servet.
javax.naming.NoInitialContextException: Unable to find the
InitialContextFactory org.eclipse.jetty.jndi.InitialContextFactory.
at
org.apache.aries.jndi.ContextHelper.
Yes that is what I think i am doing.. If it helps I can clone my git
to somewhere reachable? IT is a very basic example project just
demonstrating a cxf rest front with 2 backend services with ranking.
On Mon, May 18, 2015 at 3:11 PM, wrote:
> You want to export the interface from the API bundle
On Mon, May 18, 2015 at 9:11 AM wrote:
> You want to export the interface from the API bundle, import it
> into the service bundle, let BP and the Maven plugin take care of exports
>
>
+1, definitely use the maven-bundle-plugin to manage your MANIFEST. Most
of the time it "just works" without an
I just tried, setting the member-type to service-object this gives me
the same result. Reason why am doing the whole blueprint are to avoid
knowing about servicereferences.
On Mon, May 18, 2015 at 2:34 PM, Charlie Mordant wrote:
> Hi,
>
> Can you try to change your setter argument to a ServiceRef
Hi,
What does 'diag' and 'info' gives on the hibernate-osgi bundle?
regards,
2015-05-18 15:08 GMT+02:00 manueld :
> Hi,
>
> We recently migrated our platform from Karaf 2.3.2 to Karaf 3.0.3.
>
> Everything runs fine excepted JPA and Hibernate.
> When we start our custom distribution in some env
You want to export the interface from the API bundle, import it
into the service bundle, let BP and the Maven plugin take care of exports
On Mon, May 18, 2015 at 7:09 AM, nino martinez wael
wrote:
> I did use * exports initially but did change it.
> To
> com.netdesign.osgi.examples.rest.backen
I did use * exports initially but did change it.
To com.netdesign.osgi.examples.rest.backendb.*
and commented out the export package part.
On Mon, May 18, 2015 at 2:55 PM, wrote:
> I’m guessing you are using * exports and the API and Impl bundle export the
> same interface.
>
>
>
> On Mon, Ma
Hi,
We recently migrated our platform from Karaf 2.3.2 to Karaf 3.0.3.
Everything runs fine excepted JPA and Hibernate.
When we start our custom distribution in some environments, persistence
bundles stay in GracePeriod and are never initialized, as if the persistence
context was never read. The
I’m guessing you are using * exports and the API and Impl bundle export the
same interface.
On Mon, May 18, 2015 at 3:09 AM, nino martinez wael
wrote:
> Setter is correct:
> https://paste.apache.org/e5ld
> And BackendBImplement does implement the interface
> https://paste.apache.org/4pOv
> Here
Class org.apache.commons.dbcp.BasicDataSource changed its poroperty names:
user -> username.
And there is also a problem with GenericObjectPool constructor.
--
View this message in context:
http://karaf.922171.n3.nabble.com/jdbc-create-creates-incorrect-blueprint-when-using-generic-datasource-t
Hi,
Can you try to change your setter argument to a ServiceReference? Or
setting the 'member-type="service-object"' attribute in your
?
Here are some sources that can help:
http://aries.apache.org/modules/blueprint.html and
http://www.ibm.com/developerworks/library/os-osgiblueprint/
Regards,
201
So Im still stumbling a bit around this, and not sure what todo...
On Mon, May 18, 2015 at 11:09 AM, nino martinez wael
wrote:
> Setter is correct:
>
> https://paste.apache.org/e5ld
>
> And BackendBImplement does implement the interface
>
> https://paste.apache.org/4pOv
>
> Heres the interface:
>
Setter is correct:
https://paste.apache.org/e5ld
And BackendBImplement does implement the interface
https://paste.apache.org/4pOv
Heres the interface:
package com.netdesign.osgi.examples.rest.domain;
/**
* Created by nmw on 14-05-2015.
*/
public interface MessageProvider {
String getMe
Hi,
Check if the setter has the correct type. Check also if the
BackendBImplement implements MessageProvider.
Regards
JB
On 05/18/2015 09:40 AM, nino martinez wael wrote:
Hi im having a little difficulty getting my services to get "injected"
via a blueprint, the service are injected but when
Hi im having a little difficulty getting my services to get "injected"
via a blueprint, the service are injected but when trying to use it,
it fails with this exception:
Proxyac192a6f_60ad_44a3_8470_75b9a9054462 cannot be cast to
com.netdesign.osgi.examples.rest.domain.MessageProvider
java.lang.Cl
41 matches
Mail list logo