GridGain不会加载分区

时间:2014-08-25 23:32:30

标签: java gridgain

〜/ .bashrc设置

  • export GRIDGAIN_HOME =〜/ Downloads / gridgain-platform-os-6.1.9-nix

我无法让服务器加载分区配置,因为它不断从java中抛出错误;

  • 线程中的异常" main" java.lang.IllegalArgumentException:未配置缓存:partitioned

命令行管理控制台提供以下内容:

ADMIN CONSOLE
 2014 Copyright (C) GridGain Systems

+-----------------------------------------+
| Status      | Connected                 |
| Grid name   | <default>                 |
| Config path | config/default-config.xml |
| Uptime      | 00:00:00                  |
+-----------------------------------------+

这是我用来启动应用程序的命令;

我也试过

  • {GRIDGAIN_HOME} / bin / ggstart。{bat | sh} examples / config / example-cache.xml

正如文档中所建议的那样。

[aaa@sandbox bin]$ ./ggstart.sh ../config/default-config.xml
[16:06:56]   _____     _     _______      _         
[16:06:56]  / ___/____(_)___/ / ___/___ _(_)___     
[16:06:56] / (_ // __/ // _  / (_ // _ `/ // _ \   
[16:06:56] \___//_/ /_/ \_,_/\___/ \_,_/_//_//_/
[16:06:56]  
[16:06:56] ver. 6.1.9-os#20140627-sha1:88a243e1
[16:06:56] 2014 Copyright (C) GridGain Systems
[16:06:56] 
[16:06:56] Quiet mode.
[16:06:56]   ^-- Logging to file '/home/aaa/Downloads/gridgain-platform-os-6.1.9-nix/work/log/gridgain-95b42fea.%g.log'
[16:06:56]   ^-- To see **FULL** console log here add -DGRIDGAIN_QUIET=false or "-v" to ggstart.{sh|bat}
[16:06:56] 
[16:06:57] Failed to create Protobuf marshaller for REST C++ and .NET clients (consider adding gridgain-protobuf module to classpath).
[16:06:57] Failed to initialize HTTP REST protocol (consider adding gridgain-rest-http module to classpath).
[16:06:59] New version is available at www.gridgain.org: 6.2.0-rc5
[16:06:59] If running benchmarks, see http://bit.ly/GridGain-Benchmarking
[16:06:59] To start Console Management & Monitoring run ggvisorcmd.{sh|bat}
[16:06:59] 
[16:06:59] GridGain node started OK (id=95b42fea)
[16:06:59] Topology snapshot [ver=1, nodes=1, CPUs=4, heap=1.0GB]

我一打电话就这样;

这些是我尝试启动网格格式java的不同方法。

  • grid = GridGain.start(&#34; /home/aaa/Downloads/gridgain-platform-os-6.1.9-nix/config/default-config.xml");
  • grid = GridGain.start(&#34; /home/aaa/Downloads/gridgain-platform-os-6.1.9-nix/config/example-cache.xml");
  • grid = GridGain.start(&#34; /config/default-config.xml");
  • grid = GridGain.start(&#34; /config/example-cache.xml");

  • grid = GridGain.start();

  • final GridCache cache = grid.cache(&#34; partitioned&#34;);
它爆炸了,并且做到了。

Exception in thread "main" java.lang.IllegalArgumentException: Cache is not configured: partitioned
    at org.gridgain.grid.kernal.processors.cache.GridCacheProcessor.publicCache(GridCacheProcessor.java:1697)
    at org.gridgain.grid.kernal.GridKernal.cache(GridKernal.java:2782)
    at com.xxx.xxx.xxx.xxx(xxx.java:296)
    at com.xxx.xxx.xxx.xxx(xxx.java:124)
    at com.xxx.xxx.xxx.main(xxx.java:542)

我也得到了这个;

Initializing settings
Reading sites:
Site file read!
Exception in thread "main" class org.gridgain.grid.GridException: Failed to create GridGain component (consider adding gridgain-spring module to classpath) [component=SPRING, cls=org.gridgain.grid.kernal.processors.spring.GridSpringProcessorImpl]
For more information see:
    Troubleshooting:      http://bit.ly/GridGain-Troubleshooting
    Documentation Center: http://bit.ly/GridGain-Documentation

    at org.gridgain.grid.kernal.GridComponentType.componentException(GridComponentType.java:239)
    at org.gridgain.grid.kernal.GridComponentType.create0(GridComponentType.java:230)
    at org.gridgain.grid.kernal.GridComponentType.create(GridComponentType.java:141)
    at org.gridgain.grid.kernal.GridGainEx.loadConfigurations(GridGainEx.java:509)
    at org.gridgain.grid.kernal.GridGainEx.start(GridGainEx.java:687)
    at org.gridgain.grid.kernal.GridGainEx.start(GridGainEx.java:626)
    at org.gridgain.grid.kernal.GridGainEx.start(GridGainEx.java:491)
    at org.gridgain.grid.GridGain.start(GridGain.java:314)
    at com.tupl.geolocation.GeolocationComputation.<init>(GeolocationComputation.java:95)
    at com.tupl.geolocation.GeolocationComputation.main(GeolocationComputation.java:542)
Caused by: java.lang.ClassNotFoundException:       org.gridgain.grid.kernal.processors.spring.GridSpringProcessorImpl
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:190)
    at org.gridgain.grid.kernal.GridComponentType.create0(GridComponentType.java:216)
    ... 8 more

我错过了什么?

亲切的问候......

1 个答案:

答案 0 :(得分:0)

通过maven添加spring,我能够摆脱上面的错误。我一定错过了。但现在我只能打开默认配置。如果我尝试使用&#34; examples / config / example-cache.xml&#34;

使用:

  • grid = GridGain.start(&#34; /config/default-config.xml");

引发另一个错误:

  • grid = GridGain.start(&#34; /config/example-cache.xml");

    线程中的异常&#34; main&#34; class org.gridgain.grid.GridException:无法实例化Spring XML 应用背景 [springUrl =文件:/home/aaa/Downloads/gridgain-platform-os-6.1.9-nix/examples/config/example-cache.xml, err =创建名称为&#39; grid.cfg&#39;的bean时出错在URL中定义 [文件:/home/aaa/Downloads/gridgain-platform-os-6.1.9-nix/examples/config/example-cache.xml]: 无法创建内核&#39; org.gridgain.grid.spi.indexing.h2.GridH2IndexingSpi#17fd8d42&#39;类型 [org.gridgain.grid.spi.indexing.h2.GridH2IndexingSpi]设置bean属性&#39; indexingSpi&#39; 用键[0];嵌套异常是org.springframework.beans.factory.CannotLoadBeanClassException: 找不到名为bean的类[org.gridgain.grid.spi.indexing.h2.GridH2IndexingSpi] &#39;#org.gridgain.grid.spi.indexing.h2.GridH2IndexingSpi 17fd8d42&#39;在URL中定义 [文件:/home/aaa/Downloads/gridgain-platform-os-6.1.9-nix/examples/config/example-cache.xml]; 嵌套异常是java.lang.ClassNotFoundException: org.gridgain.grid.spi.indexing.h2.GridH2IndexingSpi]

    有关更多信息,请参阅:     疑难解答:http://bit.ly/GridGain-Troubleshooting     文档中心:http://bit.ly/GridGain-Documentation

我不知道这意味着什么。

感谢。