Re: How to make karaf install features of certain versions?

2015-04-15 Thread Christoph Gritschenberger
Hi,

JRE actually only supplies 1.0 of javax.annotation.
That's why the weld-feature in karaf-3.0.3 provides the bundle
mvn:javax.annotation/javax.annotation-api/1.2

You should use that bundle too, rather than modifying the version in
jre.properties.

kind regards,
Christoph

On 13/04/15 20:26, Krzysztof Sobkowiak wrote:
> Hi
> 
> I have just taken a fresh Karaf 3.0.3 and imported the pax cdi 0.8.0 
> repository
> 
> karaf@root()> feature:repo-add 
> mvn:org.ops4j.pax.cdi/pax-cdi-features/0.8.0/xml/features
> Adding feature url mvn:org.ops4j.pax.cdi/pax-cdi-features/0.8.0/xml/features
> karaf@root()> feature:install pax-cdi/0.8.0
> Error executing command: Can't install feature pax-cdi/0.8.0:
> Could not start bundle mvn:org.ops4j.pax.cdi/pax-cdi-extension/0.8.0 in 
> feature(s) pax-cdi-1.1-0.8.0, pax-cdi-0.8.0,
> pax-cdi-1.2-0.8.0: Unresolved constraint in bundle 
> org.ops4j.pax.cdi.extension [80]: Unable to resolve 80.0: missing
> requirement [80.0] osgi.wiring.package; 
> (&(osgi.wiring.package=javax.annotation)(version>=1.1.0)(!(version>=2.0.0)))
> 
> Next I have changed the version of javax.annotation to 1.2
> 
> jre-1.7= \
>  javax.accessibility, \
>  javax.activation;version="1.1", \
>  javax.activity, \
>  javax.annotation;version="1.2", \
> 
> After restart I could install the pax cdi
> 
> karaf@root()> feature:install pax-cdi/0.8.0
> karaf@root()>
> 
> Regards
> Krzysztof
> 
> 
> 
> 
> On 13.04.2015 19:57, PashaTurok wrote:
>> I've changed version of javax.annotation to 1.2 in /etc/jre.properties and
>> when I execute feature:install pax-cdi/0.8.0 I get osgi framework exception
>> that javax.annotaion package can't be resolved. what to do?
>>
>>
>>
>> --
>> View this message in context: 
>> http://karaf.922171.n3.nabble.com/How-to-make-karaf-install-features-of-certain-versions-tp4039644p4039658.html
>> Sent from the Karaf - User mailing list archive at Nabble.com.
> 



Re: [PROPOSAL] Karaf release cycle

2014-10-08 Thread Christoph Gritschenberger

+1

And as for third-party dependencies I think there are two possible 
scenarios:


1) a library-upgrade fixes an issue that was already present in the 
previous release:

--> screw it and postpone the lib-upgrade for the next-release
2) a library-upgrade causes a regression, i.e. a bug that was *not* 
present in the previous release:

--> revert the lib-upgrade and release without the library-upgrade

kind regards,
Christoph


On 08/10/14 10:46, Jamie G. wrote:

+1

There will always be another upstream fix to wait for, a short Karaf
update cycle seems to be the best approach to avoiding extended
delays.

--J

On Wed, Oct 8, 2014 at 4:55 AM, Achim Nierbeck  wrote:

Hi,

I'm in big favor of having a hard release cycle on 6 weeks (minimum I'd
actually prefer 4 ;) )
Regarding the thoughts about 3party dependencies, actually it's the reason
we don't get our own bugfixes out fast right now.
Actually I'd say screw it. No more waiting for 3rd party dependencies ...
get the stuff out fast cause 4-6 weeks later you have the next
release picking up the issue.

regards, Achim


2014-10-08 8:18 GMT+02:00 Jean-Baptiste Onofré :


That's why we have an extend of 2 weeks to deal with other projects.

Regards
JB

On 10/08/2014 08:16 AM, Christian Schneider wrote:


Generally I agree that we should aim for such a cycle.
I only hope it is possible as we depend a lot on other projects that we
bundle. So a lot of the time a release waits on fixes or releases in
upstream projects.

Christian

Am 08.10.2014 07:52, schrieb Jean-Baptiste Onofré:


Hi all,

Users complained about the variable and long delays between Karaf
releases. It's a fair comment and it's something that we have to
improve.

I propose the following new policy about the releases cycle:
- for "active" branches (3.0.x and 2.4.x), I propose a release every 6
weeks, with maximum extend to 8 weeks.
- for "eol" and "maintenance" branches (2.2.x and 2.3.x), it's "on
demand", no strong cycle there.

WDYT ?

If everybody agrees, I will update the releases schedule page on the
website.

Regards
JB






--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com





--

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 

Software Architect / Project Manager / Scrum Master






smime.p7s
Description: S/MIME Cryptographic Signature


Re: JPA with Karaf

2014-01-15 Thread Christoph Gritschenberger
Setting the start-level of hibernate-osgi to 100 (higher than all the 
other bundles) worked for me


kind regards,
Christoph


On 2014-01-15 16:13, Dutertry Nicolas wrote:

I used version 3.3.2.GA available in Karaf 3.0.0.

I have also tested version 4.2.7 found here :
https://github.com/lburgazzoli/lb-karaf-features/blob/master/repo/hibernate4.xml

I have finally managed to make this version work. Indeed I found in a hibernate 
tutorial (see last comment in 
https://github.com/hibernate/hibernate-orm/blob/4.2/documentation/src/main/docbook/quickstart/tutorials/osgi/managed-jpa/features.xml)
 that hibernate-osgi must be started after the bundle containing JPA entities.
So to make everything work,  I have to stop the "hibernate-osgi" bundle before installing 
my bundle, and then restart "hibernate-osgi".
For instance :

feature:install hibernate42
stop 127 // NB: 127 is hibernate-osgi bundle
install url_to_my_bundle
start 127


This is somewhat dirty, I hope we can find a better solution.

Regards,
--
Nicolas

-Original Message-
From: Jean-Baptiste Onofré [mailto:j...@nanthrax.net]
Sent: mercredi 15 janvier 2014 15:02
To: user@karaf.apache.org
Subject: Re: JPA with Karaf

Hi Nicolas,

thanks for the update.

What's version of the hibernate feature do you use ?

Regards
JB

On 01/15/2014 02:53 PM, Dutertry Nicolas wrote:

The "hibernate" feature seems to be broken as well. I tried it and got a 
"GracePeriod" state with the same log message :
Bundle test.jpa is waiting for dependencies
[(&(&(org.apache.aries.jpa.proxy.factory=true)(osgi.unit.name=test))(o
bjectClass=javax.persistence.EntityManagerFactory))]

Regards
--
Nicolas
-Original Message-
From: Jean-Baptiste Onofré [mailto:j...@nanthrax.net]
Sent: mercredi 15 janvier 2014 06:46
To: user@karaf.apache.org
Subject: Re: JPA with Karaf

By the way, reviewing the OpenJPA feature, we found that the problem is in the 
feature itself. We fix both OpenJPA 2.2.2 and 2.3.0 features for the next Karaf 
release.

Sorry about that.

Regards
JB

On 01/14/2014 10:33 AM, Dutertry Nicolas wrote:

Hi,

I am trying to use JPA with Karaf 3.0.0 but it does not work.

First of all I have installed the following features :

karaf@root()> feature:install jndi jpa transaction openjpa

Then I have created a simple JPA bundle containing:

-A HSQLDB datasource configured with blueprint

-A JPA entity (class Person) and the file META-INF/persistence.xml

-A service for getting and creating people (class PersonService)

The JPA EntityManager is injected in PersonService using blueprint.

Finally I have deployed hsqldb and my bundle in Karaf, but my
bundle's state is set to "GracePeriod" :

karaf@root()> list

START LEVEL 100 , List Threshold: 50

ID | State   | Lvl | Version| Name

-
-
---

86 | Active  |  80 | 3.0.0  | Apache Karaf :: JNDI :: Command

114 | Active  |  80 | 2.3.0  | Apache ServiceMix :: Specs ::
Java Persistence API 1.4

115 | Active  |  80 | 3.2.1  | Commons Collections

116 | Active  |  80 | 1.6.0  | Commons Pool

117 | Active  |  80 | 1.4| Commons DBCP

118 | Active  |  80 | 2.6| Commons Lang

119 | Active  |  80 | 2.3.0  | OpenJPA Aggregate Jar

120 | Active  |  80 | 2.3.1  | HSQLDB

121 | GracePeriod |  80 | 1.0.0.SNAPSHOT | Test JPA OSGi Bundle

In the log file we found :

2014-01-14 10:04:28,388 | INFO  | raf-3.0.0/deploy |
BlueprintContainerImpl   | 4 - org.apache.aries.blueprint.core -
1.3.0 | Bundle test.jpa is waiting for dependencies
[(&(&(org.apache.aries.jpa.proxy.factory=true)(osgi.unit.name=test))(
o bjectClass=javax.persistence.EntityManagerFactory))]

I have attached the sources of my bundle and the full karaf log file
in this mail.

Is there a bug in Karaf or am I missing something ?

Thanks for your help.

--
Nicolas Dutertry
HR Access - http://www.hraccess.com



--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com



--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com






smime.p7s
Description: S/MIME Cryptographic Signature


Re: JPA with Karaf

2014-01-14 Thread Christoph Gritschenberger

Hi,

Try adding

org.apache.openjpa.persistence.PersistenceProviderImpl

to your persistence-unit. I got a working setup with OpenJPA 2.3.0.

kind regards,
christoph

On 2014-01-14 12:01, Jean-Baptiste Onofré wrote:

Hi Nicolas,

could you try with OpenJPA 2.2.2 ? AFAIR it seems OpenJPA 2.3.0 has an
issue.

Regards
JB

On 01/14/2014 10:33 AM, Dutertry Nicolas wrote:

Hi,

I am trying to use JPA with Karaf 3.0.0 but it does not work.

First of all I have installed the following features :

karaf@root()> feature:install jndi jpa transaction openjpa

Then I have created a simple JPA bundle containing:

-A HSQLDB datasource configured with blueprint

-A JPA entity (class Person) and the file META-INF/persistence.xml

-A service for getting and creating people (class PersonService)

The JPA EntityManager is injected in PersonService using blueprint.

Finally I have deployed hsqldb and my bundle in Karaf, but my bundle’s
state is set to “GracePeriod” :

karaf@root()> list

START LEVEL 100 , List Threshold: 50

ID | State   | Lvl | Version| Name

-


86 | Active  |  80 | 3.0.0  | Apache Karaf :: JNDI :: Command

114 | Active  |  80 | 2.3.0  | Apache ServiceMix :: Specs ::
Java Persistence API 1.4

115 | Active  |  80 | 3.2.1  | Commons Collections

116 | Active  |  80 | 1.6.0  | Commons Pool

117 | Active  |  80 | 1.4| Commons DBCP

118 | Active  |  80 | 2.6| Commons Lang

119 | Active  |  80 | 2.3.0  | OpenJPA Aggregate Jar

120 | Active  |  80 | 2.3.1  | HSQLDB

121 | GracePeriod |  80 | 1.0.0.SNAPSHOT | Test JPA OSGi Bundle

In the log file we found :

2014-01-14 10:04:28,388 | INFO  | raf-3.0.0/deploy |
BlueprintContainerImpl   | 4 - org.apache.aries.blueprint.core -
1.3.0 | Bundle test.jpa is waiting for dependencies
[(&(&(org.apache.aries.jpa.proxy.factory=true)(osgi.unit.name=test))(objectClass=javax.persistence.EntityManagerFactory))]


I have attached the sources of my bundle and the full karaf log file in
this mail.

Is there a bug in Karaf or am I missing something ?

Thanks for your help.

--
Nicolas Dutertry
HR Access - http://www.hraccess.com







Re: no osgi command in karaf 3.0.0 RC1

2013-05-09 Thread Christoph Gritschenberger

The commands have been moved/renamed

osgi:list --> bundle:list
features:* --> feature:*

kind regards,
christoph

On 2013-05-09 13:58, skysw...@gmail.com wrote:

Hi,

I downloaded the karaf 3.0.0 RC1

but when I tried to run the osgi:list command the console returned

no osgi:list command. The same problem happened to features command

Could anybody kindly told me the reason and how to fix it?

Thanks!






smime.p7s
Description: S/MIME Cryptographic Signature


Re: Problem getting servlet filter to activate

2013-02-25 Thread Christoph Gritschenberger

The ranking is specified in OSGi Core [1]

kind regards,
christoph

[1] http://www.osgi.org/Download/Release4V43

On 2013-02-25 17:48, Lars-Erik Helander wrote:

I found a note on using a "ranking" property, which I tested. It did not help, but I am not really 
sure what ranking value to use. Is there more info available on the semantics of the "ranking" 
property somewhere? What Karaf version do I need to use in order to get "ranking" to work?

Or , could I somehow register a new HttpContext that gets associated with the 
already existing cxf servlet?



Thanks

Lars

Skickat från min iPhone

25 feb 2013 kl. 13:22 skrev helander :


After some testing I now think I know what the problem is. The cxf servlet
implements Filter, and I guess that the cxf filter is processed before my
filter and that it "breaks" the filtering chain, by not explicitly chaining
to other filters.

Is there some way to have my filter being processed before the cxf filter?

Thanks

Lars



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Problem-getting-servlet-filter-to-activate-tp4027868p4027875.html
Sent from the Karaf - User mailing list archive at Nabble.com.





smime.p7s
Description: S/MIME Cryptographic Signature


Re: Aries/JPA error to stdout at karaf 2.3.1-SNAPSHOT

2013-02-25 Thread Christoph Gritschenberger

Hi Dan,

I had time to investigate this a bit further and found the problem in 
Aries-JPA. I filed ARIES-1018 [1].


regards,
christoph

[1] https://issues.apache.org/jira/browse/ARIES-1018

On 2013-02-22 20:37, Dan Tran wrote:

Thanks I will give it a shot, and report back

-D

On Fri, Feb 22, 2013 at 9:00 AM, Christoph Gritschenberger
 wrote:

Hi Dan,

I ran into this issue recently myself (was working on a 4-week-old
karaf-trunk-version until now).

I found a workaround for the problem:
I just set the start-level for the openjpa-bundle to 19 so it starts before
the Aries stuff.

The Exception is thrown because the persistence-units are destroyed twice.
Once when the JPA-provider (OpenJPA-bundle) is shut down and once when
"Aries JPA Container" is shut down.
If the provider is shutdown after Aries, the Exception does not occur.

regards,
christoph


On 2013-02-11 17:53, Dan Tran wrote:


I am using jpa from karaf's enterprise feature. This means JPA start
at system level ( ie 30 )

-D

On Mon, Feb 11, 2013 at 2:55 AM, Christoph Gritschenberger
 wrote:


Hi Dan,

What's the start-level of your bundles?
I think I remember encountering this issue with bundles that started
before
aries-stuff.

kind regards,
christoph


On 2013-02-10 23:22, Dan Tran wrote:



H JB,

I rebuild karaf-2.3.1-SNAPSHOT using aries.jpa 1.0.0 ( ie with
-Daries.jpa.version=1.0.0 -Daries.jpa.container.context.version=1.0.0,
see karaf-2.3.1-SNAPSHOT's top level pom for details) and still see
the issue.  So this probably comes from changes id needed
aries.blueprint.core )

-D

On Sun, Feb 10, 2013 at 12:06 PM, Jean-Baptiste Onofré 
wrote:



It seems that the JPA engine is now "mandatory". Let me take a look in
the
Aries JPA changes.

Regards
JB


On 02/10/2013 09:02 PM, Dan Tran wrote:




I wonder if any one who also uses JPA sees the same issue with me at
karaf 2.3.1-snapshot?

-D

On Fri, Feb 8, 2013 at 9:14 PM, Dan Tran  wrote:




I am testing out my app which has a few JPA bundle with karaf
2.3.1-SNAPSHOT

during shutdown, karaf throws the following error to stdout


ERROR: Bundle org.apache.aries.jpa.container [73] Error stopping
bundle. (java.lang.IllegalStateException: No persistence units
defined
for bundle .host.mgr/1.0.0.SNAPSHOT.)
java.lang.IllegalStateException: No persistence units defined for
bundle .host.mgr/1.0.0.SNAPSHOT.
at


org.apache.aries.jpa.container.unit.impl.ManagedPersistenceUnitInfoFactoryImpl.destroyPersistenceBundle(ManagedPersistenceUnitInfoFactoryImpl.java:60)
at


org.apache.aries.jpa.container.impl.PersistenceBundleManager.removedBundle(PersistenceBundleManager.java:313)
at


org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerRemoved(BundleHookBundleTracker.java:513)
at


org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerRemoved(BundleHookBundleTracker.java:433)


This may be a regression under new blueprint's core?

my OpenJPA with embeded derby runs fine after startup.  Only at
shutdown it barfs.

Thanks

-D





--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com













smime.p7s
Description: S/MIME Cryptographic Signature


Re: Aries/JPA error to stdout at karaf 2.3.1-SNAPSHOT

2013-02-22 Thread Christoph Gritschenberger

Hi Dan,

I ran into this issue recently myself (was working on a 4-week-old 
karaf-trunk-version until now).


I found a workaround for the problem:
I just set the start-level for the openjpa-bundle to 19 so it starts 
before the Aries stuff.


The Exception is thrown because the persistence-units are destroyed 
twice. Once when the JPA-provider (OpenJPA-bundle) is shut down and once 
when "Aries JPA Container" is shut down.

If the provider is shutdown after Aries, the Exception does not occur.

regards,
christoph

On 2013-02-11 17:53, Dan Tran wrote:

I am using jpa from karaf's enterprise feature. This means JPA start
at system level ( ie 30 )

-D

On Mon, Feb 11, 2013 at 2:55 AM, Christoph Gritschenberger
 wrote:

Hi Dan,

What's the start-level of your bundles?
I think I remember encountering this issue with bundles that started before
aries-stuff.

kind regards,
christoph


On 2013-02-10 23:22, Dan Tran wrote:


H JB,

I rebuild karaf-2.3.1-SNAPSHOT using aries.jpa 1.0.0 ( ie with
-Daries.jpa.version=1.0.0 -Daries.jpa.container.context.version=1.0.0,
see karaf-2.3.1-SNAPSHOT's top level pom for details) and still see
the issue.  So this probably comes from changes id needed
aries.blueprint.core )

-D

On Sun, Feb 10, 2013 at 12:06 PM, Jean-Baptiste Onofré 
wrote:


It seems that the JPA engine is now "mandatory". Let me take a look in
the
Aries JPA changes.

Regards
JB


On 02/10/2013 09:02 PM, Dan Tran wrote:



I wonder if any one who also uses JPA sees the same issue with me at
karaf 2.3.1-snapshot?

-D

On Fri, Feb 8, 2013 at 9:14 PM, Dan Tran  wrote:



I am testing out my app which has a few JPA bundle with karaf
2.3.1-SNAPSHOT

during shutdown, karaf throws the following error to stdout


ERROR: Bundle org.apache.aries.jpa.container [73] Error stopping
bundle. (java.lang.IllegalStateException: No persistence units defined
for bundle .host.mgr/1.0.0.SNAPSHOT.)
java.lang.IllegalStateException: No persistence units defined for
bundle .host.mgr/1.0.0.SNAPSHOT.
   at

org.apache.aries.jpa.container.unit.impl.ManagedPersistenceUnitInfoFactoryImpl.destroyPersistenceBundle(ManagedPersistenceUnitInfoFactoryImpl.java:60)
   at

org.apache.aries.jpa.container.impl.PersistenceBundleManager.removedBundle(PersistenceBundleManager.java:313)
   at

org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerRemoved(BundleHookBundleTracker.java:513)
   at

org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerRemoved(BundleHookBundleTracker.java:433)


This may be a regression under new blueprint's core?

my OpenJPA with embeded derby runs fine after startup.  Only at
shutdown it barfs.

Thanks

-D




--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com









smime.p7s
Description: S/MIME Cryptographic Signature


Re: karaf 3.0.0.RC1 ?

2013-02-20 Thread Christoph Gritschenberger

Hi JB,

Any update on karaf-3.0.0(.RC1)?
AFAICS the aries libs and pax-url have already been released.

regards,
christoph

On 2013-01-18 00:34, Jean-Baptiste Onofré wrote:

Hi Andrei,

A first artifact (Aries plugin) has been cut off yesterday and the vote
is in progress.
The other artifacts (blueprint, etc) vote will start as soon as the
first one is complete. So, if no issue, we can plan something like one
week.

In the mean time, I gonna cut off Pax Url 1.5.x release (Karaf 3.0.0
currently use SNAPSHOT) and review some issues.

Regards
JB

On 01/17/2013 10:54 PM, Andrei Pozolotin wrote:

Achim: got it; any time frame from Aries and form you? :-) Thanks.
Andrei.

 Original Message 
Subject: Re: karaf 3.0.0.RC1 ?
From: Achim Nierbeck 
To: user@karaf.apache.org
Date: Thu 17 Jan 2013 03:43:02 PM CST

Hi Andrei,

we still are waiting for the last bug-fixes in Aries.
Right now there are some preparations going on at Aries to be able to
release the next version of Aries soon.

regards, Achim


2013/1/17 Andrei Pozolotin mailto:andrei.pozolo...@gmail.com>>

*Jean-Baptiste*, hello.

internally we are building everything on karaf 3.0.0-SNAPSHOT,
and the time came to produce a pre release of our platform;
but we can not release any of our artifacts since we depend on
karaf snapshot;

do you think you will be releasing 3.0.0.RC1 "real soon" or
should we start building our own karaf?

it seems "there is nothing here" preventing you from RC1
release:

https://issues.apache.org/jira/browse/KARAF/fixforversion/12321742

Thank you,

Andrei




--

Apache Karaf  Committer & PMC
OPS4J Pax Web 
Committer & Project Lead
OPS4J Pax for Vaadin
 Commiter & Project
Lead
blog 









smime.p7s
Description: S/MIME Cryptographic Signature


Re: Java Heap Space - Karaf Pax Exam

2013-02-16 Thread Christoph Gritschenberger

Another hint:

pax-exam 2.6 requires ops4j-base 1.4 to work while pax-exam 2.4 uses 
ops4j-base 1.3


Maybe you forgot to update some reference there.

regards,
christoph

On 2013-02-16 10:52, Dan Tran wrote:

your log still show you are using pax-exam 2.4

-D

On Sat, Feb 16, 2013 at 1:48 AM, Charles Moulliard  wrote:

Dan,

I already use pax-exam 2.6.0.

Regards,

Charles


On Sat, Feb 16, 2013 at 10:20 AM, Dan Tran  wrote:


https://issues.apache.org/jira/browse/KARAF-2096

-D

On Sat, Feb 16, 2013 at 12:49 AM, Charles Moulliard 
wrote:

Hi,

I have created a pax exam test class using karaf tool exam but when the
mvn
test is started, I get this error :

eatures.core - 2.3.0 | Error installing boot features
java.lang.Exception: Could not start bundle
mvn:org.ops4j.pax.swissbox/pax-swissbox-core/ in feature(s) exam-2.4.0:
Unresolved constraint in bundle org.ops4j.pax.swissbox.core [92]: Unable
to
resolve 92.0: missing requirement [92.0] osgi.wiring.package;
(&(osgi.wiring.package=org.ops4j.lang)(version>=1.4.0))
at

org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:476)[20:org.apache.karaf.features.core:2.3.0]
at

org.apache.karaf.features.internal.FeaturesServiceImpl$2.run(FeaturesServiceImpl.java:1141)[20:org.apache.karaf.features.core:2.3.0]
Caused by: org.osgi.framework.BundleException: Unresolved constraint in
bundle org.ops4j.pax.swissbox.core [92]: Unable to resolve 92.0: missing
requirement [92.0] osgi.wiring.package;
(&(osgi.wiring.package=org.ops4j.lang)(version>=1.4.0))
at

org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3826)[org.apache.felix.framework-4.0.3.jar:]
at

org.apache.felix.framework.Felix.startBundle(Felix.java:1868)[org.apache.felix.framework-4.0.3.jar:]
at

org.apache.felix.framework.BundleImpl.start(BundleImpl.java:944)[org.apache.felix.framework-4.0.3.jar:]
at

org.apache.felix.framework.BundleImpl.start(BundleImpl.java:931)[org.apache.felix.framework-4.0.3.jar:]
at

org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:473)[20:org.apache.karaf.features.core:2.3.0]
... 1 more

Config

 @Configuration
 public Option[] configure() {
 return new Option[]{
 karafDistributionConfiguration().frameworkUrl(


maven().groupId("org.apache.karaf").artifactId("apache-karaf").type("tar.gz").versionAsInProject())
 //This version doesn't affect the version of
karaf
we use

.karafVersion(MavenUtils.getArtifactVersion("org.apache.karaf",
"apache-karaf")).name("Apache Karaf")
 .unpackDirectory(new
File("target/exam/unpack/")),

 keepRuntimeFolder(),
 logLevel(LogLevelOption.LogLevel.ERROR),

 // scanFeatures("config"),
 scanFeatures(getCamelKarafFeatureUrl(), "camel-core",
"camel-spring"),

 mavenBundle("org.apache.servicemix.bundles",
"org.apache.servicemix.bundles.protobuf-java", "2.4.1_1"),
 mavenBundle("org.apache.servicemix.bundles",
"org.apache.servicemix.bundles.antlr", "3.5_1"),
 mavenBundle("org.mvel", "mvel2", "2.1.3.Final"),
 mavenBundle("org.drools.karaf", "drools-core",
"1.0-SNAPSHOT"),
 mavenBundle("org.drools", "drools-spring",
"5.3.0.Final"),
 mavenBundle("org.drools", "drools-camel",
"5.3.0.Final"),
 //
 mavenBundle("org.drools.karaf", "drools-example",
"1.0-SNAPSHOT")
 };

 }

Is there a workaround ?

Regards,

--
Charles Moulliard
Apache Committer / Sr. Enterprise Architect (RedHat)
Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com






--
Charles Moulliard
Apache Committer / Sr. Enterprise Architect (RedHat)
Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com






smime.p7s
Description: S/MIME Cryptographic Signature


Re: Aries/JPA error to stdout at karaf 2.3.1-SNAPSHOT

2013-02-11 Thread Christoph Gritschenberger

Hi Dan,

What's the start-level of your bundles?
I think I remember encountering this issue with bundles that started 
before aries-stuff.


kind regards,
christoph

On 2013-02-10 23:22, Dan Tran wrote:

H JB,

I rebuild karaf-2.3.1-SNAPSHOT using aries.jpa 1.0.0 ( ie with
-Daries.jpa.version=1.0.0 -Daries.jpa.container.context.version=1.0.0,
see karaf-2.3.1-SNAPSHOT's top level pom for details) and still see
the issue.  So this probably comes from changes id needed
aries.blueprint.core )

-D

On Sun, Feb 10, 2013 at 12:06 PM, Jean-Baptiste Onofré  
wrote:

It seems that the JPA engine is now "mandatory". Let me take a look in the
Aries JPA changes.

Regards
JB


On 02/10/2013 09:02 PM, Dan Tran wrote:


I wonder if any one who also uses JPA sees the same issue with me at
karaf 2.3.1-snapshot?

-D

On Fri, Feb 8, 2013 at 9:14 PM, Dan Tran  wrote:


I am testing out my app which has a few JPA bundle with karaf
2.3.1-SNAPSHOT

during shutdown, karaf throws the following error to stdout


ERROR: Bundle org.apache.aries.jpa.container [73] Error stopping
bundle. (java.lang.IllegalStateException: No persistence units defined
for bundle .host.mgr/1.0.0.SNAPSHOT.)
java.lang.IllegalStateException: No persistence units defined for
bundle .host.mgr/1.0.0.SNAPSHOT.
  at
org.apache.aries.jpa.container.unit.impl.ManagedPersistenceUnitInfoFactoryImpl.destroyPersistenceBundle(ManagedPersistenceUnitInfoFactoryImpl.java:60)
  at
org.apache.aries.jpa.container.impl.PersistenceBundleManager.removedBundle(PersistenceBundleManager.java:313)
  at
org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerRemoved(BundleHookBundleTracker.java:513)
  at
org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerRemoved(BundleHookBundleTracker.java:433)


This may be a regression under new blueprint's core?

my OpenJPA with embeded derby runs fine after startup.  Only at
shutdown it barfs.

Thanks

-D



--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com





smime.p7s
Description: S/MIME Cryptographic Signature


Re: refresh/update bundles

2013-02-06 Thread Christoph Gritschenberger

When using maven, you can use

bundle:watch 

or

bundle:watch *

and just call mvn install on your project. The watcher detects the 
change in your local .m2 and updates the artifact.


kind regards,
christoph

On 2013-02-06 22:19, Jason wrote:

All,

This worked

Uninstall the bundle -> copy the bundle I want into
/system/overwriting the existing bundle -> install the
bundle.  Is there a better way to do this?

Regards,
Jason


On 02/06/2013 04:01 PM, Jason wrote:

Hi all,

I am trying to refresh a bundle from the Karaf console.  I have a
features project that describes the bundles I want deployed & I have a
distribution project to build a custom Karaf instance. All that works
great, but when I rebuild my project from source & execute a
"features:uninstall " & then "features:install
", that bundle is not refreshed/updated.  Does Karaf
provisioning behave differently when bundles are assembled via a
custom distribution vs just running "osgi:install -s mvn:somebundle"?

Thanks,
Jason









smime.p7s
Description: S/MIME Cryptographic Signature


Re: pax-wicket example running on karaf

2013-02-05 Thread Christoph Gritschenberger
Some classes are loaded at runtime using reflection etc., so that the 
bundle-plugin does not pick it up. Not sure why the "*" at the end is 
missing though.


The import-list in the wiki often has to be extended depending on your 
application (e.g. if you need authentication).


kind regards,
christoph

On 2013-02-05 09:42, Dan Tran wrote:

My apology for using this list to ask about pax-wick since I
understand Andrea is usually here

I notices pax-wicket declare osgi import all wicket package manually
at 
https://github.com/ops4j/org.ops4j.pax.wicket/blob/master/samples/blueprint/applicationFactory/pom.xml

is it the job of maven-bundle-plugin?  Of course Istill need to
manually import a minimum list of packages doc at
http://team.ops4j.org/wiki/display/paxwicket/Wicket+Applications+%28Quick%29

My attempt to let maven-bundle-plugin to figure out the need imports
also fail.  What is the reason?

Thanks

-D






smime.p7s
Description: S/MIME Cryptographic Signature


Re: karaf 2.3.x's notices file mentioned LGPL ??

2013-02-03 Thread Christoph Gritschenberger

According to the homepage [1] it's actually public domain.

kind regards,
christoph

[1] http://aopalliance.sourceforge.net/

On 2013-02-03 20:13, Jean-Baptiste Onofré wrote:

AFAIR, it's a dual license.

On 02/03/2013 07:59 PM, Dan Tran wrote:

Super thanks for removing that

-D

Btw, http://aopalliance.sourceforge.net only use 'Public Domain'  I
dont see LPGL mentioned in that page



On Sun, Feb 3, 2013 at 10:53 AM, Jean-Baptiste Onofré
 wrote:

Correct, GPL and LGPL is category X license. However, as we don't
"embed" it
in the distribution, it's allowed.
Anyway, I don't think that the dependency is required, I will remove
it if
it's really the case.

Regards
JB


On 02/03/2013 07:52 PM, Dan Tran wrote:


My bad it is from http://aopalliance.sourceforge.net

I thought Apache policy does allow direct usage of LGPL lib?

Thanks

-D

On Sun, Feb 3, 2013 at 10:49 AM, Dan Tran  wrote:


http://svn.apache.org/repos/asf/karaf/branches/karaf-2.3.x/NOTICE

mentions about LGPL in summary section.  which artifact is that?

Thanks

-D



--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com







smime.p7s
Description: S/MIME Cryptographic Signature


Re: Orderly shutting down services

2013-01-18 Thread Christoph Gritschenberger
You also need blueprint-cm in version 1.0.1-SNAPSHOT. The version-range 
for blueprint-core has been increased there. That's all I had to do.


blueprint-core-1.1.0-SNAPSHOT and blueprint-cm-1.0.1-SNAPSHOT

kind regards,
christoph


On 2013-01-18 20:34, Dan Tran wrote:

I checkout the blueprint-core from trunk, which is currently at
1.1.0-SNAPSHOT, it it right? ) and build with apache-karaf
2.3.1-snapshot

upon startup with karaf.bat i got the following stderr

ERROR: Bundle org.apache.aries.blueprint.cm [13] Error starting
mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.cm/1.0.0
(org.osgi.framework.BundleException: Unresolved constraint in bundle
org.apache.aries.blueprint.cm [13]: Unable to resolve 13.0: missing
requirement [13.0] osgi.wiring.package;
(&(osgi.wiring.package=org.apache.aries.blueprint)(version>=1.0.0)(!(version>=1.1.0
org.osgi.framework.BundleException: Unresolved constraint in bundle
org.apache.aries.blueprint.cm [13]: Unable to resolve 13.0: missing
requirement [13.0] osgi.wiring.package; (&(osgi.wiring.package=o
rg.apache.aries.blueprint)(version>=1.0.0)(!(version>=1.1.0)))
 at 
org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3826)
 at org.apache.felix.framework.Felix.startBundle(Felix.java:1868)
 at 
org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1191)
 at 
org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:295)
 at java.lang.Thread.run(Thread.java:662)


On Fri, Jan 18, 2013 at 10:37 AM, Dan Tran  wrote:

would it be possible to have aries blueprint 1.0.2-snashot deployed?

apache snapshot at
https://repository.apache.org/content/repositories/snapshots/org/apache/aries/blueprint/org.apache.aries.blueprint.core/1.0.2-SNAPSHOT/
is quite old

Thanks

-D

On Fri, Jan 18, 2013 at 9:09 AM, Dan Tran  wrote:

cool, I will try to build my own version of karaf 2.3.1 snapshot to aries 1.0.2

Thanks

-Dan

On Fri, Jan 18, 2013 at 12:35 AM, Guillaume Nodet  wrote:

Actually, I've raised and fixed
https://issues.apache.org/jira/browse/ARIES-1004
Can you see if the latest snapshots works better for you ?


On Fri, Jan 18, 2013 at 8:26 AM, Guillaume Nodet  wrote:


I fix a bunch of problems with blueprint shutting down recently, so could
you try with a recent blueprint snapshot and see if that helps ?
For now, blueprint bundles are shut down roughly according to their start
level.   THere's something in blueprint which is supposed to better use the
bundle service usage and shutdown bundles so that the problem you see would
not happen, however, this only happen when the blueprint extender itself is
stopped, which in fact, does not really help because the extender has a very
low start level and is thus stopped very late in the process.
Something that could be improved in blueprint is reacting to the fact that
a framework shutdown is initiated and do that orderly shutdown earlier in
the process.
In all cases, your bundles should be able to deal with cases where one
dependency is missing and be able to shutdown cleanly anyway.
So I would suggest you try with the latest blueprint snapshots and see if
it helps.  I can write a patch to see if the modification i suggested above
would help (I think it should) if you want to give it a try.



On Wed, Jan 16, 2013 at 9:31 PM, Dan Tran  wrote:


Hi JB,

I only try 2.3, my new work does not work with 2.2

what is osgi/karaf shutdown sequencing flow?  like it would shutdown
all bundles with the same start- level in the order from high to low ?

Thanks

-D


On Wed, Jan 16, 2013 at 12:18 PM, Jean-Baptiste Onofré 
wrote:

Hi Dan,

did you try both with Karaf 2.2.x and 2.3.x ?
did you see differences in the behavior ?

Regards
JB


On 01/16/2013 09:17 PM, Dan Tran wrote:


Hi I have a service's PreDestroy method which requires a service from
other bundle during shutdown. However at shutdown time, blueprint make
the required service 'unavailable'. Using start level ordering does
not seem to help.

What are your experiences dealing with this issue?

Big thanks ahead.

-Dan



--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com





--

Guillaume Nodet

Blog: http://gnodet.blogspot.com/

FuseSource, Integration everywhere
http://fusesource.com





--

Guillaume Nodet

Blog: http://gnodet.blogspot.com/

FuseSource, Integration everywhere
http://fusesource.com





smime.p7s
Description: S/MIME Cryptographic Signature


Re: All Pax Exam Integration Tests do not work anymore

2013-01-09 Thread Christoph Gritschenberger

I think this happens mostly on clean local .m2-repos.

Here's a link to the original issue (which contains a patch)

kind regards,
christoph

On 2013-01-08 11:38, Michael Szalay wrote:

Yes, adding this


 
 
 org.ops4j.pax.exam
 pax-exam
 2.6.0
 
 
 

..and now everything works again.

Magic moments...

Thanks

- Ursprüngliche Mail -
Von: "Peter Gardfjäll" 
An: user@karaf.apache.org
CC: "Jean-Baptiste Onofré" 
Gesendet: Dienstag, 8. Januar 2013 11:12:05
Betreff: Re: All Pax Exam Integration Tests do not work anymore

I think this is caused by
https://issues.apache.org/jira/browse/KARAF-2096

Have a look at
http://karaf.922171.n3.nabble.com/My-Karaf-PaxExam-test-mysteriously-fails-after-new-year-td4027175.html

best regards, Peter


On 01/08/2013 11:08 AM, Jean-Baptiste Onofré wrote:

Hi Michael,

I gonna to take a look but it may be a change on the OPS4J repo.

Thanks for the report.

Regards
JB

On 01/08/2013 10:40 AM, Michael Szalay wrote:

Hi all

since a few days, all our pax exam karaf integration tests do not work
anymore.

The error message is:

java.lang.Exception: Could not start bundle
mvn:org.ops4j.pax.swissbox/pax-swissbox-core/ in feature(s)
exam-2.4.0: Unresolved constraint in bundle
org.ops4j.pax.swissbox.core [79]: Unable to resolve 79.0: missing
requirement [79.0] package; (&(package=org.ops4j.lang)(version>=1.4.0))
  at
org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:356)[21:org.apache.karaf.features.core:2.2.9]

  at
org.apache.karaf.features.internal.FeaturesServiceImpl$1.run(FeaturesServiceImpl.java:988)[21:org.apache.karaf.features.core:2.2.9]

Caused by: org.osgi.framework.BundleException: Unresolved constraint
in bundle org.ops4j.pax.swissbox.core [79]: Unable to resolve 79.0:
missing requirement [79.0] package;
(&(package=org.ops4j.lang)(version>=1.4.0))
  at
org.apache.felix.framework.Felix.resolveBundle(Felix.java:3564)[org.apache.felix.framework-3.2.2.jar:]

  at
org.apache.felix.framework.Felix.startBundle(Felix.java:1797)[org.apache.felix.framework-3.2.2.jar:]

  at
org.apache.felix.framework.BundleImpl.start(BundleImpl.java:927)[org.apache.felix.framework-3.2.2.jar:]

  at
org.apache.felix.framework.BundleImpl.start(BundleImpl.java:914)[org.apache.felix.framework-3.2.2.jar:]

  at
org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:353)[21:org.apache.karaf.features.core:2.2.9]



We use the following versions pax and karaf exam:

  
  
  org.apache.karaf.tooling.exam

org.apache.karaf.tooling.exam.container
  2.3.0
  
  
  org.ops4j.pax.exam
  pax-exam-junit4
  2.6.0
  

any hints what has changed here?

Regards Michael










smime.p7s
Description: S/MIME Cryptographic Signature


Re: Kar features.xml file is not filtered

2012-10-22 Thread Christoph Gritschenberger
Hi,

Just remembered, we specifically attach the execution of the
resource-plugin to the "generate-resources"-phase like this:

  
org.apache.maven.plugins
maven-resources-plugin

  
filter
generate-resources

  resources

  

  

That way the filtered features.xml is created way earlier in the
build-process and available when the assembly is created.

kind regards,
christoph

On 22/10/12 15:33, Giacomo Coletta wrote:
> The build fails because of  the error and there is no target directory at
> all.
> 
> 2012/10/22 Christoph Gritschenberger 
> 
>> And is the file actually not there?
>> Is it nowhere in the target-directory?
>>
>> kind regards,
>> christoph
>>
>> On 22/10/12 14:51, Giacomo Coletta wrote:
>>> hi,
>>>
>>> this does not work for me.
>>>
>>> The message i get is:
>>>
>>> [ERROR] Failed to execute goal
>>> org.apache.karaf.tooling:features-maven-plugin:2.3.0:create-kar
>>> (create-kar) on project kar.rttr: Could not interpret features XML file:
>>>
>> C:\DEV3\Sources\RTTR\osgi.rttr.repo\karaf\kars\kar.rttr\target\classes\feature.xml
>>> (Impossible to find the specified path) :
>>>
>> file:/C:/DEV3/Sources/RTTR/osgi.rttr.repo/karaf/kars/kar.rttr/target/classes/feature.xml
>>> -> [Help 1]
>>>
>>> 2012/10/19 Michael Täschner 
>>>
>>>> Hi,
>>>>
>>>> pick up the filtered file from the target folder. Here's my example
>> config:
>>>>
>>>>
>>>>   
>>>> org.apache.karaf.tooling
>>>> features-maven-plugin
>>>> true
>>>>
>>>> 
>>>>   
>>>> create-kar
>>>> process-resources
>>>>
>>>> 
>>>>   create-kar
>>>> 
>>>> 
>>>>
>>>> ${project.build.directory}/doesNotExist
>>>>   false
>>>>
>>>>
>> ${project.build.outputDirectory}/feature.xml
>>>> 
>>>>   
>>>> 
>>>>   
>>>>
>>>> Regards,
>>>> Michael
>>>>
>>>> P.S.: I do not actually remember why I added the /doesNotExist folder
>>>> though but feature.xml is located in src/main/resourses
>>>>
>>>>
>>>> 2012/10/19 Giacomo Coletta 
>>>>
>>>>> This was more or less what I already tried, but alone does not work.
>>>>>
>>>>> it seem that the resources:resources goal is not executed during
>>>>> packaging with  pom (while it is with jars).
>>>>>
>>>>> i tried a bit more and in the end find something working (even if
>> doesn't
>>>>> look so clean):
>>>>>
>>>>>  
>>>>> 
>>>>> 
>>>>>
>>>>> ${project.basedir}/src/main/feature/
>>>>> true
>>>>> 
>>>>> **/*
>>>>> 
>>>>>
>>>>> ${project.basedir}/src/main/filteredFeature/
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> org.apache.maven.plugins
>>>>> maven-resources-plugin
>>>>> ${maven-resources-plugin.version}
>>>>> 
>>>>> 
>>>>> filter
>>>>> generate-resources
>>>>> 
>>>>> resources
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> org.apache.karaf.tooling
>>>>> features-maven-plugin
>>>>> 2.2.9
>>>>> 
>>>>> 
>>>>> create-kar
>>>>> 
>>>>> create-kar
>>>>>

Re: Kar features.xml file is not filtered

2012-10-22 Thread Christoph Gritschenberger
And is the file actually not there?
Is it nowhere in the target-directory?

kind regards,
christoph

On 22/10/12 14:51, Giacomo Coletta wrote:
> hi,
> 
> this does not work for me.
> 
> The message i get is:
> 
> [ERROR] Failed to execute goal
> org.apache.karaf.tooling:features-maven-plugin:2.3.0:create-kar
> (create-kar) on project kar.rttr: Could not interpret features XML file:
> C:\DEV3\Sources\RTTR\osgi.rttr.repo\karaf\kars\kar.rttr\target\classes\feature.xml
> (Impossible to find the specified path) :
> file:/C:/DEV3/Sources/RTTR/osgi.rttr.repo/karaf/kars/kar.rttr/target/classes/feature.xml
> -> [Help 1]
> 
> 2012/10/19 Michael Täschner 
> 
>> Hi,
>>
>> pick up the filtered file from the target folder. Here's my example config:
>>
>>
>>   
>> org.apache.karaf.tooling
>> features-maven-plugin
>> true
>>
>> 
>>   
>> create-kar
>> process-resources
>>
>> 
>>   create-kar
>> 
>> 
>>
>> ${project.build.directory}/doesNotExist
>>   false
>>
>> ${project.build.outputDirectory}/feature.xml
>> 
>>   
>> 
>>   
>>
>> Regards,
>> Michael
>>
>> P.S.: I do not actually remember why I added the /doesNotExist folder
>> though but feature.xml is located in src/main/resourses
>>
>>
>> 2012/10/19 Giacomo Coletta 
>>
>>> This was more or less what I already tried, but alone does not work.
>>>
>>> it seem that the resources:resources goal is not executed during
>>> packaging with  pom (while it is with jars).
>>>
>>> i tried a bit more and in the end find something working (even if doesn't
>>> look so clean):
>>>
>>>  
>>> 
>>> 
>>>
>>> ${project.basedir}/src/main/feature/
>>> true
>>> 
>>> **/*
>>> 
>>>
>>> ${project.basedir}/src/main/filteredFeature/
>>> 
>>> 
>>> 
>>> 
>>> org.apache.maven.plugins
>>> maven-resources-plugin
>>> ${maven-resources-plugin.version}
>>> 
>>> 
>>> filter
>>> generate-resources
>>> 
>>> resources
>>> 
>>> 
>>> 
>>> 
>>> 
>>> org.apache.karaf.tooling
>>> features-maven-plugin
>>> 2.2.9
>>> 
>>> 
>>> create-kar
>>> 
>>> create-kar
>>> 
>>> 
>>>
>>>
>>> ${project.basedir}/src/main/filteredFeature/feature.xml
>>> 
>>>
>>> 
>>> 
>>> 
>>> 
>>> 
>>>
>>> Thanks anyway.
>>>
>>> Giacomo
>>>
>>> 2012/10/19 Christoph Gritschenberger >>>
>>>
>>>> You need to enable resource-filtering in your maven-build. You can set
>>>> this up in your pom.xml like this:
>>>>
>>>> ...
>>>>   
>>>> 
>>>>   
>>>>
>>>> ${project.basedir}/src/main/filtered-resources
>>>> true
>>>> 
>>>>   **/*
>>>> 
>>>>   
>>>> 
>>>> ...
>>>>   
>>>> ...
>>>>
>>>> kind regards,
>>>> christoph
>>>>
>>>> On 19/10/12 11:16, Giacomo Coletta wrote:
>>>>> Hi,
>>>>>
>>>>> i started using the KARs archives, and creates a few KARS using the KAR
>>>>> archetype.
>>>>>
>>>>> one problem I encountered is that the features.xml file included in
>>>> the kar
>>>>> in the generated maven project doesn't seem to be maven filtered by
>>>> default.
>>>>> I would like it to be filtered for managing the included karaf
>>>> features and
>>>>> bundles versions using maven properties like in the following example:
>>>>>
>>>>> 
>>>>> 
>>>>>   
>>>>> mvn:mybundle.groupId/mybundle.ArtifactId/${mybundle.version}
>>>>>
>>>>> 
>>>>> 
>>>>>
>>>>> i was able to do this while including the features in an assembly
>>>> using the
>>>>> add-features-to-repo goal of the features-maven-plugin (features.xml
>>>> was
>>>>> filtered by default)
>>>>>
>>>>> I tried to do the same with kars, but I was not able to get to this
>>>> result
>>>>> quickly.
>>>>> May be this is related to the fact that in the features-maven-pluging
>>>> the
>>>>> create-kar goal is tied to the package phase, while
>>>>> the add-features-to-repo was in the compile phase.
>>>>>
>>>>>
>>>>> Does anybody know a standard or easy way to have the features.xml file
>>>>> maven filtered in KARs ?
>>>>>
>>>>> Many Thanks
>>>>>
>>>>> Giacomo
>>>>>
>>>>
>>>>
>>>>
>>>
>>
> 




smime.p7s
Description: S/MIME Cryptographic Signature


Re: Kar features.xml file is not filtered

2012-10-19 Thread Christoph Gritschenberger
You need to enable resource-filtering in your maven-build. You can set
this up in your pom.xml like this:

...
  

  

${project.basedir}/src/main/filtered-resources
true

  **/*

  

...
  
...

kind regards,
christoph

On 19/10/12 11:16, Giacomo Coletta wrote:
> Hi,
> 
> i started using the KARs archives, and creates a few KARS using the KAR
> archetype.
> 
> one problem I encountered is that the features.xml file included in the kar
> in the generated maven project doesn't seem to be maven filtered by default.
> I would like it to be filtered for managing the included karaf features and
> bundles versions using maven properties like in the following example:
> 
> 
> 
>   
> mvn:mybundle.groupId/mybundle.ArtifactId/${mybundle.version}
> 
> 
> 
> 
> i was able to do this while including the features in an assembly using the
> add-features-to-repo goal of the features-maven-plugin (features.xml was
> filtered by default)
> 
> I tried to do the same with kars, but I was not able to get to this result
> quickly.
> May be this is related to the fact that in the features-maven-pluging the
> create-kar goal is tied to the package phase, while
> the add-features-to-repo was in the compile phase.
> 
> 
> Does anybody know a standard or easy way to have the features.xml file
> maven filtered in KARs ?
> 
> Many Thanks
> 
> Giacomo
> 




smime.p7s
Description: S/MIME Cryptographic Signature


Re: Apache Karaf 2.3.0 vs 2.2.x

2012-10-09 Thread Christoph Gritschenberger
I can confirm that karaf 2.2.9 fixed our issues with jre 6u33+.

kind regards,
christoph

On 09/10/12 14:16, Achim Nierbeck wrote:
> Hi Bengt,
> 
> to my knowledge Karaf 2.2.9 uses a 0.3.1 (or higher) which also
> includes the corresponding Bug-Fix and therefore should work.
> 
> regards, Achim
> 
> 2012/10/9 Bengt Rodehav :
>> Just a question since I've seen that Karaf 2.3.0 is in the works.
>>
>> I've just encountered a bug in Aries Proxy 0.3 (Aries-908 in JIRA) that
>> causes Proxy 0.3  to fail with JVM 1.6.0_33 and later. This has been fixed
>> in Aries but I noticed that Karaf 2.2.9 still uses Proxy 0.3. Karaf 2.3.0
>> seems to have been upgrade to Proxy 1.0 (which should work).
>>
>> Are there any plans to release a Karaf 2.2.10 with a new proxy version?
>> Otherwise, I believe many people may encounter the same problem I did when
>> upgrading their JVM version. For me personally I'm waiting for the 2.3.0 to
>> be released and then I'll upgrade my custom distribution. Not sure how
>> people generally do this but a 2.2.10 with an upgraded proxy might be needed
>> for some people.
>>
>> /Bengt
> 
> 
> 




smime.p7s
Description: S/MIME Cryptographic Signature


Re: Aries error: No transaction currently active

2012-08-27 Thread Christoph Gritschenberger
Hi,

There seems to be some race-condition in aries there. Something similar
has been reported previously [1] [2].
I think we were able to fix it by synchronizing entity-manager-access
with synchronized-blocks

synchronized(entityManager){
entityManager.merge(...);
}

kind regards,
christoph

[1]
http://karaf.922171.n3.nabble.com/Exception-No-transaction-currently-active-td4025308.html
[2]
http://mail-archives.apache.org/mod_mbox/aries-dev/201207.mbox/%3CCAEQV%2BEEhx4zNS%3D9MbxBhBUfedeC8F%3DBvGXn7v49EzwYxBJdf3g%40mail.gmail.com%3E

On 25/08/12 10:12, johnsas wrote:
> Hi,
> 
> I am using Aries 0.3 for transaction management in Karaf 2.2.8.
> It works in gereral but sometimes I get the following exception when
> accessing a database:
> 
> javax.persistence.TransactionRequiredException: No transaction currently
> active
>   at
> org.apache.aries.jpa.container.context.transaction.impl.JTAPersistenceContextRegistry.getCurrentPersistenceContext(JTAPersistenceContextRegistry.java:103)
>   at
> org.apache.aries.jpa.container.context.transaction.impl.JTAEntityManager.getPersistenceContext(JTAEntityManager.java:83)
>   at
> org.apache.aries.jpa.container.context.transaction.impl.JTAEntityManager.merge(JTAEntityManager.java:270)
>   at
> org.xxx.persistence.impl.DatabaseProviderDao.merge(DatabaseProviderDao.java:304)
> 
> This error occurs out of the blue.
> Do you have an idea why this happens, and what can be done to avoid it?
> 
> 
> 
> 
> --
> View this message in context: 
> http://karaf.922171.n3.nabble.com/Aries-error-No-transaction-currently-active-tp4025825.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
> 




smime.p7s
Description: S/MIME Cryptographic Signature


Re: Why is JDK required for running Karaf?

2012-07-31 Thread Christoph Gritschenberger
I think Andreas covered it pretty well.
In "server"-mode the JVM does more optimizations which increase
startup-times and memory-footprint, and it's default in the
karaf-startup-script.
While on Linux the JRE comes with both "server" and "client"-mode, the
windows-version of JRE does not include the "server"-mode only the JDK does.

While I think it makes sense to use the server-mode by default, there
should be a fallback to client-mode on windows-machines where the
Java-installation does not support "server"-mode.

I already created an issue for that [1]

kind regards,
christoph

[1] https://issues.apache.org/jira/browse/KARAF-1695

On 31/07/12 19:54, Dan Tran wrote:
> any one recall why Karaf requires JDK at the first place?
> 
> Thanks
> 
> -Dan
> 
> On Tue, Jul 31, 2012 at 6:11 AM, Andreas Pieber  wrote:
>> @Christoph: can you create a JIRA for the problem that we don't lost
>> this problem?
>>
>> Kind regards,
>> Andreas
>>
>> On Tue, Jul 31, 2012 at 1:57 PM, Guillaume Nodet  wrote:
>>> Yes, I think if the default windows JRE does not support server, we should
>>> not include this option by default on windows.
>>> Unless we can actually find if it's present or not, which would be even
>>> better.
>>>
>>>
>>> On Tue, Jul 31, 2012 at 1:02 PM, Christoph Gritschenberger
>>>  wrote:
>>>>
>>>> Hi,
>>>>
>>>> With this, I get some syntax-error
>>>>
>>>> "-Dcom.sun.management.jmxremote""" ist syntaktisch an dieser Stelle
>>>> nicht verarbeitbar.
>>>>
>>>> (Sorry for the german, but that's my only WinXP I got lying around.)
>>>>
>>>> I tried with skipping the quotes and jmxremote-part, then everything
>>>> seemed to work.
>>>>
>>>> set JAVA_OPTS=-Xmx512M
>>>> bin\karaf.bat
>>>>
>>>> Maybe the karaf.bat-script should detect whether "-server" is supported.
>>>> Or is it required for some feature(s)?
>>>>
>>>> kind regards,
>>>> christoph
>>>>
>>>>
>>>> On 31/07/12 12:35, Guillaume Nodet wrote:
>>>>> Could you try running without the -server flags maybe ?
>>>>>
>>>>> set JAVA_OPTS="-Xmx512M -Dcom.sun.management.jmxremote"
>>>>> bin\karaf.bat
>>>>>
>>>>>
>>>>>
>>>>> On Tue, Jul 31, 2012 at 12:15 PM, Christoph Gritschenberger <
>>>>> christoph.gritschenber...@gmail.com> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I ran into an Error when I tried to run karaf on a Windows XP with
>>>>>> Oracle JRE 7u5 installed.
>>>>>>
>>>>>> Error: missing `server' JVM at
>>>>>> `C:\Programme\Java\jre7\bin\server\jvm.dll'.
>>>>>> Please install or use the JRE or JDK that contains these missing
>>>>>> components.
>>>>>>
>>>>>> I then discovered that the karaf-documentation states that a JDK is
>>>>>> required to run karaf. I installed JDK 7u5 and everything went fine.
>>>>>> But I have some difficulties explaining to certain customers that they
>>>>>> need to install a Development Kit to run this thing.
>>>>>>
>>>>>> So my question is, why exactly is it required to install JDK? Is there
>>>>>> no other way?
>>>>>>
>>>>>> Thanks.
>>>>>>
>>>>>> kind regards,
>>>>>> christoph
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> 
>>> Guillaume Nodet
>>> 
>>> Blog: http://gnodet.blogspot.com/
>>> 
>>> FuseSource, Integration everywhere
>>> http://fusesource.com




smime.p7s
Description: S/MIME Cryptographic Signature


Re: automatic SNAPSHOT-deployment for release-branches

2012-07-31 Thread Christoph Gritschenberger
Hi,

Great thanks

kind regards,
christoph

On 31/07/12 15:11, Jean-Baptiste Onofré wrote:
> I fixed the Jenkins configuration (the SNAPSHOT are now uploaded
> correctly).
> 
> However, the builds are failed due to demo (I think that the demo
> groupId is not correct and so the upload is not allowed). I'm fixing
> that ;)
> 
> Regards
> JB
> 
> On 07/31/2012 11:58 AM, Christoph Gritschenberger wrote:
>> Hi,
>>
>> I noticed that the 2.2.9-SNAPSHOT and 2.3.0-SNAPSHOT in the
>> apache-snapshot-repository [1] are quite outdated, although builds on
>> builds.apache.org were stable.
>> Jamie Goodyear pointed out to me in IRC that auto-deploy was "turned off
>> as there was infra problems at the time".
>> Would it be possible to turn them back on?
>>
>> kind regards,
>> christoph
>>
> 




smime.p7s
Description: S/MIME Cryptographic Signature


Re: Why is JDK required for running Karaf?

2012-07-31 Thread Christoph Gritschenberger
Hi,

With this, I get some syntax-error

"-Dcom.sun.management.jmxremote""" ist syntaktisch an dieser Stelle
nicht verarbeitbar.

(Sorry for the german, but that's my only WinXP I got lying around.)

I tried with skipping the quotes and jmxremote-part, then everything
seemed to work.

set JAVA_OPTS=-Xmx512M
bin\karaf.bat

Maybe the karaf.bat-script should detect whether "-server" is supported.
Or is it required for some feature(s)?

kind regards,
christoph


On 31/07/12 12:35, Guillaume Nodet wrote:
> Could you try running without the -server flags maybe ?
> 
> set JAVA_OPTS="-Xmx512M -Dcom.sun.management.jmxremote"
> bin\karaf.bat
> 
> 
> 
> On Tue, Jul 31, 2012 at 12:15 PM, Christoph Gritschenberger <
> christoph.gritschenber...@gmail.com> wrote:
> 
>> Hi,
>>
>> I ran into an Error when I tried to run karaf on a Windows XP with
>> Oracle JRE 7u5 installed.
>>
>> Error: missing `server' JVM at `C:\Programme\Java\jre7\bin\server\jvm.dll'.
>> Please install or use the JRE or JDK that contains these missing
>> components.
>>
>> I then discovered that the karaf-documentation states that a JDK is
>> required to run karaf. I installed JDK 7u5 and everything went fine.
>> But I have some difficulties explaining to certain customers that they
>> need to install a Development Kit to run this thing.
>>
>> So my question is, why exactly is it required to install JDK? Is there
>> no other way?
>>
>> Thanks.
>>
>> kind regards,
>> christoph
>>
>>
> 
> 




smime.p7s
Description: S/MIME Cryptographic Signature


Why is JDK required for running Karaf?

2012-07-31 Thread Christoph Gritschenberger
Hi,

I ran into an Error when I tried to run karaf on a Windows XP with
Oracle JRE 7u5 installed.

Error: missing `server' JVM at `C:\Programme\Java\jre7\bin\server\jvm.dll'.
Please install or use the JRE or JDK that contains these missing components.

I then discovered that the karaf-documentation states that a JDK is
required to run karaf. I installed JDK 7u5 and everything went fine.
But I have some difficulties explaining to certain customers that they
need to install a Development Kit to run this thing.

So my question is, why exactly is it required to install JDK? Is there
no other way?

Thanks.

kind regards,
christoph



smime.p7s
Description: S/MIME Cryptographic Signature


automatic SNAPSHOT-deployment for release-branches

2012-07-31 Thread Christoph Gritschenberger
Hi,

I noticed that the 2.2.9-SNAPSHOT and 2.3.0-SNAPSHOT in the
apache-snapshot-repository [1] are quite outdated, although builds on
builds.apache.org were stable.
Jamie Goodyear pointed out to me in IRC that auto-deploy was "turned off
as there was infra problems at the time".
Would it be possible to turn them back on?

kind regards,
christoph



smime.p7s
Description: S/MIME Cryptographic Signature


Re: IDE run configuration

2012-07-28 Thread Christoph Gritschenberger
What exactly are you trying to do?
You want to execute junit-tests that always launch a "clean" karaf instance?
You can do this with pax-exam [1] and pax-exam-karaf.

kind regards,
christoph

[1] http://team.ops4j.org/wiki/display/paxexam/Pax+Exam
[2] https://github.com/openengsb/labs-paxexam-karaf/wiki/

On Fri, Jul 27, 2012 at 2:19 PM, wildes  wrote:
> it looks good. but I have some observations.
> - The command could auto install the bundle.
> - The command configuration could be persistent.
>
>
> The Karaf embedded as maven plugin in my opinion would be the better
> solution for development.
> The Apache Sling maven-launchpad-plugin does something like, running Sling
> application on Apache Felix.
> Does This plugin could be adapted to run Karaf as embedded ?
>
>
> Thanks.
>
>
>
> --
> View this message in context: 
> http://karaf.922171.n3.nabble.com/IDE-run-configuration-tp4025338p4025354.html
> Sent from the Karaf - User mailing list archive at Nabble.com.


Re: IDE run configuration

2012-07-26 Thread Christoph Gritschenberger
If you just like to debug, you can enable remote-debugging in karaf by
setting the KARAF_DEBUG env-variable.

export KARAF_DEBUG=true
bin/karaf

You can then connect your debugger to port 5005.

The downside of this approach is that runtime code-editing is very limited.

Is this what you are looking for?

kind regards,
christoph

On 26/07/12 16:38, wildes wrote:
> Hi,
> 
> i'd like a help me how to run and debug blueprint applications on karaf
> runtime from IDE. I have tried Karaf Eik 0.5.3 but it is limited to eclipse
> plugins project, doesnt works with latest eclipse releases. I´d lik to know
> a approach about configurations to run maven  projects.
> 
> Thanks.
> 
> 
> 
> --
> View this message in context: 
> http://karaf.922171.n3.nabble.com/IDE-run-configuration-tp4025338.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
> 




smime.p7s
Description: S/MIME Cryptographic Signature


Re: Felix File install and Weaving Hooks

2012-07-25 Thread Christoph Gritschenberger
Hi,

I just had a look at Christian Schneider's code that delays startup of
the console. It just periodically checks the list of installed bundles
and stops when it's startup is finished.
I don't think it can be reused for this purpose.

I think the real problem is that bundles with start-level 80 (default
for bundles in deploy) are started before other bundles specified in
features-core with lower start-level (in our case 40).

A specific solution would be, when starting the bundle providing the
weaving hook, to check all installed bundles whether they would require
weaving. If a bundle does, refresh it, so that the weaving hook is applied.

Maybe this can be fixed by adding an option to refresh all hot-deployed
bundles when features-core is finished installing the features from
features.cfg

WDYT?

kind regards,
christoph



On 18/07/12 19:07, Andreas Pieber wrote:
> maybe there is some other way delay deploy folder loading till all
> bundles are at least started? Since Christian is after something here
> anyhow (he'll need something similar for his startup logic anyhow)
> maybe we can reuse parts of this logic? Or is there something
> completely different possibly here?
> 
> Kind regards,
> Andreas
> 
> On Wed, Jul 18, 2012 at 6:56 PM, Guillaume Nodet  wrote:
>> Yes, that would be a problem, because fileinstall is the one that grabs all
>> the configuration from the etc/ directory and that needs to be done early in
>> the process.
>>
>> On Wed, Jul 18, 2012 at 6:37 PM, Christoph Gritschenberger
>>  wrote:
>>>
>>> Hi,
>>>
>>> We recently started using Weaving Hooks in our Project (running in
>>> karaf-3.0.0-SNAPSHOT) and ran into a Problem:
>>>
>>> When deploying a bundle using the deploy-directory the bundle might get
>>> installed before the weaving hook is active. This causes the bundle to
>>> remain unweaved.
>>>
>>> We described the weaving-hook as part of a feature in a features.xml and
>>> added it to featuresBoot in org.apache.karaf.features.cfg. (We use
>>> start-level 40 for it as start-levels lower than 30 caused issues with
>>> aries because it obviously does not like bundle that are started before
>>> itself.)
>>>
>>> Now the Felix File installer is started with start-level 17, so it might
>>> pick up the bundle in the deploy-folder way before Karaf loads the
>>> feature-core that would install the feature of the weaver.
>>> My question is, does it even make sense to start the file installer
>>> earlier than the features-core-bundle?
>>> As far as I can tell it would make more sense to start the Feature-core
>>> before the file-installer, or does that cause other problems?
>>>
>>> WDYT?
>>>
>>> kind regards,
>>> christoph
>>>
>>
>>
>>
>> --
>> 
>> Guillaume Nodet
>> 
>> Blog: http://gnodet.blogspot.com/
>> 
>> FuseSource, Integration everywhere
>> http://fusesource.com




smime.p7s
Description: S/MIME Cryptographic Signature


Felix File install and Weaving Hooks

2012-07-18 Thread Christoph Gritschenberger
Hi,

We recently started using Weaving Hooks in our Project (running in
karaf-3.0.0-SNAPSHOT) and ran into a Problem:

When deploying a bundle using the deploy-directory the bundle might get
installed before the weaving hook is active. This causes the bundle to
remain unweaved.

We described the weaving-hook as part of a feature in a features.xml and
added it to featuresBoot in org.apache.karaf.features.cfg. (We use
start-level 40 for it as start-levels lower than 30 caused issues with
aries because it obviously does not like bundle that are started before
itself.)

Now the Felix File installer is started with start-level 17, so it might
pick up the bundle in the deploy-folder way before Karaf loads the
feature-core that would install the feature of the weaver.
My question is, does it even make sense to start the file installer
earlier than the features-core-bundle?
As far as I can tell it would make more sense to start the Feature-core
before the file-installer, or does that cause other problems?

WDYT?

kind regards,
christoph



smime.p7s
Description: S/MIME Cryptographic Signature