简体   繁体   English

Java Xtext / EMF资源工厂Impl NoClassDefFoundError

[英]Java Xtext/EMF Resource Factory Impl NoClassDefFoundError

UPDATE : I solved it by removing and reimporting my project as well the dependencies 更新 :我通过删除并重新导入项目以及相关性来解决它

I recently updated eclipse from neon3 modeling edition to oxygen2 modeling edition. 我最近将Eclipse从neon3建模版更新为oxygen2建模版。 While my code worked perfectly with neon3 , in oxygen2 after importing my workspace and updating the classpath and the dependencies, while on execution of the program, NoClassDefFoundError occurs on org/eclipse/emf/ecore/xmi/impl/EcoreResourceFactoryImpl . 虽然我的代码以neon3完美工作,在oxygen2导入我的工作区和更新类路径和依存关系,同时对程序的执行,之后NoClassDefFoundError上发生org/eclipse/emf/ecore/xmi/impl/EcoreResourceFactoryImpl

Here i provide the code that produces the error stack as well a part of the stack 在这里,我提供了产生错误堆栈以及堆栈一部分的代码

/*
 * generated by Xtext 2.10.0
 */
public class MyAppDslStandaloneSetupGenerated implements ISetup {

    @Override
    public Injector createInjectorAndDoEMFRegistration() {
        // register default ePackages
        if (!Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().containsKey("ecore"))
            Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put(
                "ecore", new EcoreResourceFactoryImpl());
        if (!Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().containsKey("xmi"))
            Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put(
                "xmi", new XMIResourceFactoryImpl());

        Injector injector = createInjector();
        register(injector);
        return injector;
    }


...

}

StackTrace: 堆栈跟踪:

    Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/eclipse/emf/ecore/xmi/impl/EcoreResourceFactoryImpl
        at com.xtext.myapp.MyAppDslStandaloneSetupGenerated.createInjectorAndDoEMFRegistration(MyAppDslStandaloneSetupGenerated.java:27)
...
Caused by: java.lang.ClassNotFoundException: org.eclipse.emf.ecore.xmi.impl.EcoreResourceFactoryImpl

Plugin Dependencies: 插件依赖项:

插件依赖

I have done some research on the net but I couldn't figure out whats wrong. 我已经在网上进行了一些研究,但是我不知道出了什么问题。 The

确保在插件的依赖项上添加/可用了org.eclipse.emf.ecore.xmi

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Xtext错误:需要注册资源工厂 - Xtext error: Registered resource factory is needed 使用LevelDB的Java Impl时出现NoClassDefFoundError - NoClassDefFoundError when using java impl of leveldb Xtext解析EMF模型接口 - Xtext parse EMF model interface java.lang.NoClassDefFoundError:org / apache / commons / pool / impl / GenericObjectPool - java.lang.NoClassDefFoundError: org/apache/commons/pool/impl/GenericObjectPool java.lang.NoClassDefFoundError:org / apache / http / impl / conn / PoolingClientConnectionManager - java.lang.NoClassDefFoundError: org/apache/http/impl/conn/PoolingClientConnectionManager java.lang.NoClassDefFoundError:org / slf4j / impl / StaticLoggerBinder - java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder Java:java.lang.NoClassDefFoundError:org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager - Java: java.lang.NoClassDefFoundError: org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager “正在中止:没有提供EMF资源的途径!” - “Aborting: no path to EMF resource provided!” java.lang.NoClassDefFoundError: - 不能初始化类org.apache.http.impl.conn.ManagedHttpClientConnectionFactory - java.lang.NoClassDefFoundError :-Could not initialize class org.apache.http.impl.conn.ManagedHttpClientConnectionFactory com.ibm.websphere.servlet.error.ServletErrorReport:java.lang.NoClassDefFoundError:org.hibernate.impl.SessionFactoryImpl - com.ibm.websphere.servlet.error.ServletErrorReport: java.lang.NoClassDefFoundError: org.hibernate.impl.SessionFactoryImpl
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM