Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Cannot resolve dependencies in 0.14.0

Igor,

Thanks.

I haven't been able to reproduce the issue with javax.xml in smaller test projects without our rebundled dependencies. I think it was some weird interaction between a rebundled log4j & the log4j in the Eclipse repo. I changed a minimum version on an Import-Package from 1.2.15 to 1.2.16 and the problem disappeared. I realize this sounds like craziness. I wish I had something better for you to help with this.

Matt

On Tue, Feb 14, 2012 at 4:27 PM, Igor Fedorenko <igor@xxxxxxxxxxxxxx> wrote:
I've opened bug 371552 to track "No system.bundle" warning and the
problem should be fixed in 0.15 already.

Although the warning was introduced in 0.14, I do not believe the
underlying behaviour changed in 0.14, i.e. earlier versions of Tycho did
not have properly setup system.bundles for projects which did not depend
on org.eclipse.equinox bundle. There simply was no warning.

You can suppress the warning in 0.14 by forcing org.eclipse.osgi bundle
into project dependencies

 <plugin>
   <groupId>org.eclipse.tycho</groupId>
   <artifactId>target-platform-configuration</artifactId>
   <version>${tycho-version}</version>
   <configuration>
     <dependency-resolution>
       <extraRequirements>
         <requirement>
           <type>eclipse-plugin</type>
           <id>org.eclipse.osgi</id>
           <versionRange>0.0.0</versionRange>
         </requirement>
       </extraRequirements>
     </dependency-resolution>
   </configuration>
 </plugin>

If you still have problems resolving import package of
javax.xml.datatype and similar with Tycho 0.15, please provide a small
standalone example project and we'll have a look.

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=371552

--
Regards,
Igor


On 12-02-14 2:33 PM, Matthew O'Connor wrote:
Igor,

Attached is a project demonstrating the "no system.bundle" error. It
appears that if the bundle's manifest doesn't import org.osgi.framework,
this error appears.

Matt

On Tue, Feb 7, 2012 at 11:55 AM, Igor Fedorenko <igor@xxxxxxxxxxxxxx
<mailto:igor@xxxxxxxxxxxxxx>> wrote:

   system.bundle is a standard OSGi alias od OSGi framework bundle. There
   are some heuristics Tycho uses to either find or fabricate appropriate
   system bundle and apparently this does not work for your project. I
   don't know if this explains resolution errors you get or not. Please
   provide a standalone example project and I will have a look.

   --
   Regards,
   Igor


   On 12-02-07 1:09 PM, Ben Abernathy wrote:

       Igor,

       Your example is very close to one I made that also works in 0.14.0.
       Upon looking at our project a little closer, I am noticing the
       following warning. I did a quick Google for "tycho
       system.bundle", but
       couldn't find anything specific aside from some emails on this list.
       Is the system.bundle a tycho or equinox thing?

       [WARNING] No sustem.bundle

       Thank you,

       Ben

       On Mon, Feb 6, 2012 at 5:27 PM, Igor
       Fedorenko<igor@xxxxxxxxxxxxxx <mailto:igor@xxxxxxxxxxxxxx>>  wrote:


           I am unable to reproduce the problem (see attached example).
           I will need
           a standalone complete example project and steps to reproduce
           the problem
           to be able to help you troubleshoot it.

           --
           Regards,
           Igor


           On 12-02-06 5:54 PM, Ben Abernathy wrote:


               The Bundle-__RequiredExecutionEnvironment is JavaSE-1.6

               and that version
               of the JRE does have those packages. Does OSGi/Equinox
               treat javax
               packages differently such that they are not
               automatically provided by
               the runtime? And if the default runtime does not expose
               those
               packages, even though it does contain them, then how
               would I specify
               them as a maven dependency?

               Thanks,
               Ben

               On Mon, Feb 6, 2012 at 3:32 PM, Igor
               Fedorenko<igor@xxxxxxxxxxxxxx <mailto:igor@xxxxxxxxxxxxxx>>

                 wrote:


                   Are these packages expected to come from the target
                   JVM defined by
                   Bundle-__RequiredExecutionEnvironment?


                   --
                   Regards,
                   Igor


                   On 12-02-06 4:55 PM, Ben Abernathy wrote:



                       I am building a project using tycho 0.14.o and
                       starting with the
                       9d71c422fb004896bbc8b81963393e__7ede88b5cc

                       commit (related to this
                       ticket:
                       https://bugs.eclipse.org/bugs/__show_bug.cgi?id=367701
                       <https://bugs.eclipse.org/bugs/show_bug.cgi?id=367701>),

                       I have
                       been having problems importing packages such as
                       javax.xml.bind.annotations.__adapters and

                       javax.xml.datatype. Upon using
                       the previous commit, everything builds fine. The
                       dependencies listed
                       are not optional and do not specify a version
                       match. Before I start
                       building a minimal example project, I thought
                       I'd shoot off this email
                       to see if there is an obvious solution. I've
                       included the stack trace
                       below for reference.

                       Thanks in advance,

                       Ben

                       --build error--

                       org.apache.maven.__InternalErrorException:
                       Internal error:
                       java.lang.RuntimeException:
                       org.osgi.framework.__BundleException: Bundle

                       com.example.core cannot be resolved
                       Resolution errors:
                           Bundle com.example.core - Missing
                       Constraint: Import-Package:
                       javax.xml.bind.annotation.__adapters;

                       version="0.0.0"
                           Bundle com.example.core - Missing
                       Constraint: Import-Package:
                       javax.xml.datatype; version="0.0.0"

                               at
                       org.apache.maven.DefaultMaven.__execute(DefaultMaven.java:168)
                               at
                       org.apache.maven.cli.MavenCli.__execute(MavenCli.java:534)
                               at
                       org.apache.maven.cli.MavenCli.__doMain(MavenCli.java:196)
                               at
                       org.apache.maven.cli.MavenCli.__main(MavenCli.java:141)
                               at
                       sun.reflect.__NativeMethodAccessorImpl.__invoke0(Native
                       Method)
                               at

                       sun.reflect.__NativeMethodAccessorImpl.__invoke(__NativeMethodAccessorImpl.java:__39)
                               at

                       sun.reflect.__DelegatingMethodAccessorImpl.__invoke(__DelegatingMethodAccessorImpl.__java:25)
                               at
                       java.lang.reflect.Method.__invoke(Method.java:597)
                               at

                       org.codehaus.plexus.__classworlds.launcher.Launcher.__launchEnhanced(Launcher.java:__290)
                               at

                       org.codehaus.plexus.__classworlds.launcher.Launcher.__launch(Launcher.java:230)
                               at

                       org.codehaus.plexus.__classworlds.launcher.Launcher.__mainWithExitCode(Launcher.__java:409)
                               at

                       org.codehaus.plexus.__classworlds.launcher.Launcher.__main(Launcher.java:352)
                       Caused by: java.lang.RuntimeException:
                       org.osgi.framework.__BundleException: Bundle

                       com.example.core cannot be
                       resolved
                       Resolution errors:
                           Bundle com.example.core - Missing
                       Constraint: Import-Package:
                       javax.xml.bind.annotation.__adapters;

                       version="0.0.0"
                           Bundle com.example.core - Missing
                       Constraint: Import-Package:
                       javax.xml.datatype; version="0.0.0"

                               at

                       org.eclipse.tycho.core.__osgitools.OsgiBundleProject.__getResolverState(__OsgiBundleProject.java:252)
                               at

                       org.eclipse.tycho.core.__osgitools.OsgiBundleProject.__resolveClassPath(__OsgiBundleProject.java:158)
                               at

                       org.eclipse.tycho.core.__resolver.__DefaultTychoDependencyResolver__.resolveProject(__DefaultTychoDependencyResolver__.java:111)
                               at

                       org.eclipse.tycho.core.maven.__TychoMavenLifecycleParticipant__.afterProjectsRead(__TychoMavenLifecycleParticipant__.java:61)
                               at
                       org.apache.maven.DefaultMaven.__doExecute(DefaultMaven.java:__273)
                               at
                       org.apache.maven.DefaultMaven.__execute(DefaultMaven.java:156)
                               ... 11 more
                       Caused by: org.osgi.framework.__BundleException:

                       Bundle com.example.core
                       cannot be resolved
                       Resolution errors:
                           Bundle com.example.core - Missing
                       Constraint: Import-Package:
                       javax.xml.bind.annotation.__adapters;

                       version="0.0.0"
                           Bundle com.example.core - Missing
                       Constraint: Import-Package:
                       javax.xml.datatype; version="0.0.0"

                               at

                       org.eclipse.tycho.core.__osgitools.EquinoxResolver.__assertResolved(__EquinoxResolver.java:280)
                               at

                       org.eclipse.tycho.core.__osgitools.EquinoxResolver.__newResolvedState(__EquinoxResolver.java:69)
                               at

                       org.eclipse.tycho.core.__osgitools.OsgiBundleProject.__getResolverState(__OsgiBundleProject.java:250)
                               ... 16 more
                       _________________________________________________
                       tycho-user mailing list
                       tycho-user@xxxxxxxxxxx
                       <mailto:tycho-user@xxxxxxxxxxx>
                       https://dev.eclipse.org/__mailman/listinfo/tycho-user
                       <https://dev.eclipse.org/mailman/listinfo/tycho-user>



                   _________________________________________________
                   tycho-user mailing list
                   tycho-user@xxxxxxxxxxx <mailto:tycho-user@xxxxxxxxxxx>
                   https://dev.eclipse.org/__mailman/listinfo/tycho-user <https://dev.eclipse.org/mailman/listinfo/tycho-user>


               _________________________________________________
               tycho-user mailing list
               tycho-user@xxxxxxxxxxx <mailto:tycho-user@xxxxxxxxxxx>
               https://dev.eclipse.org/__mailman/listinfo/tycho-user
               <https://dev.eclipse.org/mailman/listinfo/tycho-user>



           _________________________________________________
           tycho-user mailing list
           tycho-user@xxxxxxxxxxx <mailto:tycho-user@xxxxxxxxxxx>
           https://dev.eclipse.org/__mailman/listinfo/tycho-user
           <https://dev.eclipse.org/mailman/listinfo/tycho-user>

       _________________________________________________
       tycho-user mailing list
       tycho-user@xxxxxxxxxxx <mailto:tycho-user@xxxxxxxxxxx>
       https://dev.eclipse.org/__mailman/listinfo/tycho-user
       <https://dev.eclipse.org/mailman/listinfo/tycho-user>

   _________________________________________________
   tycho-user mailing list
   tycho-user@xxxxxxxxxxx <mailto:tycho-user@xxxxxxxxxxx>
   https://dev.eclipse.org/__mailman/listinfo/tycho-user
   <https://dev.eclipse.org/mailman/listinfo/tycho-user>




_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user


Back to the top