Re: Karav 3.0.3 vs 2.4.1 : file install behavior

2015-04-21 Thread lbu
Looking at bundles' headers I see the same version on 3.0.3 and 2.4.1 :

- Karaf 2.4.1:

Bundle-SymbolicName = org.apache.felix.fileinstall
Bundle-Version = 3.4.2
Bundle-Name = Apache Felix File Install

Bundle-SymbolicName = org.apache.felix.configadmin
Bundle-Version = 1.8.0
Bundle-Name = Apache Felix Configuration Admin Service

- Karaf 3.0.3:

Bundle-SymbolicName = org.apache.felix.fileinstall
Bundle-Version = 3.4.2
Bundle-Name = Apache Felix File Install

Bundle-SymbolicName = org.apache.felix.configadmin
Bundle-Version = 1.8.0
Bundle-Name = Apache Felix Configuration Admin Service


Looks like sub-folders of ${karaf.base}/etc are processed by Blueprint which
tries to find blueprint applications but see it as a bundle even if it does
not contains any blueprint data:

 2015-04-21 08:31:11,495 | DEBUG | l for user karaf | BlueprintContainerImpl
  
| 15 - org.apache.aries.blueprint.core - 1.4.2 | Instantiating component
shell-516
2015-04-21 08:31:35,589 | DEBUG | f-3.0.3-test/etc | BndUtils   
 
| 2 - org.ops4j.pax.url.wrap - 2.3.0 | Creating bundle for
[wrap:jardir:/opt/sfw/containers/apache-karaf-3.0.3-test/etc/myfolder3$Bundle-SymbolicName=myfolder3Bundle-Version=0.0.0]
2015-04-21 08:31:35,590 | DEBUG | f-3.0.3-test/etc | BndUtils   
 
| 2 - org.ops4j.pax.url.wrap - 2.3.0 | Overwrite mode: KEEP
2015-04-21 08:31:35,630 | INFO  | f-3.0.3-test/etc | fileinstall
 
| 7 - org.apache.felix.fileinstall - 3.4.2 | Installing bundle myfolder3 /
0.0.0
2015-04-21 08:31:35,631 | DEBUG | f-3.0.3-test/etc | BlueprintExtender  
 
| 15 - org.apache.aries.blueprint.core - 1.4.2 | Starting BlueprintContainer
destruction process for bundle myfolder3
2015-04-21 08:31:35,631 | DEBUG | f-3.0.3-test/etc | BlueprintExtender  
 
| 15 - org.apache.aries.blueprint.core - 1.4.2 | Not a blueprint bundle or
destruction of BlueprintContainer already finished for myfolder3.
2015-04-21 08:31:35,631 | DEBUG | f-3.0.3-test/etc | myfolder3  
 
| 66 - myfolder3 - 0.0.0 | BundleEvent INSTALLED - myfolder3
2015-04-21 08:31:35,631 | DEBUG | f-3.0.3-test/etc | BlueprintExtender  
 
| 15 - org.apache.aries.blueprint.core - 1.4.2 | Starting BlueprintContainer
destruction process for bundle myfolder3
2015-04-21 08:31:35,631 | DEBUG | f-3.0.3-test/etc | BlueprintExtender  
 
| 15 - org.apache.aries.blueprint.core - 1.4.2 | Not a blueprint bundle or
destruction of BlueprintContainer already finished for myfolder3.
2015-04-21 08:31:35,640 | DEBUG | lixDispatchQueue | framework  
 
| 0 - org.apache.felix.framework - 4.2.1 | FrameworkEvent PACKAGES REFRESHED
- org.apache.felix.framework
2015-04-21 08:31:35,643 | DEBUG | f-3.0.3-test/etc | BlueprintExtender  
 
| 15 - org.apache.aries.blueprint.core - 1.4.2 | Starting BlueprintContainer
destruction process for bundle myfolder3
2015-04-21 08:31:35,644 | DEBUG | f-3.0.3-test/etc | BlueprintExtender  
 
| 15 - org.apache.aries.blueprint.core - 1.4.2 | Not a blueprint bundle or
destruction of BlueprintContainer already finished for myfolder3.
2015-04-21 08:31:35,645 | DEBUG | f-3.0.3-test/etc | myfolder3  
 
| 66 - myfolder3 - 0.0.0 | BundleEvent RESOLVED - myfolder3
2015-04-21 08:31:35,645 | DEBUG | f-3.0.3-test/etc | BlueprintExtender  
 
| 15 - org.apache.aries.blueprint.core - 1.4.2 | Starting BlueprintContainer
destruction process for bundle myfolder3
2015-04-21 08:31:35,645 | DEBUG | f-3.0.3-test/etc | BlueprintExtender  
 
| 15 - org.apache.aries.blueprint.core - 1.4.2 | Not a blueprint bundle or
destruction of BlueprintContainer already finished for myfolder3.
2015-04-21 08:31:35,646 | DEBUG | f-3.0.3-test/etc | myfolder3  
 
| 66 - myfolder3 - 0.0.0 | BundleEvent STARTING - myfolder3
2015-04-21 08:31:35,646 | DEBUG | f-3.0.3-test/etc | BlueprintExtender  
 
| 15 - org.apache.aries.blueprint.core - 1.4.2 | Scanning bundle myfolder3
for blueprint application
2015-04-21 08:31:35,647 | DEBUG | f-3.0.3-test/etc | BlueprintExtender  
 
| 15 - org.apache.aries.blueprint.core - 1.4.2 | No blueprint application
found in bundle myfolder3
2015-04-21 08:31:35,647 | DEBUG | f-3.0.3-test/etc | myfolder3  
 
| 66 - myfolder3 - 0.0.0 | BundleEvent STARTED - myfolder3
2015-04-21 08:31:35,647 | INFO  | f-3.0.3-test/etc | fileinstall
 
| 7 - org.apache.felix.fileinstall - 3.4.2 | Started bundle:
wrap:jardir:/opt/sfw/containers/apache-karaf-3.0.3-test/etc/myfolder3$Bundle-SymbolicName=myfolder3Bundle-Version=0.0.0







--
View this message in context: 
http://karaf.922171.n3.nabble.com/Karav-3-0-3-vs-2-4-1-file-install-behavior-tp4039815p4039821.html
Sent from the Karaf - User mailing list archive at Nabble.com.


Re: Declarative Services with Karaf

2015-04-20 Thread lbu
It was much simpler than I thought, thank you guys



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Declarative-Services-with-Karaf-tp4039768p4039814.html
Sent from the Karaf - User mailing list archive at Nabble.com.


Karav 3.0.3 vs 2.4.1 : file install behavior

2015-04-20 Thread lbu
Hi,

I've noticed that in Karaf 3.0.3 if I add an additional folder to the list
of the folders to watch for configurations, Karaf creates a bundle withe the
name of the folder once a configuration file (even empty) is created in the
new folder.

The File Install configuration (config.properties) is

felix.fileinstall.enableConfigSave = true
felix.fileinstall.dir = ${karaf.etc}, ${karaf.etc}/myfolder
felix.fileinstall.filter = .*\\.cfg
felix.fileinstall.poll = 1000
felix.fileinstall.noInitialDelay = true
felix.fileinstall.log.level = 3



Bundle's header is:
   
myfolder (64)
-
Created-By = 1.8.0_45 (Oracle Corporation)
Manifest-Version = 1.0
Bnd-LastModified = 1429539709907
Generated-By-Ops4j-Pax-From =
wrap:jardir:/opt/sfw/containers/apache-karaf-3.0.3-test/etc/myfolder$Bundle-SymbolicName=myfolderBundle-Version=0.0.0
Tool = Bnd-2.3.0.201405100607

Bundle-ManifestVersion = 2
Bundle-SymbolicName = myfolder
Bundle-Version = 0.0.0
Bundle-Name = myfolder

Export-Package = 
test.cfg



This does not happen in Karaf 2.4.1, is that expected ?


Regards,
Luca

 




--
View this message in context: 
http://karaf.922171.n3.nabble.com/Karav-3-0-3-vs-2-4-1-file-install-behavior-tp4039815.html
Sent from the Karaf - User mailing list archive at Nabble.com.


Re: EclipseLink 2.5.2 (JPA 2.1) in Karaf 3.0.2

2014-12-12 Thread lbu
I've manually updated the Aries JPA and it works, thank you.
In 3.0.2's enterprise features JPA is still 2.0, am I wrong? 



--
View this message in context: 
http://karaf.922171.n3.nabble.com/EclipseLink-2-5-2-JPA-2-1-in-Karaf-3-0-2-tp4037031p4037196.html
Sent from the Karaf - User mailing list archive at Nabble.com.


EclipseLink 2.5.2 (JPA 2.1) in Karaf 3.0.2

2014-12-07 Thread lbu
Hi,

Following http://comments.gmane.org/gmane.comp.apache.karaf.devel/7411, I'm
trying to update my https://github.com/lburgazzoli/lb-karaf-examples-jpa to
include EclipseLink 2.5.2 but I fail to get it working:

In the log files I see the following error:

2014-11-04 13:47:48,650 | ERROR | l for user karaf | container  
 
| 82 - org.apache.aries.jpa.container - 1.0.0 | There was an error while
parsing the persistence descriptor META-INF/persistence.xml in the bundle
lb-karaf-examples-jpa-eclipselink-25/3.0.2.SNAPSHOT. No persistence units
will be managed for this bundle.
org.apache.aries.jpa.container.parsing.PersistenceDescriptorParserException:
A schema could not be located for the persistence descriptor
META-INF/persistence.xml in bundle
lb-karaf-examples-jpa-eclipselink-25/3.0.2.SNAPSHOT

The code is
https://github.com/lburgazzoli/lb-karaf-examples-jpa/tree/master/jpa-eclipselink-25,
any hint?

PS: by mistake, I've posted the same question karaf-dev, sorry for that
 



--
View this message in context: 
http://karaf.922171.n3.nabble.com/EclipseLink-2-5-2-JPA-2-1-in-Karaf-3-0-2-tp4037031.html
Sent from the Karaf - User mailing list archive at Nabble.com.


karaf 3.0 : ShellTable question

2014-01-03 Thread lbu
Hi,
I've started playing with Karaf 3.0 (thanks for the Christmas gift) and I
have some questions related to ShellTable: 

For most of the methods, the action is not in the name so you have
column(...),  separator(...), etc but this is not true for addRow:

public Row addRow() {
Row row = new Row();
rows.add(row);
return row;
}

Is there any reason? 

For my own needs, I've also created an EnhancedShellTable which let you to:
- set-up columns in the constructor

public EnhancedShellTable(String... columns) {
super();
for(String column : columns) {
super.column(column);
}
}

- add and fill a row with a single method

public void row(Object... content) {
addRow().addContent(content);
}

Would it be possible to add them to ShellTable?

Regards,
Luca





--
View this message in context: 
http://karaf.922171.n3.nabble.com/karaf-3-0-ShellTable-question-tp4030886.html
Sent from the Karaf - User mailing list archive at Nabble.com.


karaf 3.0 : hibernate 4 feature

2014-01-03 Thread lbu
Hi,
here you can find a feature for Hibernate 4:

feature name=hibernate4 version=4.2.7.Final description=Hibernate4 JPA
persistence engine support
detailsEnable Hibernate4 as persistence engine./details
featuretransaction/feature
featurejpa/feature
featurehttp/feature
bundle
dependency=truemvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.antlr/2.7.7_5/bundle
bundle
dependency=truemvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.ant/1.8.2_2/bundle
bundle
dependency=truemvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j/1.6.1_5/bundle
bundle
dependency=truemvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.serp/1.14.1_1/bundle
bundle dependency=truemvn:com.fasterxml/classmate/0.9.0/bundle
bundle dependency=truemvn:org.javassist/javassist/3.18.1-GA/bundle
bundle
dependency=truemvn:org.jboss.spec.javax.security.jacc/jboss-jacc-api_1.4_spec/1.0.2.Final/bundle
bundle dependency=truewrap:mvn:org.jboss/jandex/1.1.0.Final/bundle
bundle
dependency=truemvn:org.jboss.logging/jboss-logging/3.1.4.GA/bundle
bundle
dependency=truemvn:org.hibernate.common/hibernate-commons-annotations/4.0.4.Final/bundle
bundlemvn:org.hibernate/hibernate-core/4.2.7.Final/bundle
bundlemvn:org.hibernate/hibernate-entitymanager/4.2.7.Final/bundle
bundlemvn:org.hibernate/hibernate-envers/4.2.7.Final/bundle
bundlemvn:org.hibernate/hibernate-osgi/4.2.7.Final/bundle
/feature

Do you think it can be added to karaf's enterprise features?

 



--
View this message in context: 
http://karaf.922171.n3.nabble.com/karaf-3-0-hibernate-4-feature-tp4030887.html
Sent from the Karaf - User mailing list archive at Nabble.com.


gradle-plugin : karaf-features-gen

2013-12-12 Thread lbu
Hi all,
I've wrote a simple gradle plugin aimed to help people to generate people
using gradle to generate Karaf's features files: 

https://github.com/lburgazzoli/lb-gradle-plugins
https://github.com/lburgazzoli/lb-gradle-plugins/tree/master/karaf-features-gen

The development is it its early stage and it lacks lot of things to be
really usable but I'd like feedback, features request etc.







--
View this message in context: 
http://karaf.922171.n3.nabble.com/gradle-plugin-karaf-features-gen-tp4030627.html
Sent from the Karaf - User mailing list archive at Nabble.com.


Re: Aries JPA bundle start order issues

2013-10-29 Thread lbu
Hi,
this seems a common issue while working with Aries JPA:

from Stack Overflow
(http://stackoverflow.com/questions/9430270/enterprise-osgi-frameworks-maturity-comparison-apache-aries-vs-eclipse-gemini):

3: As I like using JTA it was no option for me to use Gemini at all. I used
Aries JPA for quiet a while and I was satisfied with it. As I work with many
colleagues I am responsible for their effectiveness. With Aries JPA I had
the problem that it did not wait for DataSourceFactory services (if db
connection is defined in the persistence.xml) or the DataSource services (if
jta-data-source or non-jta-data-source) is defined. It meant that the bundle
starting order matters when you use Aries JPA.

You can find some more info here:
http://everit.org/osgi/jpa/org.everit.osgi.jpa.container/
https://issues.apache.org/jira/browse/ARIES-840

Is there anyone aware if this issue/behaviour has been taken into account by
Aries team?






--
View this message in context: 
http://karaf.922171.n3.nabble.com/Aries-JPA-bundle-start-order-issues-tp4028997p4030096.html
Sent from the Karaf - User mailing list archive at Nabble.com.


OpenJPA logging Vs Karaf

2013-10-05 Thread lbu
Hi,
Im trying to understand why OpenJPA logging does not work properly in Karaf
and I found out that if OpenJPA is configured to use log4j as logging
engine, it fails for NoClassDefFoundError: org/apache/log4j/LogManager

12:01:11,054|ERROR|org.apache.karaf.shell.console.jline.Console 
   
== Exception caught while executing command
org.apache.karaf.shell.console.MultiException: Error starting bundles:
Unable to start bundle 66: Activator start error in bundle
org.apache.aries.jpa.container [66].
at
org.apache.karaf.shell.console.MultiException.throwIf(MultiException.java:91)
at
org.apache.karaf.shell.osgi.StartBundle.doExecute(StartBundle.java:43)[24:org.apache.karaf.shell.osgi:2.3.3]
at
org.apache.karaf.shell.osgi.BundlesCommand.doExecute(BundlesCommand.java:37)[24:org.apache.karaf.shell.osgi:2.3.3]
at
org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)[14:org.apache.karaf.shell.console:2.3.3]
at
org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)[14:org.apache.karaf.shell.console:2.3.3]
at
org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[14:org.apache.karaf.shell.console:2.3.3]
at
org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:474)[14:org.apache.karaf.shell.console:2.3.3]
at
org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:400)[14:org.apache.karaf.shell.console:2.3.3]
at
org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[14:org.apache.karaf.shell.console:2.3.3]
at
org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[14:org.apache.karaf.shell.console:2.3.3]
at
org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[14:org.apache.karaf.shell.console:2.3.3]
at
org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)[14:org.apache.karaf.shell.console:2.3.3]
at
org.apache.karaf.shell.console.jline.Console.run(Console.java:173)[14:org.apache.karaf.shell.console:2.3.3]
at java.lang.Thread.run(Thread.java:724)[:1.7.0_40]
Caused by: java.lang.Exception: Unable to start bundle 66: Activator start
error in bundle org.apache.aries.jpa.container [66].
at
org.apache.karaf.shell.osgi.StartBundle.doExecute(StartBundle.java:39)[24:org.apache.karaf.shell.osgi:2.3.3]
... 12 more
Caused by: org.osgi.framework.BundleException: Activator start error in
bundle org.apache.aries.jpa.container [66].
at
org.apache.felix.framework.Felix.activateBundle(Felix.java:2027)[org.apache.felix.framework-4.0.3.jar:]
at
org.apache.felix.framework.Felix.startBundle(Felix.java:1895)[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.shell.osgi.StartBundle.doExecute(StartBundle.java:37)[24:org.apache.karaf.shell.osgi:2.3.3]
... 12 more
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/LogManager
at
org.apache.openjpa.lib.log.Log4JLogFactory.newLogAdapter(Log4JLogFactory.java:33)
at
org.apache.openjpa.lib.log.LogFactoryAdapter.getLog(LogFactoryAdapter.java:40)
at
org.apache.openjpa.lib.conf.ConfigurationImpl.getLog(ConfigurationImpl.java:230)

Log4j packages are properly exposed by Karaf:

karaf@jpa exports | grep org.apache.log4j
 4 org.apache.log4j; version=1.2.15
 4 org.apache.log4j.spi; version=1.2.15
 4 org.apache.log4j.xml; version=1.2.15

And it also like that OpenJPA (bundle 91 in my example) imports them:

karaf@jpa imports 91 | grep -i log
OPS4J Pax Logging - API (4): org.apache.commons.logging; version=1.1.1
OPS4J Pax Logging - API (4): org.apache.commons.logging; version=1.0.4
OPS4J Pax Logging - API (4): org.apache.log4j; version=1.2.15
OPS4J Pax Logging - API (4): org.slf4j; version=1.7.1
OPS4J Pax Logging - API (4): org.slf4j; version=1.6.6
OPS4J Pax Logging - API (4): org.slf4j; version=1.5.11
OPS4J Pax Logging - API (4): org.slf4j; version=1.4.3

Any hint?




--
View this message in context: 
http://karaf.922171.n3.nabble.com/OpenJPA-logging-Vs-Karaf-tp4029844.html
Sent from the Karaf - User mailing list archive at Nabble.com.


Re: Karaf, JPA and ConfigAdmin

2013-05-06 Thread lbu
Issue logged here: https://issues.apache.org/jira/browse/ARIES-1023



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Karaf-JPA-and-ConfigAdmin-tp3667564p4028564.html
Sent from the Karaf - User mailing list archive at Nabble.com.


Custom PersistenceManager

2013-03-07 Thread lbu
Hi,
I'm trying to implement a custom PersistenceManager to store the
configuration related to some bundles on an alternative storage system
(hazelcast, db, etc) and not in $KARAF_HOME/etc. 

The documentation I've found in Felix's homepage is not really exhaustive so
I'm wondering if someone here did a similar development. I've create a
simple example which uses hazelcast
https://github.com/lburgazzoli/lb-karaf-examples/tree/master/cm-hazelcast
but I'm not able to prevent the default PersistenceManager to store the
values in the file-system.

Any hint?





--
View this message in context: 
http://karaf.922171.n3.nabble.com/Custom-PersistenceManager-tp4028050.html
Sent from the Karaf - User mailing list archive at Nabble.com.


Re: Karaf JPA and EclipseLink

2013-02-28 Thread lbu

Hi Filippo,
as today the bundle that contains the JPA stuffs does require
DynamicImport-Package: * to find EclipseLink's weaving packages, I'll try
to fix it as soon as I have a little time.



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Karaf-JPA-and-EclipseLink-tp4027571p4027977.html
Sent from the Karaf - User mailing list archive at Nabble.com.


OpenJPA loggin in Karaf 2.3.0

2013-02-21 Thread lbu

Hi,
I would like to know if someone was able to properly set-up OpenJPA to log
SQL statements in Karaf 2.3.0:

If I set the following properties in the persistence.xml, the statement are
logged but in the console:
properties
property name=openjpa.Log
value=DefaultLevel=TRACE/
property name=openjpa.ConnectionFactoryProperties
value=PrintParameters=true/
/properties

If I set the following properties in the persistence.xml, nothing is logged
in karaf's log file:
properties
property name=openjpa.Log value=slf4j/
property name=openjpa.ConnectionFactoryProperties
value=PrintParameters=true/
/properties

I've also tried to configure a custom logger but then the bundle fails to
start..

Any hint?








--
View this message in context: 
http://karaf.922171.n3.nabble.com/OpenJPA-loggin-in-Karaf-2-3-0-tp4027841.html
Sent from the Karaf - User mailing list archive at Nabble.com.


Re: karaf features and maven urls

2013-02-04 Thread lbu

It is a know bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=385413 




--
View this message in context: 
http://karaf.922171.n3.nabble.com/karaf-features-and-maven-urls-tp4027592p4027611.html
Sent from the Karaf - User mailing list archive at Nabble.com.


karaf features and maven urls

2013-02-03 Thread lbu
Hi,
I would like to know if it possible to set a repository alongside a karaf
feauture e.g:

feature name=my-feautre-1 version=1.0.0
repository=http://maven.mycompany.com;
feature name=my-feautre-2 version=1.0.0 repository=file:///opt/maven
feature name=my-feautre-3 version=1.0.0
repository=file://${env.HOME}/.m2/repository

So we can avoid to search in the repository chain configured via config
admin if we know where a bundle is and where it isn't





--
View this message in context: 
http://karaf.922171.n3.nabble.com/karaf-features-and-maven-urls-tp4027592.html
Sent from the Karaf - User mailing list archive at Nabble.com.


Re: Eclkpselink bundle installation : features vs command

2013-02-03 Thread lbu
Hi,

thank you I'll report it.

For my understanding, why the features fails whereas the command doesn't ?





--
View this message in context: 
http://karaf.922171.n3.nabble.com/Eclkpselink-bundle-installation-features-vs-command-tp4027584p4027607.html
Sent from the Karaf - User mailing list archive at Nabble.com.


Eclkpselink bundle installation : features vs command

2013-02-02 Thread lbu
Hi,
I've created a simple feature to automatically install all the eclipselink
dependencies of a project and I've noticed the following behavior:

When the bundle org.eclipse.persistence.asm is installed from the karaf
shell, the bundle is installed

karaf@btuninstall 89
karaf@btosgi:install
mvn:org.eclipse.persistence/org.eclipse.persistence.asm/3.3.1.v201206041142
Bundle ID: 182

When installed from a very simple feature, it fails:

karaf@btfeatures:install bt-jpa
Error executing command: Manifest not present in the first entry of the zip
mvn:org.eclipse.persistence/org.eclipse.persistence.asm/3.3.1.v201206041142

Here the feature:
feature name=bt-jpa version=1.0.0
   
bundlemvn:org.eclipse.persistence/org.eclipse.persistence.asm/3.3.1.v201206041142/bundle
   
bundlemvn:org.eclipse.persistence/org.eclipse.persistence.antlr/3.2.0.v201206041011/bundle
   
bundlemvn:org.eclipse.persistence/org.eclipse.persistence.core/2.4.1/bundle
   
bundlemvn:org.eclipse.persistence/org.eclipse.persistence.jpa/2.4.1/bundle
   
bundlemvn:org.eclipse.persistence/org.eclipse.persistence.oracle/2.4.1/bundle
bundlemvn:org.apache.openjpa/openjpa/2.2.0/bundle
/feature

And the log:
13:56:25,370|INFO |org.apache.karaf.shell.console.jline.Console 
   
== Exception caught while executing command
org.osgi.framework.BundleException: Manifest not present in the first entry
of the zip
mvn:org.eclipse.persistence/org.eclipse.persistence.asm/3.3.1.v201206041142
at
org.apache.karaf.features.internal.FeaturesServiceImpl.installBundleIfNeeded(FeaturesServiceImpl.java:817)[20:org.apache.karaf.features.core:2.3.0]
at
org.apache.karaf.features.internal.FeaturesServiceImpl.doInstallFeature(FeaturesServiceImpl.java:603)[20:org.apache.karaf.features.core:2.3.0]
at
org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:405)[20:org.apache.karaf.features.core:2.3.0]
at
org.apache.karaf.features.internal.FeaturesServiceImpl.installFeature(FeaturesServiceImpl.java:393)[20:org.apache.karaf.features.core:2.3.0]
at
org.apache.karaf.features.internal.FeaturesServiceImpl.installFeature(FeaturesServiceImpl.java:389)[20:org.apache.karaf.features.core:2.3.0]
at
org.apache.karaf.features.command.InstallFeatureCommand.doExecute(InstallFeatureCommand.java:62)[22:org.apache.karaf.features.command:2.3.0]
at
org.apache.karaf.features.command.FeaturesCommandSupport.doExecute(FeaturesCommandSupport.java:41)[22:org.apache.karaf.features.command:2.3.0]
at
org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)[14:org.apache.karaf.shell.console:2.3.0]
at
org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)[14:org.apache.karaf.shell.console:2.3.0]
at
org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[14:org.apache.karaf.shell.console:2.3.0]
at
org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:474)[14:org.apache.karaf.shell.console:2.3.0]
at
org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:400)[14:org.apache.karaf.shell.console:2.3.0]
at
org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[14:org.apache.karaf.shell.console:2.3.0]
at
org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[14:org.apache.karaf.shell.console:2.3.0]
at
org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[14:org.apache.karaf.shell.console:2.3.0]
at
org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)[14:org.apache.karaf.shell.console:2.3.0]
at
org.apache.karaf.shell.console.jline.Console.run(Console.java:175)[14:org.apache.karaf.shell.console:2.3.0]
at java.lang.Thread.run(Thread.java:680)[:1.6.0_37]


It looks like a bug, or am I missing something?




--
View this message in context: 
http://karaf.922171.n3.nabble.com/Eclkpselink-bundle-installation-features-vs-command-tp4027584.html
Sent from the Karaf - User mailing list archive at Nabble.com.


Karaf JPA and EclipseLink

2013-02-01 Thread lbu
Hi all,
I've a little trouble to have JPA to work on Karaf 2.3.0 (JDK 1.7), I've
create a bundle that contains
- persistence unit
- blueprint descriptor

I've installed the required features:
karaf@btfeatures:list -i
State Version   NameRepository Description
[installed  ] [1.0.1  ] transaction karaf-enterprise-2.3.0 OSGi Transaction
Manager
[installed  ] [1.0.1  ] jpa karaf-enterprise-2.3.0 OSGi Persistence
Container
[installed  ] [1.0.0  ] jndikaraf-enterprise-2.3.0 OSGi Service
Registry JNDI access
[installed  ] [1.0.0  ] bt  bt-karaf-repo  
[installed  ] [2.3.0  ] config  karaf-2.3.0Provide OSGi
ConfigAdmin support
[installed  ] [2.3.0  ] ssh karaf-2.3.0Provide a SSHd
server on Karaf
[installed  ] [2.3.0  ] management  karaf-2.3.0Provide a JMX
MBeanServer and a set of MBeans in Karaf
[installed  ] [2.3.0  ] eventadmin  karaf-2.3.0OSGi Event Admin
service specification for event-based communication

But when I deploy the bundle, it looks like Aries is not able to lookup the
persistence unit:

14:37:29,854|DEBUG|org.apache.aries.jpa.blueprint.aries 
   
== Creating blueprint injection metadata to inject the unit BT-IO-FIX into
bean property entityManagerFactory
14:37:29,855|DEBUG|.apache.aries.blueprint.container.AbstractServiceReferenceRecipe
== Found initial references null for OSGi service
(((!(org.apache.aries.jpa.proxy.factory=*))(osgi.unit.name=BT-IO-FIX))(objectClass=javax.persistence.EntityManagerFactory))
14:37:29,855|DEBUG|org.apache.aries.blueprint.container.BlueprintContainerImpl  
   
== Tracking service references: [.component-1]
14:37:29,855|INFO
|org.apache.aries.blueprint.container.BlueprintContainerImpl  == Bundle
bt.service.io.fix is waiting for dependencies
[(((!(org.apache.aries.jpa.proxy.factory=*))(osgi.unit.name=BT-IO-FIX))(objectClass=javax.persistence.EntityManagerFactory))]
14:37:29,856|DEBUG|org.apache.aries.blueprint.container.BlueprintEventDispatcher
   
== Sending blueprint container event BlueprintEvent[type=GRACE_PERIOD,
dependencies=[(((!(org.apache.aries.jpa.proxy.factory=*))(osgi.unit.name=BT-IO-FIX))(objectClass=javax.persistence.EntityManagerFactory))]]
for bundle bt.service.io.fix
14:37:29,856|DEBUG|org.apache.karaf.shell.osgi.BlueprintListener
   
== Blueprint app state changed to GracePeriod for bundle 162


Below META-INF:MANIFEST.MF (generated by gradle osgi):
Manifest-Version: 1.0
Export-Package: bt.service.io.fix.factory;uses:=org.slf4j.spi,org.slf
 4j,quickfix,bt.core,javax.persistence,bt.service.io.fix;uses:=org.s
 lf4j,quickfix,org.apache.commons.lang3,bt.core,bt.core.util,org.osgi.
 framework,bt.core.session,bt.core.codec
Private-Package: bt.service.io.fix.jpa.entity
Tool: Bnd-1.50.0
Bundle-Name: BT :: Service :: IO :: FIX
Created-By: 1.7.0_11 (Oracle Corporation)
JPA-PersistenceUnits: BT-IO-FIX
Meta-Persistence: META-INF/persistence.xml
Bundle-Version: 1.0.0
Bnd-LastModified: 1359704784000
Bundle-ManifestVersion: 2
Bundle-Description: BT :: Service :: IO :: FIX
Import-Package: bt.core,bt.core.codec,bt.core.session,bt.core.util,jav
 ax.persistence;version=[1.1,2),org.apache.commons.lang3;version=[3
 .1,4),org.osgi.framework;version=[1.6,2),org.slf4j;version=[1.7,2
 ),org.slf4j.spi;version=[1.7,2),quickfix
Bundle-SymbolicName: bt.service.io.fix


below META-INF/persistence.xml:
?xml version=1.0 encoding=UTF-8 ?
persistence
xsi:schemaLocation=http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd;
xmlns=http://java.sun.com/xml/ns/persistence;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
version=2.0

persistence-unit name=BT-IO-FIX transaction-type=RESOURCE_LOCAL
providerorg.eclipse.persistence.jpa.PersistenceProvider/provider
   
non-jta-data-sourceosgi:service/javax.sql.DataSource/(osgi.jndi.service.name=jdbc/BTDS)/non-jta-data-source
classbt.service.io.fix.jpa.entity.FIXMessageEntity/class
classbt.service.io.fix.jpa.entity.FIXSessionEntity/class
exclude-unlisted-classestrue/exclude-unlisted-classes
properties
property name=eclipselink.logging.level 
value=FINEST/
property name=eclipselink.logging.level.sql 
value=FINE/
property name=eclipselink.logging.parameters
value=true/
property name=eclipselink.logging.timestamp 
value=true/
property name=eclipselink.logging.session   
value=true/
property name=eclipselink.logging.thread
value=true/
property name=eclipselink.logging.exceptions
value=true/
property name=eclipselink.session.include.descriptor.queries
value=true/
/properties
/persistence-unit
/persistence


Here OSGI-INF/blueprint/blueprint.xml:
bean
 

Re: Karaf JPA and EclipseLink

2013-02-01 Thread lbu
Actually I do not care about transaction, it is only a study to catch what
issue and drawbacks we may have if we move our applications to OSGi/Karaf.

I can change it but it should not be the reason of the issue, isn't it?



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Karaf-JPA-and-EclipseLink-tp4027571p4027573.html
Sent from the Karaf - User mailing list archive at Nabble.com.


Re: Karaf JPA and EclipseLink

2013-02-01 Thread lbu
Hi Christian,
I've followed you tutorial and now I've switched to JTA but the result is
again a bundle in GracePeriod:


16:39:39,556|DEBUG|.apache.aries.blueprint.container.AbstractServiceReferenceRecipe
== Found initial references null for OSGi service
(((!(org.apache.aries.jpa.proxy.factory=*))(osgi.unit.name=BT-IO-FIX))(objectClass=javax.persistence.EntityManagerFactory))
16:39:39,557|DEBUG|org.apache.aries.blueprint.container.BlueprintContainerImpl  
   
== Tracking service references: [.component-1]
16:39:39,557|INFO
|org.apache.aries.blueprint.container.BlueprintContainerImpl  == Bundle
bt.service.io.fix is waiting for dependencies
[(((!(org.apache.aries.jpa.proxy.factory=*))(osgi.unit.name=BT-IO-FIX))(objectClass=javax.persistence.EntityManagerFactory))]
16:39:39,557|DEBUG|org.apache.aries.blueprint.container.BlueprintEventDispatcher
   
== Sending blueprint container event BlueprintEvent[type=GRACE_PERIOD,
dependencies=[(((!(org.apache.aries.jpa.proxy.factory=*))(osgi.unit.name=BT-IO-FIX))(objectClass=javax.persistence.EntityManagerFactory))]]
for bundle bt.service.io.fix




--
View this message in context: 
http://karaf.922171.n3.nabble.com/Karaf-JPA-and-EclipseLink-tp4027571p4027576.html
Sent from the Karaf - User mailing list archive at Nabble.com.


Re: karaf in production

2012-09-10 Thread lbu
Hi Jean-Baptiste,
thank you for the quick answer.

Do you think it would be possible to ship in any karaf release what files
have been changed? This would simplify the upgrade process for karaf
installations on which I deploy on.

e.g:

* Karaf 2.2.9:
  - etc/shell.init.script
  - lib/karaf.jar
* Karaf 2.2.8:
  - etc/startup.properties
  - lib/karaf.jar





--
View this message in context: 
http://karaf.922171.n3.nabble.com/karaf-in-production-tp4025971p4025973.html
Sent from the Karaf - User mailing list archive at Nabble.com.


Apache Commons DBCP fragment

2012-01-30 Thread lbu
Hi,
I'm working to a project OSGi-fication and I have a little trouble with a
fragment that does not seem taken into account by Karaf (2.2.5). The
fragment is supposed to add DynamicImport-Package to org.apache.commons.dbcp
to look-up jdbc drivers.  

Here the META-INF/MANIFEST.MF of my fragment:

Manifest-Version: 1.0
Created-By: LB
Bundle-Name: lb.fragment.apache.commons.dbcp
Bundle-Vendor: LB
Bundle-Version: 1.0.7
Bundle-SymbolicName: org.apache.commons.dbcp.fragment
Bundle-Description: Fragment attached to Apache Commons DBCP
Fragment-Host: org.apache.commons.dbcp
DynamicImport-Package: *

What's wrong ? 

Thx,
Luca




--
View this message in context: 
http://karaf.922171.n3.nabble.com/Apache-Commons-DBCP-fragment-tp3700373p3700373.html
Sent from the Karaf - User mailing list archive at Nabble.com.


Re: Karaf, JPA and ConfigAdmin

2012-01-20 Thread lbu

I've tried the following configuration:

blueprint
 xmlns=http://www.osgi.org/xmlns/blueprint/v1.0.0;
 xmlns:jpa=http://aries.apache.org/xmlns/jpa/v1.1.0;
 xmlns:cm=http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0;

 cm:property-placeholder persistent-id=DM-CFG
   cm:default-properties
 cm:property name=jdbc.url
value=jdbc:derby:./data/jpa;create=true/
   /cm:default-properties
 /cm:property-placeholder

 bean id=DM class=lb.sandbox.osgi.jpa.DataManager init-method=init
   jpa:context property=em unitname=LBU type=EXTENDED
 map
   entry key=javax.persistence.jdbc.url value=${jdbc.url}/
 /map
   /jpa:context
  /bean

  service ref=DM interface=lb.sandbox.osgi.jpa.IDataManager/

/blueprint


But I got the following exception even the example has been taken from the
aries webpage :

2012-01-20 15:55:22,471 | ERROR | rint Extender: 1 | BlueprintContainerImpl 
 
| container.BlueprintContainerImpl  358 | 9 - org.apache.aries.blueprint -
0.3.1 | Unable to start blueprint container for bundle lb.sandbox.osgi.jpa
org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to
validate xml
at
org.apache.aries.blueprint.container.Parser.validate(Parser.java:288)[9:org.apache.aries.blueprint:0.3.1]
at
org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:275)[9:org.apache.aries.blueprint:0.3.1]
at
org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:227)[9:org.apache.aries.blueprint:0.3.1]
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_29]
at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_29]
at java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_29]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)[:1.6.0_29]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)[:1.6.0_29]
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_29]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_29]
at java.lang.Thread.run(Thread.java:662)[:1.6.0_29]
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid
content was found starting with element 'map'. One of
'{http://aries.apache.org/xmlns/jpa/v1.1.0:map}' is expected.
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)[:1.6.0_29]
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:131)[:1.6.0_29]
at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:384)[:1.6.0_29]
at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:318)[:1.6.0_29]
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:417)[:1.6.0_29]
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3182)[:1.6.0_29]
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1806)[:1.6.0_29]
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:705)[:1.6.0_29]
at
com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.beginNode(DOMValidatorHelper.java:273)[:1.6.0_29]
at
com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.validate(DOMValidatorHelper.java:240)[:1.6.0_29]
at
com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.validate(DOMValidatorHelper.java:186)[:1.6.0_29]
at
com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.validate(ValidatorImpl.java:104)[:1.6.0_29]
at 
javax.xml.validation.Validator.validate(Validator.java:127)[:1.6.0_29]
at
org.apache.aries.blueprint.container.Parser.validate(Parser.java:285)[9:org.apache.aries.blueprint:0.3.1]
... 10 more


Do you see any misconfiguration in my blueprint ?



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Karaf-JPA-and-ConfigAdmin-tp3667564p3675652.html
Sent from the Karaf - User mailing list archive at Nabble.com.