Re: karaf using 100% cpu

2014-05-06 Thread Dan Tran
this is going to be tough, but possible.  You can scan thru all the thread
stacks and look for the one that spins ( ie not locking on a
pause/sleep/pause method)

-D


On Tue, May 6, 2014 at 8:30 AM, Jean-Baptiste Onofré j...@nanthrax.netwrote:

 Hi Laci,

 What's the version of ActiveMQ that you use ? If you use ActiveMQ 5.7,
 there's a bug in the ConnectionFactory (it doesn't release correctly the
 session). Maybe it's your issue (but not fully sure).

 Regards
 JB


 On 05/06/2014 04:37 PM, Laci Gaspar wrote:

 Ok, after a little struggle, I installed jmxterm because I have only a
 terminal access to the host.
 Unfortunately I have no idea what to do now... no jmx experience.
 When I list the mbeans, I get TONS of entries representing my ActiveMQ
 queues.  Is that correct?

 Then, how can I find out which process uses most cpu?

 Thanks for your help.
 Laci


 On 06.05.2014 14:44, Achim Nierbeck wrote:

 Also, do you have some trace levels activated with your camel routes?
 This might also produce a high load :)
 But as Jamie already said, it's good to enable JMX Monitoring ... this
 way you also find out about the camel routes ;)

 regards, Achim


 2014-05-06 14:07 GMT+02:00 Jamie G. jamie.goody...@gmail.com
 mailto:jamie.goody...@gmail.com:


 Connect to the JMX management console and see what's running up
 the CPU.

 --Jamie

 On Tue, May 6, 2014 at 9:31 AM, Laci Gaspar laci...@gmail.com
 mailto:laci...@gmail.com wrote:
  Hi
  I noticed that our karaf runtime is using 100% CPU.
  We are running karaf version 2.2.6 with some camel routes. There
 is hardly
  any load.
 
  Looking at the log file with level DEBUG didn't reveal anything.
 
 
  What can I do to find out what's causing the high cpu load?
 
  Regards
  Laci




 --

 Apache Karaf http://karaf.apache.org/ Committer  PMC
 OPS4J Pax Web http://wiki.ops4j.org/display/paxweb/Pax+Web/
 Committer  Project Lead
 blog http://notizblog.nierbeck.de/

 Software Architect / Project Manager / Scrum Master



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



Re: Shutdown Order on 2.3.3

2014-02-14 Thread Dan Tran
see if this help

http://karaf.922171.n3.nabble.com/Orderly-shutting-down-services-td4027336.html

-D


On Fri, Feb 14, 2014 at 10:02 AM, Chris Geer ch...@cxtsoftware.com wrote:

 JB,

 It's the default config.properties files.

 Chris


 On Fri, Feb 14, 2014 at 10:59 AM, Jean-Baptiste Onofré 
 j...@nanthrax.netwrote:

 Hi Chris,

 did you change something in the etc config file or it's the default one ?

 Regards
 JB


 On 02/14/2014 06:54 PM, Chris Geer wrote:

 We just upgraded our container from Karaf 2.2.10 to 2.3.3 and are now
 having some significant issues on shutdown. Previously, everything would
 shut down in a normal order but now for some reasons things with lower
 start levels are shutting down first. Our big problem is ActiveMQ. We
 have our activemq broker starting with a start level of 60 and our
 normal bundles (mostly camel) starting at 80. But on shutdown the first
 thing that shows up in the logs is this.

 23:46:38,243 | INFO  | Thread-2 | Main
|  -  -  | Karaf shutdown socket: received shutdown command. Stopping
 framework...
 23:46:38,266 | INFO  | FelixShutdown| BlueprintExtender
 | 7 - org.apache.aries.blueprint.core - 1.1.0 | Destroying
 BlueprintContainer for bundle activemq-broker.xml
 23:46:38,290 | INFO  | FelixShutdown| BrokerService
 | 133 - org.apache.activemq.activemq-osgi - 5.9.0 | Apache ActiveMQ
 5.9.0 (default, ID:CXTPRO-CG.local-49654-1392332684735-0:1) is shutting
 down
 23:46:38,368 | INFO  | FelixShutdown| TransportConnector
| 133 - org.apache.activemq.activemq-osgi - 5.9.0 | Connector
 openwire stopped
 23:46:38,436 | INFO  | FelixShutdown| TransportConnector
| 133 - org.apache.activemq.activemq-osgi - 5.9.0 | Connector stomp
 stopped


 As you can imagine that causes problems because now that the broker
 doesn't exist the bundles that use it start throwing errors and
 in-flight transactions are failing.


 23:46:38,440 | INFO  | : vm://default#0 | PooledConnectionFactory
 | 133 - org.apache.activemq.activemq-osgi - 5.9.0 | Expiring
 connection ActiveMQConnection
 {id=ID:CXTPRO-CG.local-49654-1392332684735-3:1,clientId=ID:
 CXTPRO-CG.local-49654-1392332684735-2:8,started=false}
 on IOException:
 org.apache.activemq.transport.TransportDisposedIOException: peer
 (vm://default#1) stopped.
 23:46:38,444 | WARN  | n-notifications] |
 faultJmsMessageListenerContainer | 163 - org.springframework.jms -
 3.2.4.RELEASE | Setup of JMS message listener invoker failed for
 destination 'permission-notifications' - trying to recover. Cause: peer
 (vm://default#3) stopped.
 23:46:38,444 | WARN  | t-notifications] | PooledSession
 | 133 - org.apache.activemq.activemq-osgi - 5.9.0 | Caught exception
 trying rollback() when putting session back into the pool, will
 invalidate. javax.jms.IllegalStateException: The Session is closed


 Is there anything we can do to restore an orderly shutdown order?


 Thanks,

 Chris


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





Re: Shutdown Order on 2.3.3

2014-02-14 Thread Dan Tran
Karaf dev team is currently calling a vote to karaf-2.3.4, You may want to
try it out  and provide feedback

-D


On Fri, Feb 14, 2014 at 4:48 PM, Chris Geer ch...@cxtsoftware.com wrote:

 Thanks Dan. Since 1.1.1 seems to have never been released I tried to
 upgrade to 1.2.0 but that broke the container pretty good. I see that Karaf
 2.3.4 has been upgraded to core 1.4.0 so hopefully that will fix it. Any
 news on when 2.3.4 will be released?

 Since 1.1.1 isn't even in JIRA, any idea what ticket actually fixed this
 issue?

 Chris


 On Fri, Feb 14, 2014 at 3:20 PM, Dan Tran dant...@gmail.com wrote:

 see if this help


 http://karaf.922171.n3.nabble.com/Orderly-shutting-down-services-td4027336.html

 -D


 On Fri, Feb 14, 2014 at 10:02 AM, Chris Geer ch...@cxtsoftware.comwrote:

 JB,

 It's the default config.properties files.

 Chris


 On Fri, Feb 14, 2014 at 10:59 AM, Jean-Baptiste Onofré 
 j...@nanthrax.netwrote:

 Hi Chris,

 did you change something in the etc config file or it's the default one
 ?

 Regards
 JB


 On 02/14/2014 06:54 PM, Chris Geer wrote:

 We just upgraded our container from Karaf 2.2.10 to 2.3.3 and are now
 having some significant issues on shutdown. Previously, everything
 would
 shut down in a normal order but now for some reasons things with lower
 start levels are shutting down first. Our big problem is ActiveMQ. We
 have our activemq broker starting with a start level of 60 and our
 normal bundles (mostly camel) starting at 80. But on shutdown the first
 thing that shows up in the logs is this.

 23:46:38,243 | INFO  | Thread-2 | Main
|  -  -  | Karaf shutdown socket: received shutdown command.
 Stopping
 framework...
 23:46:38,266 | INFO  | FelixShutdown| BlueprintExtender
 | 7 - org.apache.aries.blueprint.core - 1.1.0 | Destroying
 BlueprintContainer for bundle activemq-broker.xml
 23:46:38,290 | INFO  | FelixShutdown| BrokerService
 | 133 - org.apache.activemq.activemq-osgi - 5.9.0 | Apache
 ActiveMQ
 5.9.0 (default, ID:CXTPRO-CG.local-49654-1392332684735-0:1) is
 shutting down
 23:46:38,368 | INFO  | FelixShutdown| TransportConnector
| 133 - org.apache.activemq.activemq-osgi - 5.9.0 | Connector
 openwire stopped
 23:46:38,436 | INFO  | FelixShutdown| TransportConnector
| 133 - org.apache.activemq.activemq-osgi - 5.9.0 | Connector stomp
 stopped


 As you can imagine that causes problems because now that the broker
 doesn't exist the bundles that use it start throwing errors and
 in-flight transactions are failing.


 23:46:38,440 | INFO  | : vm://default#0 | PooledConnectionFactory
 | 133 - org.apache.activemq.activemq-osgi - 5.9.0 | Expiring
 connection ActiveMQConnection
 {id=ID:CXTPRO-CG.local-49654-1392332684735-3:1,clientId=ID:
 CXTPRO-CG.local-49654-1392332684735-2:8,started=false}
 on IOException:
 org.apache.activemq.transport.TransportDisposedIOException: peer
 (vm://default#1) stopped.
 23:46:38,444 | WARN  | n-notifications] |
 faultJmsMessageListenerContainer | 163 - org.springframework.jms -
 3.2.4.RELEASE | Setup of JMS message listener invoker failed for
 destination 'permission-notifications' - trying to recover. Cause: peer
 (vm://default#3) stopped.
 23:46:38,444 | WARN  | t-notifications] | PooledSession
 | 133 - org.apache.activemq.activemq-osgi - 5.9.0 | Caught
 exception
 trying rollback() when putting session back into the pool, will
 invalidate. javax.jms.IllegalStateException: The Session is closed


 Is there anything we can do to restore an orderly shutdown order?


 Thanks,

 Chris


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







Re: Code formatting for Apache projects

2014-01-15 Thread Dan Tran
I would be nice to add this into karaf dev doc

-D


On Wed, Jan 15, 2014 at 10:58 PM, Jean-Baptiste Onofré j...@nanthrax.netwrote:

 Hi Krzysztof,

 you can find the code formatter for Eclipse here:

 http://svn.apache.org/viewvc/servicemix/smx3/branches/
 servicemix-3.2/build/src/main/resources/smx-eclipse-code-
 conventions.xml?view=corevision=602828content-type=text%2Fplain

 Regards
 JB


 On 01/15/2014 08:52 PM, Krzysztof Sobkowiak wrote:

 Hi

 Do you have any special code formatting configuration for Eclipse used
 when you develop Karaf, SMX or Camel?

 Regards
 Krzysztof


 --
 Krzysztof Sobkowiak

 JEE  OSS Architect | Technical Architect @ Capgemini
 Capgemini http://www.pl.capgemini.com/ | Software Solutions Center
 http://www.pl.capgemini-sdm.com/ | Wroclaw
 e-mail: krzys.sobkow...@gmail.com mailto:krzys.sobkow...@gmail.com |
 Twitter: @KSobkowiak


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



Re: custom distribution

2013-11-01 Thread Dan Tran
start with standard karaf, the remove unused artifacts, and customize boot
feature?

-Dan



On Fri, Nov 1, 2013 at 2:23 PM, ken anh...@gmail.com wrote:

 Hi All,

 I am trying to make a custom distribution and I don't know if it's even
 possible or not.  I want to make a distribution with the following
 features;
 * hot deployment
 * dynamic configuration
 * logging
 * provisioning
 * console

 For the console, I do not want any commands aside from the help and
 logout as I'll be providing other set of commands.  How would I go about
 achieving this?

 Thanks,

 Ken



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



Asking Aries dev to release blueprint core 1.1.1 to pickup by karaf 2.3.2?

2013-06-04 Thread Dan Tran
Just incase karaf 2.3.2 does not come out in time, i can also push new
blueprint-core into my custom karaf 2.3.1

I have put a request at Aries group, but no response

Thanks

-D


Re: Asking Aries dev to release blueprint core 1.1.1 to pickup by karaf 2.3.2?

2013-06-04 Thread Dan Tran
Hi JB,

Could you provide a list of JIRA that you are going to submit patches for
Aries, So that I can prepare ahead?

Thanks

-D


On Mon, Jun 3, 2013 at 11:57 PM, Jean-Baptiste Onofré j...@nanthrax.netwrote:

 Hi Dan,

 I have some other patches that I submitted to Aries (or that I will submit
 to Aries). I gonna deal with Dan (Kulp) and Guillaume (Nodet) to see how we
 can move forward on the Aries side.

 Thanks for the reminder.

 Regards
 JB


 On 06/04/2013 08:49 AM, Dan Tran wrote:

 Just incase karaf 2.3.2 does not come out in time, i can also push new
 blueprint-core into my custom karaf 2.3.1

 I have put a request at Aries group, but no response

 Thanks

 -D


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



How to get paxweb to redirect root context to another context

2013-05-29 Thread Dan Tran
My apology if this is too obvious

I need a way to configure paxweb to forward my http://host:port to
http://host:port/myContext

is it possible?

Thanks

-D


Re: How to get paxweb to redirect root context to another context

2013-05-29 Thread Dan Tran
Thanks Achim, that solution is bigger than i have in mind

In my case,   I just want a friendly url into my karaf/wicket/webapp where
  url to   http://myapphost:port   would automatically forward/route to the
same url with another context ( http://myapphost:port/myAppContext

For vanilla tomcat, i can just create a index.hml at ROOT which contains
'meta http-equiv=refresh content=0; url=./myapp/index.html'

Can I do the same for karaf/paxweb/jetty??

Thanks

-D


On Wed, May 29, 2013 at 2:29 PM, Achim Nierbeck bcanh...@googlemail.comwrote:

 Hi,

 Don't know if you already read the [1] blog about virtual hosts and
 connectors.
 And there is always the possibility to place a apache http server up front.

 Regards, Achim

 [1] -
 http://notizblog.nierbeck.de/2013/05/bind-certain-web-applications-to-specific-httpconnectors-ii/

 sent from mobile device
 Am 29.05.2013 20:57 schrieb Dan Tran dant...@gmail.com:


 My apology if this is too obvious

 I need a way to configure paxweb to forward my http://host:port to
 http://host:port/myContext

 is it possible?

 Thanks

 -D





How to make a bundle's Web-ContextPath configurable at runtime??

2013-05-28 Thread Dan Tran
Hi

I have a bundle that uses war feature where I statically configure the
context path via bundle maven plugin list this

  build

plugins

  plugin
groupIdorg.apache.felix/groupId
artifactIdmaven-bundle-plugin/artifactId
configuration
  instructions
Import-Package!*/Import-Package
Export-Package*/Export-Package
Web-ContextPath/console/help/Web-ContextPath
  /instructions
/configuration
  /plugin

/plugins

  /build


Is there a  way to configure 'Web-ContextPath' at runtime?

Big thanks ahead

-Dan


Strange jaxws issue

2013-05-15 Thread Dan Tran
I am seeing this problem [1] when running with karaf shell ( bin/karaf )

When running under jsw wrapper it is ok?

Advice on this is very much appreciated

I am running under Centos 5, openjdk 1.7, 32 bit

-D

[1] javax.xml.ws.spi.FactoryFinder$ConfigurationError: Provider
org.apache.cxf.jaxws.spi.ProviderImpl not found
at
javax.xml.ws.spi.FactoryFinder$2.run(FactoryFinder.java:133)[:2.2.0]
at
javax.xml.ws.spi.FactoryFinder.doPrivileged(FactoryFinder.java:238)[:2.2.0]
at
javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:127)[:2.2.0]
at
javax.xml.ws.spi.FactoryFinder.access$200(FactoryFinder.java:44)[:2.2.0]
at
javax.xml.ws.spi.FactoryFinder$3.run(FactoryFinder.java:229)[:2.2.0]
at
javax.xml.ws.spi.FactoryFinder.doPrivileged(FactoryFinder.java:238)[:2.2.0]
at
javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:163)[:2.2.0]
at javax.xml.ws.spi.Provider.provider(Provider.java:43)[:2.2.0]
at javax.xml.ws.Service.init(Service.java:35)[:2.2.0]


Re: Strange jaxws issue

2013-05-15 Thread Dan Tran
yes, mine is 3.2.1

Thank you for the quick response

-D


On Wed, May 15, 2013 at 8:54 PM, Freeman Fang freeman.f...@gmail.comwrote:

 Hi,

 What's Karaf version you're using?
 If it's 2.3.1, should be related to [1], that said, you can edit
 $KARAF_HOME/etc/system.properties
 change
 org.apache.servicemix.specs.timeout=0
 to
 org.apache.servicemix.specs.timeout=100 (or bigger)

 So that the OSGiLocator can get some time to wait for the jaxws impl
 bundle(cxf jaxws fronted in this case) available

 [1]https://issues.apache.org/jira/browse/KARAF-2269
 -
 Freeman(Yue) Fang

 Red Hat, Inc.
 FuseSource is now part of Red Hat
 Web: http://fusesource.com | http://www.redhat.com/
 Twitter: freemanfang
 Blog: http://freemanfang.blogspot.com
 http://blog.sina.com.cn/u/1473905042
 weibo: @Freeman小屋

 www.camelone.org : The open source integration conference:

 On 2013-5-16, at 上午11:41, Dan Tran wrote:


 I am seeing this problem [1] when running with karaf shell ( bin/karaf )

 When running under jsw wrapper it is ok?

 Advice on this is very much appreciated

 I am running under Centos 5, openjdk 1.7, 32 bit

 -D

 [1] javax.xml.ws.spi.FactoryFinder$ConfigurationError: Provider
 org.apache.cxf.jaxws.spi.ProviderImpl not found
 at
 javax.xml.ws.spi.FactoryFinder$2.run(FactoryFinder.java:133)[:2.2.0]
 at
 javax.xml.ws.spi.FactoryFinder.doPrivileged(FactoryFinder.java:238)[:2.2.0]
 at
 javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:127)[:2.2.0]
 at
 javax.xml.ws.spi.FactoryFinder.access$200(FactoryFinder.java:44)[:2.2.0]
 at
 javax.xml.ws.spi.FactoryFinder$3.run(FactoryFinder.java:229)[:2.2.0]
 at
 javax.xml.ws.spi.FactoryFinder.doPrivileged(FactoryFinder.java:238)[:2.2.0]
 at
 javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:163)[:2.2.0]
 at javax.xml.ws.spi.Provider.provider(Provider.java:43)[:2.2.0]
 at javax.xml.ws.Service.init(Service.java:35)[:2.2.0]





Where can I pickup new servicemix bundles

2013-04-07 Thread Dan Tran
Hi I

I saw J-B released a bunch of bundles ( i am interesting in fixes for
lucence and ehcache ) at
http://svn.apache.org/repos/asf/servicemix/smx4/bundles/tags/

But NOT able find them at central.maven.org

Am I missing something?

thanks

-D


Re: Where can I pickup new servicemix bundles

2013-04-07 Thread Dan Tran
I spoke too quickly, they are still at staging
https://repository.apache.org/content/groups/staging. am I correct?

Thanks

-D


On Sun, Apr 7, 2013 at 11:56 AM, Dan Tran dant...@gmail.com wrote:

 Hi I

 I saw J-B released a bunch of bundles ( i am interesting in fixes for
 lucence and ehcache ) at
 http://svn.apache.org/repos/asf/servicemix/smx4/bundles/tags/

 But NOT able find them at central.maven.org

 Am I missing something?

 thanks

 -D



Re: Where can I pickup new servicemix bundles

2013-04-07 Thread Dan Tran
Thanks J-B, I now understand the release process of those bundle.


On Sun, Apr 7, 2013 at 12:15 PM, Jean-Baptiste Onofré j...@nanthrax.netwrote:

 Hi Dan,

 yes the vote is still open. I plan to close the vote tomorrow.

 Regards
 JB


 On 04/07/2013 09:06 PM, Dan Tran wrote:

 I spoke too quickly, they are still at staging
 https://repository.apache.org/**content/groups/staginghttps://repository.apache.org/content/groups/staging.
 am I correct?

 Thanks

 -D


 On Sun, Apr 7, 2013 at 11:56 AM, Dan Tran dant...@gmail.com
 mailto:dant...@gmail.com wrote:

 Hi I

 I saw J-B released a bunch of bundles ( i am interesting in fixes
 for lucence and ehcache ) at
 
 http://svn.apache.org/repos/**asf/servicemix/smx4/bundles/**tags/http://svn.apache.org/repos/asf/servicemix/smx4/bundles/tags/

 But NOT able find them at central.maven.org http://central.maven.org
 


 Am I missing something?

 thanks

 -D



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



Re: Force kill of JVM corrupt karaf/osgi cache?

2013-03-24 Thread Dan Tran
The source of the issue is my app running into OOM, where JVM is at
the state where GC is constantly running to the point where JSW
issues initial shutdown ( normal kill ), and finally force kill

Looks like the combination of 2 kills get Karaf cache into corrupted state?

-D

On Sun, Mar 24, 2013 at 7:22 AM, Jean-Baptiste Onofré j...@nanthrax.net wrote:
 Hi Dan,

 I used a lot kill -9 without problem, so I doubt it's the problem. It may
 be cache corruption, but we need more details to find exactly the issue.
 Could you elaborate your use case (especially what's the source of the
 reboot) ?

 Regards
 JB


 On 03/23/2013 07:25 PM, Dan Tran wrote:

 Hi my karaf application, currently in development, occasionally get
 killed by java service wrapper  due to many reasons.  However, there
 are case it karaf just cant come back ( ie some of bundle got stuck in
 grace period or just die ). is it because of file system corruption
 due to kill -9? and nothing Karaf can do?

 Thanks

 -D


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


Re: Karaf localization howto?

2013-03-23 Thread Dan Tran
yes, it got it right.

I was hoping to store the browse language type in a local thread
storage. This way we can translate our own exception message at the
time it is thrown at service layer.

Spring has conventional way to do it, perhaps blueprint/osgi has
similar path, otherwise I need to come up my own.

Thank you for bouncing out this idea.

-Dan

On Sat, Mar 23, 2013 at 11:02 AM, Achim Nierbeck
bcanh...@googlemail.com wrote:
 Hi Dan,

 I'm not sure I follow, therefore I'll try to do a quick summary of yours.

 You do have a Service containing the classic middle-ware logic,
 and you have a view rendering this done with Wicket.

 Now, you do have Exceptions thrown by your service that end up in
 your Wicket-Application? Well I'd say at this point it's std. Wicket
 Exception Handling and message translation.

 Exceptions just seen by the service are kept in the middleware and therefore
 never need to know about the browser language type, therefor should be kept
 in
 your preferred language

 Did I get this right?

 regards, Achim


 2013/3/22 Dan Tran dant...@gmail.com

 My apology about this very vague question.

 I should re-phase:

   I need figure out how to localize error throw from service layer
 calling by the view ( wicket ).

   Note: We know how to to do at Wicket side, but not service side.  We
 will put in place I18N fragment at the service side, just dont know
 how to integrate with the whole application where browser dictates the
 language type

 Advice is greatly appreciated

 Thanks

 -D



 On Fri, Mar 22, 2013 at 1:57 AM, Achim Nierbeck bcanh...@googlemail.com
 wrote:
  Hi,
 
  I don't think there is a blueprint way of doing this. But how about
  fragments containing your good old java property files, for the good
  old
  way of I18N in Java?
 
  regards, Achim
 
 
  2013/3/22 Dan Tran dant...@gmail.com
 
  Hi
 
  Hi I would like to localize my error messages of all my service beans
  ( spring/blueprint, we run most of unit test using spring, but
  production is under  karaf blueprint ),
 
  Could some one point me to a direction how to do this? ( back in the
  old day,  we have spring specific code for I18N, but now i need to get
  OSGi/Blueprint working as well. )
 
  Big thanks ahead
 
  0Dan
 
 
 
 
  --
 
  Apache Karaf http://karaf.apache.org/ Committer  PMC
  OPS4J Pax Web http://wiki.ops4j.org/display/paxweb/Pax+Web/ Committer
  
  Project Lead
  OPS4J Pax for Vaadin http://team.ops4j.org/wiki/display/PAXVAADIN/Home
  Commiter  Project Lead
  blog http://notizblog.nierbeck.de/




 --

 Apache Karaf http://karaf.apache.org/ Committer  PMC
 OPS4J Pax Web http://wiki.ops4j.org/display/paxweb/Pax+Web/ Committer 
 Project Lead
 OPS4J Pax for Vaadin http://team.ops4j.org/wiki/display/PAXVAADIN/Home
 Commiter  Project Lead
 blog http://notizblog.nierbeck.de/


Re: Force kill of JVM corrupt karaf/osgi cache?

2013-03-23 Thread Dan Tran
jsw has a feature to auto restart it managed JVM when problem occurs like:

  - JVM exits by itself either normal or abnormal.

  - JVM hang

in my case, JVM hangs due memory exhaustion, no response to jsw
heartbeat,  not response to normal shutdown request initiate by JSW, a
kill -9 was issue as the last resort

The question here how could it possible corrupted karaf cache which
leads to the need for manual intervention to remove karaf/data
directory to get it start again

-D





On Sat, Mar 23, 2013 at 3:28 PM, Achim Nierbeck bcanh...@googlemail.com wrote:
 Hi Dan,

 could you give us more details on why it dies with the server wrapper?
 Regarding killing Karaf, that can be troublesome, but I think after a clean
 reboot (without killing ;))
 it should start nicely again.

 regards, Achim


 2013/3/23 Dan Tran dant...@gmail.com

 Hi my karaf application, currently in development, occasionally get
 killed by java service wrapper  due to many reasons.  However, there
 are case it karaf just cant come back ( ie some of bundle got stuck in
 grace period or just die ). is it because of file system corruption
 due to kill -9? and nothing Karaf can do?

 Thanks

 -D




 --

 Apache Karaf http://karaf.apache.org/ Committer  PMC
 OPS4J Pax Web http://wiki.ops4j.org/display/paxweb/Pax+Web/ Committer 
 Project Lead
 OPS4J Pax for Vaadin http://team.ops4j.org/wiki/display/PAXVAADIN/Home
 Commiter  Project Lead
 blog http://notizblog.nierbeck.de/


Re: Karaf localization howto?

2013-03-22 Thread Dan Tran
My apology about this very vague question.

I should re-phase:

  I need figure out how to localize error throw from service layer
calling by the view ( wicket ).

  Note: We know how to to do at Wicket side, but not service side.  We
will put in place I18N fragment at the service side, just dont know
how to integrate with the whole application where browser dictates the
language type

Advice is greatly appreciated

Thanks

-D



On Fri, Mar 22, 2013 at 1:57 AM, Achim Nierbeck bcanh...@googlemail.com wrote:
 Hi,

 I don't think there is a blueprint way of doing this. But how about
 fragments containing your good old java property files, for the good old
 way of I18N in Java?

 regards, Achim


 2013/3/22 Dan Tran dant...@gmail.com

 Hi

 Hi I would like to localize my error messages of all my service beans
 ( spring/blueprint, we run most of unit test using spring, but
 production is under  karaf blueprint ),

 Could some one point me to a direction how to do this? ( back in the
 old day,  we have spring specific code for I18N, but now i need to get
 OSGi/Blueprint working as well. )

 Big thanks ahead

 0Dan




 --

 Apache Karaf http://karaf.apache.org/ Committer  PMC
 OPS4J Pax Web http://wiki.ops4j.org/display/paxweb/Pax+Web/ Committer 
 Project Lead
 OPS4J Pax for Vaadin http://team.ops4j.org/wiki/display/PAXVAADIN/Home
 Commiter  Project Lead
 blog http://notizblog.nierbeck.de/


Re: Could not start JMX connector server

2013-03-19 Thread Dan Tran
your local firewall may prevent karaf from binding to its jmx listner port

Exception in thread JMX Connector Thread
[service:jmx:rmi://0.0.0.0:4/jndi/rmi://0.0.0.0:1099/karaf-root]
java.lang.RuntimeException: Could not start JMX connector server
at
org.apache.karaf.management.ConnectorServerFactory$1.run(ConnectorServerFactory.java:245)
Caused by: java.io.IOException: Cannot bind to URL
[rmi://0.0.0.0:1099/karaf-root]: javax.naming.ServiceUnavailableException
[Root exception is java.rmi.ConnectException: Connection refused to host:
0.0.0.0; nested exception is:
java.net.ConnectException: Connection timed out: connect]

On Tue, Mar 19, 2013 at 10:16 AM, ingulp ing...@gmail.com wrote:
 Would anyone be able to explain what functionality I'm losing with the JMX
 connector server not starting?  I'm getting several errors throughout my
 process, but cannot be sure if they are my fault or because of this failure
 on startup.  As far as I can tell, it doesn't affect anything, but again, I
 cannot be sure.

 Thanks



 --
 View this message in context: 
 http://karaf.922171.n3.nabble.com/Could-not-start-JMX-connector-server-tp4028221p4028265.html
 Sent from the Karaf - User mailing list archive at Nabble.com.


Re: Orderly shutting down services

2013-03-07 Thread Dan Tran
It works!!!

I replace a latest copy of blueprint.core-1.1.1-SNAPSHOT at apache
jenkins and replaced the one at my 2.3.1 karaf ( ie
blueprint.core-1.1.0 )

Thanks

-D

On Thu, Mar 7, 2013 at 6:27 AM, Guillaume Nodet gno...@gmail.com wrote:
 Dan, you may want to try building an aries snapshot of blueprint-core and
 see if that helps.
 I've fixed ARIES-1020 and ARIES-1025 which should help with your problems.


 On Thu, Feb 28, 2013 at 10:44 AM, Dan Tran dant...@gmail.com wrote:

 I am able to produce the issue with a couple of simple bundles.

 However, setting

  org.apache.aries.blueprint.preemptiveShutdown=false

 at etc/config.properties

 does not help.

 For my case now, I currently swallow the exception.  But I still think
 the blueprint service should not disappear when it not its turn to
 shutdown yet.

 Thanks

 -D

 On Thu, Feb 28, 2013 at 12:18 AM, Guillaume Nodet gno...@gmail.com
 wrote:
  Try setting org.apache.aries.blueprint.preemptiveShutdown=false
  And in all cases, your bundle should support the service to not be
  available.
 
 
 
  On Thu, Feb 28, 2013 at 8:46 AM, Dan Tran dant...@gmail.com wrote:
 
  It my case, i have bundle with higher start level trying to access
  service from lower start level at shutdown time ( ie blueprint
  destroy-method ), it seems like the lower blueprint bundle service get
  removed early, even thou the bundle is not stopped yet.
 
  I will create a couple of simple of bundles to reproduce this issue.
 
  Thank you for looking into this
 
  -Dan
 
 
 
  On Wed, Feb 27, 2013 at 11:30 PM, Guillaume Nodet gno...@gmail.com
  wrote:
   Could you build something that we can reproduce ?
   Ot at least give more details about what happens (services, start
   level,
   etc..) ?
  
   I've done an enhancement in blueprint so that when the extender
   detects
   that
   the framework is stopping, it will preemptively shutdown all
   blueprint
   containers.
   So is the bundle accessing the service a blueprint one ? If not, then
   that's
   somewhat expected.  You can disable this behaviour by setting the
  org.apache.aries.blueprint.preemptiveShutdown=false
   in etc/config.properties
  
   However, if you expect things to just shutdown bundles in the correct
   order,
   that's not gonna happen.  The framework shut them down in reverse
   start
   level order, so services are removed in that way.   If a bundle with
   a
   low
   start level uses a service from a bundle with a higher start level,
   it
   won't
   be there.  And that means that the bundle is flawed and should
   support
   the
   fact that one of its needed service is gone.
  
  
  
   On Sun, Feb 17, 2013 at 8:44 AM, Dan Tran dant...@gmail.com wrote:
  
   karf-2.3.1-snapshot with felix 4.2.0 does not help either.
  
   Thanks your for looking into this issue
  
   -D
  
   On Sat, Feb 16, 2013 at 11:40 PM, Jean-Baptiste Onofré
   j...@nanthrax.net
   wrote:
It sounds like a bug in Aries Blueprint. Let me try to reproduce
with
a
simple test case.
   
Regards
JB
   
   
On 02/17/2013 08:21 AM, Dan Tran wrote:
   
this issue also happens in karaf 2.3.0 but it is very
intermittent,
I
am able to play with start level, and with some luck, the problem
went
away.
   
Only with 2.3.1-snapshot the issue is very repeatable.
   
I am going to build 2.3.1-snapshot with filix 4.2.0 to see if it
helps.
   
for me both 2.3.0 and 2.3.1 is not ready for full production yet
and
I
still have some time to wait as well
   
Thanks
   
-D
   
   
On Sat, Feb 16, 2013 at 11:15 PM, Jean-Baptiste Onofré
j...@nanthrax.net
wrote:
   
I created a Jira to update to Felix Framework 4.2.0 but only on
trunk
and
for Karaf 2.4.0.
   
I'm going to test if it helps for this issue, if so, I will
upgrade
for
Karaf 2.3.1 as well.
   
Did you notice this issue with Karaf 2.3.0 as well ?
   
Thanks
Regards
JB
   
   
On 02/17/2013 08:12 AM, Dan Tran wrote:
   
   
May be an upgrade to felix 4.2 is needed?
   
On Mon, Feb 11, 2013 at 8:56 AM, Dan Tran dant...@gmail.com
wrote:
   
   
In 2.3.0, this issue is intermittent, I was able to twist
start
level,
and luckily it disappears.  In 2.3.1-SNAPSHOT, it consistently
happen,
In a way this is a good news since It is always reproducible.
   
-D
   
On Fri, Feb 8, 2013 at 1:52 PM, Dan Tran dant...@gmail.com
wrote:
   
   
I am testing with the latest apache-karaf-2.3.1-SNAPSHOT with
latest
aries blueprint. and still see this issue
   
where one of my blueprint's destroy method needs a service
from
another bundle,  however, that bundle's service is not longer
available. Is it bug from latest blueprint? Looks like
blueprint
remove the service too early?
   
   
2013-02-08 13:31:16,067 | ERROR | FelixShutdown|
BeanRecipe

Re: Orderly shutting down services

2013-03-07 Thread Dan Tran
But the latest snapshot at apache snapshot repo does not have your change

Please please, help to push a new snapshot

Thanks

On Thu, Mar 7, 2013 at 8:13 AM, Dan Tran dant...@gmail.com wrote:
 It works!!!

 I replace a latest copy of blueprint.core-1.1.1-SNAPSHOT at apache
 jenkins and replaced the one at my 2.3.1 karaf ( ie
 blueprint.core-1.1.0 )

 Thanks

 -D

 On Thu, Mar 7, 2013 at 6:27 AM, Guillaume Nodet gno...@gmail.com wrote:
 Dan, you may want to try building an aries snapshot of blueprint-core and
 see if that helps.
 I've fixed ARIES-1020 and ARIES-1025 which should help with your problems.


 On Thu, Feb 28, 2013 at 10:44 AM, Dan Tran dant...@gmail.com wrote:

 I am able to produce the issue with a couple of simple bundles.

 However, setting

  org.apache.aries.blueprint.preemptiveShutdown=false

 at etc/config.properties

 does not help.

 For my case now, I currently swallow the exception.  But I still think
 the blueprint service should not disappear when it not its turn to
 shutdown yet.

 Thanks

 -D

 On Thu, Feb 28, 2013 at 12:18 AM, Guillaume Nodet gno...@gmail.com
 wrote:
  Try setting org.apache.aries.blueprint.preemptiveShutdown=false
  And in all cases, your bundle should support the service to not be
  available.
 
 
 
  On Thu, Feb 28, 2013 at 8:46 AM, Dan Tran dant...@gmail.com wrote:
 
  It my case, i have bundle with higher start level trying to access
  service from lower start level at shutdown time ( ie blueprint
  destroy-method ), it seems like the lower blueprint bundle service get
  removed early, even thou the bundle is not stopped yet.
 
  I will create a couple of simple of bundles to reproduce this issue.
 
  Thank you for looking into this
 
  -Dan
 
 
 
  On Wed, Feb 27, 2013 at 11:30 PM, Guillaume Nodet gno...@gmail.com
  wrote:
   Could you build something that we can reproduce ?
   Ot at least give more details about what happens (services, start
   level,
   etc..) ?
  
   I've done an enhancement in blueprint so that when the extender
   detects
   that
   the framework is stopping, it will preemptively shutdown all
   blueprint
   containers.
   So is the bundle accessing the service a blueprint one ? If not, then
   that's
   somewhat expected.  You can disable this behaviour by setting the
  org.apache.aries.blueprint.preemptiveShutdown=false
   in etc/config.properties
  
   However, if you expect things to just shutdown bundles in the correct
   order,
   that's not gonna happen.  The framework shut them down in reverse
   start
   level order, so services are removed in that way.   If a bundle with
   a
   low
   start level uses a service from a bundle with a higher start level,
   it
   won't
   be there.  And that means that the bundle is flawed and should
   support
   the
   fact that one of its needed service is gone.
  
  
  
   On Sun, Feb 17, 2013 at 8:44 AM, Dan Tran dant...@gmail.com wrote:
  
   karf-2.3.1-snapshot with felix 4.2.0 does not help either.
  
   Thanks your for looking into this issue
  
   -D
  
   On Sat, Feb 16, 2013 at 11:40 PM, Jean-Baptiste Onofré
   j...@nanthrax.net
   wrote:
It sounds like a bug in Aries Blueprint. Let me try to reproduce
with
a
simple test case.
   
Regards
JB
   
   
On 02/17/2013 08:21 AM, Dan Tran wrote:
   
this issue also happens in karaf 2.3.0 but it is very
intermittent,
I
am able to play with start level, and with some luck, the problem
went
away.
   
Only with 2.3.1-snapshot the issue is very repeatable.
   
I am going to build 2.3.1-snapshot with filix 4.2.0 to see if it
helps.
   
for me both 2.3.0 and 2.3.1 is not ready for full production yet
and
I
still have some time to wait as well
   
Thanks
   
-D
   
   
On Sat, Feb 16, 2013 at 11:15 PM, Jean-Baptiste Onofré
j...@nanthrax.net
wrote:
   
I created a Jira to update to Felix Framework 4.2.0 but only on
trunk
and
for Karaf 2.4.0.
   
I'm going to test if it helps for this issue, if so, I will
upgrade
for
Karaf 2.3.1 as well.
   
Did you notice this issue with Karaf 2.3.0 as well ?
   
Thanks
Regards
JB
   
   
On 02/17/2013 08:12 AM, Dan Tran wrote:
   
   
May be an upgrade to felix 4.2 is needed?
   
On Mon, Feb 11, 2013 at 8:56 AM, Dan Tran dant...@gmail.com
wrote:
   
   
In 2.3.0, this issue is intermittent, I was able to twist
start
level,
and luckily it disappears.  In 2.3.1-SNAPSHOT, it consistently
happen,
In a way this is a good news since It is always reproducible.
   
-D
   
On Fri, Feb 8, 2013 at 1:52 PM, Dan Tran dant...@gmail.com
wrote:
   
   
I am testing with the latest apache-karaf-2.3.1-SNAPSHOT with
latest
aries blueprint. and still see this issue
   
where one of my blueprint's destroy method needs a service
from
another bundle,  however, that bundle's service is not longer
available

Re: Issues with latest Karaf 2.3.1

2013-03-06 Thread Dan Tran
I think you are seeing
https://issues.apache.org/jira/browse/KARAF-2189, also could you try
the mention work around? it does not work for me either

On you side, I also see all bundle using the same start level, you
need to tune it so that service does not shutdown at the same time
where one needs the other service.

-D

On Wed, Mar 6, 2013 at 2:29 AM, Achim Nierbeck bcanh...@googlemail.com wrote:
 Hi Nicolas,

 that's some better information :)
 I think I've seen a mail-thread talking of a similar situation.
 It could well be that the blueprint extender is already down while your
 application bundle is still trying to shutdown.
 AFAIRC there is a workaround for this to decrease the startlevel of the
 blueprint bundles.
 This way it might be possible to work around this.

 regards, Achim


 2013/3/6 djos06 djo...@gmail.com

 Hi Everyone,

 Thanks for your answers.

 For more information I'm using blueprint and yes I have specials in
 destroy
 methods.
 I've tried to put try{} catch(Throwable t){} in destroy methods but the
 problem is still there.
 i've reduced the number of my active bundles to 2, to make the
 investigation
 of this problem more easy.
 Last time I've stopped karaf with shutdown command, and i saw an exception
 into my new try catch() in destroy method of one of my 2 active bundles.

 *org.osgi.service.blueprint.container.ServiceUnavailableException: The
 Blueprint container is being or has been destroyed:
 (objectClass=com.swingws.shaft.core.api.facade.RepositoryService)
 at

 org.apache.aries.blueprint.container.ReferenceRecipe.getService(ReferenceRecipe.java:233)
 at

 org.apache.aries.blueprint.container.ReferenceRecipe.access$000(ReferenceRecipe.java:54)
 at

 org.apache.aries.blueprint.container.ReferenceRecipe$ServiceDispatcher.call(ReferenceRecipe.java:291)
 at Proxye8d4f95a_b29b_42dd_a38a_363d39688d30.getModel(Unknown
 Source)
 at

 com.swingws.shaft.command.impl.dao.PavConnectionService.stop(PavConnectionService.java:151)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
 Method)[:1.6.0_24]
 at

 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.6.0_24]
 at

 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.6.0_24]
 at java.lang.reflect.Method.invoke(Method.java:616)[:1.6.0_24]
 at

 org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:297)[7:org.apache.aries.blueprint.core:1.1.0]
 at

 org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:958)[7:org.apache.aries.blueprint.core:1.1.0]
 at

 org.apache.aries.blueprint.container.BeanRecipe.destroy(BeanRecipe.java:863)[7:org.apache.aries.blueprint.core:1.1.0]
 at

 org.apache.aries.blueprint.container.BlueprintRepository.destroy(BlueprintRepository.java:320)[7:org.apache.aries.blueprint.core:1.1.0]
 at

 org.apache.aries.blueprint.container.BlueprintContainerImpl.destroyComponents(BlueprintContainerImpl.java:709)[7:org.apache.aries.blueprint.core:1.1.0]
 at

 org.apache.aries.blueprint.container.BlueprintContainerImpl.tidyupComponents(BlueprintContainerImpl.java:908)[7:org.apache.aries.blueprint.core:1.1.0]
 at

 org.apache.aries.blueprint.container.BlueprintContainerImpl.destroy(BlueprintContainerImpl.java:857)[7:org.apache.aries.blueprint.core:1.1.0]
 at

 org.apache.aries.blueprint.container.BlueprintExtender$3.run(BlueprintExtender.java:284)[7:org.apache.aries.blueprint.core:1.1.0]
 at

 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.6.0_24]
 at

 java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.6.0_24]
 at
 java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.6.0_24]
 at

 org.apache.aries.blueprint.container.BlueprintExtender.destroyContainer(BlueprintExtender.java:305)[7:org.apache.aries.blueprint.core:1.1.0]
 at

 org.apache.aries.blueprint.container.BlueprintExtender.stop(BlueprintExtender.java:156)[7:org.apache.aries.blueprint.core:1.1.0]
 at

 org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:199)[7:org.apache.aries.blueprint.core:1.1.0]
 at

 org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:500)[11:org.apache.aries.util:1.1.0]
 at

 org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:433)[11:org.apache.aries.util:1.1.0]
 at

 org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:725)[11:org.apache.aries.util:1.1.0]
 at

 org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:463)[11:org.apache.aries.util:1.1.0]
 at

 

Re: Issues with latest Karaf 2.3.1

2013-03-06 Thread Dan Tran
You may want to invest time to get
feature-maven-plugin/karaf-maven-plugin to do this work for you.  It
is worthwhile for big app.

I, personally, dont know how to configure startLevel from bundle
perspective.  My be the webconsole can help.

-D

On Wed, Mar 6, 2013 at 8:35 AM, djos06 djo...@gmail.com wrote:
 We actually don't use feature descriptor, we just put our bundles .jar  into
 deploy/ directory,
 is there a way to declare the bundle's start-level into a file contained in
 the .jar of the bundle ?




 --
 View this message in context: 
 http://karaf.922171.n3.nabble.com/Issues-with-latest-Karaf-2-3-1-tp4028022p4028035.html
 Sent from the Karaf - User mailing list archive at Nabble.com.


Re: Orderly shutting down services

2013-02-28 Thread Dan Tran
I am able to produce the issue with a couple of simple bundles.

However, setting

 org.apache.aries.blueprint.preemptiveShutdown=false

at etc/config.properties

does not help.

For my case now, I currently swallow the exception.  But I still think
the blueprint service should not disappear when it not its turn to
shutdown yet.

Thanks

-D

On Thu, Feb 28, 2013 at 12:18 AM, Guillaume Nodet gno...@gmail.com wrote:
 Try setting org.apache.aries.blueprint.preemptiveShutdown=false
 And in all cases, your bundle should support the service to not be
 available.



 On Thu, Feb 28, 2013 at 8:46 AM, Dan Tran dant...@gmail.com wrote:

 It my case, i have bundle with higher start level trying to access
 service from lower start level at shutdown time ( ie blueprint
 destroy-method ), it seems like the lower blueprint bundle service get
 removed early, even thou the bundle is not stopped yet.

 I will create a couple of simple of bundles to reproduce this issue.

 Thank you for looking into this

 -Dan



 On Wed, Feb 27, 2013 at 11:30 PM, Guillaume Nodet gno...@gmail.com
 wrote:
  Could you build something that we can reproduce ?
  Ot at least give more details about what happens (services, start level,
  etc..) ?
 
  I've done an enhancement in blueprint so that when the extender detects
  that
  the framework is stopping, it will preemptively shutdown all blueprint
  containers.
  So is the bundle accessing the service a blueprint one ? If not, then
  that's
  somewhat expected.  You can disable this behaviour by setting the
 org.apache.aries.blueprint.preemptiveShutdown=false
  in etc/config.properties
 
  However, if you expect things to just shutdown bundles in the correct
  order,
  that's not gonna happen.  The framework shut them down in reverse start
  level order, so services are removed in that way.   If a bundle with a
  low
  start level uses a service from a bundle with a higher start level, it
  won't
  be there.  And that means that the bundle is flawed and should support
  the
  fact that one of its needed service is gone.
 
 
 
  On Sun, Feb 17, 2013 at 8:44 AM, Dan Tran dant...@gmail.com wrote:
 
  karf-2.3.1-snapshot with felix 4.2.0 does not help either.
 
  Thanks your for looking into this issue
 
  -D
 
  On Sat, Feb 16, 2013 at 11:40 PM, Jean-Baptiste Onofré
  j...@nanthrax.net
  wrote:
   It sounds like a bug in Aries Blueprint. Let me try to reproduce with
   a
   simple test case.
  
   Regards
   JB
  
  
   On 02/17/2013 08:21 AM, Dan Tran wrote:
  
   this issue also happens in karaf 2.3.0 but it is very intermittent,
   I
   am able to play with start level, and with some luck, the problem
   went
   away.
  
   Only with 2.3.1-snapshot the issue is very repeatable.
  
   I am going to build 2.3.1-snapshot with filix 4.2.0 to see if it
   helps.
  
   for me both 2.3.0 and 2.3.1 is not ready for full production yet and
   I
   still have some time to wait as well
  
   Thanks
  
   -D
  
  
   On Sat, Feb 16, 2013 at 11:15 PM, Jean-Baptiste Onofré
   j...@nanthrax.net
   wrote:
  
   I created a Jira to update to Felix Framework 4.2.0 but only on
   trunk
   and
   for Karaf 2.4.0.
  
   I'm going to test if it helps for this issue, if so, I will upgrade
   for
   Karaf 2.3.1 as well.
  
   Did you notice this issue with Karaf 2.3.0 as well ?
  
   Thanks
   Regards
   JB
  
  
   On 02/17/2013 08:12 AM, Dan Tran wrote:
  
  
   May be an upgrade to felix 4.2 is needed?
  
   On Mon, Feb 11, 2013 at 8:56 AM, Dan Tran dant...@gmail.com
   wrote:
  
  
   In 2.3.0, this issue is intermittent, I was able to twist start
   level,
   and luckily it disappears.  In 2.3.1-SNAPSHOT, it consistently
   happen,
   In a way this is a good news since It is always reproducible.
  
   -D
  
   On Fri, Feb 8, 2013 at 1:52 PM, Dan Tran dant...@gmail.com
   wrote:
  
  
   I am testing with the latest apache-karaf-2.3.1-SNAPSHOT with
   latest
   aries blueprint. and still see this issue
  
   where one of my blueprint's destroy method needs a service from
   another bundle,  however, that bundle's service is not longer
   available. Is it bug from latest blueprint? Looks like blueprint
   remove the service too early?
  
  
   2013-02-08 13:31:16,067 | ERROR | FelixShutdown| BeanRecipe
| s.blueprint.container.BeanRecipe  873 | 7 -
   org.apache.aries.blueprint.core - 1.1.0 | The blueprint bean
   fileStreamDataProviderFactory in bundle
   x.data.provider.filestream/1.0.0.SNAPSHOT incorrectly threw
   an
   exception from its destroy method.
  
   org.osgi.service.blueprint.container.ServiceUnavailableException:
   The
   Blueprint container is being or has been destroyed:
   (objectClass=xd.data.provider.core.ConnectionFactory)
 at
  
  
  
   org.apache.aries.blueprint.container.ReferenceRecipe.getService(ReferenceRecipe.java:233)
 at
  
  
  
   org.apache.aries.blueprint.container.ReferenceRecipe.access$000(ReferenceRecipe.java:54

Re: Orderly shutting down services

2013-02-27 Thread Dan Tran
It my case, i have bundle with higher start level trying to access
service from lower start level at shutdown time ( ie blueprint
destroy-method ), it seems like the lower blueprint bundle service get
removed early, even thou the bundle is not stopped yet.

I will create a couple of simple of bundles to reproduce this issue.

Thank you for looking into this

-Dan



On Wed, Feb 27, 2013 at 11:30 PM, Guillaume Nodet gno...@gmail.com wrote:
 Could you build something that we can reproduce ?
 Ot at least give more details about what happens (services, start level,
 etc..) ?

 I've done an enhancement in blueprint so that when the extender detects that
 the framework is stopping, it will preemptively shutdown all blueprint
 containers.
 So is the bundle accessing the service a blueprint one ? If not, then that's
 somewhat expected.  You can disable this behaviour by setting the
org.apache.aries.blueprint.preemptiveShutdown=false
 in etc/config.properties

 However, if you expect things to just shutdown bundles in the correct order,
 that's not gonna happen.  The framework shut them down in reverse start
 level order, so services are removed in that way.   If a bundle with a low
 start level uses a service from a bundle with a higher start level, it won't
 be there.  And that means that the bundle is flawed and should support the
 fact that one of its needed service is gone.



 On Sun, Feb 17, 2013 at 8:44 AM, Dan Tran dant...@gmail.com wrote:

 karf-2.3.1-snapshot with felix 4.2.0 does not help either.

 Thanks your for looking into this issue

 -D

 On Sat, Feb 16, 2013 at 11:40 PM, Jean-Baptiste Onofré j...@nanthrax.net
 wrote:
  It sounds like a bug in Aries Blueprint. Let me try to reproduce with a
  simple test case.
 
  Regards
  JB
 
 
  On 02/17/2013 08:21 AM, Dan Tran wrote:
 
  this issue also happens in karaf 2.3.0 but it is very intermittent, I
  am able to play with start level, and with some luck, the problem went
  away.
 
  Only with 2.3.1-snapshot the issue is very repeatable.
 
  I am going to build 2.3.1-snapshot with filix 4.2.0 to see if it helps.
 
  for me both 2.3.0 and 2.3.1 is not ready for full production yet and I
  still have some time to wait as well
 
  Thanks
 
  -D
 
 
  On Sat, Feb 16, 2013 at 11:15 PM, Jean-Baptiste Onofré
  j...@nanthrax.net
  wrote:
 
  I created a Jira to update to Felix Framework 4.2.0 but only on trunk
  and
  for Karaf 2.4.0.
 
  I'm going to test if it helps for this issue, if so, I will upgrade
  for
  Karaf 2.3.1 as well.
 
  Did you notice this issue with Karaf 2.3.0 as well ?
 
  Thanks
  Regards
  JB
 
 
  On 02/17/2013 08:12 AM, Dan Tran wrote:
 
 
  May be an upgrade to felix 4.2 is needed?
 
  On Mon, Feb 11, 2013 at 8:56 AM, Dan Tran dant...@gmail.com wrote:
 
 
  In 2.3.0, this issue is intermittent, I was able to twist start
  level,
  and luckily it disappears.  In 2.3.1-SNAPSHOT, it consistently
  happen,
  In a way this is a good news since It is always reproducible.
 
  -D
 
  On Fri, Feb 8, 2013 at 1:52 PM, Dan Tran dant...@gmail.com wrote:
 
 
  I am testing with the latest apache-karaf-2.3.1-SNAPSHOT with
  latest
  aries blueprint. and still see this issue
 
  where one of my blueprint's destroy method needs a service from
  another bundle,  however, that bundle's service is not longer
  available. Is it bug from latest blueprint? Looks like blueprint
  remove the service too early?
 
 
  2013-02-08 13:31:16,067 | ERROR | FelixShutdown| BeanRecipe
   | s.blueprint.container.BeanRecipe  873 | 7 -
  org.apache.aries.blueprint.core - 1.1.0 | The blueprint bean
  fileStreamDataProviderFactory in bundle
  x.data.provider.filestream/1.0.0.SNAPSHOT incorrectly threw an
  exception from its destroy method.
  org.osgi.service.blueprint.container.ServiceUnavailableException:
  The
  Blueprint container is being or has been destroyed:
  (objectClass=xd.data.provider.core.ConnectionFactory)
at
 
 
  org.apache.aries.blueprint.container.ReferenceRecipe.getService(ReferenceRecipe.java:233)
at
 
 
  org.apache.aries.blueprint.container.ReferenceRecipe.access$000(ReferenceRecipe.java:54)
at
 
 
  org.apache.aries.blueprint.container.ReferenceRecipe$ServiceDispatcher.call(ReferenceRecipe.java:291)
at
 
 
  Proxy292eef6e_56c9_4a23_9717_803ff8d4fb86.deregisterDataProvider(Unknown
  Source)
at
 
 
  xx.data.provider.filestream.internal.core.DefaultFileStreamDataProviderFactory.cleanup(DefaultFileStreamDataProviderFactory.java:114)
 
  []
 
  2013-02-08 13:31:16,159 | INFO  | FelixShutdown|
  BlueprintExtender
   | nt.container.BlueprintExtender$3  282 | 7 -
  org.apache.aries.blueprint.core - 1.1.0 | Destroying
  BlueprintContainer for bundle x.storage.core
 
 
  The service not available bundle eventually destroyed at the end
  successfully
 
 
  Thanks
 
  -D
 
  On Fri, Jan 18, 2013 at 2:21 PM, Dan Tran dant...@gmail.com

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

2013-02-22 Thread Dan Tran
Thanks I will give it a shot, and report back

-D

On Fri, Feb 22, 2013 at 9:00 AM, Christoph Gritschenberger
christoph.gritschenber...@gmail.com 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
 christoph.gritschenber...@gmail.com 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é j...@nanthrax.net
 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 dant...@gmail.com 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








Re: Java Heap Space - Karaf Pax Exam

2013-02-16 Thread Dan Tran
https://issues.apache.org/jira/browse/KARAF-2096

-D

On Sat, Feb 16, 2013 at 12:49 AM, Charles Moulliard ch0...@gmail.com 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



Re: Java Heap Space - Karaf Pax Exam

2013-02-16 Thread Dan Tran
your log still show you are using pax-exam 2.4

-D

On Sat, Feb 16, 2013 at 1:48 AM, Charles Moulliard ch0...@gmail.com wrote:
 Dan,

 I already use pax-exam 2.6.0.

 Regards,

 Charles


 On Sat, Feb 16, 2013 at 10:20 AM, Dan Tran dant...@gmail.com wrote:

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

 -D

 On Sat, Feb 16, 2013 at 12:49 AM, Charles Moulliard ch0...@gmail.com
 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



Re: Java Heap Space - Karaf Pax Exam

2013-02-16 Thread Dan Tran
karaf 2.3.x branch is already using pax-exam 2.6.0  (
pax.exam.version2.6.0/pax.exam.version )


Re: Orderly shutting down services

2013-02-16 Thread Dan Tran
May be an upgrade to felix 4.2 is needed?

On Mon, Feb 11, 2013 at 8:56 AM, Dan Tran dant...@gmail.com wrote:
 In 2.3.0, this issue is intermittent, I was able to twist start level,
 and luckily it disappears.  In 2.3.1-SNAPSHOT, it consistently happen,
 In a way this is a good news since It is always reproducible.

 -D

 On Fri, Feb 8, 2013 at 1:52 PM, Dan Tran dant...@gmail.com wrote:
 I am testing with the latest apache-karaf-2.3.1-SNAPSHOT with latest
 aries blueprint. and still see this issue

 where one of my blueprint's destroy method needs a service from
 another bundle,  however, that bundle's service is not longer
 available. Is it bug from latest blueprint? Looks like blueprint
 remove the service too early?


 2013-02-08 13:31:16,067 | ERROR | FelixShutdown| BeanRecipe
| s.blueprint.container.BeanRecipe  873 | 7 -
 org.apache.aries.blueprint.core - 1.1.0 | The blueprint bean
 fileStreamDataProviderFactory in bundle
 x.data.provider.filestream/1.0.0.SNAPSHOT incorrectly threw an
 exception from its destroy method.
 org.osgi.service.blueprint.container.ServiceUnavailableException: The
 Blueprint container is being or has been destroyed:
 (objectClass=xd.data.provider.core.ConnectionFactory)
 at 
 org.apache.aries.blueprint.container.ReferenceRecipe.getService(ReferenceRecipe.java:233)
 at 
 org.apache.aries.blueprint.container.ReferenceRecipe.access$000(ReferenceRecipe.java:54)
 at 
 org.apache.aries.blueprint.container.ReferenceRecipe$ServiceDispatcher.call(ReferenceRecipe.java:291)
 at 
 Proxy292eef6e_56c9_4a23_9717_803ff8d4fb86.deregisterDataProvider(Unknown
 Source)
 at 
 xx.data.provider.filestream.internal.core.DefaultFileStreamDataProviderFactory.cleanup(DefaultFileStreamDataProviderFactory.java:114)

 []

 2013-02-08 13:31:16,159 | INFO  | FelixShutdown| BlueprintExtender
| nt.container.BlueprintExtender$3  282 | 7 -
 org.apache.aries.blueprint.core - 1.1.0 | Destroying
 BlueprintContainer for bundle x.storage.core


 The service not available bundle eventually destroyed at the end successfully


 Thanks

 -D

 On Fri, Jan 18, 2013 at 2:21 PM, Dan Tran dant...@gmail.com wrote:
 Thanks JB

 -D

 On Fri, Jan 18, 2013 at 2:19 PM, Jean-Baptiste Onofré j...@nanthrax.net 
 wrote:
 Hi Dan,

 yes, we are working on the Aries update (to fix the Blueprint issues).

 I submitted a patch about to Aries, I gonna check if a new SNAPSHOT has 
 been
 deployed (at Aries) including the patch.

 I keep you posted.

 Regards
 JB


 On 01/18/2013 11:17 PM, Dan Tran wrote:

 I now have my apache karaf 2.3.1-snapshot to pickup blueprint-core
 1.1.0-SNAPSHOT and blueprint-cm 1.0.1-SNAPSHOT

 my karaf.bat now hangs at startup

 ERROR: Bundle org.apache.aries.blueprint.cm [8] Error starting

 mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.cm/1.0.1-SNAPSHOT
 (org.osgi.framework.BundleException: Unresolved constraint in
   bundle org.apache.aries.blueprint.cm [8]: Unable to resolve 8.0:
 missing requirement [8.0] osgi.wiring.package;

 ((osgi.wiring.package=org.apache.aries.blueprint)(version=1.0.0)(!(version=1.2.0

 org.osgi.framework.BundleException: Unresolved constraint in bundle
 org.apache.aries.blueprint.cm [8]: Unable to resolve 8.0: missing
 requirement [8.0] osgi.wiring.package; ((osgi.wiring.package=org.
 apache.aries.blueprint)(version=1.0.0)(!(version=1.2.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:722)

 not sure what is the artifact org.apache.aries.blueprint is from

 Thanks

 -D

 On Fri, Jan 18, 2013 at 12:14 PM, Christoph Gritschenberger
 christoph.gritschenber...@gmail.com wrote:

 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

Re: Orderly shutting down services

2013-02-16 Thread Dan Tran
this issue also happens in karaf 2.3.0 but it is very intermittent, I
am able to play with start level, and with some luck, the problem went
away.

Only with 2.3.1-snapshot the issue is very repeatable.

I am going to build 2.3.1-snapshot with filix 4.2.0 to see if it helps.

for me both 2.3.0 and 2.3.1 is not ready for full production yet and I
still have some time to wait as well

Thanks

-D


On Sat, Feb 16, 2013 at 11:15 PM, Jean-Baptiste Onofré j...@nanthrax.net 
wrote:
 I created a Jira to update to Felix Framework 4.2.0 but only on trunk and
 for Karaf 2.4.0.

 I'm going to test if it helps for this issue, if so, I will upgrade for
 Karaf 2.3.1 as well.

 Did you notice this issue with Karaf 2.3.0 as well ?

 Thanks
 Regards
 JB


 On 02/17/2013 08:12 AM, Dan Tran wrote:

 May be an upgrade to felix 4.2 is needed?

 On Mon, Feb 11, 2013 at 8:56 AM, Dan Tran dant...@gmail.com wrote:

 In 2.3.0, this issue is intermittent, I was able to twist start level,
 and luckily it disappears.  In 2.3.1-SNAPSHOT, it consistently happen,
 In a way this is a good news since It is always reproducible.

 -D

 On Fri, Feb 8, 2013 at 1:52 PM, Dan Tran dant...@gmail.com wrote:

 I am testing with the latest apache-karaf-2.3.1-SNAPSHOT with latest
 aries blueprint. and still see this issue

 where one of my blueprint's destroy method needs a service from
 another bundle,  however, that bundle's service is not longer
 available. Is it bug from latest blueprint? Looks like blueprint
 remove the service too early?


 2013-02-08 13:31:16,067 | ERROR | FelixShutdown| BeanRecipe
 | s.blueprint.container.BeanRecipe  873 | 7 -
 org.apache.aries.blueprint.core - 1.1.0 | The blueprint bean
 fileStreamDataProviderFactory in bundle
 x.data.provider.filestream/1.0.0.SNAPSHOT incorrectly threw an
 exception from its destroy method.
 org.osgi.service.blueprint.container.ServiceUnavailableException: The
 Blueprint container is being or has been destroyed:
 (objectClass=xd.data.provider.core.ConnectionFactory)
  at
 org.apache.aries.blueprint.container.ReferenceRecipe.getService(ReferenceRecipe.java:233)
  at
 org.apache.aries.blueprint.container.ReferenceRecipe.access$000(ReferenceRecipe.java:54)
  at
 org.apache.aries.blueprint.container.ReferenceRecipe$ServiceDispatcher.call(ReferenceRecipe.java:291)
  at
 Proxy292eef6e_56c9_4a23_9717_803ff8d4fb86.deregisterDataProvider(Unknown
 Source)
  at
 xx.data.provider.filestream.internal.core.DefaultFileStreamDataProviderFactory.cleanup(DefaultFileStreamDataProviderFactory.java:114)

 []

 2013-02-08 13:31:16,159 | INFO  | FelixShutdown| BlueprintExtender
 | nt.container.BlueprintExtender$3  282 | 7 -
 org.apache.aries.blueprint.core - 1.1.0 | Destroying
 BlueprintContainer for bundle x.storage.core


 The service not available bundle eventually destroyed at the end
 successfully


 Thanks

 -D

 On Fri, Jan 18, 2013 at 2:21 PM, Dan Tran dant...@gmail.com wrote:

 Thanks JB

 -D

 On Fri, Jan 18, 2013 at 2:19 PM, Jean-Baptiste Onofré j...@nanthrax.net
 wrote:

 Hi Dan,

 yes, we are working on the Aries update (to fix the Blueprint issues).

 I submitted a patch about to Aries, I gonna check if a new SNAPSHOT
 has been
 deployed (at Aries) including the patch.

 I keep you posted.

 Regards
 JB


 On 01/18/2013 11:17 PM, Dan Tran wrote:


 I now have my apache karaf 2.3.1-snapshot to pickup blueprint-core
 1.1.0-SNAPSHOT and blueprint-cm 1.0.1-SNAPSHOT

 my karaf.bat now hangs at startup

 ERROR: Bundle org.apache.aries.blueprint.cm [8] Error starting


 mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.cm/1.0.1-SNAPSHOT
 (org.osgi.framework.BundleException: Unresolved constraint in
bundle org.apache.aries.blueprint.cm [8]: Unable to resolve 8.0:
 missing requirement [8.0] osgi.wiring.package;


 ((osgi.wiring.package=org.apache.aries.blueprint)(version=1.0.0)(!(version=1.2.0

 org.osgi.framework.BundleException: Unresolved constraint in bundle
 org.apache.aries.blueprint.cm [8]: Unable to resolve 8.0: missing
 requirement [8.0] osgi.wiring.package; ((osgi.wiring.package=org.
 apache.aries.blueprint)(version=1.0.0)(!(version=1.2.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:722)

 not sure what is the artifact org.apache.aries.blueprint is from

 Thanks

 -D

 On Fri, Jan 18, 2013 at 12:14 PM, Christoph Gritschenberger
 christoph.gritschenber...@gmail.com wrote:


 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

Re: Orderly shutting down services

2013-02-16 Thread Dan Tran
karf-2.3.1-snapshot with felix 4.2.0 does not help either.

Thanks your for looking into this issue

-D

On Sat, Feb 16, 2013 at 11:40 PM, Jean-Baptiste Onofré j...@nanthrax.net 
wrote:
 It sounds like a bug in Aries Blueprint. Let me try to reproduce with a
 simple test case.

 Regards
 JB


 On 02/17/2013 08:21 AM, Dan Tran wrote:

 this issue also happens in karaf 2.3.0 but it is very intermittent, I
 am able to play with start level, and with some luck, the problem went
 away.

 Only with 2.3.1-snapshot the issue is very repeatable.

 I am going to build 2.3.1-snapshot with filix 4.2.0 to see if it helps.

 for me both 2.3.0 and 2.3.1 is not ready for full production yet and I
 still have some time to wait as well

 Thanks

 -D


 On Sat, Feb 16, 2013 at 11:15 PM, Jean-Baptiste Onofré j...@nanthrax.net
 wrote:

 I created a Jira to update to Felix Framework 4.2.0 but only on trunk and
 for Karaf 2.4.0.

 I'm going to test if it helps for this issue, if so, I will upgrade for
 Karaf 2.3.1 as well.

 Did you notice this issue with Karaf 2.3.0 as well ?

 Thanks
 Regards
 JB


 On 02/17/2013 08:12 AM, Dan Tran wrote:


 May be an upgrade to felix 4.2 is needed?

 On Mon, Feb 11, 2013 at 8:56 AM, Dan Tran dant...@gmail.com wrote:


 In 2.3.0, this issue is intermittent, I was able to twist start level,
 and luckily it disappears.  In 2.3.1-SNAPSHOT, it consistently happen,
 In a way this is a good news since It is always reproducible.

 -D

 On Fri, Feb 8, 2013 at 1:52 PM, Dan Tran dant...@gmail.com wrote:


 I am testing with the latest apache-karaf-2.3.1-SNAPSHOT with latest
 aries blueprint. and still see this issue

 where one of my blueprint's destroy method needs a service from
 another bundle,  however, that bundle's service is not longer
 available. Is it bug from latest blueprint? Looks like blueprint
 remove the service too early?


 2013-02-08 13:31:16,067 | ERROR | FelixShutdown| BeanRecipe
  | s.blueprint.container.BeanRecipe  873 | 7 -
 org.apache.aries.blueprint.core - 1.1.0 | The blueprint bean
 fileStreamDataProviderFactory in bundle
 x.data.provider.filestream/1.0.0.SNAPSHOT incorrectly threw an
 exception from its destroy method.
 org.osgi.service.blueprint.container.ServiceUnavailableException: The
 Blueprint container is being or has been destroyed:
 (objectClass=xd.data.provider.core.ConnectionFactory)
   at

 org.apache.aries.blueprint.container.ReferenceRecipe.getService(ReferenceRecipe.java:233)
   at

 org.apache.aries.blueprint.container.ReferenceRecipe.access$000(ReferenceRecipe.java:54)
   at

 org.apache.aries.blueprint.container.ReferenceRecipe$ServiceDispatcher.call(ReferenceRecipe.java:291)
   at

 Proxy292eef6e_56c9_4a23_9717_803ff8d4fb86.deregisterDataProvider(Unknown
 Source)
   at

 xx.data.provider.filestream.internal.core.DefaultFileStreamDataProviderFactory.cleanup(DefaultFileStreamDataProviderFactory.java:114)

 []

 2013-02-08 13:31:16,159 | INFO  | FelixShutdown| BlueprintExtender
  | nt.container.BlueprintExtender$3  282 | 7 -
 org.apache.aries.blueprint.core - 1.1.0 | Destroying
 BlueprintContainer for bundle x.storage.core


 The service not available bundle eventually destroyed at the end
 successfully


 Thanks

 -D

 On Fri, Jan 18, 2013 at 2:21 PM, Dan Tran dant...@gmail.com wrote:


 Thanks JB

 -D

 On Fri, Jan 18, 2013 at 2:19 PM, Jean-Baptiste Onofré
 j...@nanthrax.net
 wrote:


 Hi Dan,

 yes, we are working on the Aries update (to fix the Blueprint
 issues).

 I submitted a patch about to Aries, I gonna check if a new SNAPSHOT
 has been
 deployed (at Aries) including the patch.

 I keep you posted.

 Regards
 JB


 On 01/18/2013 11:17 PM, Dan Tran wrote:



 I now have my apache karaf 2.3.1-snapshot to pickup blueprint-core
 1.1.0-SNAPSHOT and blueprint-cm 1.0.1-SNAPSHOT

 my karaf.bat now hangs at startup

 ERROR: Bundle org.apache.aries.blueprint.cm [8] Error starting



 mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.cm/1.0.1-SNAPSHOT
 (org.osgi.framework.BundleException: Unresolved constraint in
 bundle org.apache.aries.blueprint.cm [8]: Unable to resolve
 8.0:
 missing requirement [8.0] osgi.wiring.package;



 ((osgi.wiring.package=org.apache.aries.blueprint)(version=1.0.0)(!(version=1.2.0

 org.osgi.framework.BundleException: Unresolved constraint in bundle
 org.apache.aries.blueprint.cm [8]: Unable to resolve 8.0: missing
 requirement [8.0] osgi.wiring.package; ((osgi.wiring.package=org.
 apache.aries.blueprint)(version=1.0.0)(!(version=1.2.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

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

2013-02-11 Thread Dan Tran
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
christoph.gritschenber...@gmail.com 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é j...@nanthrax.net
 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 dant...@gmail.com 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





Re: Orderly shutting down services

2013-02-11 Thread Dan Tran
In 2.3.0, this issue is intermittent, I was able to twist start level,
and luckily it disappears.  In 2.3.1-SNAPSHOT, it consistently happen,
In a way this is a good news since It is always reproducible.

-D

On Fri, Feb 8, 2013 at 1:52 PM, Dan Tran dant...@gmail.com wrote:
 I am testing with the latest apache-karaf-2.3.1-SNAPSHOT with latest
 aries blueprint. and still see this issue

 where one of my blueprint's destroy method needs a service from
 another bundle,  however, that bundle's service is not longer
 available. Is it bug from latest blueprint? Looks like blueprint
 remove the service too early?


 2013-02-08 13:31:16,067 | ERROR | FelixShutdown| BeanRecipe
| s.blueprint.container.BeanRecipe  873 | 7 -
 org.apache.aries.blueprint.core - 1.1.0 | The blueprint bean
 fileStreamDataProviderFactory in bundle
 x.data.provider.filestream/1.0.0.SNAPSHOT incorrectly threw an
 exception from its destroy method.
 org.osgi.service.blueprint.container.ServiceUnavailableException: The
 Blueprint container is being or has been destroyed:
 (objectClass=xd.data.provider.core.ConnectionFactory)
 at 
 org.apache.aries.blueprint.container.ReferenceRecipe.getService(ReferenceRecipe.java:233)
 at 
 org.apache.aries.blueprint.container.ReferenceRecipe.access$000(ReferenceRecipe.java:54)
 at 
 org.apache.aries.blueprint.container.ReferenceRecipe$ServiceDispatcher.call(ReferenceRecipe.java:291)
 at 
 Proxy292eef6e_56c9_4a23_9717_803ff8d4fb86.deregisterDataProvider(Unknown
 Source)
 at 
 xx.data.provider.filestream.internal.core.DefaultFileStreamDataProviderFactory.cleanup(DefaultFileStreamDataProviderFactory.java:114)

 []

 2013-02-08 13:31:16,159 | INFO  | FelixShutdown| BlueprintExtender
| nt.container.BlueprintExtender$3  282 | 7 -
 org.apache.aries.blueprint.core - 1.1.0 | Destroying
 BlueprintContainer for bundle x.storage.core


 The service not available bundle eventually destroyed at the end successfully


 Thanks

 -D

 On Fri, Jan 18, 2013 at 2:21 PM, Dan Tran dant...@gmail.com wrote:
 Thanks JB

 -D

 On Fri, Jan 18, 2013 at 2:19 PM, Jean-Baptiste Onofré j...@nanthrax.net 
 wrote:
 Hi Dan,

 yes, we are working on the Aries update (to fix the Blueprint issues).

 I submitted a patch about to Aries, I gonna check if a new SNAPSHOT has been
 deployed (at Aries) including the patch.

 I keep you posted.

 Regards
 JB


 On 01/18/2013 11:17 PM, Dan Tran wrote:

 I now have my apache karaf 2.3.1-snapshot to pickup blueprint-core
 1.1.0-SNAPSHOT and blueprint-cm 1.0.1-SNAPSHOT

 my karaf.bat now hangs at startup

 ERROR: Bundle org.apache.aries.blueprint.cm [8] Error starting

 mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.cm/1.0.1-SNAPSHOT
 (org.osgi.framework.BundleException: Unresolved constraint in
   bundle org.apache.aries.blueprint.cm [8]: Unable to resolve 8.0:
 missing requirement [8.0] osgi.wiring.package;

 ((osgi.wiring.package=org.apache.aries.blueprint)(version=1.0.0)(!(version=1.2.0

 org.osgi.framework.BundleException: Unresolved constraint in bundle
 org.apache.aries.blueprint.cm [8]: Unable to resolve 8.0: missing
 requirement [8.0] osgi.wiring.package; ((osgi.wiring.package=org.
 apache.aries.blueprint)(version=1.0.0)(!(version=1.2.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:722)

 not sure what is the artifact org.apache.aries.blueprint is from

 Thanks

 -D

 On Fri, Jan 18, 2013 at 12:14 PM, Christoph Gritschenberger
 christoph.gritschenber...@gmail.com wrote:

 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

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

2013-02-10 Thread Dan Tran
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 dant...@gmail.com 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


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

2013-02-10 Thread Dan Tran
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é j...@nanthrax.net 
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 dant...@gmail.com 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


Suspicious org.ops4j.pax.url.wrap - 1.3.5 | Bundle cannot be generated

2013-02-10 Thread Dan Tran
Hello

I am seeing this warning  at both karaf 2.3.0 and 2.3.1-SNAPSHOT

2013-02-10 16:46:54,627 | WARN  | Thread-102   | BndUtils
   | ps4j.pax.swissbox.bnd.BndUtils$1  178 | 2 -
org.ops4j.pax.url.wrap - 1.3.5 | Bundle cannot be generated
2013-02-10 16:46:54,920 | WARN  | Thread-103   | BndUtils
   | ps4j.pax.swissbox.bnd.BndUtils$1  178 | 2 -
org.ops4j.pax.url.wrap - 1.3.5 | Bundle cannot be generated

I do have a few  wrap:mvn:... in my feature file and everythine works
as expected

is this something karaf team can get rid off?

Thanks

-Dan


Re: Bundle hangs at 'GracePeriod' forever waiting for wicket namespace

2013-02-09 Thread Dan Tran
Yes its still happen with latest karaf 2.3-1-SNAPSHOT. The good news
is not does not happen offen, i would say 5% compare to 50% with 2.3.0

-D

On Fri, Feb 8, 2013 at 11:27 PM, Jean-Baptiste Onofré j...@nanthrax.net wrote:
 Hi Dan,

 with which version of Karaf do you see the issue ?
 Did you try with the latest 2.3.1-SNAPSHOT (including new Aries Blueprint) ?

 It looks like the issue that we had in Aries Blueprint in Karaf 2.3.0.

 Regards
 JB


 On 02/09/2013 03:02 AM, Dan Tran wrote:

 it is reproducible consistently on fast box ( 8 CPU modern development
 box windows or linux )

 -D

 On Fri, Feb 8, 2013 at 9:17 AM, Dan Tran dant...@gmail.com wrote:

 Hi Lukasz

 [ 153] [Active ] [] [   60] Wicket Util (6.2.0)
 [ 154] [Active ] [] [   60] Wicket Request (6.2.0)
 [ 155] [Active ] [] [   60] Wicket Core (6.2.0)
 [ 156] [Active ] [] [   60] Wicket Auth Roles (6.2.0)
 [ 157] [Active ] [] [   60] Wicket Extensions (6.2.0)
 [ 159] [Active ] [] [   60] OPS4J Base - All (1.4.0)
 [ 160] [Active ] [Created ] [   60] OPS4J Pax Wicket :: Service
 (2.0.0)
 [ 161] [Active ] [] [   60] Apache ServiceMix ::
 Bundles :: cglib (2.2.2.1)



 Any more idea?

 -D

 On Fri, Feb 8, 2013 at 1:52 AM, Łukasz Dywicki l...@code-house.org
 wrote:

 Hey Dan,
 I did not experience this kind of problem. Have you tried if
 org.ops4j.pax.wicket bundle is in ACTIVE state not RESOLVED?

 Cheers,
 Lukasz

 Wiadomość napisana przez Dan Tran dant...@gmail.com w dniu 8 lut 2013,
 o godz. 08:08:

 by default, the bundle should bail out after 5 min, but it hangs that
 state forever. Sound like blueprint bug?

 I am using karaf 2.3.0 java 1.7

 -D



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


Re: Orderly shutting down services

2013-02-08 Thread Dan Tran
I am testing with the latest apache-karaf-2.3.1-SNAPSHOT with latest
aries blueprint. and still see this issue

where one of my blueprint's destroy method needs a service from
another bundle,  however, that bundle's service is not longer
available. Is it bug from latest blueprint? Looks like blueprint
remove the service too early?


2013-02-08 13:31:16,067 | ERROR | FelixShutdown| BeanRecipe
   | s.blueprint.container.BeanRecipe  873 | 7 -
org.apache.aries.blueprint.core - 1.1.0 | The blueprint bean
fileStreamDataProviderFactory in bundle
x.data.provider.filestream/1.0.0.SNAPSHOT incorrectly threw an
exception from its destroy method.
org.osgi.service.blueprint.container.ServiceUnavailableException: The
Blueprint container is being or has been destroyed:
(objectClass=xd.data.provider.core.ConnectionFactory)
at 
org.apache.aries.blueprint.container.ReferenceRecipe.getService(ReferenceRecipe.java:233)
at 
org.apache.aries.blueprint.container.ReferenceRecipe.access$000(ReferenceRecipe.java:54)
at 
org.apache.aries.blueprint.container.ReferenceRecipe$ServiceDispatcher.call(ReferenceRecipe.java:291)
at 
Proxy292eef6e_56c9_4a23_9717_803ff8d4fb86.deregisterDataProvider(Unknown
Source)
at 
xx.data.provider.filestream.internal.core.DefaultFileStreamDataProviderFactory.cleanup(DefaultFileStreamDataProviderFactory.java:114)

[]

2013-02-08 13:31:16,159 | INFO  | FelixShutdown| BlueprintExtender
   | nt.container.BlueprintExtender$3  282 | 7 -
org.apache.aries.blueprint.core - 1.1.0 | Destroying
BlueprintContainer for bundle x.storage.core


The service not available bundle eventually destroyed at the end successfully


Thanks

-D

On Fri, Jan 18, 2013 at 2:21 PM, Dan Tran dant...@gmail.com wrote:
 Thanks JB

 -D

 On Fri, Jan 18, 2013 at 2:19 PM, Jean-Baptiste Onofré j...@nanthrax.net 
 wrote:
 Hi Dan,

 yes, we are working on the Aries update (to fix the Blueprint issues).

 I submitted a patch about to Aries, I gonna check if a new SNAPSHOT has been
 deployed (at Aries) including the patch.

 I keep you posted.

 Regards
 JB


 On 01/18/2013 11:17 PM, Dan Tran wrote:

 I now have my apache karaf 2.3.1-snapshot to pickup blueprint-core
 1.1.0-SNAPSHOT and blueprint-cm 1.0.1-SNAPSHOT

 my karaf.bat now hangs at startup

 ERROR: Bundle org.apache.aries.blueprint.cm [8] Error starting

 mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.cm/1.0.1-SNAPSHOT
 (org.osgi.framework.BundleException: Unresolved constraint in
   bundle org.apache.aries.blueprint.cm [8]: Unable to resolve 8.0:
 missing requirement [8.0] osgi.wiring.package;

 ((osgi.wiring.package=org.apache.aries.blueprint)(version=1.0.0)(!(version=1.2.0

 org.osgi.framework.BundleException: Unresolved constraint in bundle
 org.apache.aries.blueprint.cm [8]: Unable to resolve 8.0: missing
 requirement [8.0] osgi.wiring.package; ((osgi.wiring.package=org.
 apache.aries.blueprint)(version=1.0.0)(!(version=1.2.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:722)

 not sure what is the artifact org.apache.aries.blueprint is from

 Thanks

 -D

 On Fri, Jan 18, 2013 at 12:14 PM, Christoph Gritschenberger
 christoph.gritschenber...@gmail.com wrote:

 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

Re: Bundle hangs at 'GracePeriod' forever waiting for wicket namespace

2013-02-08 Thread Dan Tran
it is reproducible consistently on fast box ( 8 CPU modern development
box windows or linux )

-D

On Fri, Feb 8, 2013 at 9:17 AM, Dan Tran dant...@gmail.com wrote:
 Hi Lukasz

 [ 153] [Active ] [] [   60] Wicket Util (6.2.0)
 [ 154] [Active ] [] [   60] Wicket Request (6.2.0)
 [ 155] [Active ] [] [   60] Wicket Core (6.2.0)
 [ 156] [Active ] [] [   60] Wicket Auth Roles (6.2.0)
 [ 157] [Active ] [] [   60] Wicket Extensions (6.2.0)
 [ 159] [Active ] [] [   60] OPS4J Base - All (1.4.0)
 [ 160] [Active ] [Created ] [   60] OPS4J Pax Wicket :: Service (2.0.0)
 [ 161] [Active ] [] [   60] Apache ServiceMix ::
 Bundles :: cglib (2.2.2.1)



 Any more idea?

 -D

 On Fri, Feb 8, 2013 at 1:52 AM, Łukasz Dywicki l...@code-house.org wrote:
 Hey Dan,
 I did not experience this kind of problem. Have you tried if 
 org.ops4j.pax.wicket bundle is in ACTIVE state not RESOLVED?

 Cheers,
 Lukasz

 Wiadomość napisana przez Dan Tran dant...@gmail.com w dniu 8 lut 2013, o 
 godz. 08:08:

 by default, the bundle should bail out after 5 min, but it hangs that
 state forever. Sound like blueprint bug?

 I am using karaf 2.3.0 java 1.7

 -D



Aries/JPA error to stdout at karaf 2.3.1-SNAPSHOT

2013-02-08 Thread Dan Tran
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


Bundle hangs at 'GracePeriod' forever waiting for wicket namespace

2013-02-07 Thread Dan Tran
Hello,

I am currently encounter an issue where one my UI bundle hang %50 at
'GracePeriod' and never recover at first time ever started.  here is
the log

2013-02-07 20:09:19,280 | INFO  | lixDispatchQueue |
PaxWicketBundleListener  | extender.PaxWicketBundleListener
58 | 160 - org.ops4j.pax.wicket.service - 2.1.0 | .ui.core is
added as a relevant bundle for pax wicket
   2013-02-07 20:09:19,289 | INFO  | rint Extender: 3 |
BlueprintContainerImpl   | container.BlueprintContainerImpl
294 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Bundle
.ui.core is waiting for namespace handlers
[http://www.ops4j.org/schema/wicket]


I am trying this with paxwicket-2.0 to 2.1 with same result

The work around to restart my bundle, or restart Karaf.

First I thought default start level for paxwicket and wicket is at 80,
so I create my own pax-wicket eature and lower paxwicket/wicket to 60.
Still not able to see this issue go away.

Looks like it is a bug at paxwicket?  any one seeing the same issue?

Any help is greatly appreciated

Thanks

-Dan


Re: Bundle hangs at 'GracePeriod' forever waiting for wicket namespace

2013-02-07 Thread Dan Tran
by default, the bundle should bail out after 5 min, but it hangs that
state forever. Sound like blueprint bug?

I am using karaf 2.3.0 java 1.7

-D


pax-wicket example running on karaf

2013-02-05 Thread Dan Tran
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


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

2013-02-03 Thread Dan Tran
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 dant...@gmail.com 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


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

2013-02-03 Thread Dan Tran
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é j...@nanthrax.net 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 dant...@gmail.com 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


Re: Orderly shutting down services

2013-01-18 Thread Dan Tran
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 gno...@gmail.com 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 gno...@gmail.com 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 dant...@gmail.com 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é j...@nanthrax.net
 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


Re: Orderly shutting down services

2013-01-18 Thread Dan Tran
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 dant...@gmail.com 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 gno...@gmail.com 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 gno...@gmail.com 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 dant...@gmail.com 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é j...@nanthrax.net
 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


Re: Orderly shutting down services

2013-01-18 Thread Dan Tran
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 dant...@gmail.com 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 dant...@gmail.com 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 gno...@gmail.com 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 gno...@gmail.com 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 dant...@gmail.com 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é j...@nanthrax.net
 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


Re: Orderly shutting down services

2013-01-18 Thread Dan Tran
I now have my apache karaf 2.3.1-snapshot to pickup blueprint-core
1.1.0-SNAPSHOT and blueprint-cm 1.0.1-SNAPSHOT

my karaf.bat now hangs at startup

ERROR: Bundle org.apache.aries.blueprint.cm [8] Error starting
mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.cm/1.0.1-SNAPSHOT
(org.osgi.framework.BundleException: Unresolved constraint in
 bundle org.apache.aries.blueprint.cm [8]: Unable to resolve 8.0:
missing requirement [8.0] osgi.wiring.package;
((osgi.wiring.package=org.apache.aries.blueprint)(version=1.0.0)(!(version=1.2.0

org.osgi.framework.BundleException: Unresolved constraint in bundle
org.apache.aries.blueprint.cm [8]: Unable to resolve 8.0: missing
requirement [8.0] osgi.wiring.package; ((osgi.wiring.package=org.
apache.aries.blueprint)(version=1.0.0)(!(version=1.2.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:722)

not sure what is the artifact org.apache.aries.blueprint is from

Thanks

-D

On Fri, Jan 18, 2013 at 12:14 PM, Christoph Gritschenberger
christoph.gritschenber...@gmail.com wrote:
 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 dant...@gmail.com 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 dant...@gmail.com 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 gno...@gmail.com
 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 gno...@gmail.com
 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 dant...@gmail.com wrote:


 Hi JB,

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

 what is osgi/karaf shutdown

Re: Orderly shutting down services

2013-01-18 Thread Dan Tran
also apache jenkens job for aries build also failing

https://builds.apache.org/job/AriesWithSnapshotDependencies/339/console

-D

On Fri, Jan 18, 2013 at 2:17 PM, Dan Tran dant...@gmail.com wrote:
 I now have my apache karaf 2.3.1-snapshot to pickup blueprint-core
 1.1.0-SNAPSHOT and blueprint-cm 1.0.1-SNAPSHOT

 my karaf.bat now hangs at startup

 ERROR: Bundle org.apache.aries.blueprint.cm [8] Error starting
 mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.cm/1.0.1-SNAPSHOT
 (org.osgi.framework.BundleException: Unresolved constraint in
  bundle org.apache.aries.blueprint.cm [8]: Unable to resolve 8.0:
 missing requirement [8.0] osgi.wiring.package;
 ((osgi.wiring.package=org.apache.aries.blueprint)(version=1.0.0)(!(version=1.2.0

 org.osgi.framework.BundleException: Unresolved constraint in bundle
 org.apache.aries.blueprint.cm [8]: Unable to resolve 8.0: missing
 requirement [8.0] osgi.wiring.package; ((osgi.wiring.package=org.
 apache.aries.blueprint)(version=1.0.0)(!(version=1.2.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:722)

 not sure what is the artifact org.apache.aries.blueprint is from

 Thanks

 -D

 On Fri, Jan 18, 2013 at 12:14 PM, Christoph Gritschenberger
 christoph.gritschenber...@gmail.com wrote:
 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 dant...@gmail.com 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 dant...@gmail.com 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 gno...@gmail.com
 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 gno...@gmail.com
 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

Re: Orderly shutting down services

2013-01-18 Thread Dan Tran
Thanks JB

-D

On Fri, Jan 18, 2013 at 2:19 PM, Jean-Baptiste Onofré j...@nanthrax.net wrote:
 Hi Dan,

 yes, we are working on the Aries update (to fix the Blueprint issues).

 I submitted a patch about to Aries, I gonna check if a new SNAPSHOT has been
 deployed (at Aries) including the patch.

 I keep you posted.

 Regards
 JB


 On 01/18/2013 11:17 PM, Dan Tran wrote:

 I now have my apache karaf 2.3.1-snapshot to pickup blueprint-core
 1.1.0-SNAPSHOT and blueprint-cm 1.0.1-SNAPSHOT

 my karaf.bat now hangs at startup

 ERROR: Bundle org.apache.aries.blueprint.cm [8] Error starting

 mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.cm/1.0.1-SNAPSHOT
 (org.osgi.framework.BundleException: Unresolved constraint in
   bundle org.apache.aries.blueprint.cm [8]: Unable to resolve 8.0:
 missing requirement [8.0] osgi.wiring.package;

 ((osgi.wiring.package=org.apache.aries.blueprint)(version=1.0.0)(!(version=1.2.0

 org.osgi.framework.BundleException: Unresolved constraint in bundle
 org.apache.aries.blueprint.cm [8]: Unable to resolve 8.0: missing
 requirement [8.0] osgi.wiring.package; ((osgi.wiring.package=org.
 apache.aries.blueprint)(version=1.0.0)(!(version=1.2.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:722)

 not sure what is the artifact org.apache.aries.blueprint is from

 Thanks

 -D

 On Fri, Jan 18, 2013 at 12:14 PM, Christoph Gritschenberger
 christoph.gritschenber...@gmail.com wrote:

 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 dant...@gmail.com 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 dant...@gmail.com 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 gno...@gmail.com
 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 gno...@gmail.com
 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

Karat wont start bundle with start-level 99 ??

2013-01-16 Thread Dan Tran
I just happen to change some of my bundle to start at level  100 and
the bundle get 'installed' state and would not go to 'active'. No
error found in log.  Can some one confirm?

May karaf is 2.3.0

Thanks

-Dan


Re: Karat wont start bundle with start-level 99 ??

2013-01-16 Thread Dan Tran
Yes, I am seeing 2 properties under config.properties

org.osgi.framework.startlevel.beginning=100
karaf.startlevel.bundle=80


It would be nice if those 2 are documented in the config file so that
other user may able to figure out the issue when the same problem
encounter.

May be org.osgi.framework.startlevel.beginning should start with
higher number so that karaf user would have a longer range to work
with?

Thanks

-D


On Wed, Jan 16, 2013 at 11:31 AM, Guillaume Nodet gno...@gmail.com wrote:
 That's expecte because the start level of the framework is set to 100.
 You can change that in etc/config.properties iirc.


 On Wed, Jan 16, 2013 at 8:14 PM, Dan Tran dant...@gmail.com wrote:

 I just happen to change some of my bundle to start at level  100 and
 the bundle get 'installed' state and would not go to 'active'. No
 error found in log.  Can some one confirm?

 May karaf is 2.3.0

 Thanks

 -Dan




 --
 
 Guillaume Nodet
 
 Blog: http://gnodet.blogspot.com/
 
 FuseSource, Integration everywhere
 http://fusesource.com


Re: Karat wont start bundle with start-level 99 ??

2013-01-16 Thread Dan Tran
yes i am using blueprint for all of our bundle

-D

On Wed, Jan 16, 2013 at 11:18 AM, Jean-Baptiste Onofré j...@nanthrax.net 
wrote:
 Hi Dan,

 We have an issue about Aries Blueprint in Karaf 2.3.0.

 Your bundles are blueprint bundles ?

 I saw the issue randomly with Karaf sshd and management blueprint bundles
 for instance.

 A fix has been performed in Aries, I submitted another patch to be able to
 work with Blueprint CM and the new Blueprint Core version.

 Regards
 JB


 On 01/16/2013 08:14 PM, Dan Tran wrote:

 I just happen to change some of my bundle to start at level  100 and
 the bundle get 'installed' state and would not go to 'active'. No
 error found in log.  Can some one confirm?

 May karaf is 2.3.0

 Thanks

 -Dan


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


Re: Orderly shutting down services

2013-01-16 Thread Dan Tran
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é j...@nanthrax.net 
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


Re: Karat wont start bundle with start-level 99 ??

2013-01-16 Thread Dan Tran
According to my experience the start-level is set to
'karaf.startlevel.bundle' if not specify in the feature xml file.

Also, what is the shutdown sequence, just like start up, but going
backward from org.osgi.framework.startlevel.beginning to 0?

does the shutdown ensure each start-level completely shutdown before
moving on to the next downward level? I am asking this question, is
because i am having a unordering shutdown behavior

Thanks

-Dan

On Wed, Jan 16, 2013 at 2:03 PM, Guillaume Nodet gno...@gmail.com wrote:
 The way the start level service is that when the framework boots, it goes
 from 0 to the value specified by org.osgi.framework.startlevel.beginning.
 At each level, the start level service will start bundles on that level.
 I think the default value is 1 if not otherwise specified.


 On Wed, Jan 16, 2013 at 10:57 PM, Dan Tran dant...@gmail.com wrote:

 I understand that when user does not specify the start-level of a
 bundle in the feature file, it is default to the value of
 karaf.startlevel.bundle ( which is 80)

 However, what is the purpose of
 org.osgi.framework.startlevel.beginning ??  ( max start-level allowed?
 )

 Thanks

 -Dan

 On Wed, Jan 16, 2013 at 1:49 PM, Jean-Baptiste Onofré j...@nanthrax.net
 wrote:
  To be honest, I don't remember why we increased the Karaf start level.
  Let
  me dig in the Jira/e-mails ;)
 
  Regards
  JB
 
 
  On 01/16/2013 10:47 PM, Guillaume Nodet wrote:
 
  Well, originally, it karaf.startlevel.bundle was at 50, and for some
  reasons, it kept increasing over time.
  I think 100 start levels is good enough, but we should lower from 80
  back to 50, which would give more room for users.
 
 
  On Wed, Jan 16, 2013 at 9:01 PM, Dan Tran dant...@gmail.com
  mailto:dant...@gmail.com wrote:
 
  Yes, I am seeing 2 properties under config.properties
 
  org.osgi.framework.startlevel.beginning=100
  karaf.startlevel.bundle=80
 
 
  It would be nice if those 2 are documented in the config file so
  that
  other user may able to figure out the issue when the same problem
  encounter.
 
  May be org.osgi.framework.startlevel.beginning should start with
  higher number so that karaf user would have a longer range to work
  with?
 
  Thanks
 
  -D
 
 
  On Wed, Jan 16, 2013 at 11:31 AM, Guillaume Nodet gno...@gmail.com
  mailto:gno...@gmail.com wrote:
That's expecte because the start level of the framework is set
  to
  100.
You can change that in etc/config.properties iirc.
   
   
On Wed, Jan 16, 2013 at 8:14 PM, Dan Tran dant...@gmail.com
  mailto:dant...@gmail.com wrote:
   
I just happen to change some of my bundle to start at level 
  100 and
the bundle get 'installed' state and would not go to 'active'.
  No
error found in log.  Can some one confirm?
   
May karaf is 2.3.0
   
Thanks
   
-Dan
   
   
   
   
--

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
 
 
  --
  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


Re: My Karaf PaxExam test mysteriously fails after new year

2013-01-04 Thread Dan Tran
Bug filed at https://issues.apache.org/jira/browse/KARAF-2096

-D


Re: My Karaf PaxExam test mysteriously fails after new year

2013-01-02 Thread Dan Tran
Looks like it is a bug under pax-exam 2.4, by forcing my maven build
to pickup pax-exam 2.6 via dependencyManagement fixes the issue.

My guess karaf 2.3.1-SNAPSHOT also seeing the same issue, so upgrading
to pax-exam 1.6 would fix it as well

-Dan


On Wed, Jan 2, 2013 at 7:13 PM, Dan Tran dant...@gmail.com wrote:
 Hi

 My pax-exam test started to fail with the following trace

 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 [68]: Unable to resolve
 68.0: missing requirement [68.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 [68]: Unable to resolve 68.0:
 missing requirement [68.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


 Further investigation points to a generated feature file under my exam
 directory with this name examfeatures.xml

 ?xml version=1.0 encoding=UTF-8?
 features name=pax-exam-features-2.4.0
 feature name=exam version=2.4.0

 bundle start-level='5'mvn:org.ops4j.base/ops4j-base-lang/1.3.0/bundle
 bundle start-level='5'mvn:org.ops4j.base/ops4j-base-monitors/1.3.0/bundle
 bundle start-level='5'mvn:org.ops4j.base/ops4j-base-net/1.3.0/bundle
 bundle start-level='5'mvn:org.ops4j.base/ops4j-base-store/1.3.0/bundle
 bundle start-level='5'mvn:org.ops4j.base/ops4j-base-io/1.3.0/bundle
 bundle start-level='5'mvn:org.ops4j.base/ops4j-base-spi/1.3.0/bundle
 bundle 
 start-level='5'mvn:org.ops4j.base/ops4j-base-util-property/1.3.0/bundle
 bundle start-level='5'mvn:org.ops4j.pax.swissbox/pax-swissbox-core//bundle
 bundle 
 start-level='5'mvn:org.ops4j.pax.swissbox/pax-swissbox-extender//bundle
 bundle 
 start-level='5'mvn:org.ops4j.pax.swissbox/pax-swissbox-lifecycle//bundle
 bundle 
 start-level='5'mvn:org.ops4j.pax.swissbox/pax-swissbox-framework//bundle
 bundle start-level='5'mvn:org.ops4j.pax.exam/pax-exam/2.4.0/bundle
 bundle 
 start-level='5'mvn:org.ops4j.pax.exam/pax-exam-extender-service/2.4.0/bundle
 bundle 
 start-level='5'mvn:org.ops4j.pax.exam/pax-exam-container-rbc/2.4.0/bundle
 bundle start-level='5'wrap:mvn:junit/junit/4.10/bundle
 bundle 
 start-level='5'mvn:org.ops4j.pax.exam/pax-exam-invoker-junit/2.4.0/bundle
 bundle 
 start-level='5'mvn:org.apache.karaf.tooling.exam/org.apache.karaf.tooling.exam.options/2.3.0/bundle
 bundle 
 start-level='5'mvn:org.apache.geronimo.specs/geronimo-atinject_1.0_spec/1.0/bundle
 bundle start-level='5'mvn:org.ops4j.pax.exam/pax-exam-inject/2.4.0/bundle
 /feature
 /features


 Where pax-swissbox-xxx bundles do not have associated version, by
 default it would pickup the latest version 1.6 ( release on
 12/26/2012), instead of 1.5.1 and cause the failure

 How do I fix this?  Adding those artifact into my test dependencies
 does not work either

 Thanks

 -Dan


Re: Karaf shell command argument with space

2012-12-06 Thread Dan Tran
I did try 'ListString option, but running into another isue where

  my:command this is single arg with space and quotes

Karaf takes out my quotes

I can escape the quote, but then the usage becomes more complicated

Thanks

-Dan

PS fully understanding that dealing space quote are complicated and
tedious stuff


On Thu, Dec 6, 2012 at 12:18 AM, Guillaume Nodet gno...@gmail.com wrote:
 Well, depending on your needs, one possible work around is to
 define the command as accepting a single argument with the
 multiple flag consisting of a ListString.
 You then have to rebuild the single argument from the string list.
 However, you'll loose multiple whitespaces between words.


 On Thu, Dec 6, 2012 at 9:02 AM, Dan Tran dant...@gmail.com wrote:

 Hi

 I would like to create a karaf command that can have a single argument
 with space like

 my:command this is my single argument with spaces

 karaf turns it into

my:command this

 The work around is

 my: command 'this is my single argument with spaces'

 Would it possible to to do this without surrounding single quotes?


 Huge thanks ahead

 -Dan




 --
 
 Guillaume Nodet
 
 Blog: http://gnodet.blogspot.com/
 
 FuseSource, Integration everywhere
 http://fusesource.com


Re: Karaf shell command argument with space

2012-12-06 Thread Dan Tran
I did try 'ListString option, but running into another isue where

  my:command this is single arg with space

Karaf takes out my quotes

fully understand dealing space quote are complicated

On Thu, Dec 6, 2012 at 12:18 AM, Guillaume Nodet gno...@gmail.com wrote:
 Well, depending on your needs, one possible work around is to
 define the command as accepting a single argument with the
 multiple flag consisting of a ListString.
 You then have to rebuild the single argument from the string list.
 However, you'll loose multiple whitespaces between words.


 On Thu, Dec 6, 2012 at 9:02 AM, Dan Tran dant...@gmail.com wrote:

 Hi

 I would like to create a karaf command that can have a single argument
 with space like

 my:command this is my single argument with spaces

 karaf turns it into

my:command this

 The work around is

 my: command 'this is my single argument with spaces'

 Would it possible to to do this without surrounding single quotes?


 Huge thanks ahead

 -Dan




 --
 
 Guillaume Nodet
 
 Blog: http://gnodet.blogspot.com/
 
 FuseSource, Integration everywhere
 http://fusesource.com


Re: How to configure karaf shell session timeout - longer?

2012-12-04 Thread Dan Tran
I went ahead with jira creation

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

Thanks

-D

On Tue, Dec 4, 2012 at 12:04 AM, Jean-Baptiste Onofré j...@nanthrax.net wrote:
 Hi Dan,

 It could be interesting to expose it in etc/org.apache.karaf.shell.cfg. I
 will create the corresponding Jira.

 Regards
 JB


 On 12/04/2012 07:16 AM, Dan Tran wrote:

 ping again to get some attention :-)

 -D

 On Mon, Dec 3, 2012 at 12:09 AM, Dan Tran dant...@gmail.com wrote:

 looks like sshd mina does support this configuration, but it just not
 exposed at karaf ??

 https://issues.apache.org/jira/browse/SSHD-140

 -D

 On Sun, Dec 2, 2012 at 5:17 PM, Dan Tran dant...@gmail.com wrote:

 Hi

 Karah shell terminates session every 5 idle minute. and no hint of
 available configuration under etc directory either.

 I am using kara 2.3.0

 Thanks

 -D


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


Re: How to configure karaf shell session timeout - longer?

2012-12-03 Thread Dan Tran
looks like sshd mina does support this configuration, but it just not
exposed at karaf ??

https://issues.apache.org/jira/browse/SSHD-140

-D

On Sun, Dec 2, 2012 at 5:17 PM, Dan Tran dant...@gmail.com wrote:
 Hi

 Karah shell terminates session every 5 idle minute. and no hint of
 available configuration under etc directory either.

 I am using kara 2.3.0

 Thanks

 -D


Re: How to configure karaf shell session timeout - longer?

2012-12-03 Thread Dan Tran
ping again to get some attention :-)

-D

On Mon, Dec 3, 2012 at 12:09 AM, Dan Tran dant...@gmail.com wrote:
 looks like sshd mina does support this configuration, but it just not
 exposed at karaf ??

 https://issues.apache.org/jira/browse/SSHD-140

 -D

 On Sun, Dec 2, 2012 at 5:17 PM, Dan Tran dant...@gmail.com wrote:
 Hi

 Karah shell terminates session every 5 idle minute. and no hint of
 available configuration under etc directory either.

 I am using kara 2.3.0

 Thanks

 -D


How to configure karaf shell session timeout - longer?

2012-12-02 Thread Dan Tran
Hi

Karah shell terminates session every 5 idle minute. and no hint of
available configuration under etc directory either.

I am using kara 2.3.0

Thanks

-D


Re: Intercepting Karaf's CommandSession.close()??

2012-11-28 Thread Dan Tran
ping, to make sure it get attention :-)

Thanks

-D

On Sun, Nov 25, 2012 at 2:04 PM, Dan Tran dant...@gmail.com wrote:
 Hi

 One of our custom karaf command shell stores its resource under Karaf
 CommandSession for sharing purpose.  When user logging off the shell,
 I would like to an opportunity to clean up my resource. is it possible
 to intercept?

 Big Thanks

 -Dan


Intercepting Karaf's CommandSession.close()??

2012-11-25 Thread Dan Tran
Hi

One of our custom karaf command shell stores its resource under Karaf
CommandSession for sharing purpose.  When user logging off the shell,
I would like to an opportunity to clean up my resource. is it possible
to intercept?

Big Thanks

-Dan


Re: webonline help as a paxwick-osgi bundle

2012-11-16 Thread Dan Tran
Hi Andreas,

Exactly, you have summarized what I am try to convey.  Basically, I
would like pax-wicket to serve my static contents which are in a
bundle/jar.

is it possible?

-Dan


On Fri, Nov 16, 2012 at 4:31 AM, Andreas Pieber anpie...@gmail.com wrote:
 Hey Dan,

 What exactly do you want pax-wicket to do here? Provide static
 content? Or is all you want to do providing static content? Or do I
 completely miss the point?

 Kind regards,
 Andreas

 On Thu, Nov 8, 2012 at 12:32 AM, Dan Tran dant...@gmail.com wrote:
 I have webhelp content in a jar file.  I like to covert it to a
 paxwicket's osgi bundle  so that when user clicks on my help button,
 it will navigate to our bundle's index.html as a external window. Is
 it possible?

 Thanks

 -D


Re: webonline help as a paxwick-osgi bundle

2012-11-16 Thread Dan Tran
not sure it helps by looking at the code involved.  All I want  is to
have pax-wicket picking up my initial index.html as the starting point
and form there on every thing is like a static content

-D

On Fri, Nov 16, 2012 at 9:16 AM, Andreas Pieber anpie...@gmail.com wrote:
 OK, basically all you have to do is to mount static resources [1].

 Is this what you're looking for?

 Kind regards,
 Andreas

 [1] http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/

 On Fri, Nov 16, 2012 at 6:07 PM, Dan Tran dant...@gmail.com wrote:
 Hi Andreas,

 Exactly, you have summarized what I am try to convey.  Basically, I
 would like pax-wicket to serve my static contents which are in a
 bundle/jar.

 is it possible?

 -Dan


 On Fri, Nov 16, 2012 at 4:31 AM, Andreas Pieber anpie...@gmail.com wrote:
 Hey Dan,

 What exactly do you want pax-wicket to do here? Provide static
 content? Or is all you want to do providing static content? Or do I
 completely miss the point?

 Kind regards,
 Andreas

 On Thu, Nov 8, 2012 at 12:32 AM, Dan Tran dant...@gmail.com wrote:
 I have webhelp content in a jar file.  I like to covert it to a
 paxwicket's osgi bundle  so that when user clicks on my help button,
 it will navigate to our bundle's index.html as a external window. Is
 it possible?

 Thanks

 -D


Re: webonline help as a paxwick-osgi bundle

2012-11-09 Thread Dan Tran
ended up to create a bundle with WEB-INF signature according to this link

http://wiki.eclipse.org/Jetty/Tutorial/Jetty-OSGi_SDK

and activate it with 'war' feature.

I was hoping i can tap into the existing pax-wicket so that I dont
need to install war feature

-Dan

On Wed, Nov 7, 2012 at 3:32 PM, Dan Tran dant...@gmail.com wrote:
 I have webhelp content in a jar file.  I like to covert it to a
 paxwicket's osgi bundle  so that when user clicks on my help button,
 it will navigate to our bundle's index.html as a external window. Is
 it possible?

 Thanks

 -D


webonline help as a paxwick-osgi bundle

2012-11-07 Thread Dan Tran
I have webhelp content in a jar file.  I like to covert it to a
paxwicket's osgi bundle  so that when user clicks on my help button,
it will navigate to our bundle's index.html as a external window. Is
it possible?

Thanks

-D


Re: How to inject a list of beans into blueprint component??

2012-11-04 Thread Dan Tran
been there many time,

and it only show value list

list
   value123/value
   value type=”java.math.BigInteger”456/value
   null/
   set value-type=”java.lang.Integer”
   value1/value
   value2/value
   /set
   /list


Thanks for suggestion

-D

On Sun, Nov 4, 2012 at 11:05 AM, dealbitte anand.boc...@gmail.com wrote:

 Take a look at the examples in the tutorial below. It helped me a lot to
 configure dependency injection via blueprint
 http://www.ibm.com/developerworks/opensource/library/os-osgiblueprint/index.html


 regards



 --
 View this message in context: 
 http://karaf.922171.n3.nabble.com/How-to-inject-a-list-of-beans-into-blueprint-component-tp4026671p4026672.html
 Sent from the Karaf - User mailing list archive at Nabble.com.


Re: How to inject a list of beans into blueprint component??

2012-11-04 Thread Dan Tran
Thanks for the hints

the working syntax is

list
  ref component-id=bean-1/
  ref component-id=bean-2/
  
/list


-D

On Sun, Nov 4, 2012 at 2:23 PM, Ansgar Konermann
ansgar.konerm...@googlemail.com wrote:
 Search for

 ref component-id=”accountOne”/ on that website.

 What else do you need?

 Am 04.11.2012 20:24 schrieb Dan Tran dant...@gmail.com:

 been there many time,

 and it only show value list

 list
value123/value
value type=”java.math.BigInteger”456/value
null/
set value-type=”java.lang.Integer”
value1/value
value2/value
/set
/list


 Thanks for suggestion

 -D

 On Sun, Nov 4, 2012 at 11:05 AM, dealbitte anand.boc...@gmail.com wrote:
 
  Take a look at the examples in the tutorial below. It helped me a lot to
  configure dependency injection via blueprint
 
  http://www.ibm.com/developerworks/opensource/library/os-osgiblueprint/index.html
 
 
  regards
 
 
 
  --
  View this message in context:
  http://karaf.922171.n3.nabble.com/How-to-inject-a-list-of-beans-into-blueprint-component-tp4026671p4026672.html
  Sent from the Karaf - User mailing list archive at Nabble.com.


Re: Does maven-bundle-plugin merge its 'instructions' settings?

2012-10-30 Thread Dan Tran
sorry, i meant maven-bundle-plugin.  and your answer is exactly what I
am looking for

big thanks

-Dan

On Mon, Oct 29, 2012 at 11:13 PM, Andreas Pieber anpie...@gmail.com wrote:
 Hey Dan,

 Do you really mean the maven-plugin-plugin or the maven-bundle-plugin (as  I
 assume since you referenced the Felix group).

 In case you mean the maven-bundle-plugin it depends which properties you
 mean. AFAIK different properties are merged, same properties are merged.
 E.g. if you define a package-export and bundle-import in the parent, but
 package-import and package-export in the client, the bundle-import will be
 taken from the parent, package-import and export from the child.

 Hope this helps.

 Kind regards,
 Andreas

 On Tue, Oct 30, 2012 at 6:26 AM, Dan Tran dant...@gmail.com wrote:

 Hi,

 This question should go to felix group, but I think we have experts
 here who many be able to help me with this question

 Currently I have maven-plugin-plugin configure at the parent pom
 outside of my projects.

 once a while I need to override the 'instructions' settings from sub
 project. The question here should I just add/set the 'changed' portion
 and assume maven-bundle-plugin would merge the 'changed' portion to
 the one already defined at my parent pom?

 Thanks

 -Dan




Re: [ANN] Apache Karaf 2.3.0 released!

2012-10-16 Thread Dan Tran
it is working now.

Sorry about the noise

-D

On Mon, Oct 15, 2012 at 9:03 PM, Dan Tran dant...@gmail.com wrote:
 I tried other jars, they are downloadable, exception the one I reported

 -D

 On Mon, Oct 15, 2012 at 9:02 PM, Dan Tran dant...@gmail.com wrote:
 I got http code 404

 -D



 On Mon, Oct 15, 2012 at 8:57 PM, Freeman Fang freeman.f...@gmail.com wrote:
 I can download it here.
 Please give another try, :-)
 -
 Freeman(Yue) Fang

 Red Hat, Inc.
 FuseSource is now part of Red Hat
 Web: http://fusesource.com | http://www.redhat.com/
 Twitter: freemanfang
 Blog: http://freemanfang.blogspot.com
 http://blog.sina.com.cn/u/1473905042
 weibo: http://weibo.com/u/1473905042

 On 2012-10-16, at 上午11:51, Dan Tran wrote:

 I am not able to pull down
 http://central.maven.org/maven2/org/apache/karaf/shell/org.apache.karaf.shell.console/2.3.0/org.apache.karaf.shell.console-2.3.0.jar

 can someone confirm?

 Thanks

 -D

 On Mon, Oct 15, 2012 at 6:05 PM, Jamie G. jamie.goody...@gmail.com wrote:

 The Karaf team is pleased to announce the release of Karaf version 2.3.0.


 Apache Karaf is a small OSGi distribution which provides a ready to

 use container for server side applications.


 This release of Apache Karaf sets the stage for the 3.0.x line,

 introducing OSGi rev 4.3 support, new commands, features,

 improvements, and a multitude of dependency updates. At Karaf's core

 you'll find Equinox 3.8.0.v20120529-1548 and Apache Felix framework

 4.0.3. New additions such as Karaf-pax-exam, commands back ported from

 Karaf 3.x, and command aliases to help make migrating between 2.3.x

 and 3.x easier.


 http://karaf.apache.org/


 This release is available from

 http://karaf.apache.org/index/community/download.html#Karaf2.3.0 and

 Maven:


 dependency

 groupIdorg.apache.karaf/groupId

 artifactIdapache-karaf/artifactId

 version2.3.0/version

 /dependency


 Release Notes:


 There are 220 resolved issues included in this release, as such we've

 documented them on the 2.3.0 release notes page:

 http://karaf.apache.org/index/community/download/karaf-2.3.0-release.html


 Enjoy!




Karaf-PaxExam - Option to setup environment variable

2012-10-15 Thread Dan Tran
Hi

My app has a need for additional references to native shared
libraries.  Is there option to do so ( ie setup PATH on windows and
LD_LIBRARY_PATH on linux )?

I dont see this kind of option under karaf 2.3.0/toolings/exam project.

Thanks

-Dan


Re: Possible to point karaf-pax-exam to a existing unpacked karaf installation

2012-10-15 Thread Dan Tran
Hi Andreas

Could you point me to the '2 already supported'? that would give some
hint how to implement the 'alreadyUnpack' one.

Or you can cook up the new option, i can test it right away :-)

Thanks

-D

On Fri, Oct 5, 2012 at 1:09 PM, Andreas Pieber anpie...@gmail.com wrote:
 Right now it's not really possible. But it shouldn't be too hard to add a
 new distribution provider simular to the two already supported. So, while I
 personally don't need it I think it's a good idea.

 Kind regards,
 Andreas

 On Oct 5, 2012 9:33 AM, Jean-Baptiste Onofré j...@nanthrax.net wrote:

 Hi Dan,

 it's not possible easily (you have to use
 KarafDistributionBaseConfigurationOption.unpackDirectory manually, etc) but
 I think it's a good addition.

 We can add an option like UseExistingKaraf().setLocation(...)

 for instance.

 Regards
 JB

 On 10/05/2012 09:14 AM, Dan Tran wrote:

 Hi

 I am able to run simple pax-exam test with a given karaf archive using
 maven coordinate. Is there a option to use an existing karaf directory
   ( ie already unpack )??

 Thanks

 -D


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


Re: Karaf-PaxExam - Option to setup environment variable

2012-10-15 Thread Dan Tran
setup env using surefire does the trick.

-D

On Sun, Oct 14, 2012 at 11:21 PM, Dan Tran dant...@gmail.com wrote:
 Hi

 My app has a need for additional references to native shared
 libraries.  Is there option to do so ( ie setup PATH on windows and
 LD_LIBRARY_PATH on linux )?

 I dont see this kind of option under karaf 2.3.0/toolings/exam project.

 Thanks

 -Dan


Re: [ANN] Apache Karaf 2.3.0 released!

2012-10-15 Thread Dan Tran
I am not able to pull down
http://central.maven.org/maven2/org/apache/karaf/shell/org.apache.karaf.shell.console/2.3.0/org.apache.karaf.shell.console-2.3.0.jar

can someone confirm?

Thanks

-D

On Mon, Oct 15, 2012 at 6:05 PM, Jamie G. jamie.goody...@gmail.com wrote:
 The Karaf team is pleased to announce the release of Karaf version 2.3.0.

 Apache Karaf is a small OSGi distribution which provides a ready to
 use container for server side applications.

 This release of Apache Karaf sets the stage for the 3.0.x line,
 introducing OSGi rev 4.3 support, new commands, features,
 improvements, and a multitude of dependency updates. At Karaf's core
 you'll find Equinox 3.8.0.v20120529-1548 and Apache Felix framework
 4.0.3. New additions such as Karaf-pax-exam, commands back ported from
 Karaf 3.x, and command aliases to help make migrating between 2.3.x
 and 3.x easier.

 http://karaf.apache.org/

 This release is available from
 http://karaf.apache.org/index/community/download.html#Karaf2.3.0 and
 Maven:

  dependency
  groupIdorg.apache.karaf/groupId
  artifactIdapache-karaf/artifactId
  version2.3.0/version
  /dependency

 Release Notes:

 There are 220 resolved issues included in this release, as such we've
 documented them on the 2.3.0 release notes page:
 http://karaf.apache.org/index/community/download/karaf-2.3.0-release.html

 Enjoy!


Re: [ANN] Apache Karaf 2.3.0 released!

2012-10-15 Thread Dan Tran
I got http code 404

-D



On Mon, Oct 15, 2012 at 8:57 PM, Freeman Fang freeman.f...@gmail.com wrote:
 I can download it here.
 Please give another try, :-)
 -
 Freeman(Yue) Fang

 Red Hat, Inc.
 FuseSource is now part of Red Hat
 Web: http://fusesource.com | http://www.redhat.com/
 Twitter: freemanfang
 Blog: http://freemanfang.blogspot.com
 http://blog.sina.com.cn/u/1473905042
 weibo: http://weibo.com/u/1473905042

 On 2012-10-16, at 上午11:51, Dan Tran wrote:

 I am not able to pull down
 http://central.maven.org/maven2/org/apache/karaf/shell/org.apache.karaf.shell.console/2.3.0/org.apache.karaf.shell.console-2.3.0.jar

 can someone confirm?

 Thanks

 -D

 On Mon, Oct 15, 2012 at 6:05 PM, Jamie G. jamie.goody...@gmail.com wrote:

 The Karaf team is pleased to announce the release of Karaf version 2.3.0.


 Apache Karaf is a small OSGi distribution which provides a ready to

 use container for server side applications.


 This release of Apache Karaf sets the stage for the 3.0.x line,

 introducing OSGi rev 4.3 support, new commands, features,

 improvements, and a multitude of dependency updates. At Karaf's core

 you'll find Equinox 3.8.0.v20120529-1548 and Apache Felix framework

 4.0.3. New additions such as Karaf-pax-exam, commands back ported from

 Karaf 3.x, and command aliases to help make migrating between 2.3.x

 and 3.x easier.


 http://karaf.apache.org/


 This release is available from

 http://karaf.apache.org/index/community/download.html#Karaf2.3.0 and

 Maven:


 dependency

 groupIdorg.apache.karaf/groupId

 artifactIdapache-karaf/artifactId

 version2.3.0/version

 /dependency


 Release Notes:


 There are 220 resolved issues included in this release, as such we've

 documented them on the 2.3.0 release notes page:

 http://karaf.apache.org/index/community/download/karaf-2.3.0-release.html


 Enjoy!




Re: [ANN] Apache Karaf 2.3.0 released!

2012-10-15 Thread Dan Tran
I tried other jars, they are downloadable, exception the one I reported

-D

On Mon, Oct 15, 2012 at 9:02 PM, Dan Tran dant...@gmail.com wrote:
 I got http code 404

 -D



 On Mon, Oct 15, 2012 at 8:57 PM, Freeman Fang freeman.f...@gmail.com wrote:
 I can download it here.
 Please give another try, :-)
 -
 Freeman(Yue) Fang

 Red Hat, Inc.
 FuseSource is now part of Red Hat
 Web: http://fusesource.com | http://www.redhat.com/
 Twitter: freemanfang
 Blog: http://freemanfang.blogspot.com
 http://blog.sina.com.cn/u/1473905042
 weibo: http://weibo.com/u/1473905042

 On 2012-10-16, at 上午11:51, Dan Tran wrote:

 I am not able to pull down
 http://central.maven.org/maven2/org/apache/karaf/shell/org.apache.karaf.shell.console/2.3.0/org.apache.karaf.shell.console-2.3.0.jar

 can someone confirm?

 Thanks

 -D

 On Mon, Oct 15, 2012 at 6:05 PM, Jamie G. jamie.goody...@gmail.com wrote:

 The Karaf team is pleased to announce the release of Karaf version 2.3.0.


 Apache Karaf is a small OSGi distribution which provides a ready to

 use container for server side applications.


 This release of Apache Karaf sets the stage for the 3.0.x line,

 introducing OSGi rev 4.3 support, new commands, features,

 improvements, and a multitude of dependency updates. At Karaf's core

 you'll find Equinox 3.8.0.v20120529-1548 and Apache Felix framework

 4.0.3. New additions such as Karaf-pax-exam, commands back ported from

 Karaf 3.x, and command aliases to help make migrating between 2.3.x

 and 3.x easier.


 http://karaf.apache.org/


 This release is available from

 http://karaf.apache.org/index/community/download.html#Karaf2.3.0 and

 Maven:


 dependency

 groupIdorg.apache.karaf/groupId

 artifactIdapache-karaf/artifactId

 version2.3.0/version

 /dependency


 Release Notes:


 There are 220 resolved issues included in this release, as such we've

 documented them on the 2.3.0 release notes page:

 http://karaf.apache.org/index/community/download/karaf-2.3.0-release.html


 Enjoy!




Possible to point karaf-pax-exam to a existing unpacked karaf installation

2012-10-05 Thread Dan Tran
Hi

I am able to run simple pax-exam test with a given karaf archive using
maven coordinate. Is there a option to use an existing karaf directory
 ( ie already unpack )??

Thanks

-D


Re: Possible to point karaf-pax-exam to a existing unpacked karaf installation

2012-10-05 Thread Dan Tran
I filed a enhancement at https://issues.apache.org/jira/browse/KARAF-1902

Thanks

-D

On Fri, Oct 5, 2012 at 12:32 AM, Jean-Baptiste Onofré j...@nanthrax.net wrote:
 Hi Dan,

 it's not possible easily (you have to use
 KarafDistributionBaseConfigurationOption.unpackDirectory manually, etc) but
 I think it's a good addition.

 We can add an option like UseExistingKaraf().setLocation(...)

 for instance.

 Regards
 JB


 On 10/05/2012 09:14 AM, Dan Tran wrote:

 Hi

 I am able to run simple pax-exam test with a given karaf archive using
 maven coordinate. Is there a option to use an existing karaf directory
   ( ie already unpack )??

 Thanks

 -D


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


jni/native karaf

2012-09-28 Thread Dan Tran
Hello,

I know there is a right to package jni bundle together with associated
bits ( I can see jansi as a good example )

For prototyping purpose, can just create a java jni only bundle and
place the native files in the path ? ie ( on windows use PATH env ,
for Linux us LD_LIBRARY_PATH )

Big thanks for any suggestion.

-Dan


Re: Multiple JPA bundles under karaf whe the same base module, possible?

2012-09-27 Thread Dan Tran
See my comments inline

On Wed, Sep 26, 2012 at 10:05 PM, Brian Topping topp...@codehaus.org wrote:
 Dan, I went through a lot of this recently with OpenJPA.  YMMV with other 
 providers.

Brian, thank you for sharing this experience, it is surely settle our
headache a bit!!


 1. OpenJPA doesn't seem to manage very well with base classes across bundle 
 boundaries.  It looked like there needed to be more magic in place that it 
 could deal with not being able to enhance or otherwise modify the superclass 
 jar due to classloader isolation.  I did set up build time enhancement but it 
 didn't seem to be enough and I forgot where I was in the code that it was a 
 problem.  One solution to this *may* be to use fragment hosts.  For now, 
 we've just duplicated the base classes across the persistence bundles, 
 kicking the can down the road a bit.


This would mean all your duplicate base classes have their own java
package to prevent collision?

 2. I have been successful in having multiple persistence units in the same 
 Karaf runtime and sharing a single data source, but the PUs do need to be 
 named differently.  We have noticed some race conditions that occur, turning 
 on JPA logging seems to bury them a little deeper, and we haven't had time to 
 explore what's going on so we can report it.

This is worry some. Are you able to bring your JPA into production
with this issue?


 3. One of the issues with multiple PUs is you need to set them up with 
 different names for the sequence tables under DBs like Postgres and Oracle.  
 This can be done statically from persistence.xml.

 I'm very interested in resolutions to these issues and would like to 
 contribute to them, but have been under a lot of pressure with client 
 deadlines.  I wonder if others have seen any of these issues yet and can 
 offer any better advice than this.

 Cheers, B

Thanks

-D



 On Sep 26, 2012, at 9:01 PM, Dan Tran dant...@gmail.com wrote:

 Hi,

 I am porting a set of JPA moduels under spring to Karaf JPA where I
 have i module which contains abstract entity classes, and a couple of
 other JPA modules use the 'base module', is it possible under
 jpa/openjpa/derby??

 I am struggling on what do do with the base module since it has no
 entities, what the persistent.xml looks like, should it has its own
 persistent unit?

 Can all three modules use the same persistent unit name?

 any suggestion is greatly appreciated.

 thanks

 -D



Re: Multiple JPA bundles under karaf whe the same base module, possible?

2012-09-27 Thread Dan Tran
Brian

What karaf version are you using?

Thanks

-D

On Wed, Sep 26, 2012 at 11:37 PM, Dan Tran dant...@gmail.com wrote:
 See my comments inline

 On Wed, Sep 26, 2012 at 10:05 PM, Brian Topping topp...@codehaus.org wrote:
 Dan, I went through a lot of this recently with OpenJPA.  YMMV with other 
 providers.

 Brian, thank you for sharing this experience, it is surely settle our
 headache a bit!!


 1. OpenJPA doesn't seem to manage very well with base classes across bundle 
 boundaries.  It looked like there needed to be more magic in place that it 
 could deal with not being able to enhance or otherwise modify the superclass 
 jar due to classloader isolation.  I did set up build time enhancement but 
 it didn't seem to be enough and I forgot where I was in the code that it was 
 a problem.  One solution to this *may* be to use fragment hosts.  For now, 
 we've just duplicated the base classes across the persistence bundles, 
 kicking the can down the road a bit.


 This would mean all your duplicate base classes have their own java
 package to prevent collision?

 2. I have been successful in having multiple persistence units in the same 
 Karaf runtime and sharing a single data source, but the PUs do need to be 
 named differently.  We have noticed some race conditions that occur, turning 
 on JPA logging seems to bury them a little deeper, and we haven't had time 
 to explore what's going on so we can report it.

 This is worry some. Are you able to bring your JPA into production
 with this issue?


 3. One of the issues with multiple PUs is you need to set them up with 
 different names for the sequence tables under DBs like Postgres and Oracle.  
 This can be done statically from persistence.xml.

 I'm very interested in resolutions to these issues and would like to 
 contribute to them, but have been under a lot of pressure with client 
 deadlines.  I wonder if others have seen any of these issues yet and can 
 offer any better advice than this.

 Cheers, B

 Thanks

 -D



 On Sep 26, 2012, at 9:01 PM, Dan Tran dant...@gmail.com wrote:

 Hi,

 I am porting a set of JPA moduels under spring to Karaf JPA where I
 have i module which contains abstract entity classes, and a couple of
 other JPA modules use the 'base module', is it possible under
 jpa/openjpa/derby??

 I am struggling on what do do with the base module since it has no
 entities, what the persistent.xml looks like, should it has its own
 persistent unit?

 Can all three modules use the same persistent unit name?

 any suggestion is greatly appreciated.

 thanks

 -D



Multiple JPA bundles under karaf whe the same base module, possible?

2012-09-26 Thread Dan Tran
Hi,

I am porting a set of JPA moduels under spring to Karaf JPA where I
have i module which contains abstract entity classes, and a couple of
other JPA modules use the 'base module', is it possible under
jpa/openjpa/derby??

I am struggling on what do do with the base module since it has no
entities, what the persistent.xml looks like, should it has its own
persistent unit?

Can all three modules use the same persistent unit name?

any suggestion is greatly appreciated.

thanks

-D


Re: pax-wicket for wicket 6.0

2012-09-25 Thread Dan Tran
We are still early phase of wicket adoption, did some prototype on
pure wicket app. Will start wicket under osgi soon and give pax-wicket
2.0 a shot

-D

On Mon, Sep 24, 2012 at 10:31 PM, Andreas Pieber anpie...@gmail.com wrote:
 As said, pax wicket 2.0.0 is already read; build the master locally; I
 just want to get some additional feedback before releasing

 Kind regards,
 Andreas

 On Tue, Sep 25, 2012 at 6:18 AM, Dan Tran dant...@gmail.com wrote:
 will do, when ever pax wicket 2.0 is ready

 -D

 On Mon, Sep 24, 2012 at 9:07 PM, Andreas Pieber anpie...@gmail.com wrote:
 Well, actually good that you ask. Pax wicket trunk is already wickets ready
 and the changes for wicket Web console shouldn't be more than some name
 space adaptions. So once checked Web console I can cut pax wicket 2.0.0 and
 we're good to go. Would you like to give it a shot? :-)

 Kind regards Andreas

 On Sep 24, 2012 10:40 PM, Dan Tran dant...@gmail.com wrote:

 May be this way too early to ask, but I am asking for any way. :-)

 Do we have a timeframe where karaf team would like to support wicket 6.0?

 Thanks

 -D


pax-wicket for wicket 6.0

2012-09-24 Thread Dan Tran
May be this way too early to ask, but I am asking for any way. :-)

Do we have a timeframe where karaf team would like to support wicket 6.0?

Thanks

-D


Re: pax-wicket for wicket 6.0

2012-09-24 Thread Dan Tran
will do, when ever pax wicket 2.0 is ready

-D

On Mon, Sep 24, 2012 at 9:07 PM, Andreas Pieber anpie...@gmail.com wrote:
 Well, actually good that you ask. Pax wicket trunk is already wickets ready
 and the changes for wicket Web console shouldn't be more than some name
 space adaptions. So once checked Web console I can cut pax wicket 2.0.0 and
 we're good to go. Would you like to give it a shot? :-)

 Kind regards Andreas

 On Sep 24, 2012 10:40 PM, Dan Tran dant...@gmail.com wrote:

 May be this way too early to ask, but I am asking for any way. :-)

 Do we have a timeframe where karaf team would like to support wicket 6.0?

 Thanks

 -D


Re: Unable to install webconsole under karaf-2.2.9

2012-08-25 Thread Dan Tran
If you have a work around to get webconsole-wicket to work on 2.2.9,
please let me know.

Thanks

-D

On Fri, Aug 24, 2012 at 9:56 PM, Łukasz Dywicki l...@code-house.org wrote:
 Dan,
 Thanks for testing. I checked 2.2.9 with webconsole-wicket indtallation and 
 it worked well. Will take a lok on yor issue.

 Łukasz Dywicki
 --
 Code-House
 http://code-house.org

 Dnia 25 sie 2012 o godz. 06:26 Dan Tran dant...@gmail.com napisał(a):

 feature:install webconsole and webconsole-wicket work for full pack.
 So I guess this is a bug. I also try 2.2.7, 2.2.8 as well

 Will create a JIRA for this

 -Dan

 On Fri, Aug 24, 2012 at 8:56 PM, Dan Tran dant...@gmail.com wrote:
 Hi this is the first time I try the webconsole feature under karaf
 minimal package

 and run into this issue, is it a bug?  I can see same error on both
 linux and windows

 I also try to build webconsole-wicket and install according source
 tree's readme, and ran into the same issue.  Looks like a regression
 for 2.2.9??

 Could someone confirm?

 Thanks


 -Dan

 karaf@root feature:install -v webconsole
 Installing feature webconsole 2.2.9
 Installing feature webconsole-base 2.2.9
 Installing feature http 2.2.9
 Installing feature jetty 7.5.4.v20111024
 Installing bundle
 mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1/2.0.0
 Installing bundle 
 mvn:org.apache.geronimo.specs/geronimo-servlet_2.5_spec/1.1.2
 Installing bundle mvn:javax.mail/mail/1.4.5
 Installing bundle mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
 Installing bundle mvn:org.eclipse.jetty/jetty-util/7.5.4.v20111024
 Installing bundle mvn:org.eclipse.jetty/jetty-io/7.5.4.v20111024
 Installing bundle mvn:org.eclipse.jetty/jetty-http/7.5.4.v20111024
 Installing bundle mvn:org.eclipse.jetty/jetty-client/7.5.4.v20111024
 Installing bundle mvn:org.eclipse.jetty/jetty-continuation/7.5.4.v20111024
 Installing bundle mvn:org.eclipse.jetty/jetty-jmx/7.5.4.v20111024
 Installing bundle mvn:org.eclipse.jetty/jetty-server/7.5.4.v20111024
 Installing bundle mvn:org.eclipse.jetty/jetty-security/7.5.4.v20111024
 Installing bundle mvn:org.eclipse.jetty/jetty-servlet/7.5.4.v20111024
 Installing bundle mvn:org.eclipse.jetty/jetty-servlets/7.5.4.v20111024
 Installing bundle mvn:org.eclipse.jetty/jetty-xml/7.5.4.v20111024
 Installing bundle mvn:org.eclipse.jetty/jetty-webapp/7.5.4.v20111024
 Installing bundle mvn:org.eclipse.jetty/jetty-jndi/7.5.4.v20111024
 Installing bundle mvn:org.eclipse.jetty/jetty-plus/7.5.4.v20111024
 Installing bundle mvn:org.eclipse.jetty/jetty-websocket/7.5.4.v20111024
 Checking configuration file
 mvn:org.apache.karaf/apache-karaf/2.2.9/xml/jettyconfig
 Installing bundle mvn:org.ops4j.pax.web/pax-web-api/1.0.11
 Installing bundle mvn:org.ops4j.pax.web/pax-web-spi/1.0.11
 Installing bundle mvn:org.ops4j.pax.web/pax-web-runtime/1.0.11
 Installing bundle mvn:org.ops4j.pax.web/pax-web-jetty/1.0.11
 Installing bundle mvn:org.apache.felix/org.apache.felix.metatype/1.0.4
 Installing bundle
 mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.branding/2.2.9
 Installing bundle
 mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.console/2.2.9
 Installing bundle
 mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.admin/2.2.9
 Installing bundle
 mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.features/2.2.9
 Installing bundle
 mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.gogo/2.2.9
 Installing bundle
 mvn:org.apache.felix/org.apache.felix.webconsole.plugins.event/1.0.2
 Error executing command: Could not start bundle
 mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.admin/2.2.9
 in feature(s) webconsole-2.2.9: Unresolved constraint in bundle
 org.apache.karaf
 .webconsole.admin [60]: Unable to resolve 60.0: missing requirement
 [60.0] package;
 ((package=org.apache.karaf.admin)(version=2.2.0)(!(version=3.0.0)))
 karaf@root


Re: Karaf WebConsole development environment

2012-08-19 Thread Dan Tran
Thanks Lukasz

Not that bad. I feel much better now.

-D

On Sun, Aug 19, 2012 at 3:35 AM, Łukasz Dywicki l...@code-house.org wrote:
 You are almost there.
 1. Build and install bundle by hand first time, then configure dev:watch 
 bundle-id
 2. Write code in editor.
 3. Execute maven install in IDE - using m2e in eclipse or any other way to 
 cause update.
 4. Navigate to browser and check if everyting is ok.

 Number of manual operation is really small in comparision to usage of WTP. 
 With dev:watch maven install works as Deploy command from IDE.

 If there are some problems then switch karaf to debug mode and check using 
 remote java debug.

 Best regards,
 Lukasz


 Wiadomość napisana przez Dan Tran w dniu 17 sie 2012, o godz. 23:37:

 hi Lukasz,

 Could you elaborate more on your day to day work with
 webconsole/wicket development ( btw  my back ground is via service
 bean level, hardly do web work ).  What I am imaging is:

  1. Develop web wicket jar component with IDE,

  2. Drop the jar into karaf and restart the bundle as needed

  3. Use IDE remote debug to talk to karaf?

 am I close to what you have?

 Thanks

 -Dan

 On Fri, Aug 17, 2012 at 1:10 PM, Łukasz Dywicki l...@code-house.org wrote:
 Hey Dan,
 My development environment for WebConsole was same as you described at the 
 begining. There is almost no magic in Wicket / html files and you are able 
 to walk step by step trought every component initalization process. All I 
 needed to go was a Karaf started in debug mode. Sometimes it was painfull 
 but not too much.

 Kind regards,
 Lukasz

 Wiadomość napisana przez Dan Tran w dniu 17 sie 2012, o godz. 20:07:

 So far we are ok with remote debugging the service bundles, since we
 are already have lot of unit tests via mocking and other means ( via
 spring ).  Remote debug seldom happen.

 However when come to rapid development, specially webapp, remote
 debug is SOO painful.

 Yes I do see EIK, and looking forward to try it out.

 -Dan


 On Fri, Aug 17, 2012 at 10:55 AM, Jean-Baptiste Onofré j...@nanthrax.net 
 wrote:
 Hi Dan,

 All depends that we mean by integrated. Using remote debug, we can already
 have a lot of useful information and a better understanding about what 
 Karaf
 code does. To be honest, I mostly use the remote debug.

 FYI we want to make some progress on EIK. With EIK, we are able to run a
 Karaf inside Eclipse: it simplifies a lot the deployment, testing and
 debugging.

 Regards
 JB


 On 08/17/2012 07:50 PM, Dan Tran wrote:

 The console is the new wicket base ( to be released as a alpha as
 discussed at dev list )

 Are you able to get IDEA to fully integrate with karaf for development
 and debugging? ( id no remote debug involved )

 Thanks

 -Dan

 On Fri, Aug 17, 2012 at 9:52 AM, Jean-Baptiste Onofré j...@nanthrax.net
 wrote:

 Hi Dan,

 which console are you talking about ? the one currently in Karaf 2.2.x
 (based on Felix WebConsole), or the new project in preparation (based on
 Pax-Wicket) ?

 On my side, I use IntelliJ IDEA as IDE.

 Regards
 JB


 On 08/17/2012 06:30 PM, Dan Tran wrote:


 Hi

 I am looking for advice on how to setup a development environment
 starting out with karaf webconsole architecture and extend to add our
 own features.  We currently has 'semi' successful dev environment for
 a small set of osgi features running under karaf 2.2.x where we use
 Eclipse for IDE,  Spring and mocking for unit testing, BUT the
 production the osgi feature only run under 'blueprint' no Spring.
 Debugging under runtime is a pain. We can only use remote debug.

 Now I'd like to bring more ppl to do web development.  This means I
 must have a much better development where we would like to be able to
 full integrate karaf with our Eclipse.

 Questions:

- How do Karaf devs develop and test webconsole??, are you able to
 fully integrate your IDE ( what is it ? ) with karaf?

 Thanks

 -Dan


 --
 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




Re: Karaf WebConsole development environment

2012-08-17 Thread Dan Tran
The console is the new wicket base ( to be released as a alpha as
discussed at dev list )

Are you able to get IDEA to fully integrate with karaf for development
and debugging? ( id no remote debug involved )

Thanks

-Dan

On Fri, Aug 17, 2012 at 9:52 AM, Jean-Baptiste Onofré j...@nanthrax.net wrote:
 Hi Dan,

 which console are you talking about ? the one currently in Karaf 2.2.x
 (based on Felix WebConsole), or the new project in preparation (based on
 Pax-Wicket) ?

 On my side, I use IntelliJ IDEA as IDE.

 Regards
 JB


 On 08/17/2012 06:30 PM, Dan Tran wrote:

 Hi

 I am looking for advice on how to setup a development environment
 starting out with karaf webconsole architecture and extend to add our
 own features.  We currently has 'semi' successful dev environment for
 a small set of osgi features running under karaf 2.2.x where we use
 Eclipse for IDE,  Spring and mocking for unit testing, BUT the
 production the osgi feature only run under 'blueprint' no Spring.
 Debugging under runtime is a pain. We can only use remote debug.

 Now I'd like to bring more ppl to do web development.  This means I
 must have a much better development where we would like to be able to
 full integrate karaf with our Eclipse.

 Questions:

 - How do Karaf devs develop and test webconsole??, are you able to
 fully integrate your IDE ( what is it ? ) with karaf?

 Thanks

 -Dan


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


Re: Karaf WebConsole development environment

2012-08-17 Thread Dan Tran
So far we are ok with remote debugging the service bundles, since we
are already have lot of unit tests via mocking and other means ( via
spring ).  Remote debug seldom happen.

 However when come to rapid development, specially webapp, remote
debug is SOO painful.

Yes I do see EIK, and looking forward to try it out.

-Dan


On Fri, Aug 17, 2012 at 10:55 AM, Jean-Baptiste Onofré j...@nanthrax.net 
wrote:
 Hi Dan,

 All depends that we mean by integrated. Using remote debug, we can already
 have a lot of useful information and a better understanding about what Karaf
 code does. To be honest, I mostly use the remote debug.

 FYI we want to make some progress on EIK. With EIK, we are able to run a
 Karaf inside Eclipse: it simplifies a lot the deployment, testing and
 debugging.

 Regards
 JB


 On 08/17/2012 07:50 PM, Dan Tran wrote:

 The console is the new wicket base ( to be released as a alpha as
 discussed at dev list )

 Are you able to get IDEA to fully integrate with karaf for development
 and debugging? ( id no remote debug involved )

 Thanks

 -Dan

 On Fri, Aug 17, 2012 at 9:52 AM, Jean-Baptiste Onofré j...@nanthrax.net
 wrote:

 Hi Dan,

 which console are you talking about ? the one currently in Karaf 2.2.x
 (based on Felix WebConsole), or the new project in preparation (based on
 Pax-Wicket) ?

 On my side, I use IntelliJ IDEA as IDE.

 Regards
 JB


 On 08/17/2012 06:30 PM, Dan Tran wrote:


 Hi

 I am looking for advice on how to setup a development environment
 starting out with karaf webconsole architecture and extend to add our
 own features.  We currently has 'semi' successful dev environment for
 a small set of osgi features running under karaf 2.2.x where we use
 Eclipse for IDE,  Spring and mocking for unit testing, BUT the
 production the osgi feature only run under 'blueprint' no Spring.
 Debugging under runtime is a pain. We can only use remote debug.

 Now I'd like to bring more ppl to do web development.  This means I
 must have a much better development where we would like to be able to
 full integrate karaf with our Eclipse.

 Questions:

  - How do Karaf devs develop and test webconsole??, are you able to
 fully integrate your IDE ( what is it ? ) with karaf?

 Thanks

 -Dan


 --
 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


Re: Why is JDK required for running Karaf?

2012-07-31 Thread Dan Tran
any one recall why Karaf requires JDK at the first place?

Thanks

-Dan

On Tue, Jul 31, 2012 at 6:11 AM, Andreas Pieber anpie...@gmail.com 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 gno...@gmail.com 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
 christoph.gritschenber...@gmail.com 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


Re: Unable to load Spring's petcare showcase using karaf 2.3.0 and 3.0 snapshots and 2.2.7

2012-06-30 Thread Dan Tran
Actually I have not touched virgo for at least a year. However as i
recall, loading a vanilla war file is very transparent, Virgo does the
magic behind the scene. All I did, is just dropped my war into a Virgo
hot deploy folder and the magic happens

Thanks

-Dan


On Fri, Jun 29, 2012 at 3:23 AM, Achim Nierbeck bcanh...@googlemail.com wrote:
 Hi Dan,

 ok, coming back to your issue, since talking of virgo :)
 did you try what the spring-bundlor does to the standard war and how
 it looks different
 to what the bnd tool (either as maven-bundle or used with the
 wrap-protokol) does
 to the war in question.

 I'm pretty sure we at ops4j would also love some contribution for an
 alternative wrap
 url handler that uses spring-bundlor ;)

 regards, Achim

 2012/6/28 Dan Tran dant...@gmail.com:
 Hi Achim

 Sorry about offending in any way, you have been very responsive of all
 of my inquiries

 -Dan

 On Wed, Jun 27, 2012 at 11:57 PM, Achim Nierbeck
 bcanh...@googlemail.com wrote:
 Hi Dan,

 thanx for pointing to Virgo,
 unfortunately I'm a not good enough [1]
 therefore I do not get paid for working on this, I
 solely do this in my spare time for fame and fortune.

 regards, Achim

 [1] - 
 http://journal.dedasys.com/2012/03/22/im-not-good-enough-to-work-on-open-source-software

 2012/6/28 Dan Tran dant...@gmail.com:
 Ah, I totally forgot about that requirement.  Will look into it.

 btw, Virgo works great with vanilla webapp out of the box

 Thanks

 -Dan


 On Tue, Jun 26, 2012 at 1:47 AM, Achim Nierbeck bcanh...@googlemail.com 
 wrote:
 Hi Dan,

 how does your URL look like?
 With spring based web-app this can be a bit more tricky.
 For the following reason, when having a non OSGi
 Webapplication you need to install it a webbundle.
 The URL-Handler taking care of this will try to make the
 non-osgi war a web application bundle analyzing the dependencies
 and so forth based on the classfiles with the BND tool.
 As it uses BND it only works as good as the standalone BND
 tool can be. Therefore any dynamically loaded class that is contained
 in a string can not be found as a dependency.
 To get this working you need to give the webbundle URL handler
 some hints on how to improve the import-packages by
 adding those parameters to the install commando.
 Like:

 install 
 webbundle:mvn:groupid/artefactid/version?Import-Package=com.my.package;version=0.1.0,another.packageWeb-ContextPath=testme


 some more details on what needs to be set in a WebApplicationBundle
 can be found at [1]

 regards, Achim

 [1] - http://team.ops4j.org/wiki/display/paxweb/OSGi-fy+your+WAR


 2012/6/25 Dan Tran dant...@gmail.com:
 May be this issue relates to this link
 http://stackoverflow.com/questions/8118404/osgi-expose-an-classnotfoundexception-org-w3c-dom-error-when-release
 ??

 -D

 On Thu, Jun 21, 2012 at 8:50 PM, Dan Tran dant...@gmail.com wrote:
 Hi

 I am continuing my quest to get  a vanila spring webapp war file  to
 load on karaf

 The example is at
 https://src.springframework.org/svn/spring-samples/petcare/trunk. This
 example loads perfectly on my tomcat7.0.27 + jdk7

 Under karaf, after features:install war

 karaf fails to load my petcare.war the first time with following
 errror. ( dont see this under karaf 2.2.7 )


 2012-06-21 20:36:09,256 | ERROR | -SNAPSHOT/deploy | fileinstall
               | 19 - org.apache.felix.fileinstall - 3.2.4 | Failed to
 install artifact: C:\Users\Dan.Tran\dev\karaf\apache-karaf
 -3.0.0-SNAPSHOT\deploy\petcare.war
 java.lang.IllegalStateException: Unknown protocol: webbundle
        at 
 org.apache.felix.framework.URLHandlersStreamHandlerProxy.toExternalForm(URLHandlersStreamHandlerProxy.java:481)[org.apache.felix.framework-4.0.2.jar:]
        at 
 org.apache.felix.framework.URLHandlersStreamHandlerProxy.toExternalForm(URLHandlersStreamHandlerProxy.java:474)[org.apache.felix.framework-4.0.2.jar:]
        at java.net.URL.toExternalForm(URL.java:919)[:1.7.0_03]
        at java.net.URL.toString(URL.java:905)[:1.7.0_03]
        at 
 org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:937)[19:org.apache.felix.fileinstall:3.2.4]
        at 
 org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:854)[19:org.apache.felix.fileinstall:3.2.4]
        at 
 org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:483)[19:org.apache.felix.fileinstall:3.2.4]
        at 
 org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:291)[19:org.apache.felix.fileinstall:3.2.4]


 After restarting my karaf

 here is the next error ( same for all version of karaf )

   2012-06-21 20:47:02,921 | ERROR | raf-2.2.7/deploy |
 RegisterWebAppVisitorWC          | 77 -
 org.ops4j.pax.web.pax-web-extender-war - 1.0.9 | Registration
 exception. Skipping.
 java.lang.RuntimeException:
 org.springframework.beans.factory.BeanDefinitionStoreException:
 Unexpected exception parsing XML document from class path

Re: Unable to load Spring's petcare showcase using karaf 2.3.0 and 3.0 snapshots and 2.2.7

2012-06-28 Thread Dan Tran
Ah, I totally forgot about that requirement.  Will look into it.

btw, Virgo works great with vanilla webapp out of the box

Thanks

-Dan


On Tue, Jun 26, 2012 at 1:47 AM, Achim Nierbeck bcanh...@googlemail.com wrote:
 Hi Dan,

 how does your URL look like?
 With spring based web-app this can be a bit more tricky.
 For the following reason, when having a non OSGi
 Webapplication you need to install it a webbundle.
 The URL-Handler taking care of this will try to make the
 non-osgi war a web application bundle analyzing the dependencies
 and so forth based on the classfiles with the BND tool.
 As it uses BND it only works as good as the standalone BND
 tool can be. Therefore any dynamically loaded class that is contained
 in a string can not be found as a dependency.
 To get this working you need to give the webbundle URL handler
 some hints on how to improve the import-packages by
 adding those parameters to the install commando.
 Like:

 install 
 webbundle:mvn:groupid/artefactid/version?Import-Package=com.my.package;version=0.1.0,another.packageWeb-ContextPath=testme


 some more details on what needs to be set in a WebApplicationBundle
 can be found at [1]

 regards, Achim

 [1] - http://team.ops4j.org/wiki/display/paxweb/OSGi-fy+your+WAR


 2012/6/25 Dan Tran dant...@gmail.com:
 May be this issue relates to this link
 http://stackoverflow.com/questions/8118404/osgi-expose-an-classnotfoundexception-org-w3c-dom-error-when-release
 ??

 -D

 On Thu, Jun 21, 2012 at 8:50 PM, Dan Tran dant...@gmail.com wrote:
 Hi

 I am continuing my quest to get  a vanila spring webapp war file  to
 load on karaf

 The example is at
 https://src.springframework.org/svn/spring-samples/petcare/trunk. This
 example loads perfectly on my tomcat7.0.27 + jdk7

 Under karaf, after features:install war

 karaf fails to load my petcare.war the first time with following
 errror. ( dont see this under karaf 2.2.7 )


 2012-06-21 20:36:09,256 | ERROR | -SNAPSHOT/deploy | fileinstall
               | 19 - org.apache.felix.fileinstall - 3.2.4 | Failed to
 install artifact: C:\Users\Dan.Tran\dev\karaf\apache-karaf
 -3.0.0-SNAPSHOT\deploy\petcare.war
 java.lang.IllegalStateException: Unknown protocol: webbundle
        at 
 org.apache.felix.framework.URLHandlersStreamHandlerProxy.toExternalForm(URLHandlersStreamHandlerProxy.java:481)[org.apache.felix.framework-4.0.2.jar:]
        at 
 org.apache.felix.framework.URLHandlersStreamHandlerProxy.toExternalForm(URLHandlersStreamHandlerProxy.java:474)[org.apache.felix.framework-4.0.2.jar:]
        at java.net.URL.toExternalForm(URL.java:919)[:1.7.0_03]
        at java.net.URL.toString(URL.java:905)[:1.7.0_03]
        at 
 org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:937)[19:org.apache.felix.fileinstall:3.2.4]
        at 
 org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:854)[19:org.apache.felix.fileinstall:3.2.4]
        at 
 org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:483)[19:org.apache.felix.fileinstall:3.2.4]
        at 
 org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:291)[19:org.apache.felix.fileinstall:3.2.4]


 After restarting my karaf

 here is the next error ( same for all version of karaf )

   2012-06-21 20:47:02,921 | ERROR | raf-2.2.7/deploy |
 RegisterWebAppVisitorWC          | 77 -
 org.ops4j.pax.web.pax-web-extender-war - 1.0.9 | Registration
 exception. Skipping.
 java.lang.RuntimeException:
 org.springframework.beans.factory.BeanDefinitionStoreException:
 Unexpected exception parsing XML document from class path resource
 [META-INF/spring/root-context.xml]; neste
 d exception is java.lang.NoClassDefFoundError: org/w3c/dom/DOMError
        at 
 org.eclipse.jetty.servlet.ServletHandler.updateMappings(ServletHandler.java:1225)[62:org.eclipse.jetty.servlet:7.5.4.v20111024]


 Thanks

 -D



 --

 Apache Karaf http://karaf.apache.org/ Committer  PMC
 OPS4J Pax Web http://wiki.ops4j.org/display/paxweb/Pax+Web/
 Committer  Project Lead
 OPS4J Pax for Vaadin
 http://team.ops4j.org/wiki/display/PAXVAADIN/Home Commiter  Project
 Lead
 blog http://notizblog.nierbeck.de/


Re: Unable to load Spring's petcare showcase using karaf 2.3.0 and 3.0 snapshots and 2.2.7

2012-06-28 Thread Dan Tran
Hi Achim

Sorry about offending in any way, you have been very responsive of all
of my inquiries

-Dan

On Wed, Jun 27, 2012 at 11:57 PM, Achim Nierbeck
bcanh...@googlemail.com wrote:
 Hi Dan,

 thanx for pointing to Virgo,
 unfortunately I'm a not good enough [1]
 therefore I do not get paid for working on this, I
 solely do this in my spare time for fame and fortune.

 regards, Achim

 [1] - 
 http://journal.dedasys.com/2012/03/22/im-not-good-enough-to-work-on-open-source-software

 2012/6/28 Dan Tran dant...@gmail.com:
 Ah, I totally forgot about that requirement.  Will look into it.

 btw, Virgo works great with vanilla webapp out of the box

 Thanks

 -Dan


 On Tue, Jun 26, 2012 at 1:47 AM, Achim Nierbeck bcanh...@googlemail.com 
 wrote:
 Hi Dan,

 how does your URL look like?
 With spring based web-app this can be a bit more tricky.
 For the following reason, when having a non OSGi
 Webapplication you need to install it a webbundle.
 The URL-Handler taking care of this will try to make the
 non-osgi war a web application bundle analyzing the dependencies
 and so forth based on the classfiles with the BND tool.
 As it uses BND it only works as good as the standalone BND
 tool can be. Therefore any dynamically loaded class that is contained
 in a string can not be found as a dependency.
 To get this working you need to give the webbundle URL handler
 some hints on how to improve the import-packages by
 adding those parameters to the install commando.
 Like:

 install 
 webbundle:mvn:groupid/artefactid/version?Import-Package=com.my.package;version=0.1.0,another.packageWeb-ContextPath=testme


 some more details on what needs to be set in a WebApplicationBundle
 can be found at [1]

 regards, Achim

 [1] - http://team.ops4j.org/wiki/display/paxweb/OSGi-fy+your+WAR


 2012/6/25 Dan Tran dant...@gmail.com:
 May be this issue relates to this link
 http://stackoverflow.com/questions/8118404/osgi-expose-an-classnotfoundexception-org-w3c-dom-error-when-release
 ??

 -D

 On Thu, Jun 21, 2012 at 8:50 PM, Dan Tran dant...@gmail.com wrote:
 Hi

 I am continuing my quest to get  a vanila spring webapp war file  to
 load on karaf

 The example is at
 https://src.springframework.org/svn/spring-samples/petcare/trunk. This
 example loads perfectly on my tomcat7.0.27 + jdk7

 Under karaf, after features:install war

 karaf fails to load my petcare.war the first time with following
 errror. ( dont see this under karaf 2.2.7 )


 2012-06-21 20:36:09,256 | ERROR | -SNAPSHOT/deploy | fileinstall
               | 19 - org.apache.felix.fileinstall - 3.2.4 | Failed to
 install artifact: C:\Users\Dan.Tran\dev\karaf\apache-karaf
 -3.0.0-SNAPSHOT\deploy\petcare.war
 java.lang.IllegalStateException: Unknown protocol: webbundle
        at 
 org.apache.felix.framework.URLHandlersStreamHandlerProxy.toExternalForm(URLHandlersStreamHandlerProxy.java:481)[org.apache.felix.framework-4.0.2.jar:]
        at 
 org.apache.felix.framework.URLHandlersStreamHandlerProxy.toExternalForm(URLHandlersStreamHandlerProxy.java:474)[org.apache.felix.framework-4.0.2.jar:]
        at java.net.URL.toExternalForm(URL.java:919)[:1.7.0_03]
        at java.net.URL.toString(URL.java:905)[:1.7.0_03]
        at 
 org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:937)[19:org.apache.felix.fileinstall:3.2.4]
        at 
 org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:854)[19:org.apache.felix.fileinstall:3.2.4]
        at 
 org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:483)[19:org.apache.felix.fileinstall:3.2.4]
        at 
 org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:291)[19:org.apache.felix.fileinstall:3.2.4]


 After restarting my karaf

 here is the next error ( same for all version of karaf )

   2012-06-21 20:47:02,921 | ERROR | raf-2.2.7/deploy |
 RegisterWebAppVisitorWC          | 77 -
 org.ops4j.pax.web.pax-web-extender-war - 1.0.9 | Registration
 exception. Skipping.
 java.lang.RuntimeException:
 org.springframework.beans.factory.BeanDefinitionStoreException:
 Unexpected exception parsing XML document from class path resource
 [META-INF/spring/root-context.xml]; neste
 d exception is java.lang.NoClassDefFoundError: org/w3c/dom/DOMError
        at 
 org.eclipse.jetty.servlet.ServletHandler.updateMappings(ServletHandler.java:1225)[62:org.eclipse.jetty.servlet:7.5.4.v20111024]


 Thanks

 -D



 --

 Apache Karaf http://karaf.apache.org/ Committer  PMC
 OPS4J Pax Web http://wiki.ops4j.org/display/paxweb/Pax+Web/
 Committer  Project Lead
 OPS4J Pax for Vaadin
 http://team.ops4j.org/wiki/display/PAXVAADIN/Home Commiter  Project
 Lead
 blog http://notizblog.nierbeck.de/



 --

 Apache Karaf http://karaf.apache.org/ Committer  PMC
 OPS4J Pax Web http://wiki.ops4j.org/display/paxweb/Pax+Web/
 Committer  Project Lead
 OPS4J Pax for Vaadin
 http://team.ops4j.org/wiki/display/PAXVAADIN/Home Commiter  Project
 Lead

JLine issue with Karaf 2.2.8 on windows 2008R2

2012-06-27 Thread Dan Tran
here is the bin/client output

C:\Users\Administrator\dev\uc\install-1\mcagentbin\client
[ERROR] Terminal initialization failed; falling back to unsupported
java.lang.NoClassDefFoundError: Could not initialize class
org.fusesource.jansi.internal.Kernel32
at 
org.fusesource.jansi.internal.WindowsSupport.getConsoleMode(WindowsSupport.java:50)
at jline.WindowsTerminal.getConsoleMode(WindowsTerminal.java:177)
at jline.WindowsTerminal.init(WindowsTerminal.java:80)
at jline.TerminalFactory.create(TerminalFactory.java:97)
at 
org.apache.karaf.shell.console.jline.TerminalFactory.init(TerminalFactory.java:37)
at 
org.apache.karaf.shell.console.jline.TerminalFactory.getTerminal(TerminalFactory.java:30)
at org.apache.karaf.client.Main.main(Main.java:120)

__ __  
   / //_/ __ _/ __/
  / ,  / __ `/ ___/ __ `/ /_
 / /| |/ /_/ / /  / /_/ / __/
/_/ |_|\__,_/_/   \__,_/_/

  Apache Karaf (2.2.8)



I dont see this issue under windows 7.

Any one else see similar issue?

-D

BTW, on the same system, karaf 2.2.7 just hung at bin/karaf and bin/client.


  1   2   >