Hazelcast exception in logging - hazelcast

Using:
Hazelcast 3.6.1
Log4j 2.5
slf4j 1.7.13
Hazelcast client using Log4j cannot log the Membership 'printout'
Member [localhost]:19325
This client is being initialized programmatically (not via spring).
Instead, exception is thrown by logging infrastructure
2016-03-09 15:49:34,195 hz.client_0_qv-core.event-4 ERROR An exception occurred processing Appender STDOUT java.lang.IllegalArgumentException: can't parse argument number:
Member [localhost]:19325
at java.text.MessageFormat.makeFormat(MessageFormat.java:1429)
at java.text.MessageFormat.applyPattern(MessageFormat.java:479)
at java.text.MessageFormat.<init>(MessageFormat.java:362)
at java.text.MessageFormat.format(MessageFormat.java:840)
at org.apache.logging.log4j.message.MessageFormatMessage.formatMessage(MessageFormatMessage.java:94)
The error isn't related to the number of cluster members.
Server is able to print the message just fine using the same codebase.
I can provide the full stack trace if needed.

Defining logging configuration with system property: -Dhazelcast.logging.type solved the issue.

Have you tried to bind Hazelcast logging directly to log4j?
http://docs.hazelcast.org/docs/3.6/manual/html-single/index.html#logging-configuration

Related

Unable to start guidewire CC server from tomcat

We have been trying to start the claimcenter server from tomcat. The server is getting started even though it throws exception with the message "ClaimCenter unable to start" in the logs. Please find the log details below.
gw.pl.exception.GWLifecycleException: An exception was thrown while starting a component. Setting runlevel to NODAEMONS
Caused by: gw.pl.exception.GWLifecycleException:Messaging plugin does not implement MessageTransport interface error
Possible causes -
The xyzMessageTransport class failed to instantiate due to invalid parameters.
A class which is not implementation of MessageTransport inteface configured under
MessageTransport plugin. check messaging-config.xml.
Also - specify plugin name or attach whole log if possible.

Log4j2 NoSQL Cassandra configuration in .properties file

I'm trying to add an appender to Karaf 4.2, to log exceptions to Cassandra (DSE). My "org.ops4j.pax.logging.cfg" file looks like this:
log4j2.rootLogger.appenderRef.cassandrass.ref = Cassandra
# Cassandra Appender
log4j2.appender.cass.type=NoSql
log4j2.appender.cass.name=Cassandra
but it fails with
org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : NoSQL provider not specified for appender [Cassandra]. Ignored FQCN: org.apache.logging.log4j.spi.AbstractLogger
Null object returned for NoSql in Appenders. Ignored FQCN: org.apache.logging.log4j.spi.AbstractLogger
Unable to locate appender "Cassandra" for logger config "root" Ignored FQCN: org.apache.logging.log4j.spi.AbstractLogger
Almost every configuration example I find is in the xml format. Does anyone have a working example they can share? It is complaining "NoSQL provider not specified" which makes perfect sense. I just don't know how to configure the provider to be Cassandra
This is the guide I'm following: https://logging.apache.org/log4j/2.x/manual/appenders.html#CassandraAppender
It isn't clear in your post what you're trying to achieve. If you're attempting to configure logging for Cassandra, it won't work with Log4j.
Cassandra uses SLF4J with logback so you need to configure it accordingly. For details, see Configuring logging in Cassandra.
If you're using Log4j in your app, have a look at Configuring Log4j with a properties file. Cheers!

Amazon SQS Outbound channel adapter won't initialize

I'm trying to start up a spring-int-aws flow that is writing to an SQS queue, but the context won't load.
Error starting ApplicationContext. To display the auto-configuration report
re-run your application with 'debug' enabled.
2016-10-03 14:10:51.848 ERROR 3741 --- [ main]
o.s.boot.SpringApplication : Application startup failed
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'org.springframework.integration.aws.outbound.SqsMessageHandler#0':
Bean instantiation via constructor failed; nested exception is
org.springframework.beans.BeanInstantiationException: Failed to instantiate
[org.springframework.integration.aws.outbound.SqsMessageHandler]: Constructor
threw exception; nested exception is java.lang.NoSuchMethodError:
org.springframework.cloud.aws.messaging.core.QueueMessagingTemplate.<init
(Lcom/amazonaws/services/sqs/AmazonSQS;Lorg/springframework/cloud/aws/core/env/ResourceIdResolver;)V
....
Did some research: Inside of the SQSMessageHandler (v 1.0.0-RELEASE) it's attempting to create a QueueMessagingTemplate using a declared AmazonSQS object, however the QueueMessagingTemplate (v1.1.3 Release) it requires an AmazonSQSAsync object in the constructor. Since spring-cloud-aws uses the sub-interface, it seems that spring-int-aws should as well.
Am I missing something, or should this be an issue filed against the project?
spring-integration-aws is built against 1.1.1.
Please open an issue there so we can make a compatible build.
That said, it's pretty unusual for Spring projects to break APIs in a point release, so we should raise an issue for spring-cloud-aws too, to ask them to restore the other ctor (if possible), and cross-link the issues.
I opened issues.
We would wait for the disposition of that issue before doing anything in spring-integration-aws (but we should still go ahead and support the async option).

Log4j exception lead to application abort

My java application use log4j(flume appender with AsyncAppender) to log to remote log server.
If log server is down, log4j will try to reconnect a few times,but then my java application was shutdown.Is there any possible my java application goes normal with the exception of log4j?
the right solution is :
use AsyncAppender with FlumeAppender. more detail see http://edwardsbean.github.io/blog/2014/01/14/flume-in-action-1/
You have two choices
Catch the exception and ignore it
set the UnsafeMode property to true.

Replication exception with WebSphere 7 sessions

I have a JSF 2 + Spring 3 application that's currently being deployed to a clustered WebSphere 7 environment. The servers are configured for memory-to-memory replication for session handling. While running tests on the application, a common exception that's being generated is the following:
[1/3/12 20:34:48:784 EST] 0000003c WASSession E MTMBuffWrapper storeObject SESN0200E: Caught Exception while trying to serialize.
[1/3/12 20:34:48:785 EST] 0000003c WASSession E MTMHashMap handlePropertyHits SESN0202E: Failed to replicate attribute com.sun.faces.renderkit.ServerSideStateHelper.LogicalViewMap
Any idea as to what this means and how to resolve it? Thanks.
All objects on the session have to be Serializable for memory-to-memory replication (or database persistence) to work. Apparently the specified one is not.
(Hint, you can usually Google on the specific error code, which usually will send you to one of the official WebSphere InfoCenter pages.)

Resources