How can I control how many lines Karaf's log4j 2 PAX curtails / truncates?How do I stop stacktraces truncating in logsHow to configure OpenJPA logging with Pax Logging?Controlling log4j output from antnew line is not coming in log4jHow to use @WebServlet and @Component in pax-webPax exam logging with log4J for OSGI integration testsJBoss EAP 6.4/7 - Spring Boot Application's internal log4j2.xml configuration not printing on consoleHow to migrate Log4j Filter to Log4j 2how to replace pax-logging-service with pax-logging-log4j2 with latest KARAFUpdating PAX Logging configuration via ConfigurationAdminHow to create my own Appender in log4j2 with karaf and pax logging configuration?

Why is my fire extinguisher emptied after one use?

Which is the current decimal separator?

Should I leave the first authorship of our paper to the student who did the project whereas I solved it?

Can you add polynomial terms to multiple linear regression?

What are examples of experiments or studies where pre-registration would not be feasible?

Make 2019 with single digits

How does a simple logistic regression model achieve a 92% classification accuracy on MNIST?

The Planck constant for mathematicians

How to publish superseding results without creating enemies

How do we know that black holes are spinning?

Is there any way to land a rover on the Moon without using any thrusters?

How are aircraft depainted?

Consonance v. Dissonance

How are unbalanced coaxial cables used for broadcasting TV signals without any problems?

What exactly is a marshrutka (маршрутка)?

Karazuba Algorithm with arbitrary bases

If I want an interpretable model, are there methods other than Linear Regression?

How does a linear operator act on a bra?

How do certain apps show new notifications when internet access is restricted to them?

Is a suit against a University Dorm for changing policies on a whim likely to succeed (USA)?

How to write characters doing illogical things in a believable way?

If the gambler's fallacy is false, how do notions of "expected number" of events work?

Are there any “Third Order” acronyms used in space exploration?

Bit one of the Intel 8080's Flags register



How can I control how many lines Karaf's log4j 2 PAX curtails / truncates?


How do I stop stacktraces truncating in logsHow to configure OpenJPA logging with Pax Logging?Controlling log4j output from antnew line is not coming in log4jHow to use @WebServlet and @Component in pax-webPax exam logging with log4J for OSGI integration testsJBoss EAP 6.4/7 - Spring Boot Application's internal log4j2.xml configuration not printing on consoleHow to migrate Log4j Filter to Log4j 2how to replace pax-logging-service with pax-logging-log4j2 with latest KARAFUpdating PAX Logging configuration via ConfigurationAdminHow to create my own Appender in log4j2 with karaf and pax logging configuration?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I might need to change the title to refer to pax logging.



Phenomenon observed:



log entry
... 2 more


Desired outcome:



log entry
log entry
log entry


Notice that the entries in the desired outcome have not been curtailed.



Background



When using Apache Karaf, which uses the log4j 2 interface, there is a properties file
etc/org.ops4j.pax.logging.cfg where I can setup what gets logged and how. How do stop it from curtailing log entries as shown above?



org.ops4j.pax.logging.cfg



################################################################################
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
################################################################################

# Colors for log level rendering
color.fatal = bright red
color.error = bright red
color.warn = bright yellow
color.info = bright green
color.debug = cyan
color.trace = cyan

# Common pattern layout for appenders
log4j2.pattern = %dISO8601 | %-5p | %-16t | %-32c1 | %Xbundle.id - %Xbundle.name - %Xbundle.version | %m%n
log4j2.out.pattern = u001b[90m%dHH:mm:ss.SSSu001b[0m %highlight%-5levelFATAL=$color.fatal, ERROR=$color.error, WARN=$color.warn, INFO=$color.info, DEBUG=$color.debug, TRACE=$color.trace u001b[90m[%t]u001b[0m %msg%n%throwable


# Root logger
log4j2.rootLogger.level = INFO
# uncomment to use asynchronous loggers, which require mvn:com.lmax/disruptor/3.3.2 library
#log4j2.rootLogger.type = asyncRoot
#log4j2.rootLogger.includeLocation = false
log4j2.rootLogger.appenderRef.RollingFile.ref = RollingFile
log4j2.rootLogger.appenderRef.PaxOsgi.ref = PaxOsgi
log4j2.rootLogger.appenderRef.Console.ref = Console
log4j2.rootLogger.appenderRef.Console.filter.threshold.type = ThresholdFilter
log4j2.rootLogger.appenderRef.Console.filter.threshold.level = $karaf.log.console:-FINEST

# Loggers configuration

# SSHD logger
log4j2.logger.sshd.name = org.apache.sshd
log4j2.logger.sshd.level = INFO

# Spifly logger
log4j2.logger.spifly.name = org.apache.aries.spifly
log4j2.logger.spifly.level = WARN

# Security audit logger
log4j2.logger.audit.name = audit
log4j2.logger.audit.level = TRACE
log4j2.logger.audit.additivity = false
log4j2.logger.audit.appenderRef.AuditRollingFile.ref = AuditRollingFile

# Appenders configuration

# Console appender not used by default (see log4j2.rootLogger.appenderRefs)
log4j2.appender.console.type = Console
log4j2.appender.console.name = Console
log4j2.appender.console.layout.type = PatternLayout
log4j2.appender.console.layout.pattern = $log4j2.out.pattern

# Rolling file appender
log4j2.appender.rolling.type = RollingRandomAccessFile
log4j2.appender.rolling.name = RollingFile
log4j2.appender.rolling.fileName = $karaf.log/karaf.log
log4j2.appender.rolling.filePattern = $karaf.log/karaf.log.%i
# uncomment to not force a disk flush
#log4j2.appender.rolling.immediateFlush = false
log4j2.appender.rolling.append = true
log4j2.appender.rolling.layout.type = PatternLayout
log4j2.appender.rolling.layout.pattern = $log4j2.pattern
log4j2.appender.rolling.policies.type = Policies
log4j2.appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
log4j2.appender.rolling.policies.size.size = 16MB

# Audit file appender
log4j2.appender.audit.type = RollingRandomAccessFile
log4j2.appender.audit.name = AuditRollingFile
log4j2.appender.audit.fileName = $karaf.log/security.log
log4j2.appender.audit.filePattern = $karaf.log/security-%i.log
log4j2.appender.audit.append = true
log4j2.appender.audit.layout.type = PatternLayout
log4j2.appender.audit.layout.pattern = %m%n
log4j2.appender.audit.policies.type = Policies
log4j2.appender.audit.policies.size.type = SizeBasedTriggeringPolicy
log4j2.appender.audit.policies.size.size = 8MB

# OSGi appender
log4j2.appender.osgi.type = PaxOsgi
log4j2.appender.osgi.name = PaxOsgi
log4j2.appender.osgi.filter = *

# help with identification of maven-related problems with pax-url-aether
#log4j2.logger.aether.name = shaded.org.eclipse.aether
#log4j2.logger.aether.level = TRACE
#log4j2.logger.http-headers.name = shaded.org.apache.http.headers
#log4j2.logger.http-headers.level = DEBUG
#log4j2.logger.maven.name = org.ops4j.pax.url.mvn
#log4j2.logger.maven.level = TRACE



Steps to reproduce



Install Karaf 4.2.4



Make new Java project



mvn archetype:generate 
-DinteractiveMode=false
-DarchetypeGroupId=org.apache.maven.archetypes
-DgroupId=com.testproject
-DartifactId=karaftest


Add a dependency that Karaf is unaware of. Do not add a features.xml. I used a pom.xml to make this easier.



<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-blueprint</artifactId>
<version>2.22.2</version>
<scope>provided</scope>
</dependency>


Main.class:



import org.apache.camel.blueprint.BlueprintCamelContext;

/**
* Hello world!
*
*/
public class App

public static void main( String[] args )

BlueprintCamelContext blueprintCamelContext = new BlueprintCamelContext();

System.out.println( "Hello World!" );




Make a bundle. I maven's pom.xml and swapped out the packaging value and added the maven-bundle-plugin to the build command.



<packaging>bundle</packaging>

<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<version>2.4.0</version>
</plugin>
</plugins>
</build>


Build it



mvn clean install


Place bundle's jar into Karaf's deploy folder.



Karaf will not start the bundle. Start the bundle start 45 (Default bundle id on a fresh install will probably be 45.)



Run log:set debug and log:display. Look for an OSGI osgi.wiring.package error, because I did import the dependency in the MANIFEST.MF (add in the pom.xml)



Exception caught while executing command



Karaf Log Contains



11:24:05.970 ERROR [Karaf local console user karaf] Exception caught while executing command
org.apache.karaf.shell.support.MultiException: Error executing command on bundles:
Error starting bundle 45: Unable to resolve com.testproject.karaftest [45](R 45.0): missing requirement [com.testproject.karaftest [45](R 45.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.camel.blueprint)(version>=2.22.0)(!(version>=3.0.0))) Unresolved requirements: [[com.testproject.karaftest [45](R 45.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.camel.blueprint)(version>=2.22.0)(!(version>=3.0.0)))]
at org.apache.karaf.shell.support.MultiException.throwIf(MultiException.java:61) ~[?:?]
at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:70) ~[?:?]
at org.apache.karaf.bundle.command.BundlesCommand.execute(BundlesCommand.java:55) ~[?:?]
at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:84) ~[?:?]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68) ~[?:?]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86) ~[?:?]
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:599) ~[?:?]
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:526) ~[?:?]
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:415) ~[?:?]
at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:416) ~[?:?]
at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229) ~[?:?]
at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
Suppressed: java.lang.Exception: Error starting bundle 45: Unable to resolve com.testproject.karaftest [45](R 45.0): missing requirement [com.testproject.karaftest [45](R 45.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.camel.blueprint)(version>=2.22.0)(!(version>=3.0.0))) Unresolved requirements: [[com.testproject.karaftest [45](R 45.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.camel.blueprint)(version>=2.22.0)(!(version>=3.0.0)))]
at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:67) ~[?:?]
at org.apache.karaf.bundle.command.BundlesCommand.execute(BundlesCommand.java:55) ~[?:?]
at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:84) ~[?:?]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68) ~[?:?]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86) ~[?:?]
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:599) ~[?:?]
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:526) ~[?:?]
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:415) ~[?:?]
at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:416) ~[?:?]
at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229) ~[?:?]
at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: org.osgi.framework.BundleException: Unable to resolve com.testproject.karaftest [45](R 45.0): missing requirement [com.testproject.karaftest [45](R 45.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.camel.blueprint)(version>=2.22.0)(!(version>=3.0.0))) Unresolved requirements: [[com.testproject.karaftest [45](R 45.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.camel.blueprint)(version>=2.22.0)(!(version>=3.0.0)))]
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4149) ~[?:?]
at org.apache.felix.framework.Felix.startBundle(Felix.java:2119) ~[?:?]
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998) ~[?:?]
at org.apache.karaf.bundle.command.Start.executeOnBundle(Start.java:38) ~[?:?]
at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:65) ~[?:?]
... 14 more



Related: How do I stop stacktraces truncating in logs










share|improve this question


























  • Can you provide the configuration file contents?

    – Ancoron
    Apr 3 at 21:59











  • @Ancoron See appendage. I assume you were referring to org.ops4j.pax.logging.cfg.

    – Jonathan Komar
    Apr 5 at 6:49












  • OK, the logging configuration is fine. This is certainly not default Karaf behavior. You are not talking about a shortened stacktrace in the log, or?

    – Ancoron
    Apr 8 at 4:44











  • @Ancoron Shortened anything, stack traces included.

    – Jonathan Komar
    Apr 8 at 4:46











  • I've not seen anything like this behavior. Can you provide a set of real-world example log entries (not modified - complete as in the log file)?

    – Ancoron
    Apr 8 at 7:59

















0















I might need to change the title to refer to pax logging.



Phenomenon observed:



log entry
... 2 more


Desired outcome:



log entry
log entry
log entry


Notice that the entries in the desired outcome have not been curtailed.



Background



When using Apache Karaf, which uses the log4j 2 interface, there is a properties file
etc/org.ops4j.pax.logging.cfg where I can setup what gets logged and how. How do stop it from curtailing log entries as shown above?



org.ops4j.pax.logging.cfg



################################################################################
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
################################################################################

# Colors for log level rendering
color.fatal = bright red
color.error = bright red
color.warn = bright yellow
color.info = bright green
color.debug = cyan
color.trace = cyan

# Common pattern layout for appenders
log4j2.pattern = %dISO8601 | %-5p | %-16t | %-32c1 | %Xbundle.id - %Xbundle.name - %Xbundle.version | %m%n
log4j2.out.pattern = u001b[90m%dHH:mm:ss.SSSu001b[0m %highlight%-5levelFATAL=$color.fatal, ERROR=$color.error, WARN=$color.warn, INFO=$color.info, DEBUG=$color.debug, TRACE=$color.trace u001b[90m[%t]u001b[0m %msg%n%throwable


# Root logger
log4j2.rootLogger.level = INFO
# uncomment to use asynchronous loggers, which require mvn:com.lmax/disruptor/3.3.2 library
#log4j2.rootLogger.type = asyncRoot
#log4j2.rootLogger.includeLocation = false
log4j2.rootLogger.appenderRef.RollingFile.ref = RollingFile
log4j2.rootLogger.appenderRef.PaxOsgi.ref = PaxOsgi
log4j2.rootLogger.appenderRef.Console.ref = Console
log4j2.rootLogger.appenderRef.Console.filter.threshold.type = ThresholdFilter
log4j2.rootLogger.appenderRef.Console.filter.threshold.level = $karaf.log.console:-FINEST

# Loggers configuration

# SSHD logger
log4j2.logger.sshd.name = org.apache.sshd
log4j2.logger.sshd.level = INFO

# Spifly logger
log4j2.logger.spifly.name = org.apache.aries.spifly
log4j2.logger.spifly.level = WARN

# Security audit logger
log4j2.logger.audit.name = audit
log4j2.logger.audit.level = TRACE
log4j2.logger.audit.additivity = false
log4j2.logger.audit.appenderRef.AuditRollingFile.ref = AuditRollingFile

# Appenders configuration

# Console appender not used by default (see log4j2.rootLogger.appenderRefs)
log4j2.appender.console.type = Console
log4j2.appender.console.name = Console
log4j2.appender.console.layout.type = PatternLayout
log4j2.appender.console.layout.pattern = $log4j2.out.pattern

# Rolling file appender
log4j2.appender.rolling.type = RollingRandomAccessFile
log4j2.appender.rolling.name = RollingFile
log4j2.appender.rolling.fileName = $karaf.log/karaf.log
log4j2.appender.rolling.filePattern = $karaf.log/karaf.log.%i
# uncomment to not force a disk flush
#log4j2.appender.rolling.immediateFlush = false
log4j2.appender.rolling.append = true
log4j2.appender.rolling.layout.type = PatternLayout
log4j2.appender.rolling.layout.pattern = $log4j2.pattern
log4j2.appender.rolling.policies.type = Policies
log4j2.appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
log4j2.appender.rolling.policies.size.size = 16MB

# Audit file appender
log4j2.appender.audit.type = RollingRandomAccessFile
log4j2.appender.audit.name = AuditRollingFile
log4j2.appender.audit.fileName = $karaf.log/security.log
log4j2.appender.audit.filePattern = $karaf.log/security-%i.log
log4j2.appender.audit.append = true
log4j2.appender.audit.layout.type = PatternLayout
log4j2.appender.audit.layout.pattern = %m%n
log4j2.appender.audit.policies.type = Policies
log4j2.appender.audit.policies.size.type = SizeBasedTriggeringPolicy
log4j2.appender.audit.policies.size.size = 8MB

# OSGi appender
log4j2.appender.osgi.type = PaxOsgi
log4j2.appender.osgi.name = PaxOsgi
log4j2.appender.osgi.filter = *

# help with identification of maven-related problems with pax-url-aether
#log4j2.logger.aether.name = shaded.org.eclipse.aether
#log4j2.logger.aether.level = TRACE
#log4j2.logger.http-headers.name = shaded.org.apache.http.headers
#log4j2.logger.http-headers.level = DEBUG
#log4j2.logger.maven.name = org.ops4j.pax.url.mvn
#log4j2.logger.maven.level = TRACE



Steps to reproduce



Install Karaf 4.2.4



Make new Java project



mvn archetype:generate 
-DinteractiveMode=false
-DarchetypeGroupId=org.apache.maven.archetypes
-DgroupId=com.testproject
-DartifactId=karaftest


Add a dependency that Karaf is unaware of. Do not add a features.xml. I used a pom.xml to make this easier.



<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-blueprint</artifactId>
<version>2.22.2</version>
<scope>provided</scope>
</dependency>


Main.class:



import org.apache.camel.blueprint.BlueprintCamelContext;

/**
* Hello world!
*
*/
public class App

public static void main( String[] args )

BlueprintCamelContext blueprintCamelContext = new BlueprintCamelContext();

System.out.println( "Hello World!" );




Make a bundle. I maven's pom.xml and swapped out the packaging value and added the maven-bundle-plugin to the build command.



<packaging>bundle</packaging>

<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<version>2.4.0</version>
</plugin>
</plugins>
</build>


Build it



mvn clean install


Place bundle's jar into Karaf's deploy folder.



Karaf will not start the bundle. Start the bundle start 45 (Default bundle id on a fresh install will probably be 45.)



Run log:set debug and log:display. Look for an OSGI osgi.wiring.package error, because I did import the dependency in the MANIFEST.MF (add in the pom.xml)



Exception caught while executing command



Karaf Log Contains



11:24:05.970 ERROR [Karaf local console user karaf] Exception caught while executing command
org.apache.karaf.shell.support.MultiException: Error executing command on bundles:
Error starting bundle 45: Unable to resolve com.testproject.karaftest [45](R 45.0): missing requirement [com.testproject.karaftest [45](R 45.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.camel.blueprint)(version>=2.22.0)(!(version>=3.0.0))) Unresolved requirements: [[com.testproject.karaftest [45](R 45.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.camel.blueprint)(version>=2.22.0)(!(version>=3.0.0)))]
at org.apache.karaf.shell.support.MultiException.throwIf(MultiException.java:61) ~[?:?]
at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:70) ~[?:?]
at org.apache.karaf.bundle.command.BundlesCommand.execute(BundlesCommand.java:55) ~[?:?]
at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:84) ~[?:?]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68) ~[?:?]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86) ~[?:?]
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:599) ~[?:?]
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:526) ~[?:?]
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:415) ~[?:?]
at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:416) ~[?:?]
at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229) ~[?:?]
at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
Suppressed: java.lang.Exception: Error starting bundle 45: Unable to resolve com.testproject.karaftest [45](R 45.0): missing requirement [com.testproject.karaftest [45](R 45.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.camel.blueprint)(version>=2.22.0)(!(version>=3.0.0))) Unresolved requirements: [[com.testproject.karaftest [45](R 45.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.camel.blueprint)(version>=2.22.0)(!(version>=3.0.0)))]
at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:67) ~[?:?]
at org.apache.karaf.bundle.command.BundlesCommand.execute(BundlesCommand.java:55) ~[?:?]
at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:84) ~[?:?]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68) ~[?:?]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86) ~[?:?]
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:599) ~[?:?]
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:526) ~[?:?]
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:415) ~[?:?]
at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:416) ~[?:?]
at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229) ~[?:?]
at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: org.osgi.framework.BundleException: Unable to resolve com.testproject.karaftest [45](R 45.0): missing requirement [com.testproject.karaftest [45](R 45.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.camel.blueprint)(version>=2.22.0)(!(version>=3.0.0))) Unresolved requirements: [[com.testproject.karaftest [45](R 45.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.camel.blueprint)(version>=2.22.0)(!(version>=3.0.0)))]
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4149) ~[?:?]
at org.apache.felix.framework.Felix.startBundle(Felix.java:2119) ~[?:?]
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998) ~[?:?]
at org.apache.karaf.bundle.command.Start.executeOnBundle(Start.java:38) ~[?:?]
at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:65) ~[?:?]
... 14 more



Related: How do I stop stacktraces truncating in logs










share|improve this question


























  • Can you provide the configuration file contents?

    – Ancoron
    Apr 3 at 21:59











  • @Ancoron See appendage. I assume you were referring to org.ops4j.pax.logging.cfg.

    – Jonathan Komar
    Apr 5 at 6:49












  • OK, the logging configuration is fine. This is certainly not default Karaf behavior. You are not talking about a shortened stacktrace in the log, or?

    – Ancoron
    Apr 8 at 4:44











  • @Ancoron Shortened anything, stack traces included.

    – Jonathan Komar
    Apr 8 at 4:46











  • I've not seen anything like this behavior. Can you provide a set of real-world example log entries (not modified - complete as in the log file)?

    – Ancoron
    Apr 8 at 7:59













0












0








0








I might need to change the title to refer to pax logging.



Phenomenon observed:



log entry
... 2 more


Desired outcome:



log entry
log entry
log entry


Notice that the entries in the desired outcome have not been curtailed.



Background



When using Apache Karaf, which uses the log4j 2 interface, there is a properties file
etc/org.ops4j.pax.logging.cfg where I can setup what gets logged and how. How do stop it from curtailing log entries as shown above?



org.ops4j.pax.logging.cfg



################################################################################
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
################################################################################

# Colors for log level rendering
color.fatal = bright red
color.error = bright red
color.warn = bright yellow
color.info = bright green
color.debug = cyan
color.trace = cyan

# Common pattern layout for appenders
log4j2.pattern = %dISO8601 | %-5p | %-16t | %-32c1 | %Xbundle.id - %Xbundle.name - %Xbundle.version | %m%n
log4j2.out.pattern = u001b[90m%dHH:mm:ss.SSSu001b[0m %highlight%-5levelFATAL=$color.fatal, ERROR=$color.error, WARN=$color.warn, INFO=$color.info, DEBUG=$color.debug, TRACE=$color.trace u001b[90m[%t]u001b[0m %msg%n%throwable


# Root logger
log4j2.rootLogger.level = INFO
# uncomment to use asynchronous loggers, which require mvn:com.lmax/disruptor/3.3.2 library
#log4j2.rootLogger.type = asyncRoot
#log4j2.rootLogger.includeLocation = false
log4j2.rootLogger.appenderRef.RollingFile.ref = RollingFile
log4j2.rootLogger.appenderRef.PaxOsgi.ref = PaxOsgi
log4j2.rootLogger.appenderRef.Console.ref = Console
log4j2.rootLogger.appenderRef.Console.filter.threshold.type = ThresholdFilter
log4j2.rootLogger.appenderRef.Console.filter.threshold.level = $karaf.log.console:-FINEST

# Loggers configuration

# SSHD logger
log4j2.logger.sshd.name = org.apache.sshd
log4j2.logger.sshd.level = INFO

# Spifly logger
log4j2.logger.spifly.name = org.apache.aries.spifly
log4j2.logger.spifly.level = WARN

# Security audit logger
log4j2.logger.audit.name = audit
log4j2.logger.audit.level = TRACE
log4j2.logger.audit.additivity = false
log4j2.logger.audit.appenderRef.AuditRollingFile.ref = AuditRollingFile

# Appenders configuration

# Console appender not used by default (see log4j2.rootLogger.appenderRefs)
log4j2.appender.console.type = Console
log4j2.appender.console.name = Console
log4j2.appender.console.layout.type = PatternLayout
log4j2.appender.console.layout.pattern = $log4j2.out.pattern

# Rolling file appender
log4j2.appender.rolling.type = RollingRandomAccessFile
log4j2.appender.rolling.name = RollingFile
log4j2.appender.rolling.fileName = $karaf.log/karaf.log
log4j2.appender.rolling.filePattern = $karaf.log/karaf.log.%i
# uncomment to not force a disk flush
#log4j2.appender.rolling.immediateFlush = false
log4j2.appender.rolling.append = true
log4j2.appender.rolling.layout.type = PatternLayout
log4j2.appender.rolling.layout.pattern = $log4j2.pattern
log4j2.appender.rolling.policies.type = Policies
log4j2.appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
log4j2.appender.rolling.policies.size.size = 16MB

# Audit file appender
log4j2.appender.audit.type = RollingRandomAccessFile
log4j2.appender.audit.name = AuditRollingFile
log4j2.appender.audit.fileName = $karaf.log/security.log
log4j2.appender.audit.filePattern = $karaf.log/security-%i.log
log4j2.appender.audit.append = true
log4j2.appender.audit.layout.type = PatternLayout
log4j2.appender.audit.layout.pattern = %m%n
log4j2.appender.audit.policies.type = Policies
log4j2.appender.audit.policies.size.type = SizeBasedTriggeringPolicy
log4j2.appender.audit.policies.size.size = 8MB

# OSGi appender
log4j2.appender.osgi.type = PaxOsgi
log4j2.appender.osgi.name = PaxOsgi
log4j2.appender.osgi.filter = *

# help with identification of maven-related problems with pax-url-aether
#log4j2.logger.aether.name = shaded.org.eclipse.aether
#log4j2.logger.aether.level = TRACE
#log4j2.logger.http-headers.name = shaded.org.apache.http.headers
#log4j2.logger.http-headers.level = DEBUG
#log4j2.logger.maven.name = org.ops4j.pax.url.mvn
#log4j2.logger.maven.level = TRACE



Steps to reproduce



Install Karaf 4.2.4



Make new Java project



mvn archetype:generate 
-DinteractiveMode=false
-DarchetypeGroupId=org.apache.maven.archetypes
-DgroupId=com.testproject
-DartifactId=karaftest


Add a dependency that Karaf is unaware of. Do not add a features.xml. I used a pom.xml to make this easier.



<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-blueprint</artifactId>
<version>2.22.2</version>
<scope>provided</scope>
</dependency>


Main.class:



import org.apache.camel.blueprint.BlueprintCamelContext;

/**
* Hello world!
*
*/
public class App

public static void main( String[] args )

BlueprintCamelContext blueprintCamelContext = new BlueprintCamelContext();

System.out.println( "Hello World!" );




Make a bundle. I maven's pom.xml and swapped out the packaging value and added the maven-bundle-plugin to the build command.



<packaging>bundle</packaging>

<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<version>2.4.0</version>
</plugin>
</plugins>
</build>


Build it



mvn clean install


Place bundle's jar into Karaf's deploy folder.



Karaf will not start the bundle. Start the bundle start 45 (Default bundle id on a fresh install will probably be 45.)



Run log:set debug and log:display. Look for an OSGI osgi.wiring.package error, because I did import the dependency in the MANIFEST.MF (add in the pom.xml)



Exception caught while executing command



Karaf Log Contains



11:24:05.970 ERROR [Karaf local console user karaf] Exception caught while executing command
org.apache.karaf.shell.support.MultiException: Error executing command on bundles:
Error starting bundle 45: Unable to resolve com.testproject.karaftest [45](R 45.0): missing requirement [com.testproject.karaftest [45](R 45.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.camel.blueprint)(version>=2.22.0)(!(version>=3.0.0))) Unresolved requirements: [[com.testproject.karaftest [45](R 45.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.camel.blueprint)(version>=2.22.0)(!(version>=3.0.0)))]
at org.apache.karaf.shell.support.MultiException.throwIf(MultiException.java:61) ~[?:?]
at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:70) ~[?:?]
at org.apache.karaf.bundle.command.BundlesCommand.execute(BundlesCommand.java:55) ~[?:?]
at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:84) ~[?:?]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68) ~[?:?]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86) ~[?:?]
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:599) ~[?:?]
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:526) ~[?:?]
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:415) ~[?:?]
at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:416) ~[?:?]
at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229) ~[?:?]
at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
Suppressed: java.lang.Exception: Error starting bundle 45: Unable to resolve com.testproject.karaftest [45](R 45.0): missing requirement [com.testproject.karaftest [45](R 45.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.camel.blueprint)(version>=2.22.0)(!(version>=3.0.0))) Unresolved requirements: [[com.testproject.karaftest [45](R 45.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.camel.blueprint)(version>=2.22.0)(!(version>=3.0.0)))]
at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:67) ~[?:?]
at org.apache.karaf.bundle.command.BundlesCommand.execute(BundlesCommand.java:55) ~[?:?]
at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:84) ~[?:?]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68) ~[?:?]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86) ~[?:?]
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:599) ~[?:?]
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:526) ~[?:?]
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:415) ~[?:?]
at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:416) ~[?:?]
at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229) ~[?:?]
at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: org.osgi.framework.BundleException: Unable to resolve com.testproject.karaftest [45](R 45.0): missing requirement [com.testproject.karaftest [45](R 45.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.camel.blueprint)(version>=2.22.0)(!(version>=3.0.0))) Unresolved requirements: [[com.testproject.karaftest [45](R 45.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.camel.blueprint)(version>=2.22.0)(!(version>=3.0.0)))]
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4149) ~[?:?]
at org.apache.felix.framework.Felix.startBundle(Felix.java:2119) ~[?:?]
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998) ~[?:?]
at org.apache.karaf.bundle.command.Start.executeOnBundle(Start.java:38) ~[?:?]
at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:65) ~[?:?]
... 14 more



Related: How do I stop stacktraces truncating in logs










share|improve this question
















I might need to change the title to refer to pax logging.



Phenomenon observed:



log entry
... 2 more


Desired outcome:



log entry
log entry
log entry


Notice that the entries in the desired outcome have not been curtailed.



Background



When using Apache Karaf, which uses the log4j 2 interface, there is a properties file
etc/org.ops4j.pax.logging.cfg where I can setup what gets logged and how. How do stop it from curtailing log entries as shown above?



org.ops4j.pax.logging.cfg



################################################################################
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
################################################################################

# Colors for log level rendering
color.fatal = bright red
color.error = bright red
color.warn = bright yellow
color.info = bright green
color.debug = cyan
color.trace = cyan

# Common pattern layout for appenders
log4j2.pattern = %dISO8601 | %-5p | %-16t | %-32c1 | %Xbundle.id - %Xbundle.name - %Xbundle.version | %m%n
log4j2.out.pattern = u001b[90m%dHH:mm:ss.SSSu001b[0m %highlight%-5levelFATAL=$color.fatal, ERROR=$color.error, WARN=$color.warn, INFO=$color.info, DEBUG=$color.debug, TRACE=$color.trace u001b[90m[%t]u001b[0m %msg%n%throwable


# Root logger
log4j2.rootLogger.level = INFO
# uncomment to use asynchronous loggers, which require mvn:com.lmax/disruptor/3.3.2 library
#log4j2.rootLogger.type = asyncRoot
#log4j2.rootLogger.includeLocation = false
log4j2.rootLogger.appenderRef.RollingFile.ref = RollingFile
log4j2.rootLogger.appenderRef.PaxOsgi.ref = PaxOsgi
log4j2.rootLogger.appenderRef.Console.ref = Console
log4j2.rootLogger.appenderRef.Console.filter.threshold.type = ThresholdFilter
log4j2.rootLogger.appenderRef.Console.filter.threshold.level = $karaf.log.console:-FINEST

# Loggers configuration

# SSHD logger
log4j2.logger.sshd.name = org.apache.sshd
log4j2.logger.sshd.level = INFO

# Spifly logger
log4j2.logger.spifly.name = org.apache.aries.spifly
log4j2.logger.spifly.level = WARN

# Security audit logger
log4j2.logger.audit.name = audit
log4j2.logger.audit.level = TRACE
log4j2.logger.audit.additivity = false
log4j2.logger.audit.appenderRef.AuditRollingFile.ref = AuditRollingFile

# Appenders configuration

# Console appender not used by default (see log4j2.rootLogger.appenderRefs)
log4j2.appender.console.type = Console
log4j2.appender.console.name = Console
log4j2.appender.console.layout.type = PatternLayout
log4j2.appender.console.layout.pattern = $log4j2.out.pattern

# Rolling file appender
log4j2.appender.rolling.type = RollingRandomAccessFile
log4j2.appender.rolling.name = RollingFile
log4j2.appender.rolling.fileName = $karaf.log/karaf.log
log4j2.appender.rolling.filePattern = $karaf.log/karaf.log.%i
# uncomment to not force a disk flush
#log4j2.appender.rolling.immediateFlush = false
log4j2.appender.rolling.append = true
log4j2.appender.rolling.layout.type = PatternLayout
log4j2.appender.rolling.layout.pattern = $log4j2.pattern
log4j2.appender.rolling.policies.type = Policies
log4j2.appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
log4j2.appender.rolling.policies.size.size = 16MB

# Audit file appender
log4j2.appender.audit.type = RollingRandomAccessFile
log4j2.appender.audit.name = AuditRollingFile
log4j2.appender.audit.fileName = $karaf.log/security.log
log4j2.appender.audit.filePattern = $karaf.log/security-%i.log
log4j2.appender.audit.append = true
log4j2.appender.audit.layout.type = PatternLayout
log4j2.appender.audit.layout.pattern = %m%n
log4j2.appender.audit.policies.type = Policies
log4j2.appender.audit.policies.size.type = SizeBasedTriggeringPolicy
log4j2.appender.audit.policies.size.size = 8MB

# OSGi appender
log4j2.appender.osgi.type = PaxOsgi
log4j2.appender.osgi.name = PaxOsgi
log4j2.appender.osgi.filter = *

# help with identification of maven-related problems with pax-url-aether
#log4j2.logger.aether.name = shaded.org.eclipse.aether
#log4j2.logger.aether.level = TRACE
#log4j2.logger.http-headers.name = shaded.org.apache.http.headers
#log4j2.logger.http-headers.level = DEBUG
#log4j2.logger.maven.name = org.ops4j.pax.url.mvn
#log4j2.logger.maven.level = TRACE



Steps to reproduce



Install Karaf 4.2.4



Make new Java project



mvn archetype:generate 
-DinteractiveMode=false
-DarchetypeGroupId=org.apache.maven.archetypes
-DgroupId=com.testproject
-DartifactId=karaftest


Add a dependency that Karaf is unaware of. Do not add a features.xml. I used a pom.xml to make this easier.



<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-blueprint</artifactId>
<version>2.22.2</version>
<scope>provided</scope>
</dependency>


Main.class:



import org.apache.camel.blueprint.BlueprintCamelContext;

/**
* Hello world!
*
*/
public class App

public static void main( String[] args )

BlueprintCamelContext blueprintCamelContext = new BlueprintCamelContext();

System.out.println( "Hello World!" );




Make a bundle. I maven's pom.xml and swapped out the packaging value and added the maven-bundle-plugin to the build command.



<packaging>bundle</packaging>

<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<version>2.4.0</version>
</plugin>
</plugins>
</build>


Build it



mvn clean install


Place bundle's jar into Karaf's deploy folder.



Karaf will not start the bundle. Start the bundle start 45 (Default bundle id on a fresh install will probably be 45.)



Run log:set debug and log:display. Look for an OSGI osgi.wiring.package error, because I did import the dependency in the MANIFEST.MF (add in the pom.xml)



Exception caught while executing command



Karaf Log Contains



11:24:05.970 ERROR [Karaf local console user karaf] Exception caught while executing command
org.apache.karaf.shell.support.MultiException: Error executing command on bundles:
Error starting bundle 45: Unable to resolve com.testproject.karaftest [45](R 45.0): missing requirement [com.testproject.karaftest [45](R 45.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.camel.blueprint)(version>=2.22.0)(!(version>=3.0.0))) Unresolved requirements: [[com.testproject.karaftest [45](R 45.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.camel.blueprint)(version>=2.22.0)(!(version>=3.0.0)))]
at org.apache.karaf.shell.support.MultiException.throwIf(MultiException.java:61) ~[?:?]
at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:70) ~[?:?]
at org.apache.karaf.bundle.command.BundlesCommand.execute(BundlesCommand.java:55) ~[?:?]
at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:84) ~[?:?]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68) ~[?:?]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86) ~[?:?]
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:599) ~[?:?]
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:526) ~[?:?]
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:415) ~[?:?]
at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:416) ~[?:?]
at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229) ~[?:?]
at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
Suppressed: java.lang.Exception: Error starting bundle 45: Unable to resolve com.testproject.karaftest [45](R 45.0): missing requirement [com.testproject.karaftest [45](R 45.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.camel.blueprint)(version>=2.22.0)(!(version>=3.0.0))) Unresolved requirements: [[com.testproject.karaftest [45](R 45.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.camel.blueprint)(version>=2.22.0)(!(version>=3.0.0)))]
at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:67) ~[?:?]
at org.apache.karaf.bundle.command.BundlesCommand.execute(BundlesCommand.java:55) ~[?:?]
at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:84) ~[?:?]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68) ~[?:?]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86) ~[?:?]
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:599) ~[?:?]
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:526) ~[?:?]
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:415) ~[?:?]
at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:416) ~[?:?]
at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229) ~[?:?]
at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: org.osgi.framework.BundleException: Unable to resolve com.testproject.karaftest [45](R 45.0): missing requirement [com.testproject.karaftest [45](R 45.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.camel.blueprint)(version>=2.22.0)(!(version>=3.0.0))) Unresolved requirements: [[com.testproject.karaftest [45](R 45.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.camel.blueprint)(version>=2.22.0)(!(version>=3.0.0)))]
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4149) ~[?:?]
at org.apache.felix.framework.Felix.startBundle(Felix.java:2119) ~[?:?]
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998) ~[?:?]
at org.apache.karaf.bundle.command.Start.executeOnBundle(Start.java:38) ~[?:?]
at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:65) ~[?:?]
... 14 more



Related: How do I stop stacktraces truncating in logs







log4j2 apache-karaf






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 8 at 10:54







Jonathan Komar

















asked Mar 28 at 10:55









Jonathan KomarJonathan Komar

7521 gold badge12 silver badges30 bronze badges




7521 gold badge12 silver badges30 bronze badges















  • Can you provide the configuration file contents?

    – Ancoron
    Apr 3 at 21:59











  • @Ancoron See appendage. I assume you were referring to org.ops4j.pax.logging.cfg.

    – Jonathan Komar
    Apr 5 at 6:49












  • OK, the logging configuration is fine. This is certainly not default Karaf behavior. You are not talking about a shortened stacktrace in the log, or?

    – Ancoron
    Apr 8 at 4:44











  • @Ancoron Shortened anything, stack traces included.

    – Jonathan Komar
    Apr 8 at 4:46











  • I've not seen anything like this behavior. Can you provide a set of real-world example log entries (not modified - complete as in the log file)?

    – Ancoron
    Apr 8 at 7:59

















  • Can you provide the configuration file contents?

    – Ancoron
    Apr 3 at 21:59











  • @Ancoron See appendage. I assume you were referring to org.ops4j.pax.logging.cfg.

    – Jonathan Komar
    Apr 5 at 6:49












  • OK, the logging configuration is fine. This is certainly not default Karaf behavior. You are not talking about a shortened stacktrace in the log, or?

    – Ancoron
    Apr 8 at 4:44











  • @Ancoron Shortened anything, stack traces included.

    – Jonathan Komar
    Apr 8 at 4:46











  • I've not seen anything like this behavior. Can you provide a set of real-world example log entries (not modified - complete as in the log file)?

    – Ancoron
    Apr 8 at 7:59
















Can you provide the configuration file contents?

– Ancoron
Apr 3 at 21:59





Can you provide the configuration file contents?

– Ancoron
Apr 3 at 21:59













@Ancoron See appendage. I assume you were referring to org.ops4j.pax.logging.cfg.

– Jonathan Komar
Apr 5 at 6:49






@Ancoron See appendage. I assume you were referring to org.ops4j.pax.logging.cfg.

– Jonathan Komar
Apr 5 at 6:49














OK, the logging configuration is fine. This is certainly not default Karaf behavior. You are not talking about a shortened stacktrace in the log, or?

– Ancoron
Apr 8 at 4:44





OK, the logging configuration is fine. This is certainly not default Karaf behavior. You are not talking about a shortened stacktrace in the log, or?

– Ancoron
Apr 8 at 4:44













@Ancoron Shortened anything, stack traces included.

– Jonathan Komar
Apr 8 at 4:46





@Ancoron Shortened anything, stack traces included.

– Jonathan Komar
Apr 8 at 4:46













I've not seen anything like this behavior. Can you provide a set of real-world example log entries (not modified - complete as in the log file)?

– Ancoron
Apr 8 at 7:59





I've not seen anything like this behavior. Can you provide a set of real-world example log entries (not modified - complete as in the log file)?

– Ancoron
Apr 8 at 7:59












0






active

oldest

votes










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);














draft saved

draft discarded
















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55395836%2fhow-can-i-control-how-many-lines-karafs-log4j-2-pax-curtails-truncates%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes




Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.




















draft saved

draft discarded















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55395836%2fhow-can-i-control-how-many-lines-karafs-log4j-2-pax-curtails-truncates%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해