Thanks for the pointer. If someone hits the problem again here is my
findings

Issue as you might see from the errors above in the thread was with missing
dependency. I was using Log4J 2 in my parent pom and changing it to Log4j
1.2 fixed the errors.

Thanks all for your inputs!

--
Nataraj Basappa

On Tue, Apr 21, 2015 at 3:55 PM, Achim Nierbeck <[email protected]>
wrote:

> Hi,
>
> without further guessing.
> Might want to take a look on how Karaf itself is build by the plugin. [1]
> Maybe this'll get you to the right direction :)
>
> regards, Achim
> [1] -
> https://github.com/apache/karaf/blob/master/assemblies/apache-karaf/pom.xml
>
> 2015-04-21 16:49 GMT+02:00 Nataraj Basappa <[email protected]>:
>
>> Thanks Achin, Its promising that I'm learning stuff. But error still
>> exists and not sure whats causing it. I have build the vanilla distribution
>> with just the options Jean gave above. Extracting built vanilla
>> distribution and running, I can still see the error as follows in
>> karaf.log.
>>
>> 2015-04-21 15:42:38,601 | INFO  | FelixStartLevel  | fileinstall
>>              | 5 - org.apache.felix.fileinstall - 3.4.3.SNAPSHOT | Creating
>> configuration from org.apache.karaf.kar.cfg
>> 2015-04-21 15:42:38,624 | ERROR | FelixStartLevel  | Felix
>>              |  -  -  | Error starting
>> mvn:org.apache.logging.log4j/log4j-core/2.2
>> org.osgi.framework.BundleException: Unresolved constraint in bundle
>> org.apache.logging.log4j.core [6]: Unable to resolve 6.0: missing
>> requirement [6.0] osgi.wiring.package;
>> (osgi.wiring.package=org.apache.logging.log4j)
>> at
>> org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4002)[org.apache.felix.framework-4.4.1.jar:]
>> at
>> org.apache.felix.framework.Felix.startBundle(Felix.java:2045)[org.apache.felix.framework-4.4.1.jar:]
>> at
>> org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1299)[org.apache.felix.framework-4.4.1.jar:]
>> at
>> org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304)[org.apache.felix.framework-4.4.1.jar:]
>> at java.lang.Thread.run(Thread.java:745)[:1.7.0_75]
>> 2015-04-21 15:42:38,625 | ERROR | FelixStartLevel  | Felix
>>              |  -  -  | Error starting
>> mvn:org.apache.logging.log4j/log4j-slf4j-impl/2.2
>> org.osgi.framework.BundleException: Unresolved constraint in bundle
>> org.apache.logging.log4j.slf4j-impl [7]: Unable to resolve 7.0: missing
>> requirement [7.0] osgi.wiring.package;
>> (&(osgi.wiring.package=org.apache.logging.log4j)(version>=2.2.0)(!(version>=3.0.0)))
>> at
>> org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4002)[org.apache.felix.framework-4.4.1.jar:]
>> at
>> org.apache.felix.framework.Felix.startBundle(Felix.java:2045)[org.apache.felix.framework-4.4.1.jar:]
>> at
>> org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1299)[org.apache.felix.framework-4.4.1.jar:]
>> at
>> org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304)[org.apache.felix.framework-4.4.1.jar:]
>> at java.lang.Thread.run(Thread.java:745)[:1.7.0_75]
>> 2015-04-21 15:42:38,625 | ERROR | FelixStartLevel  | Felix
>>              |  -  -  | Error starting mvn:org.slf4j/slf4j-api/1.7.12
>> org.osgi.framework.BundleException: Unresolved constraint in bundle
>> slf4j.api [8]: Unable to resolve 8.0: missing requirement [8.0]
>> osgi.wiring.package;
>> (&(osgi.wiring.package=org.slf4j.impl)(version>=1.6.0)) [caused by: Unable
>> to resolve 7.0: missing requirement [7.0] osgi.wiring.package;
>> (&(osgi.wiring.package=org.apache.logging.log4j)(version>=2.2.0)(!(version>=3.0.0)))]
>> at
>> org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4002)[org.apache.felix.framework-4.4.1.jar:]
>> at
>> org.apache.felix.framework.Felix.startBundle(Felix.java:2045)[org.apache.felix.framework-4.4.1.jar:]
>> at
>> org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1299)[org.apache.felix.framework-4.4.1.jar:]
>> at
>> org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304)[org.apache.felix.framework-4.4.1.jar:]
>> at java.lang.Thread.run(Thread.java:745)[:1.7.0_75]
>> 2015-04-21 15:42:38,904 | INFO  | pool-1-thread-1  | FeaturesServiceImpl
>>              | 9 - org.apache.karaf.features.core - 4.0.0.M2 | Adding
>> features: aries-blueprint/[4.0.0.M2,4.0.0.M2],
>> diagnostic/[4.0.0.M2,4.0.0.M2], wrap/[0,0.0.0], shell/[4.0.0.M2,4.0.0.M2],
>> kar/[4.0.0.M2,4.0.0.M2], package/[4.0.0.M2,4.0.0.M2],
>> shell-compat/[4.0.0.M2,4.0.0.M2], log/[4.0.0.M2,4.0.0.M2],
>> ssh/[4.0.0.M2,4.0.0.M2], system/[4.0.0.M2,4.0.0.M2],
>> jaas/[4.0.0.M2,4.0.0.M2], service/[4.0.0.M2,4.0.0.M2],
>> config/[4.0.0.M2,4.0.0.M2], bundle/[4.0.0.M2,4.0.0.M2],
>> deployer/[4.0.0.M2,4.0.0.M2], feature/[4.0.0.M2,4.0.0.M2],
>> instance/[4.0.0.M2,4.0.0.M2], management/[4.0.0.M2,4.0.0.M2]
>>
>> --
>> Nataraj Basappa
>>
>> On Tue, Apr 21, 2015 at 3:22 PM, Achim Nierbeck <[email protected]>
>> wrote:
>>
>>> Hi,
>>>
>>> sorry if I might have confused you. But actually the log feature should
>>> add those.
>>> Just wanted to point out, that those bundles do give you the required
>>> packages.
>>>
>>> regards, Achim
>>>
>>>
>>> 2015-04-21 16:14 GMT+02:00 Nataraj Basappa <[email protected]>:
>>>
>>>> Achim,
>>>>   I'm new to Karaf and not sure how to include pax-logging bundles but
>>>> I tried following configuration option under configuration directive
>>>> of karaf-maven-plugin
>>>>
>>>> <bootBundles>
>>>>     <bundle>mvn:org.ops4j.pax.logging/pax-logging-api/1.8.1</bundle>
>>>>     <bundle>mvn:org.ops4j.pax.logging/pax-logging-service/1.8.1</bundle>
>>>> </bootBundles>
>>>>
>>>>
>>>>  With out the above config, I have checked the exploded files from
>>>> PaxExam run and I can see the pax-logging bundles (service + api) present
>>>> under <karaf_install>/system. I was under the assumption that feature
>>>> (bootFeature) "log" would automatically bring in this dependencies but I'm
>>>> sure thats not right.
>>>> --
>>>> Nataraj Basappa
>>>>
>>>>
>>>> On Tue, Apr 21, 2015 at 2:42 PM, Achim Nierbeck <
>>>> [email protected]> wrote:
>>>>
>>>>> You'll need to make sure the pax-logging bundles are present in your
>>>>> custom distribution.
>>>>>
>>>>> regards, Achim
>>>>>
>>>>> 2015-04-21 15:38 GMT+02:00 Nataraj Basappa <[email protected]>:
>>>>>
>>>>>> Thanks Jean, for a quick response. That solved my initial problem of
>>>>>> building the custom distribution.
>>>>>>
>>>>>> But the built distribution when used in Pax Exam test show missing
>>>>>> dependencies. My parent module includes both log4j and slf4j as the
>>>>>> dependencies. Does the karaf-assmbley include those or should I have to 
>>>>>> do
>>>>>> anything more?
>>>>>>
>>>>>> 2015-04-21 14:28:39,649 | ERROR | FelixStartLevel  | Felix
>>>>>>                  |  -  -  | Error starting
>>>>>> mvn:org.apache.logging.log4j/log4j-core/2.2
>>>>>> org.osgi.framework.BundleException: Unresolved constraint in bundle
>>>>>> org.apache.logging.log4j.core [6]: Unable to resolve 6.0: missing
>>>>>> requirement [6.0] osgi.wiring.package;
>>>>>> (osgi.wiring.package=org.apache.logging.log4j)
>>>>>>         at
>>>>>> org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4002)[org.apache.felix.framework-4.4.1.jar:]
>>>>>>         at
>>>>>> org.apache.felix.framework.Felix.startBundle(Felix.java:2045)[org.apache.felix.framework-4.4.1.jar:]
>>>>>>         at
>>>>>> org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1299)[org.apache.felix.framework-4.4.1.jar:]
>>>>>>         at
>>>>>> org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304)[org.apache.felix.framework-4.4.1.jar:]
>>>>>>         at java.lang.Thread.run(Thread.java:745)[:1.7.0_75]
>>>>>> 2015-04-21 14:28:39,653 | ERROR | FelixStartLevel  | Felix
>>>>>>                  |  -  -  | Error starting
>>>>>> mvn:org.apache.logging.log4j/log4j-slf4j-impl/2.2
>>>>>> org.osgi.framework.BundleException: Unresolved constraint in bundle
>>>>>> org.apache.logging.log4j.slf4j-impl [7]: Unable to resolve 7.0: missing
>>>>>> requirement [7.0] osgi.wiring.package;
>>>>>> (&(osgi.wiring.package=org.apache.logging.log4j)(version>=2.2.0)(!(version>=3.0.0)))
>>>>>>
>>>>>> --
>>>>>> Nataraj Basappa
>>>>>>
>>>>>> On Tue, Apr 21, 2015 at 1:05 PM, Jean-Baptiste Onofré <
>>>>>> [email protected]> wrote:
>>>>>>
>>>>>>> By the way, I will update the documentation to reflect that.
>>>>>>>
>>>>>>> Regards
>>>>>>> JB
>>>>>>>
>>>>>>> On 04/21/2015 01:55 PM, Nataraj Basappa wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>    I'm trying to build a Karaf custom distribution for a evaluation
>>>>>>>> project that I'm working on. I'm trying out with following pom file
>>>>>>>> and
>>>>>>>> and seeing this error. Hope someone can point me in right direction
>>>>>>>> or
>>>>>>>> correct me if I'm missing something.
>>>>>>>>
>>>>>>>> I'm following this links:
>>>>>>>>   -
>>>>>>>>
>>>>>>>> http://karaf.apache.org/manual/latest/developers-guide/custom-distribution.html
>>>>>>>>   -
>>>>>>>>
>>>>>>>> https://github.com/apache/karaf/blob/master/manual/src/main/webapp/developers-guide/custom-distribution.conf
>>>>>>>>
>>>>>>>> POM file:
>>>>>>>>
>>>>>>>> <projectxmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi=";
>>>>>>>> http://www.w3.org/2001/XMLSchema-instance";
>>>>>>>>
>>>>>>>>           xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
>>>>>>>> http://maven.apache.org/xsd/maven-4.0.0.xsd";>
>>>>>>>>      <parent>
>>>>>>>>          <artifactId>osgi-webapp</artifactId>
>>>>>>>>          <groupId>com.example.osgi</groupId>
>>>>>>>>          <version>1.0</version>
>>>>>>>>      </parent>
>>>>>>>>      <modelVersion>4.0.0</modelVersion>
>>>>>>>>
>>>>>>>>      <artifactId>karaf-distribution-test</artifactId>
>>>>>>>>      <version>4.0.0.M2</version>
>>>>>>>>      <packaging>karaf-assembly</packaging>
>>>>>>>>
>>>>>>>>      <name>karaf-distribution-test</name>
>>>>>>>>      <url>http://maven.apache.org</url>
>>>>>>>>
>>>>>>>>      <properties>
>>>>>>>>
>>>>>>>>  <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
>>>>>>>>          <!-- keep this inline with distribution version -->
>>>>>>>>          <karaf.version>4.0.0.M2</karaf.version>
>>>>>>>>      </properties>
>>>>>>>>
>>>>>>>>      <dependencies>
>>>>>>>>          <dependency>
>>>>>>>>              <!-- scope is compile so all features (there is only
>>>>>>>> one) are installed into startup.properties and the feature repo itself 
>>>>>>>> is
>>>>>>>> not added in etc/org.apache.karaf.features.cfg file -->
>>>>>>>>              <groupId>org.apache.karaf.features</groupId>
>>>>>>>>              <artifactId>framework</artifactId>
>>>>>>>>              <version>${karaf.version}</version>
>>>>>>>>              <type>kar</type>
>>>>>>>>          </dependency>
>>>>>>>>          <dependency>
>>>>>>>>              <!-- scope is runtime so the feature repo is listed in
>>>>>>>> etc/org.apache.karaf.features.cfg file, and features will installed 
>>>>>>>> into
>>>>>>>> the system directory -->
>>>>>>>>              <groupId>org.apache.karaf.features</groupId>
>>>>>>>>              <artifactId>standard</artifactId>
>>>>>>>>              <classifier>features</classifier>
>>>>>>>>              <version>${karaf.version}</version>
>>>>>>>>              <type>xml</type>
>>>>>>>>              <scope>runtime</scope>
>>>>>>>>          </dependency>
>>>>>>>>      </dependencies>
>>>>>>>>
>>>>>>>>      <build>
>>>>>>>>          <defaultGoal>install</defaultGoal>
>>>>>>>>
>>>>>>>>          <resources>
>>>>>>>>              <resource>
>>>>>>>>
>>>>>>>>  <directory>${project.basedir}/src/main/resources</directory>
>>>>>>>>                  <filtering>true</filtering>
>>>>>>>>                  <includes>
>>>>>>>>                      <include>**/*</include>
>>>>>>>>                  </includes>
>>>>>>>>                  <excludes/>
>>>>>>>>              </resource>
>>>>>>>>          </resources>
>>>>>>>>
>>>>>>>>          <plugins>
>>>>>>>>              <plugin>
>>>>>>>>                  <groupId>org.apache.maven.plugins</groupId>
>>>>>>>>                  <artifactId>maven-resources-plugin</artifactId>
>>>>>>>>                  <version>2.7</version>
>>>>>>>>                  <executions>
>>>>>>>>                      <execution>
>>>>>>>>                          <id>filter</id>
>>>>>>>>                          <phase>generate-resources</phase>
>>>>>>>>                          <goals>
>>>>>>>>                              <goal>resources</goal>
>>>>>>>>                          </goals>
>>>>>>>>                      </execution>
>>>>>>>>                  </executions>
>>>>>>>>              </plugin>
>>>>>>>>              <plugin>
>>>>>>>>                  <groupId>org.apache.karaf.tooling</groupId>
>>>>>>>>                  <artifactId>karaf-maven-plugin</artifactId>
>>>>>>>>                  <extensions>true</extensions>
>>>>>>>>                  <configuration>
>>>>>>>>                      <bootFeatures>
>>>>>>>>                          <feature>standard</feature>
>>>>>>>>                          <feature>management</feature>
>>>>>>>>                      </bootFeatures>
>>>>>>>>                  </configuration>
>>>>>>>>              </plugin>
>>>>>>>>          </plugins>
>>>>>>>>      </build>
>>>>>>>>
>>>>>>>> </project>
>>>>>>>>
>>>>>>>>
>>>>>>>> Error seen on Maven execution:
>>>>>>>>
>>>>>>>> [INFO] == Installing artifact
>>>>>>>> mvn:org.apache.karaf.features/standard/4.0.0.M2/xml/features
>>>>>>>> [INFO]
>>>>>>>>
>>>>>>>> ------------------------------------------------------------------------
>>>>>>>> [INFO] BUILD FAILURE
>>>>>>>> [INFO]
>>>>>>>>
>>>>>>>> ------------------------------------------------------------------------
>>>>>>>> [INFO] Total time: 4.809 s
>>>>>>>> [INFO] Finished at: 2015-04-21T12:45:22+01:00
>>>>>>>> [INFO] Final Memory: 20M/316M
>>>>>>>> [INFO]
>>>>>>>>
>>>>>>>> ------------------------------------------------------------------------
>>>>>>>> [ERROR] Failed to execute goal
>>>>>>>> org.apache.karaf.tooling:karaf-maven-plugin:4.0.0.M2:install-kars
>>>>>>>> (default-install-kars) on project karaf-distribution-test: Unable to
>>>>>>>> build assembly: Could not find matching feature for standard ->
>>>>>>>> [Help 1]
>>>>>>>> [ERROR]
>>>>>>>> [ERROR] To see the full stack trace of the errors, re-run Maven
>>>>>>>> with the
>>>>>>>> -e switch.
>>>>>>>> [ERROR] Re-run Maven using the -X switch to enable full debug
>>>>>>>> logging.
>>>>>>>> [ERROR]
>>>>>>>> [ERROR] For more information about the errors and possible
>>>>>>>> solutions,
>>>>>>>> please read the following articles:
>>>>>>>> [ERROR] [Help 1]
>>>>>>>>
>>>>>>>> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
>>>>>>>>
>>>>>>>> --
>>>>>>>> Nataraj Basappa
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Jean-Baptiste Onofré
>>>>>>> [email protected]
>>>>>>> http://blog.nanthrax.net
>>>>>>> Talend - http://www.talend.com
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> Apache Member
>>>>> Apache Karaf <http://karaf.apache.org/> Committer & PMC
>>>>> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
>>>>> Committer & Project Lead
>>>>> blog <http://notizblog.nierbeck.de/>
>>>>> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>>>>>
>>>>> Software Architect / Project Manager / Scrum Master
>>>>>
>>>>>
>>>>
>>>
>>>
>>> --
>>>
>>> Apache Member
>>> Apache Karaf <http://karaf.apache.org/> Committer & PMC
>>> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer
>>> & Project Lead
>>> blog <http://notizblog.nierbeck.de/>
>>> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>>>
>>> Software Architect / Project Manager / Scrum Master
>>>
>>>
>>
>
>
> --
>
> Apache Member
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
> Project Lead
> blog <http://notizblog.nierbeck.de/>
> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>
> Software Architect / Project Manager / Scrum Master
>
>

Reply via email to