分享

Ignite as Secondary File System 启动出错

墨默滴 发表于 2016-6-21 11:25:00 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 4 8509
配置Ignite作为in-memory caching layer
配置default-config.xml
                    <!--
                        Configure secondary file system if needed.
                    -->
                    <property name="secondaryFileSystem">
                        <bean class="org.apache.ignite.hadoop.fs.IgniteHadoopIgfsSecondaryFileSystem">
                            <property name="fileSystemFactory">
                                <bean class="org.apache.ignite.hadoop.fs.CachingHadoopFileSystemFactory">
                                    <property name="uri" value="hdfs://namenode_host:9000"/>
                                </bean>
                            </property>
                        </bean>
                    </property>


出错日志
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:/mnt/data0/home/hadoop/ignite-1.6.0/config/default-config.xml]
        at org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:906)
        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 instantiate Spring XML application context (make sure all classes used in Spring configuration are present at CLASSPATH) [springUrl=file:/mnt/data0/home/hadoop/ignite-1.6.0/config/default-config.xml]
        at org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.applicationContext(IgniteSpringHelperImpl.java:387)
        at org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.loadConfigurations(IgniteSpringHelperImpl.java:104)
        at org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.loadConfigurations(IgniteSpringHelperImpl.java:98)
        at org.apache.ignite.internal.IgnitionEx.loadConfigurations(IgnitionEx.java:639)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:840)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:749)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:619)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:589)
        at org.apache.ignite.Ignition.start(Ignition.java:347)
        ... 1 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'grid.cfg' defined in URL [file:/mnt/data0/home/hadoop/ignite-1.6.0/config/default-config.xml]: Cannot create inner bean 'org.apache.ignite.configuration.FileSystemConfiguration#32109b42' of type [org.apache.ignite.configuration.FileSystemConfiguration] while setting bean property 'fileSystemConfiguration' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.ignite.configuration.FileSystemConfiguration#32109b42' defined in URL [file:/mnt/data0/home/hadoop/ignite-1.6.0/config/default-config.xml]: Cannot create inner bean 'org.apache.ignite.hadoop.fs.IgniteHadoopIgfsSecondaryFileSystem#192e59e8' of type [org.apache.ignite.hadoop.fs.IgniteHadoopIgfsSecondaryFileSystem] while setting bean property 'secondaryFileSystem'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.ignite.hadoop.fs.IgniteHadoopIgfsSecondaryFileSystem#192e59e8' defined in URL [file:/mnt/data0/home/hadoop/ignite-1.6.0/config/default-config.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/apache/hadoop/fs/FSDataOutputStream
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:290)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:122)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:359)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:157)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1471)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1216)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:538)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:229)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:725)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
        at org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.applicationContext(IgniteSpringHelperImpl.java:381)
        ... 9 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.ignite.configuration.FileSystemConfiguration#32109b42' defined in URL [file:/mnt/data0/home/hadoop/ignite-1.6.0/config/default-config.xml]: Cannot create inner bean 'org.apache.ignite.hadoop.fs.IgniteHadoopIgfsSecondaryFileSystem#192e59e8' of type [org.apache.ignite.hadoop.fs.IgniteHadoopIgfsSecondaryFileSystem] while setting bean property 'secondaryFileSystem'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.ignite.hadoop.fs.IgniteHadoopIgfsSecondaryFileSystem#192e59e8' defined in URL [file:/mnt/data0/home/hadoop/ignite-1.6.0/config/default-config.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/apache/hadoop/fs/FSDataOutputStream
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:290)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:122)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1471)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1216)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:538)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:276)
        ... 24 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.ignite.hadoop.fs.IgniteHadoopIgfsSecondaryFileSystem#192e59e8' defined in URL [file:/mnt/data0/home/hadoop/ignite-1.6.0/config/default-config.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/apache/hadoop/fs/FSDataOutputStream
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1095)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1040)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:505)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:276)
        ... 30 more
Caused by: java.lang.NoClassDefFoundError: org/apache/hadoop/fs/FSDataOutputStream
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2532)
        at java.lang.Class.getConstructor0(Class.java:2842)
        at java.lang.Class.getDeclaredConstructor(Class.java:2053)
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:80)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1088)
        ... 34 more
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.fs.FSDataOutputStream
        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)
        ... 40 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:/mnt/data0/home/hadoop/ignite-1.6.0/config/default-config.xml]
Note! You may use 'USER_LIBS' environment variable to specify your classpath.


已有(4)人评论

跳转到指定楼层
xuanxufeng 发表于 2016-6-21 12:48:06
这是Java方面的?
可能环境变量的问题
回复

使用道具 举报

墨默滴 发表于 2016-6-21 15:16:42
xuanxufeng 发表于 2016-6-21 12:48
这是Java方面的?
可能环境变量的问题

java应该没问题啊 我hadoop都正常
回复

使用道具 举报

langke93 发表于 2016-6-21 17:28:16
问题不止一个,除了hadoop,还有spring问题
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.fs.FSDataOutputStream
应该缺一些包,先导入import org.apache.hadoop.fs.FSDataOutputStream;  
对于开发环境中最好都导入

回复

使用道具 举报

nextuser 发表于 2016-6-21 17:30:18
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条