Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Tycho Book: Repository in pom.ml or .target file (or both)

On Tue, Jul 3, 2012 at 9:10 PM, Igor Fedorenko <igor@xxxxxxxxxxxxxx> wrote:
> The trick is to pick the right root installable unit. Judging by missing

Here are my notes for the "trick"

Resolving target platform issues.

* One or more bundles are not resolved because the following root
constraints are not resolved

  If after getting your application running inside eclipse, it then
fails to run properly
  after being built by Tycho, and the errors are because bundles can
not be resolved,
  then this is likely because you need additional runtime packages
included in your
  Target Platform.  The fact that it worked in Eclipse was probably because
  Eclipse was being too helpful.

  e.g. the configuration/*.log file says something like:

    !ENTRY org.eclipse.osgi 2 0 2012-06-28 15:06:11.072
    !MESSAGE One or more bundles are not resolved because the
following root constraints are not resolved:
    !SUBENTRY 1 org.eclipse.osgi 2 0 2012-06-28 15:06:11.072
    !MESSAGE Bundle
initial@reference:file:plugins/org.apache.jasper_5.5.17.v201101211617.jar/
was not resolved.
    !SUBENTRY 2 org.apache.jasper 2 0 2012-06-28 15:06:11.072
    !MESSAGE Missing imported package javax.servlet.http_[2.4.0,3.0.0).
    !SUBENTRY 2 org.apache.jasper 2 0 2012-06-28 15:06:11.072
    !MESSAGE Missing imported package javax.servlet.resources_[2.4.0,3.0.0).
    !SUBENTRY 2 org.apache.jasper 2 0 2012-06-28 15:06:11.072
    !MESSAGE Missing imported package javax.servlet_[2.4.0,3.0.0).

  Means that plugins/org.apache.jasper_5.5.17.v201101211617.jar could
not be loaded correctly
  because the packages it needs are missing, specifically:
    * javax.servlet.http_[2.4.0,3.0.0)
    * javax.servlet.resources_[2.4.0,3.0.0)
    * javax.servlet_[2.4.0,3.0.0)

  See below re "OSGi console" for more on how to bring up and maybe
run some diagnostics.

  To resolve these issues use the P2 Browser, available at:
    http://ifedorenko.github.com/p2-browser/javaws/com.ifedorenko.p2browser.jnlp

  This will open a P2 browser.
  You will need to Add in all the repositories as defined in *.target file.
  You should prefer results from your base eclipse distribution before
anything else.

  Type javax.servlet.http into the search box of the P2 Browser.
  Here you will see which packages can provide this information.
  * epp.package.cpp
    * org.eclipse.epp.package.cpp.feature.feature.group
      * org.eclipse.platform.feature.group
        * org.eclipse.help.feature.group
          * javax.servlet
  For this example the versions are not important.
  We don't want our RCP application to depend on epp.package.cpp (i.e.
the C++ packages).
  But you can see from the hierarchy what includes it.

  Chances are there are other items that are also failing.
  So lets check jasper itself
  Type org.apache.jasper into the search box of the P2 Browser.
  The package hierarchies:
  * epp.package.cpp
    * org.eclipse.epp.package.cpp.feature.feature.group
      * org.eclipse.platform.feature.group
        * org.eclipse.help.feature.group
          * org.apache.jasper

  When adding to the target platform we should prefer *.feature.group
over raw plugins.
  This means we should be including one of
  * org.eclipse.platform.feature.group
  * org.eclipse.help.feature.group
  We should start with the least inclusive group
"org.eclipse.help.feature.group" first.

  After including "org.eclipse.help.feature.group" into our target platform
  you will probably see errors about
  * org.eclipse.core.runtime.compatibility
  * org.eclipse.ui.workbench.compatibility

  Following the same process as before, we find that the compatibility plugins
  are available in org.eclipse.platform.feature.group.
  So include "org.eclipse.platform.feature.group" and remove
"org.eclipse.help.feature.group"
  (since it gets included by org.eclipse.platform.feature.group).

  Keep doing this until you find bundles providing all the packages
that are missing.
  Rebuild your application, extract the zip and try running it again.
  This time it should be tickety boo.

* OSGi console

  To get at the osgi console add the following lines to your <application>.ini

-console
-noExit

  This will open the console and stop the application exiting on errors.

* See these web sites for more information

  * http://blog.springsource.org/2008/11/22/diagnosing-osgi-uses-conflicts/
  * http://njbartlett.name/2011/02/09/uses-constraints.html


Back to the top