김남욱
김남욱

Reputation: 11

Ignite: ERROR: log4j enabled and classpath settings error?

After installing ignite, the basic execution of ignite.sh went well. But, as below apache-ignite-2.11.0-bin/config/default-config.xml Setting Log4J logging in a file throws an error.

default-config.xml <property name="gridLogger"> <bean class="org.apache.ignite.logger.log4j.Log4JLogger"> <!-- log4j configuration file --> <constructor-arg type="java.lang.String" value="log4j-config.xml"/> </bean> </property>

bashrc file

export IGNITE_HOME=/home/a/apache-ignite-2.11.0-bin export IGNITE_LIBS=/home/a/apache-ignite-2.11.0-bin/libs/* export IGNITE_HOME=/home/a/apache-ignite-2.11.0-bin #export IGNITE_LIBS=${IGNITE_HOME}/libs/* #export USER_LIBS=/home/a/apache-ignite-2.11.0-bin/libs/* export PATH=$PATH:$IGNITE_HOME/bin ##export USER_LIBS=$IGNITE_HOME/libs/optional/ignite-log4j/ignite-log4j-2.11.0.jar #export CLASSPATH=$CLASSPATH:$IGNITE_HOME/libs/ignite-core-2.11.0.jar

ignite execute

[error] root@a-VirtualBox:/home/a/apache-ignite-2.11.0-bin/bin# ./ignite.sh WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.apache.ignite.internal.util.GridUnsafe$2 (file:/home/a/apache-ignite-2.11.0-bin/libs/ignite-core-2.11.0.jar) to field java.nio.Buffer.address WARNING: Please consider reporting this to the maintainers of org.apache.ignite.internal.util.GridUnsafe$2 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release class org.apache.ignite.IgniteException: Failed to instantiate Spring XML application context (make sure all classes used in Spring configuration are present at CLASSPATH) [springUrl=file:/home/a/apache- ignite-2.11.0-bin/config/default-config.xml] at org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:1098) at org.apache.ignite.Ignition.start(Ignition.java:356) at org.apache.ignite.startup.cmdline.CommandLineStartup.main(CommandLineStartup.java:367) Caused by: class org.apache.ignite.IgniteCheckedException: Failed to instantiate Spring XML application context (make sure all classes used in Spring configuration are present at CLASSPATH) [springUrl=file:/home/a/apache-ignite-2.11.0-bin/config/default-config.xml] at org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.applicationContext(IgniteSpringHelperImpl.ja va:387) at org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.loadConfigurations(IgniteSpringHelperImpl.ja va:104) at org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.loadConfigurations(IgniteSpringHelperImpl.ja va:98) at org.apache.ignite.internal.IgnitionEx.loadConfigurations(IgnitionEx.java:741) at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:942) at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:851) at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:721) at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:690) at org.apache.ignite.Ignition.start(Ignition.java:353) ... 1 more Failed to start grid: Failed to instantiate Spring XML application context (make sure all classes used in Spring configuration are present at CLASSPATH) [springUrl=file:/home/a/apache-ignite-2.11.0- bin/config/default-config.xml] Note! You may use 'USER_LIBS' environment variable to specify your classpath.

Is there a cause of the issue and a solution?

Upvotes: 0

Views: 56

Answers (1)

Stephen Darlington
Stephen Darlington

Reputation: 52565

As per the documentation, you must first enable the Log4j module. You do that by moving the ignite-log4j2 folder from libs/optional to libs.

Upvotes: 1

Related Questions