Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [glassfish-dev] OSGi help - GlassFish won't start with Jakarta Mail 2.0.0-RC3

I'm not an OSGi expert, but when I was writing the Maven versioning rules
document, I was told that OSGi considers any additional qualifiers as
describing a version that comes after the base version.  This is different
than Maven, where the qualifiers describe a version that comes before the
base version.

I don't think OSGi uses the String compareTo method to determine version
ordering.


In any event, I figured out that the problem was that jakarta.activation
was missing.  If I add that I get further before it fails for a different
reason.


kzr@xxxxxxxxxxx wrote on 3/11/20 7:07 PM:
>> So , 2.0.0.RC3 is younger than 2.0.0.
> 
> No..
> 
> "2.0.0".compareTo("2..0.0.RC3") returns -4.
> 
> 2.0.0.RC3 is older than 2.0.0.
> 
> 
>> -----Original Message-----
>> From: glassfish-dev-bounces@xxxxxxxxxxx <glassfish-dev-bounces@xxxxxxxxxxx> On Behalf Of kzr@xxxxxxxxxxx
>> Sent: Thursday, March 12, 2020 11:01 AM
>> To: glassfish developer discussions <glassfish-dev@xxxxxxxxxxx>
>> Subject: Re: [glassfish-dev] OSGi help - GlassFish won't start with Jakarta Mail 2.0.0-RC3
>>
>> https://urldefense.com/v3/__https://osgi.org/specification/osgi.core/7.0.0/framework.module.html*d0e3477__;Iw!!GqivPVa7Brio!Lfn9jJ3m_-oS3ND0FUG6dg34BR578IyXLidHiJmsQvey-F4AF1Shn9GDaxORzVdZWg$ 
>>
>> It says:
>>   Versions are comparable. Their comparison is done numerically and sequentially
>>   on the major, minor, and micro  components and
>>   lastly using the String class compareTo method for the qualifier.
>>
>> So , 2.0.0.RC3 is younger than 2.0.0.
>>
>>
>>> -----Original Message-----
>>> From: glassfish-dev-bounces@xxxxxxxxxxx <glassfish-dev-bounces@xxxxxxxxxxx> On Behalf Of
>>> sawamura.hiroki@xxxxxxxxxxx
>>> Sent: Thursday, March 12, 2020 10:39 AM
>>> To: glassfish developer discussions <glassfish-dev@xxxxxxxxxxx>
>>> Subject: Re: [glassfish-dev] OSGi help - GlassFish won't start with Jakarta Mail 2.0.0-RC3
>>>
>>> Hi Bill,
>>>
>>>> I believe OSGi considers a version like 2.0.0.RC3 to be greater than version 2.0.0, so it seems like the manifest
>>> should match the requirement.
>>>
>>> I'm not familiar with the OSGi version format, but the RC version means a release candidate, so it should be older
>>> than the released version. If not, that seems to be an issue...
>>>
>>> Regards,
>>> Hiroki
>>>
>>> -----Original Message-----
>>> From: glassfish-dev-bounces@xxxxxxxxxxx <glassfish-dev-bounces@xxxxxxxxxxx> On Behalf Of Bill Shannon
>>> Sent: Thursday, March 12, 2020 10:04 AM
>>> To: glassfish developer discussions <glassfish-dev@xxxxxxxxxxx>
>>> Subject: [glassfish-dev] OSGi help - GlassFish won't start with Jakarta Mail 2.0.0-RC3
>>>
>>> I've updated my fork of GlassFish to use the jakarta.* versions of Jakarta Activation and Jakarta Mail.  The build
>> went
>>> fine, but unfortunately GlassFish fails to start.  Here's the relevant error:
>>>
>>>      [exec] Caused by: org.osgi.framework.BundleException: Unable to resolve
>>> org.glassfish.main.webservices.connector [111](R 111.0): missing requirement
>>> [org.glassfish.main.webservices.connector [111](R 111.0)] osgi.wiring.package;
>>> (&(osgi.wiring.package=org.glassfish.web.deployment.descriptor)(version>=6.0.0)(!(version>=7.0.0)))
>>> [caused by: Unable to resolve org.glassfish.main.web.glue [189](R 189.0):
>>> missing requirement [org.glassfish.main.web.glue [189](R 189.0)] osgi.wiring.package;
>>> (&(osgi.wiring.package=org.apache.catalina)(version>=6.0.0)(!(version>=7.0.0)))
>>> [caused by: Unable to resolve org.glassfish.main.web.core [119](R 119.0):
>>> missing requirement [org.glassfish.main.web.core [119](R 119.0)] osgi.wiring.package;
>>> (&(osgi.wiring.package=org.apache.naming.factory)(version>=6.0.0)(!(version>=7.0.0)))
>>> [caused by: Unable to resolve org.glassfish.main.web.naming [104](R 104.0):
>>> missing requirement [org.glassfish.main.web.naming [104](R 104.0)] osgi.wiring.package;
>>> (&(osgi.wiring.package=jakarta.mail.internet)(version>=2.0.0)(!(version>=3.0.0)))
>>> [caused by: Unable to resolve com.sun.mail.jakarta.mail [195](R 195.0): missing requirement
>>> [com.sun.mail.jakarta.mail [195](R 195.0)] osgi.wiring.package; (osgi.wiring.package=jakarta.activation)]]]]
>>> Unresolved requirements:
>>> [[org.glassfish.main.webservices.connector [111](R 111.0)] osgi.wiring.package;
>>> (&(osgi.wiring.package=org.glassfish.web.deployment.descriptor)(version>=6.0.0)(!(version>=7.0.0)))]
>>>
>>> There's some stuff in there about jakarta.mail so I assume that's the source of the problem since that's the thing
>> that
>>> I changed.  It looks like it wants version 2.0.0 or newer of the package, which is correct.
>>>
>>> Here's the manifest file from the Jakarta Mail jar file:
>>>
>>> Manifest-Version: 1.0
>>> Automatic-Module-Name: jakarta.mail
>>> Bnd-LastModified: 1583795629871
>>> Build-Jdk: 11.0.4
>>> Built-By: shannon
>>> Bundle-Description: Jakarta Mail API
>>> Bundle-DocURL: http://www.oracle.com
>>> Bundle-License: https://urldefense.com/v3/__http://www.eclipse.org/legal/epl-2.0__;!!GqivPVa7Brio!Lfn9jJ3m_-oS3ND0FUG6dg34BR578IyXLidHiJmsQvey-F4AF1Shn9GDaxOLCzXuig$ , https://urldefense.com/v3/__https://www.gnu.or__;!!GqivPVa7Brio!Lfn9jJ3m_-oS3ND0FUG6dg34BR578IyXLidHiJmsQvey-F4AF1Shn9GDaxOOf_y8uw$   g/software/classpath/license.html,
>>> https://urldefense.com/v3/__http://www.eclipse.org/org/documents__;!!GqivPVa7Brio!Lfn9jJ3m_-oS3ND0FUG6dg34BR578IyXLidHiJmsQvey-F4AF1Shn9GDaxNK4ZDVkg$ 
>>>  /edl-v10.php
>>> Bundle-ManifestVersion: 2
>>> Bundle-Name: Jakarta Mail API
>>> Bundle-SymbolicName: com.sun.mail.jakarta.mail
>>> Bundle-Vendor: Oracle
>>> Bundle-Version: 2.0.0.RC3
>>> Created-By: Apache Maven Bundle Plugin
>>> DynamicImport-Package: *
>>> Export-Package:
>>>  jakarta.mail;version="2.0";uses:="jakarta.activation,jakarta.mail.event
>>>  ,jakarta.mail.search",
>>>  jakarta.mail.event;version="2.0";uses:="jakarta.mail",
>>>  jakarta.mail.internet;version="2.0";uses:="jakarta.activation,jakarta.m
>>>  ail",
>>>  jakarta.mail.search;version="2.0";uses:="jakarta.mail",
>>>  jakarta.mail.util;version="2.0";uses:="jakarta.activation,jakarta.mail.
>>>  internet",
>>>  com.sun.mail.imap;version="2.0.0";uses:="com.sun.mail.iap,com.sun.mail.
>>>  imap.protocol,com.sun.mail.util,jakarta.activation,jakarta.mail,jakarta
>>>  .mail.event,jakarta.mail.internet,jakarta.mail.search",
>>>  com.sun.mail.imap.protocol;version="2.0.0";uses:="com.sun.mail.iap,com.
>>>  sun.mail.imap,com.sun.mail.util,jakarta.mail,jakarta.mail.internet,jaka
>>>  rta.mail.search",
>>>  com.sun.mail.iap;version="2.0.0";uses:="com.sun.mail.util",
>>>  com.sun.mail.pop3;version="2.0.0";uses:="com.sun.mail.util,jakarta.mail
>>>  ,jakarta.mail.internet",
>>>  com.sun.mail.smtp;version="2.0.0";uses:="com.sun.mail.util,jakarta.mail
>>>  ,jakarta.mail.internet",
>>>  com.sun.mail.util;version="2.0.0";uses:="jakarta.mail,jakarta.mail.inte
>>>  rnet,javax.net.ssl",
>>>  com.sun.mail.util.logging;version="2.0.0";uses:="jakarta.mail",
>>>  com.sun.mail.handlers;version="2.0.0";uses:="jakarta.activation"
>>> Extension-Name: jakarta.mail
>>> Implementation-Title: jakarta.mail
>>> Implementation-Vendor: Oracle
>>> Implementation-Vendor-Id: com.sun
>>> Implementation-Version: 2.0.0-RC3
>>> Import-Package:
>>>  jakarta.activation,
>>>  javax.security.sasl;resolution:=optional,
>>>  com.sun.mail.iap;version="[2.0,3)",
>>>  com.sun.mail.imap;version="[2.0,3)",
>>>  com.sun.mail.util;version="[2.0,3)",
>>>  jakarta.mail;version="[2.0,3)",
>>>  jakarta.mail.event;version="[2.0,3)",
>>>  jakarta.mail.internet;version="[2.0,3)",
>>>  jakarta.mail.search;version="[2.0,3)",
>>>  jakarta.mail.util;version="[2.0,3)",
>>>  javax.crypto,
>>>  javax.crypto.spec,
>>>  javax.net,
>>>  javax.net.ssl,
>>>  javax.security.auth.callback,
>>>  javax.security.auth.x500,
>>>  javax.xml.transform,
>>>  javax.xml.transform.stream,
>>>  sun.security.util;resolution:=optional
>>> Probe-Provider-XML-File-Names: META-INF/gfprobe-provider.xml
>>> Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))"
>>> Specification-Title: Jakarta Mail API Design Specification
>>> Specification-Vendor: Oracle
>>> Specification-Version: 2.0
>>> Tool: Bnd-3.5.0.201709291849
>>>
>>>
>>> I believe OSGi considers a version like 2.0.0.RC3 to be greater than version 2.0.0, so it seems like the manifest
>>> should match the requirement.
>>>
>>> Can anyone see what's wrong with the manifest or the requirement that's causing it to fail?
>>> _______________________________________________
>>> glassfish-dev mailing list
>>> glassfish-dev@xxxxxxxxxxx
>>> To unsubscribe from this list, visit https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/glassfish-dev__;!!GqivPVa7Brio!Lfn9jJ3m_-oS3ND0FUG6dg34BR578IyXLidHiJmsQvey-F4AF1Shn9GDaxPciaYLVQ$ 
>>> _______________________________________________
>>> glassfish-dev mailing list
>>> glassfish-dev@xxxxxxxxxxx
>>> To unsubscribe from this list, visit https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/glassfish-dev__;!!GqivPVa7Brio!Lfn9jJ3m_-oS3ND0FUG6dg34BR578IyXLidHiJmsQvey-F4AF1Shn9GDaxPciaYLVQ$ 
>> _______________________________________________
>> glassfish-dev mailing list
>> glassfish-dev@xxxxxxxxxxx
>> To unsubscribe from this list, visit https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/glassfish-dev__;!!GqivPVa7Brio!Lfn9jJ3m_-oS3ND0FUG6dg34BR578IyXLidHiJmsQvey-F4AF1Shn9GDaxPciaYLVQ$ 
> _______________________________________________
> glassfish-dev mailing list
> glassfish-dev@xxxxxxxxxxx
> To unsubscribe from this list, visit https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/glassfish-dev__;!!GqivPVa7Brio!Lfn9jJ3m_-oS3ND0FUG6dg34BR578IyXLidHiJmsQvey-F4AF1Shn9GDaxPciaYLVQ$ 
> 


Back to the top