Re: Can't load log handler "org.apache.ignite.logger.java.JavaLoggerFileHandler"

2018-01-05 Thread soodrah
The suggested solution is to have ignite-log4j as your dependency and I
believe then java.util.logging is only used as last resort if no logj4.xml
is found at IGNITE_HOME
It seems that IgniteJDBCDriver always calls JavaLogger by default which
looks at the java.util.logging.properties file. 

private static final IgniteLogger LOG = new JavaLogger();

So was still getting the JavaloggerFileHandler error. The only way to over
come it was to not have that appender in java.util.logging.properties file

change this to 
handlers=java.util.logging.ConsoleHandler,/
org.apache.ignite.logger.java.JavaLoggerFileHandler/
this
handlers=java.util.logging.ConsoleHandler

Does this make sense. This is a workaround I used to prevent trying to load
that class.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Ignite Grid is in invalid state

2017-12-28 Thread soodrah
I resolved this by Converting my client side code into a spring
configuration. After that ignite resource was returned fine. It seems
loading the xml directly does not work well when its a springboot project.
This following project proved very useful.
https://mromeh.com/2017/11/17/spring-boot-with-apache-ignite-persistent-durable-memory-storage-plus-sql-queries-over-ignite-cache/
We can close this.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Ignite Grid is in invalid state

2017-12-27 Thread soodrah
Finally saw this message 
SEVERE: Failed to send message: null
java.io.IOException: Failed to get acknowledge for message:
TcpDiscoveryClientMetricsUpdateMessage [super=TcpDiscoveryAbstractMessage
[sndNodeId=null, id=695a4a99061-22773fcd-a690-4be4-8415-c9bb471b3089,
verifierNodeId=null, topVer=0, pendingIdx=0, failedNodes=null,
isClient=true]]
at
org.apache.ignite.spi.discovery.tcp.ClientImpl$SocketWriter.body(ClientImpl.java:1276)
at org.apache.ignite.spi.IgniteSpiThread.run(IgniteSpiThread.java:62)



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Ignite Grid is in invalid state

2017-12-27 Thread soodrah
thanks After I did that. I stopped my remote cluster and restarted the remote
cluster and then the client node in the spring code.
and now its sitting here after calling this line
ignited = Ignition.start(System.getProperty(IGNITE_CONFIG_FILE_PROP)); 
has not returned from this line - should I have cleared something. Below is
the configuration I used for storage
INFO: Join cluster while cluster state transition is in progress, waiting
when transition finish.



















   


















































com.db.sl.inventory.model.LabelId
com.db.sl.inventory.model.Label




































 



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Ignite Grid is in invalid state

2017-12-27 Thread soodrah
the actual failure is happening here which is after ignite instance is
returned.
Should this be in try block or why whold it go nuts. here is the stack
trace.

/this.labelCache =
this.igniteInstance.getOrCreateCache(IGNITE_LABEL_CACHE);/

Caused by: org.springframework.beans.BeanInstantiationException: Failed to
instantiate [com.db.sl.inventory.service.InventoryService]: Factory method
'createInvService' threw exception; nested exception is
java.lang.IllegalStateException: Grid is in invalid state to perform this
operation. It either not started yet or has already being or have stopped
[igniteInstanceName=null, state=STOPPED]
at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)
at
org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
... 38 more
Caused by: java.lang.IllegalStateException: Grid is in invalid state to
perform this operation. It either not started yet or has already being or
have stopped [igniteInstanceName=null, state=STOPPED]
at
org.apache.ignite.internal.GridKernalGatewayImpl.illegalState(GridKernalGatewayImpl.java:201)
at
org.apache.ignite.internal.GridKernalGatewayImpl.readLock(GridKernalGatewayImpl.java:95)
at org.apache.ignite.internal.IgniteKernal.guard(IgniteKernal.java:3794)
at
org.apache.ignite.internal.IgniteKernal.getOrCreateCache(IgniteKernal.java:3212)
at
com.db.sl.ignite.services.IgniteInventoryService.(IgniteInventoryService.java:29)
at com.db.sl.inventory.InvServiceFactory.of(InvServiceFactory.java:27)
at
com.db.sl.inventory.config.SpringConfig.createInvService(SpringConfig.java:75)
at
com.db.sl.inventory.config.SpringConfig$$EnhancerBySpringCGLIB$$12b0324d.CGLIB$createInvService$1()
at
com.db.sl.inventory.config.SpringConfig$$EnhancerBySpringCGLIB$$12b0324d$$FastClassBySpringCGLIB$$88c9fec0.invoke()
at
org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
at
org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358)
at
com.db.sl.inventory.config.SpringConfig$$EnhancerBySpringCGLIB$$12b0324d.createInvService()
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
... 39 more



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Ignite Grid is in invalid state

2017-12-27 Thread soodrah
I am seeing following error when I enable persistence mode. 
 [main] - ERROR - Failed to get Ignite Grid is in invalid state to perform
this operation. It either not started yet or has already being or have
stopped [igniteInstanceName=null, state=STOPPED]
Some background
My servernode is runningon a separate machine. I see this in the logs
Dec 27, 2017 12:36:15 PM org.apache.ignite.logger.java.JavaLogger info
INFO: Topology snapshot [ver=2, servers=1, clients=1, CPUs=20, heap=1.9GB]
Dec 27, 2017 12:36:15 PM org.apache.ignite.logger.java.JavaLogger info
INFO: Sending activate request from node
[id=50b5d870-50dd-44cd-8a1c-5be5c3542aa7, topVer=AffinityTopologyVersion
[topVer=2, minorTopVer=0], client=true, daemon=false]
Dec 27, 2017 12:36:19 PM org.apache.ignite.logger.java.JavaLogger info
and then many lines later. I see this.

NFO: Successfully performed final activation steps
[nodeId=50b5d870-50dd-44cd-8a1c-5be5c3542aa7, client=true,
topVer=AffinityTopologyVersion [topVer=2, minorTopVer=1]]
Dec 27, 2017 12:37:04 PM org.apache.ignite.logger.java.JavaLogger info
INFO: Stopped cache [cacheName=Lables]
Dec 27, 2017 12:37:04 PM org.apache.ignite.logger.java.JavaLogger info
INFO: Stopped cache [cacheName=ignite-sys-cache]
Dec 27, 2017 12:37:04 PM org.apache.ignite.logger.java.JavaLogger info
INFO: Removed undeployed class: GridDeployment [ts=1514396175130,
depMode=SHARED, clsLdr=java.net.URLClassLoader@7edbc5dd,
clsLdrId=72b8b099061-50b5d870-50dd-44cd-8a1c-5be5c3542aa7, userVer=0,
loc=true,
sampleClsName=org.apache.ignite.internal.processors.cluster.GridClusterStateProcessor$ClientChangeGlobalStateComputeRequest,
pendingUndeploy=false, undeployed=true, usage=0]

In my code in debug mode I can see the Ignite instance but then it goes to
null and I get the above mentioned exception.

This is the code I am using to return an instance of ignite to downstream,
is something wrong in this. Do I need a different way to return it please
advise

public static Ignite createAnIgniteInstance() throws InvIgniteException {
Ignite ctIgnite = null;
   
if(StringUtils.isEmpty(System.getProperty(IGNITE_CLIENT_CONFIG_PROP))){
log.warn("Default Ignite node will be created as client node");
Ignition.setClientMode(true);
}else{
Ignition.setClientMode(new
Boolean(System.getProperty(IGNITE_CLIENT_CONFIG_PROP)));
}
   
if(StringUtils.isEmpty(System.getProperty(IGNITE_CONFIG_FILE_PROP))){
log.warn("No configuration file supplied, using default config
file: {}", IGNITE_DEFAULT_CONFIG_FILE);
 try(Ignite ignited =
Ignition.start(IGNITE_DEFAULT_CONFIG_FILE)){
 ignited.active(true);
 ctIgnite = ignited;
 }
}else{
try(Ignite ignited =
Ignition.start(System.getProperty(IGNITE_CONFIG_FILE_PROP))){
ignited.active(true);
ctIgnite = ignited;
}
}


return ctIgnite;
}



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: IgniteConfigurationFile does not load consistently

2017-12-26 Thread soodrah
I noticed the bean is defined as abstract. Failed to see that earlier, so in
examples we have default configuration and then the actual bean can have
extra and be instantiated.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: IgniteConfigurationFile does not load consistently

2017-12-26 Thread soodrah
yes you are right, it is saying default instance already started. Either way
I  am facing the following problem. On my unix machine I have the binary
ignite folder and I am trying to run the ignite node over there. To that
effect I changed the example-default.xml as follows but the script gives
below exception. All I did was add the cacheConfiguration element
http://www.springframework.org/schema/beans;
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
   xmlns:util="http://www.springframework.org/schema/util;
   xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd;>















i.model.LabelId
i.model.Label















































:47500..47509










Exception

org.apache.ignite.startup.cmdline.CommandLineStartup
examples/config/example-default.xml
class org.apache.ignite.IgniteException: Failed to find configuration in:
file:/home/username/apache-ignite-fabric-2.3.0-bin/examples/config/example-default.xml
at
org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:966)
at org.apache.ignite.Ignition.start(Ignition.java:350)
at
org.apache.ignite.startup.cmdline.CommandLineStartup.main(CommandLineStartup.java:302)
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to find
configuration in:
file:/home/username/apache-ignite-fabric-2.3.0-bin/examples/config/example-default.xml
at
org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.loadConfigurations(IgniteSpringHelperImpl.java:116)
at
org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.loadConfigurations(IgniteSpringHelperImpl.java:98)
at
org.apache.ignite.internal.IgnitionEx.loadConfigurations(IgnitionEx.java:673)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:874)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:783)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:653)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:622)
at org.apache.ignite.Ignition.start(Ignition.java:347)
... 1 more





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Can't load log handler "org.apache.ignite.logger.java.JavaLoggerFileHandler"

2017-12-26 Thread soodrah
I figured this out...I still get the error but its not stopping TomCat from
coming up. 
I added Parent dependency on springboot Pom

org.springframework.boot
spring-boot-starter-parent
1.5.4.RELEASE
 

commented out all the hardcoded spring dependencies. 
added these into my webapp module

org.apache.ignite
ignite-core
${ignite.version}


org.apache.ignite
ignite-spring
${ignite.version}


org.apache.ignite
ignite-indexing
${ignite.version}


org.apache.ignite
ignite-log4j
${ignite.version}


Here is the error, which now is a warning

'ignite.cfg$child#0'
Can't load log handler "org.apache.ignite.logger.java.JavaLoggerFileHandler"
java.lang.ClassNotFoundException:
org.apache.ignite.logger.java.JavaLoggerFileHandler
java.lang.ClassNotFoundException:
org.apache.ignite.logger.java.JavaLoggerFileHandler
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.util.logging.LogManager$5.run(LogManager.java:965)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.loadLoggerHandlers(LogManager.java:958)
at
java.util.logging.LogManager.initializeGlobalHandlers(LogManager.java:1578)
at java.util.logging.LogManager.access$1500(LogManager.java:145)
at
java.util.logging.LogManager$RootLogger.accessCheckedHandlers(LogManager.java:1667)
at java.util.logging.Logger.getHandlers(Logger.java:1777)
at
org.apache.ignite.logger.java.JavaLogger.findHandler(JavaLogger.java:399)
at 
org.apache.ignite.logger.java.JavaLogger.configure(JavaLogger.java:229)
at org.apache.ignite.logger.java.JavaLogger.(JavaLogger.java:170)
at org.apache.ignite.logger.java.JavaLogger.(JavaLogger.java:126)
at
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.initLogger(IgnitionEx.java:2390)
at
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.initializeConfiguration(IgnitionEx.java:2058)
at
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1678)
at
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1652)
at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1080)
at
org.apache.ignite.internal.IgnitionEx.startConfigurations(IgnitionEx.java:998)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:884)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:783)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:653)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:622)
at org.apache.ignite.Ignition.start(Ignition.java:347)
at 
com.db.sl.ignite.IgniteNode.createAnIgniteInstance(IgniteNode.java:54)
at
com.db.sl.inventory.impl.IgniteConnection.connect(IgniteConnection.java:15)
at com.db.sl.inventory.InvServiceFactory.of(InvServiceFactory.java:26)
at
com.db.sl.inventory.config.SpringConfig.createInvService(SpringConfig.java:75)
at
com.db.sl.inventory.config.SpringConfig$$EnhancerBySpringCGLIB$$8436d1b8.CGLIB$createInvService$1()
at
com.db.sl.inventory.config.SpringConfig$$EnhancerBySpringCGLIB$$8436d1b8$$FastClassBySpringCGLIB$$79f5bf04.invoke()
at
org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
at
org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358)
at
com.db.sl.inventory.config.SpringConfig$$EnhancerBySpringCGLIB$$8436d1b8.createInvService()
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
at
org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067)
at

Re: Can't load log handler "org.apache.ignite.logger.java.JavaLoggerFileHandler"

2017-12-26 Thread soodrah
mpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc(WebappClassLoaderBase.java:1595)
at
org.apache.catalina.loader.WebappClassLoaderBase.clearReferences(WebappClassLoaderBase.java:1525)
at
org.apache.catalina.loader.WebappClassLoaderBase.stop(WebappClassLoaderBase.java:1477)
at
org.apache.catalina.loader.WebappLoader.stopInternal(WebappLoader.java:447)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:226)
at
org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5465)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:226)
at
org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1435)
at
org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1424)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
2017-12-26 11:23:21.691 DEBUG 14992 --- [   main]
.b.l.ClasspathLoggingApplicationListener : Application failed to start with
classpath:
[file:/C:/Users/soodrah/PhoneixProjects/POC/sl-inv-mgr-appsrv/target/classes/,
file:/C:/Users/soodrah/.m2/repository/org/springframework/boot/spring-boot-starter-aop/1.5.4.RELEASE/spring-boot-starter-aop-1.5.4.RELEASE.jar,
file:/C:/Users/soodrah/.m2/repository/org/springframework/boot/spring-boot-starter/1.5.4.RELEASE/spring-boot-starter-1.5.4.RELEASE.jar,
file:/C:/Users/soodrah/.m2/repository/org/springframework/boot/spring-boot/1.5.4.RELEASE/spring-boot-1.5.4.RELEASE.jar,
file:/C:/Users/soodrah/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/1.5.4.RELEASE/spring-boot-autoconfigure-1.5.4.RELEASE.jar,
file:/C:/Users/soodrah/.m2/repository/org/springframework/boot/spring-boot-starter-logging/1.5.4.RELEASE/spring-boot-starter-logging-1.5.4.RELEASE.jar,
file:/C:/Users/soodrah/.m2/repository/ch/qos/logback/logback-classic/1.1.11/logback-classic-1.1.11.jar,
file:/C:/Users/soodrah/.m2/repository/ch/qos/logback/logback-core/1.1.11/logback-core-1.1.11.jar,
file:/C:/Users/soodrah/.m2/repository/org/slf4j/slf4j-api/1.7.22/slf4j-api-1.7.22.jar,
file:/C:/Users/soodrah/.m2/repository/org/slf4j/jcl-over-slf4j/1.7.25/jcl-over-slf4j-1.7.25.jar,
file:/C:/Users/soodrah/.m2/repository/org/slf4j/jul-to-slf4j/1.7.25/jul-to-slf4j-1.7.25.jar,
file:/C:/Users/soodrah/.m2/repository/org/slf4j/log4j-over-slf4j/1.7.25/log4j-over-slf4j-1.7.25.jar,
file:/C:/Users/soodrah/.m2/repository/org/springframework/spring-core/4.3.9.RELEASE/spring-core-4.3.9.RELEASE.jar,
file:/C:/Users/soodrah/.m2/repository/org/yaml/snakeyaml/1.17/snakeyaml-1.17.jar,
file:/C:/Users/soodrah/.m2/repository/org/springframework/spring-aop/4.3.9.RELEASE/spring-aop-4.3.9.RELEASE.jar,
file:/C:/Users/soodrah/.m2/repository/org/springframework/spring-beans/4.3.9.RELEASE/spring-beans-4.3.9.RELEASE.jar,
file:/C:/Users/soodrah/.m2/repository/org/aspectj/aspectjweaver/1.8.10/aspectjweaver-1.8.10.jar,
file:/C:/Users/soodrah/.m2/repository/org/springframework/boot/spring-boot-starter-web/1.5.4.RELEASE/spring-boot-starter-web-1.5.4.RELEASE.jar,
file:/C:/Users/soodrah/.m2/repository/org/hibernate/hibernate-validator/5.3.5.Final/hibernate-validator-5.3.5.Final.jar,
file:/C:/Users/soodrah/.m2/repository/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final.jar,
file:/C:/Users/soodrah/.m2/repository/org/jboss/logging/jboss-logging/3.3.0.Final/jboss-logging-3.3.0.Final.jar,
file:/C:/Users/soodrah/.m2/repository/com/fasterxml/classmate/1.3.1/classmate-1.3.1.jar,
file:/C:/Users/soodrah/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.8.8/jackson-databind-2.8.8.jar,
file:/C:/Users/soodrah/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.8.0/jackson-annotations-2.8.0.jar,
file:/C:/Users/soodrah/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.8.8/jackson-core-2.8.8.jar,
file:/C:/Users/soodrah/.m2/repository/org/springframework/spring-web/4.3.9.RELEASE/spring-web-4.3.9.RELEASE.jar,
file:/C:/Users/soodrah/.m2/repository/org/springframework/spring-context/4.3.9.RELEASE/spring-context-4.3.9.RELEASE.jar,
file:/C:/Users/soodrah/.m2/repository/org/springframework/spring-webmvc/4.3.9.RELEASE/spring-webmvc-4.3.9.RELEASE.jar,
file:/C:/Users/soodrah/.m2/repository/org/springframework/spring-expression/4.3.9.RELEASE/spring-expression-4.3.9.RELEASE.jar,
file:/C:/Users/soodrah/.m2/repository/org/springframework/boot/spring-boot-starter-tomcat/1.5.4.RELEASE/spring-boot-starter-tomcat-1.5.4.RELEASE.jar,
file:/C:/Users/soodrah/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/8.5.15/tomcat-embed-core-8.5.15.jar,
file:/C:/Users/soodrah/.m2/repository/org/apache/tomcat/embed/tomcat-embed-el/8.5