You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by peterg <pe...@gmail.com> on 2011/09/09 08:27:25 UTC

Inconsistent deployment behavior between bundle installer and feature installer

Hi all,

I'm experiencing some deployment weirdness and I'm hoping some of you folks
can help me out.
To sum things up, the (drop-in) deployment behavior differs between the
bundle installer and the feature installer.

To be more specific, I am trying to deploy the bundle
mvn:org.apache.geronimo.specs/geronimo-j2ee-connector_1.5_spec/2.0.0,
which declares an import on package javax.transaction.xa. When I drop the
bundle jar file into the deploy directory it resolves and fires up as
expected.

However, when dropping the following feature descriptor 

  <features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0" >
    <feature name="j2ee_connector_feature" version="1.0.0-SNAPSHOT" >
     
<bundle>mvn:org.apache.geronimo.specs/geronimo-j2ee-connector_1.5_spec/2.0.0</bundle>
    </feature>
  </features>


which, I assume, should be semantically equivalent to dropping the jar file
into the deploy folder, I end up with the following error:

[ERROR] 2011-09-09T08:04:12.829 [Framework Event
Dispatcher:org.apache.karaf.deployer.features.FeatureDeploymentListener:bundleChanged:138]
Unable to install features
java.lang.Exception: Could not start bundle
mvn:org.apache.geronimo.specs/geronimo-j2ee-connector_1.5_spec/2.0.0 in
feature(s) j2ee_connector_feature-1.0.0-SNAPSHOT: The bundle
"org.apache.geronimo.specs.geronimo-j2ee-connector_1.5_spec_2.0.0 [43]"
could not be resolved. Reason: Missing Constraint: Import-Package:
javax.transaction.xa; version="0.0.0"
        at
org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:353)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)[:1.6.0_27]
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_27]
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_27]
        at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_27]
        at
org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:50)[7:org.apache.aries.proxy:0.3.0]
        at
org.apache.aries.proxy.impl.DefaultWrapper.invoke(DefaultWrapper.java:31)[7:org.apache.aries.proxy:0.3.0]
        at
org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:78)[7:org.apache.aries.proxy:0.3.0]
        at $Proxy1.installFeatures(Unknown
Source)[11:org.apache.karaf.features.core:2.2.3]
        at
org.apache.karaf.deployer.features.FeatureDeploymentListener.bundleChanged(FeatureDeploymentListener.java:133)[31:org.apache.karaf.deployer.features:2.2.3]
        at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:919)[osgi-3.6.2.R36x_v20110210.jar:]
        at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)[osgi-3.6.2.R36x_v20110210.jar:]
        at
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)[osgi-3.6.2.R36x_v20110210.jar:]
Caused by: org.osgi.framework.BundleException: The bundle
"org.apache.geronimo.specs.geronimo-j2ee-connector_1.5_spec_2.0.0 [43]"
could not be resolved. Reason: Missing Constraint: Import-Package:
javax.transaction.xa; version="0.0.0"
        at
org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolverError(AbstractBundle.java:1317)[osgi-3.6.2.R36x_v20110210.jar:]
        at
org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolutionFailureException(AbstractBundle.java:1301)[osgi-3.6.2.R36x_v20110210.jar:]
        at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:319)[osgi-3.6.2.R36x_v20110210.jar:]
        at
org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:284)[osgi-3.6.2.R36x_v20110210.jar:]
        at
org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:276)[osgi-3.6.2.R36x_v20110210.jar:]
        at
org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:350)
        ... 12 more

I'm running in a Win7/Cygwin environment on Apache Karaf 2.2.3.
What do you think, should I raise a bug?

best regards, Peter

--
View this message in context: http://karaf.922171.n3.nabble.com/Inconsistent-deployment-behavior-between-bundle-installer-and-feature-installer-tp3322051p3322051.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Inconsistent deployment behavior between bundle installer and feature installer

Posted by peterg <pe...@gmail.com>.
I don't know if this is related at all, but the etc/jre.properties contains
the following line for the javax.transaction.xa:

  javax.transaction; javax.transaction.xa; partial=true; mandatory:=partial,
\

Just an observation ...

best regards, Peter

On Fri, Sep 16, 2011 at 12:53 PM, Andreas Pieber [via Karaf] <
ml-node+s922171n3341589h93@n3.nabble.com> wrote:

> btw, I was able to reproduced the same behavior with felix and a fresh
> karaf 2.2.3 download too
>
> Kind regards,
> Andreas
>
> On Fri, Sep 16, 2011 at 12:47, peterg <[hidden email]<http://user/SendEmail.jtp?type=node&node=3341589&i=0>
> > wrote:
>
>> Hi again,
>>
>> I'm running on Equinox:
>>  karaf.framework=equinox
>>
>> I also tried setting start-level="30" in the features descriptor but with
>> the same result. That is, a missing constraint violation on
>>
>>  Import-Package: javax.transaction.xa; version="0.0.0"
>>
>> I've raised a bug to track the issue:
>> https://issues.apache.org/jira/browse/KARAF-867
>>
>> Thanks, Peter
>>
>> On Thu, Sep 15, 2011 at 6:57 AM, Jean-Baptiste Onofré [via Karaf] <
>> [hidden email] <http://user/SendEmail.jtp?type=node&node=3341589&i=1>>
>> wrote:
>>
>> > Hi Peter,
>> >
>> > could try to set:
>> >
>> > <bundle start-level="30"> ...
>> >
>> > in the features descriptor ?
>> >
>> > Regards
>> > JB
>> >
>> > On 09/09/2011 08:27 AM, peterg wrote:
>> >
>> > > Hi all,
>> > >
>> > > I'm experiencing some deployment weirdness and I'm hoping some of you
>> > folks
>> > > can help me out.
>> > > To sum things up, the (drop-in) deployment behavior differs between
>> the
>> > > bundle installer and the feature installer.
>> > >
>> > > To be more specific, I am trying to deploy the bundle
>> > > mvn:org.apache.geronimo.specs/geronimo-j2ee-connector_1.5_spec/2.0.0,
>> > > which declares an import on package javax.transaction.xa. When I drop
>> the
>> >
>> > > bundle jar file into the deploy directory it resolves and fires up as
>> > > expected.
>> > >
>> > > However, when dropping the following feature descriptor
>> > >
>> > >    <features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0">
>> > >      <feature name="j2ee_connector_feature" version="1.0.0-SNAPSHOT">
>> > >
>> > >
>> >
>> <bundle>mvn:org.apache.geronimo.specs/geronimo-j2ee-connector_1.5_spec/2.0.0</bundle>
>> >
>> > >      </feature>
>> > >    </features>
>> > >
>> > >
>> > > which, I assume, should be semantically equivalent to dropping the jar
>> > file
>> > > into the deploy folder, I end up with the following error:
>> > >
>> > > [ERROR] 2011-09-09T08:04:<a href="tel:12.829" value="+4312829">12.829
>> [Framework Event
>>
>> > >
>> >
>> Dispatcher:org.apache.karaf.deployer.features.FeatureDeploymentListener:bundleChanged:138]
>> >
>> > > Unable to install features
>> > > java.lang.Exception: Could not start bundle
>> > > mvn:org.apache.geronimo.specs/geronimo-j2ee-connector_1.5_spec/2.0.0
>> in
>> > > feature(s) j2ee_connector_feature-1.0.0-SNAPSHOT: The bundle
>> > > "org.apache.geronimo.specs.geronimo-j2ee-connector_1.5_spec_2.0.0
>> [43]"
>> > > could not be resolved. Reason: Missing Constraint: Import-Package:
>> > > javax.transaction.xa; version="0.0.0"
>> > >          at
>> > >
>> >
>> org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:353)
>> >
>> > >          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>> > > Method)[:1.6.0_27]
>> > >          at
>> > >
>> >
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_27]
>> >
>> > >          at
>> > >
>> >
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_27]
>> >
>> > >          at
>> java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_27]
>> > >          at
>> > >
>> >
>> org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:50)[7:org.apache.aries.proxy:0.3.0]
>> >
>> > >          at
>> > >
>> >
>> org.apache.aries.proxy.impl.DefaultWrapper.invoke(DefaultWrapper.java:31)[7:org.apache.aries.proxy:0.3.0]
>> >
>> > >          at
>> > >
>> >
>> org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:78)[7:org.apache.aries.proxy:0.3.0]
>> >
>> > >          at $Proxy1.installFeatures(Unknown
>> > > Source)[11:org.apache.karaf.features.core:2.2.3]
>> > >          at
>> > >
>> >
>> org.apache.karaf.deployer.features.FeatureDeploymentListener.bundleChanged(FeatureDeploymentListener.java:133)[31:org.apache.karaf.deployer.features:2.2.3]
>> >
>> > >          at
>> > >
>> >
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:919)[osgi-3.6.2.R36x_v20110210.jar:]
>> >
>> > >          at
>> > >
>> >
>> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)[osgi-3.6.2.R36x_v20110210.jar:]
>> >
>> > >          at
>> > >
>> >
>> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)[osgi-3.6.2.R36x_v20110210.jar:]
>> >
>> > > Caused by: org.osgi.framework.BundleException: The bundle
>> > > "org.apache.geronimo.specs.geronimo-j2ee-connector_1.5_spec_2.0.0
>> [43]"
>> > > could not be resolved. Reason: Missing Constraint: Import-Package:
>> > > javax.transaction.xa; version="0.0.0"
>> > >          at
>> > >
>> >
>> org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolverError(AbstractBundle.java:<a
>> href="tel:1317" value="+431317">1317)[osgi-3.6.2.R36x_v20110210.jar:]
>> >
>> > >          at
>> > >
>> >
>> org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolutionFailureException(AbstractBundle.java:<a
>> href="tel:1301" value="+431301">1301)[osgi-3.6.2.R36x_v20110210.jar:]
>>
>> >
>> > >          at
>> > >
>> >
>> org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:319)[osgi-3.6.2.R36x_v20110210.jar:]
>> >
>> > >          at
>> > >
>> >
>> org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:284)[osgi-3.6.2.R36x_v20110210.jar:]
>> >
>> > >          at
>> > >
>> >
>> org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:276)[osgi-3.6.2.R36x_v20110210.jar:]
>> >
>> > >          at
>> > >
>> >
>> org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:350)
>> >
>> > >          ... 12 more
>> > >
>> > > I'm running in a Win7/Cygwin environment on Apache Karaf 2.2.3.
>> > > What do you think, should I raise a bug?
>> > >
>> > > best regards, Peter
>> > >
>> > > --
>> > > View this message in context:
>> >
>> http://karaf.922171.n3.nabble.com/Inconsistent-deployment-behavior-between-bundle-installer-and-feature-installer-tp3322051p3322051.html
>> > > Sent from the Karaf - User mailing list archive at Nabble.com.
>> >
>> > --
>> > Jean-Baptiste Onofré
>> > [hidden email] <http://user/SendEmail.jtp?type=node&node=3337980&i=0>
>>
>> > http://blog.nanthrax.net
>> > Talend - http://www.talend.com
>> >
>> >
>> > ------------------------------
>> >  If you reply to this email, your message will be added to the
>> discussion
>> > below:
>> >
>> >
>> http://karaf.922171.n3.nabble.com/Inconsistent-deployment-behavior-between-bundle-installer-and-feature-installer-tp3322051p3337980.html
>> >  To unsubscribe from Inconsistent deployment behavior between bundle
>> > installer and feature installer, click here<
>> >
>> >
>>
>>
>> --
>> View this message in context:
>> http://karaf.922171.n3.nabble.com/Inconsistent-deployment-behavior-between-bundle-installer-and-feature-installer-tp3322051p3341577.html
>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>
>
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://karaf.922171.n3.nabble.com/Inconsistent-deployment-behavior-between-bundle-installer-and-feature-installer-tp3322051p3341589.html
>  To unsubscribe from Inconsistent deployment behavior between bundle
> installer and feature installer, click here<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3322051&code=cGV0ZXIuZ2FyZGZqZWxsQGdtYWlsLmNvbXwzMzIyMDUxfC01NTc5MTAxMjA=>.
>
>


--
View this message in context: http://karaf.922171.n3.nabble.com/Inconsistent-deployment-behavior-between-bundle-installer-and-feature-installer-tp3322051p3341595.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Inconsistent deployment behavior between bundle installer and feature installer

Posted by Andreas Pieber <an...@gmail.com>.
btw, I was able to reproduced the same behavior with felix and a fresh karaf
2.2.3 download too

Kind regards,
Andreas

On Fri, Sep 16, 2011 at 12:47, peterg <pe...@gmail.com> wrote:

> Hi again,
>
> I'm running on Equinox:
>  karaf.framework=equinox
>
> I also tried setting start-level="30" in the features descriptor but with
> the same result. That is, a missing constraint violation on
>
>  Import-Package: javax.transaction.xa; version="0.0.0"
>
> I've raised a bug to track the issue:
> https://issues.apache.org/jira/browse/KARAF-867
>
> Thanks, Peter
>
> On Thu, Sep 15, 2011 at 6:57 AM, Jean-Baptiste Onofré [via Karaf] <
> ml-node+s922171n3337980h14@n3.nabble.com> wrote:
>
> > Hi Peter,
> >
> > could try to set:
> >
> > <bundle start-level="30"> ...
> >
> > in the features descriptor ?
> >
> > Regards
> > JB
> >
> > On 09/09/2011 08:27 AM, peterg wrote:
> >
> > > Hi all,
> > >
> > > I'm experiencing some deployment weirdness and I'm hoping some of you
> > folks
> > > can help me out.
> > > To sum things up, the (drop-in) deployment behavior differs between the
> > > bundle installer and the feature installer.
> > >
> > > To be more specific, I am trying to deploy the bundle
> > > mvn:org.apache.geronimo.specs/geronimo-j2ee-connector_1.5_spec/2.0.0,
> > > which declares an import on package javax.transaction.xa. When I drop
> the
> >
> > > bundle jar file into the deploy directory it resolves and fires up as
> > > expected.
> > >
> > > However, when dropping the following feature descriptor
> > >
> > >    <features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0">
> > >      <feature name="j2ee_connector_feature" version="1.0.0-SNAPSHOT">
> > >
> > >
> >
> <bundle>mvn:org.apache.geronimo.specs/geronimo-j2ee-connector_1.5_spec/2.0.0</bundle>
> >
> > >      </feature>
> > >    </features>
> > >
> > >
> > > which, I assume, should be semantically equivalent to dropping the jar
> > file
> > > into the deploy folder, I end up with the following error:
> > >
> > > [ERROR] 2011-09-09T08:04:12.829 [Framework Event
> > >
> >
> Dispatcher:org.apache.karaf.deployer.features.FeatureDeploymentListener:bundleChanged:138]
> >
> > > Unable to install features
> > > java.lang.Exception: Could not start bundle
> > > mvn:org.apache.geronimo.specs/geronimo-j2ee-connector_1.5_spec/2.0.0 in
> > > feature(s) j2ee_connector_feature-1.0.0-SNAPSHOT: The bundle
> > > "org.apache.geronimo.specs.geronimo-j2ee-connector_1.5_spec_2.0.0 [43]"
> > > could not be resolved. Reason: Missing Constraint: Import-Package:
> > > javax.transaction.xa; version="0.0.0"
> > >          at
> > >
> >
> org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:353)
> >
> > >          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > > Method)[:1.6.0_27]
> > >          at
> > >
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_27]
> >
> > >          at
> > >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_27]
> >
> > >          at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_27]
> > >          at
> > >
> >
> org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:50)[7:org.apache.aries.proxy:0.3.0]
> >
> > >          at
> > >
> >
> org.apache.aries.proxy.impl.DefaultWrapper.invoke(DefaultWrapper.java:31)[7:org.apache.aries.proxy:0.3.0]
> >
> > >          at
> > >
> >
> org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:78)[7:org.apache.aries.proxy:0.3.0]
> >
> > >          at $Proxy1.installFeatures(Unknown
> > > Source)[11:org.apache.karaf.features.core:2.2.3]
> > >          at
> > >
> >
> org.apache.karaf.deployer.features.FeatureDeploymentListener.bundleChanged(FeatureDeploymentListener.java:133)[31:org.apache.karaf.deployer.features:2.2.3]
> >
> > >          at
> > >
> >
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:919)[osgi-3.6.2.R36x_v20110210.jar:]
> >
> > >          at
> > >
> >
> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)[osgi-3.6.2.R36x_v20110210.jar:]
> >
> > >          at
> > >
> >
> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)[osgi-3.6.2.R36x_v20110210.jar:]
> >
> > > Caused by: org.osgi.framework.BundleException: The bundle
> > > "org.apache.geronimo.specs.geronimo-j2ee-connector_1.5_spec_2.0.0 [43]"
> > > could not be resolved. Reason: Missing Constraint: Import-Package:
> > > javax.transaction.xa; version="0.0.0"
> > >          at
> > >
> >
> org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolverError(AbstractBundle.java:
> 1317)[osgi-3.6.2.R36x_v20110210.jar:]
> >
> > >          at
> > >
> >
> org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolutionFailureException(AbstractBundle.java:
> 1301)[osgi-3.6.2.R36x_v20110210.jar:]
> >
> > >          at
> > >
> >
> org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:319)[osgi-3.6.2.R36x_v20110210.jar:]
> >
> > >          at
> > >
> >
> org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:284)[osgi-3.6.2.R36x_v20110210.jar:]
> >
> > >          at
> > >
> >
> org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:276)[osgi-3.6.2.R36x_v20110210.jar:]
> >
> > >          at
> > >
> >
> org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:350)
> >
> > >          ... 12 more
> > >
> > > I'm running in a Win7/Cygwin environment on Apache Karaf 2.2.3.
> > > What do you think, should I raise a bug?
> > >
> > > best regards, Peter
> > >
> > > --
> > > View this message in context:
> >
> http://karaf.922171.n3.nabble.com/Inconsistent-deployment-behavior-between-bundle-installer-and-feature-installer-tp3322051p3322051.html
> > > Sent from the Karaf - User mailing list archive at Nabble.com.
> >
> > --
> > Jean-Baptiste Onofré
> > [hidden email] <http://user/SendEmail.jtp?type=node&node=3337980&i=0>
> > http://blog.nanthrax.net
> > Talend - http://www.talend.com
> >
> >
> > ------------------------------
> >  If you reply to this email, your message will be added to the discussion
> > below:
> >
> >
> http://karaf.922171.n3.nabble.com/Inconsistent-deployment-behavior-between-bundle-installer-and-feature-installer-tp3322051p3337980.html
> >  To unsubscribe from Inconsistent deployment behavior between bundle
> > installer and feature installer, click here<
> http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3322051&code=cGV0ZXIuZ2FyZGZqZWxsQGdtYWlsLmNvbXwzMzIyMDUxfC01NTc5MTAxMjA=
> >.
> >
> >
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/Inconsistent-deployment-behavior-between-bundle-installer-and-feature-installer-tp3322051p3341577.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>

Re: Inconsistent deployment behavior between bundle installer and feature installer

Posted by peterg <pe...@gmail.com>.
Hi again,

I'm running on Equinox:
  karaf.framework=equinox

I also tried setting start-level="30" in the features descriptor but with
the same result. That is, a missing constraint violation on

  Import-Package: javax.transaction.xa; version="0.0.0"

I've raised a bug to track the issue:
https://issues.apache.org/jira/browse/KARAF-867

Thanks, Peter

On Thu, Sep 15, 2011 at 6:57 AM, Jean-Baptiste Onofré [via Karaf] <
ml-node+s922171n3337980h14@n3.nabble.com> wrote:

> Hi Peter,
>
> could try to set:
>
> <bundle start-level="30"> ...
>
> in the features descriptor ?
>
> Regards
> JB
>
> On 09/09/2011 08:27 AM, peterg wrote:
>
> > Hi all,
> >
> > I'm experiencing some deployment weirdness and I'm hoping some of you
> folks
> > can help me out.
> > To sum things up, the (drop-in) deployment behavior differs between the
> > bundle installer and the feature installer.
> >
> > To be more specific, I am trying to deploy the bundle
> > mvn:org.apache.geronimo.specs/geronimo-j2ee-connector_1.5_spec/2.0.0,
> > which declares an import on package javax.transaction.xa. When I drop the
>
> > bundle jar file into the deploy directory it resolves and fires up as
> > expected.
> >
> > However, when dropping the following feature descriptor
> >
> >    <features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0">
> >      <feature name="j2ee_connector_feature" version="1.0.0-SNAPSHOT">
> >
> >
> <bundle>mvn:org.apache.geronimo.specs/geronimo-j2ee-connector_1.5_spec/2.0.0</bundle>
>
> >      </feature>
> >    </features>
> >
> >
> > which, I assume, should be semantically equivalent to dropping the jar
> file
> > into the deploy folder, I end up with the following error:
> >
> > [ERROR] 2011-09-09T08:04:12.829 [Framework Event
> >
> Dispatcher:org.apache.karaf.deployer.features.FeatureDeploymentListener:bundleChanged:138]
>
> > Unable to install features
> > java.lang.Exception: Could not start bundle
> > mvn:org.apache.geronimo.specs/geronimo-j2ee-connector_1.5_spec/2.0.0 in
> > feature(s) j2ee_connector_feature-1.0.0-SNAPSHOT: The bundle
> > "org.apache.geronimo.specs.geronimo-j2ee-connector_1.5_spec_2.0.0 [43]"
> > could not be resolved. Reason: Missing Constraint: Import-Package:
> > javax.transaction.xa; version="0.0.0"
> >          at
> >
> org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:353)
>
> >          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > Method)[:1.6.0_27]
> >          at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_27]
>
> >          at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_27]
>
> >          at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_27]
> >          at
> >
> org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:50)[7:org.apache.aries.proxy:0.3.0]
>
> >          at
> >
> org.apache.aries.proxy.impl.DefaultWrapper.invoke(DefaultWrapper.java:31)[7:org.apache.aries.proxy:0.3.0]
>
> >          at
> >
> org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:78)[7:org.apache.aries.proxy:0.3.0]
>
> >          at $Proxy1.installFeatures(Unknown
> > Source)[11:org.apache.karaf.features.core:2.2.3]
> >          at
> >
> org.apache.karaf.deployer.features.FeatureDeploymentListener.bundleChanged(FeatureDeploymentListener.java:133)[31:org.apache.karaf.deployer.features:2.2.3]
>
> >          at
> >
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:919)[osgi-3.6.2.R36x_v20110210.jar:]
>
> >          at
> >
> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)[osgi-3.6.2.R36x_v20110210.jar:]
>
> >          at
> >
> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)[osgi-3.6.2.R36x_v20110210.jar:]
>
> > Caused by: org.osgi.framework.BundleException: The bundle
> > "org.apache.geronimo.specs.geronimo-j2ee-connector_1.5_spec_2.0.0 [43]"
> > could not be resolved. Reason: Missing Constraint: Import-Package:
> > javax.transaction.xa; version="0.0.0"
> >          at
> >
> org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolverError(AbstractBundle.java:1317)[osgi-3.6.2.R36x_v20110210.jar:]
>
> >          at
> >
> org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolutionFailureException(AbstractBundle.java:1301)[osgi-3.6.2.R36x_v20110210.jar:]
>
> >          at
> >
> org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:319)[osgi-3.6.2.R36x_v20110210.jar:]
>
> >          at
> >
> org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:284)[osgi-3.6.2.R36x_v20110210.jar:]
>
> >          at
> >
> org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:276)[osgi-3.6.2.R36x_v20110210.jar:]
>
> >          at
> >
> org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:350)
>
> >          ... 12 more
> >
> > I'm running in a Win7/Cygwin environment on Apache Karaf 2.2.3.
> > What do you think, should I raise a bug?
> >
> > best regards, Peter
> >
> > --
> > View this message in context:
> http://karaf.922171.n3.nabble.com/Inconsistent-deployment-behavior-between-bundle-installer-and-feature-installer-tp3322051p3322051.html
> > Sent from the Karaf - User mailing list archive at Nabble.com.
>
> --
> Jean-Baptiste Onofré
> [hidden email] <http://user/SendEmail.jtp?type=node&node=3337980&i=0>
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://karaf.922171.n3.nabble.com/Inconsistent-deployment-behavior-between-bundle-installer-and-feature-installer-tp3322051p3337980.html
>  To unsubscribe from Inconsistent deployment behavior between bundle
> installer and feature installer, click here<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3322051&code=cGV0ZXIuZ2FyZGZqZWxsQGdtYWlsLmNvbXwzMzIyMDUxfC01NTc5MTAxMjA=>.
>
>


--
View this message in context: http://karaf.922171.n3.nabble.com/Inconsistent-deployment-behavior-between-bundle-installer-and-feature-installer-tp3322051p3341577.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Inconsistent deployment behavior between bundle installer and feature installer

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Peter,

could try to set:

<bundle start-level="30"> ...

in the features descriptor ?

Regards
JB

On 09/09/2011 08:27 AM, peterg wrote:
> Hi all,
>
> I'm experiencing some deployment weirdness and I'm hoping some of you folks
> can help me out.
> To sum things up, the (drop-in) deployment behavior differs between the
> bundle installer and the feature installer.
>
> To be more specific, I am trying to deploy the bundle
> mvn:org.apache.geronimo.specs/geronimo-j2ee-connector_1.5_spec/2.0.0,
> which declares an import on package javax.transaction.xa. When I drop the
> bundle jar file into the deploy directory it resolves and fires up as
> expected.
>
> However, when dropping the following feature descriptor
>
>    <features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0">
>      <feature name="j2ee_connector_feature" version="1.0.0-SNAPSHOT">
>
> <bundle>mvn:org.apache.geronimo.specs/geronimo-j2ee-connector_1.5_spec/2.0.0</bundle>
>      </feature>
>    </features>
>
>
> which, I assume, should be semantically equivalent to dropping the jar file
> into the deploy folder, I end up with the following error:
>
> [ERROR] 2011-09-09T08:04:12.829 [Framework Event
> Dispatcher:org.apache.karaf.deployer.features.FeatureDeploymentListener:bundleChanged:138]
> Unable to install features
> java.lang.Exception: Could not start bundle
> mvn:org.apache.geronimo.specs/geronimo-j2ee-connector_1.5_spec/2.0.0 in
> feature(s) j2ee_connector_feature-1.0.0-SNAPSHOT: The bundle
> "org.apache.geronimo.specs.geronimo-j2ee-connector_1.5_spec_2.0.0 [43]"
> could not be resolved. Reason: Missing Constraint: Import-Package:
> javax.transaction.xa; version="0.0.0"
>          at
> org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:353)
>          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)[:1.6.0_27]
>          at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_27]
>          at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_27]
>          at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_27]
>          at
> org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:50)[7:org.apache.aries.proxy:0.3.0]
>          at
> org.apache.aries.proxy.impl.DefaultWrapper.invoke(DefaultWrapper.java:31)[7:org.apache.aries.proxy:0.3.0]
>          at
> org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:78)[7:org.apache.aries.proxy:0.3.0]
>          at $Proxy1.installFeatures(Unknown
> Source)[11:org.apache.karaf.features.core:2.2.3]
>          at
> org.apache.karaf.deployer.features.FeatureDeploymentListener.bundleChanged(FeatureDeploymentListener.java:133)[31:org.apache.karaf.deployer.features:2.2.3]
>          at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:919)[osgi-3.6.2.R36x_v20110210.jar:]
>          at
> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)[osgi-3.6.2.R36x_v20110210.jar:]
>          at
> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)[osgi-3.6.2.R36x_v20110210.jar:]
> Caused by: org.osgi.framework.BundleException: The bundle
> "org.apache.geronimo.specs.geronimo-j2ee-connector_1.5_spec_2.0.0 [43]"
> could not be resolved. Reason: Missing Constraint: Import-Package:
> javax.transaction.xa; version="0.0.0"
>          at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolverError(AbstractBundle.java:1317)[osgi-3.6.2.R36x_v20110210.jar:]
>          at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolutionFailureException(AbstractBundle.java:1301)[osgi-3.6.2.R36x_v20110210.jar:]
>          at
> org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:319)[osgi-3.6.2.R36x_v20110210.jar:]
>          at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:284)[osgi-3.6.2.R36x_v20110210.jar:]
>          at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:276)[osgi-3.6.2.R36x_v20110210.jar:]
>          at
> org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:350)
>          ... 12 more
>
> I'm running in a Win7/Cygwin environment on Apache Karaf 2.2.3.
> What do you think, should I raise a bug?
>
> best regards, Peter
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Inconsistent-deployment-behavior-between-bundle-installer-and-feature-installer-tp3322051p3322051.html
> Sent from the Karaf - User mailing list archive at Nabble.com.

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

Re: Inconsistent deployment behavior between bundle installer and feature installer

Posted by Andreas Pieber <an...@gmail.com>.
Hey Peter,

Yes this behavior is really wired. I can reproduce it but it does not make
any sense to me... Please create an issue and we'll give it a look

Thanks and kind regards,
Andreas

On Fri, Sep 9, 2011 at 08:27, peterg <pe...@gmail.com> wrote:

> Hi all,
>
> I'm experiencing some deployment weirdness and I'm hoping some of you folks
> can help me out.
> To sum things up, the (drop-in) deployment behavior differs between the
> bundle installer and the feature installer.
>
> To be more specific, I am trying to deploy the bundle
> mvn:org.apache.geronimo.specs/geronimo-j2ee-connector_1.5_spec/2.0.0,
> which declares an import on package javax.transaction.xa. When I drop the
> bundle jar file into the deploy directory it resolves and fires up as
> expected.
>
> However, when dropping the following feature descriptor
>
>  <features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0" >
>    <feature name="j2ee_connector_feature" version="1.0.0-SNAPSHOT" >
>
>
> <bundle>mvn:org.apache.geronimo.specs/geronimo-j2ee-connector_1.5_spec/2.0.0</bundle>
>    </feature>
>  </features>
>
>
> which, I assume, should be semantically equivalent to dropping the jar file
> into the deploy folder, I end up with the following error:
>
> [ERROR] 2011-09-09T08:04:12.829 [Framework Event
>
> Dispatcher:org.apache.karaf.deployer.features.FeatureDeploymentListener:bundleChanged:138]
> Unable to install features
> java.lang.Exception: Could not start bundle
> mvn:org.apache.geronimo.specs/geronimo-j2ee-connector_1.5_spec/2.0.0 in
> feature(s) j2ee_connector_feature-1.0.0-SNAPSHOT: The bundle
> "org.apache.geronimo.specs.geronimo-j2ee-connector_1.5_spec_2.0.0 [43]"
> could not be resolved. Reason: Missing Constraint: Import-Package:
> javax.transaction.xa; version="0.0.0"
>        at
>
> org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:353)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)[:1.6.0_27]
>        at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_27]
>        at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_27]
>        at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_27]
>        at
>
> org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:50)[7:org.apache.aries.proxy:0.3.0]
>        at
>
> org.apache.aries.proxy.impl.DefaultWrapper.invoke(DefaultWrapper.java:31)[7:org.apache.aries.proxy:0.3.0]
>        at
>
> org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:78)[7:org.apache.aries.proxy:0.3.0]
>        at $Proxy1.installFeatures(Unknown
> Source)[11:org.apache.karaf.features.core:2.2.3]
>        at
>
> org.apache.karaf.deployer.features.FeatureDeploymentListener.bundleChanged(FeatureDeploymentListener.java:133)[31:org.apache.karaf.deployer.features:2.2.3]
>        at
>
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:919)[osgi-3.6.2.R36x_v20110210.jar:]
>        at
>
> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)[osgi-3.6.2.R36x_v20110210.jar:]
>        at
>
> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)[osgi-3.6.2.R36x_v20110210.jar:]
> Caused by: org.osgi.framework.BundleException: The bundle
> "org.apache.geronimo.specs.geronimo-j2ee-connector_1.5_spec_2.0.0 [43]"
> could not be resolved. Reason: Missing Constraint: Import-Package:
> javax.transaction.xa; version="0.0.0"
>        at
>
> org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolverError(AbstractBundle.java:
> 1317)[osgi-3.6.2.R36x_v20110210.jar:]
>        at
>
> org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolutionFailureException(AbstractBundle.java:
> 1301)[osgi-3.6.2.R36x_v20110210.jar:]
>        at
>
> org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:319)[osgi-3.6.2.R36x_v20110210.jar:]
>        at
>
> org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:284)[osgi-3.6.2.R36x_v20110210.jar:]
>        at
>
> org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:276)[osgi-3.6.2.R36x_v20110210.jar:]
>        at
>
> org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:350)
>        ... 12 more
>
> I'm running in a Win7/Cygwin environment on Apache Karaf 2.2.3.
> What do you think, should I raise a bug?
>
> best regards, Peter
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/Inconsistent-deployment-behavior-between-bundle-installer-and-feature-installer-tp3322051p3322051.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>

Re: Inconsistent deployment behavior between bundle installer and feature installer

Posted by Gareth <ga...@gmail.com>.
Peter,

I am curious - Which osgi container are you using with Karaf (Felix or
Equinox)? If you are using Felix, could you try with Equinox and see if you
see the same behaviour?

thanks,
Gareth

--
View this message in context: http://karaf.922171.n3.nabble.com/Inconsistent-deployment-behavior-between-bundle-installer-and-feature-installer-tp3322051p3336699.html
Sent from the Karaf - User mailing list archive at Nabble.com.