I am a little confused about what to do with jre.properties.  Is there
a way to give it a explicit version ( rather then remove it )?

  javax.annotation;version="1.0.0" \
  ...

chokes karaf at startup

Thanks

-Dan



On Mon, Mar 14, 2011 at 10:16 AM, karafman <[email protected]> wrote:
>
> karafman wrote:
>>
>>
>> jb-3 wrote:
>>>
>>> Hi,
>>>
>>> it depends of your etc/jre.properties configuration. If
>>> etc/jre.properties (for jre-1.6) contains javax.annotation, it means
>>> that the javax.annotation is provided by the JDK. If it's commented (as
>>> we have in ServiceMix), it means that javax.annotation is provided by an
>>> "external" bundle, such as Geronimo specs.
>>>
>>> So do you use the JDK or the external bundle for javax.annotation ?
>>>
>>> Thanks
>>> Regards
>>> JB
>>>
>>> On 03/13/2011 01:18 AM, Dan Tran wrote:
>>>> Hi I have a very simple spring power bundle which uses @PostContruct
>>>> and @PreDestroy. The bundle is built with bundlor-maven-plugin.  It
>>>> works fine at initial try.
>>>>
>>>> Then, I add java.annotation's version to the manifest (
>>>> bundlor-maven-plugin complains about the mising version). Deploy again
>>>> with geronimo-annotation's bundle. The PostContruct and PreDestroy
>>>> stops working.
>>>>
>>>> Kara 2.2 does not complain about bundle, every thing looks good.
>>>>
>>>> Is there a workaround?  This prevents me from deploying and use
>>>> activemq client ( which also uses geronimo-annotation )
>>>>
>>>> This sounds likes a very fundamental problem, but I am not able to
>>>> find any existing similar issue yet
>>>>
>>>> Big thanks ahead.
>>>>
>>>> -Dan
>>>
>>
>> Another item to consider is the version number of the javax.annotations
>> package you'd like to use.  All packages in the jre.properties file are
>> made available under version 0.0.0.  If you are using an external
>> javax.annotations package for your application, simply identifying the
>> version number of the javax.annotations packages will tell karaf to NOT
>> use the jre.properties defined javax.annotations package.  For example,
>> using the following will allow you to use the jsr250-api for annotation:
>>
>>  javax.annotation
>>  jsr250-api
>>  1.0
>>
>>
>> Then, in your maven-bundle-plugin you'd have the following in your
>> section to use this version of javax.annotation:
>>
>>    javax.annotation;version=1.0;
>>
>> Its been my experience that removing stuff from your jre.properties file
>> can have unforeseen results, and unless you can't differentiate between
>> packages using the version number, you really shouldn't remove packages
>> from it.
>>
>
> It looks like my posting voodoo is bad. This should better explain what I
> was trying to show you:
>
>
>  javax.annotation
>  jsr250-api
>  1.0
>
>
>
> -----
> Karafman
> Slayer of the JEE
> Pounder of the Perl Programmer
>
> --
> View this message in context: 
> http://karaf.922171.n3.nabble.com/javax-annotation-weirdness-tp2671048p2676689.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>

Reply via email to