ikvm java spring问题:找不到元素';豆子;。

ikvm java spring问题:找不到元素';豆子;。,java,ikvm,Java,Ikvm,我正在使用ikvm.46将java转换为dll 我试图调用一个用java编写的加载Springbeans的函数(转换为DLL),我已经将所有依赖项转换为DLL。 但是最简单的应用程序上下文没有被加载 应用程序上下文: /************/ <?xml version="1.0" encoding="UTF-8"?> <beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

我正在使用ikvm.46将java转换为dll

我试图调用一个用java编写的加载Springbeans的函数(转换为DLL),我已经将所有依赖项转换为DLL。 但是最简单的应用程序上下文没有被加载

应用程序上下文: /************/

    <?xml version="1.0" encoding="UTF-8"?> 
           <beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                  xmlns="http://www.springframework.org/schema/beans" 
                  xsi:schemaLocation="http://www.springframework.org/schema/beans         http://www.springframework.org/schema/beans/spring-beans-3.0.xsd" 
> 
           </beans> 
String[] configFiles = new String[] { "D:/config/spring/*.xml", "D:/config/spring/" + type + "/*.xml" }; 
FileSystemXmlApplicationContext ctx = null; 
try{ 
     ctx = new FileSystemXmlApplicationContext(configFiles); 
    }catch(Exception e){ 
      log.info("context NOT created successfully"); 
    } 
正在将“type”传递给函数,并且路径上存在所有xml。 /***************/

    <?xml version="1.0" encoding="UTF-8"?> 
           <beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                  xmlns="http://www.springframework.org/schema/beans" 
                  xsi:schemaLocation="http://www.springframework.org/schema/beans         http://www.springframework.org/schema/beans/spring-beans-3.0.xsd" 
> 
           </beans> 
String[] configFiles = new String[] { "D:/config/spring/*.xml", "D:/config/spring/" + type + "/*.xml" }; 
FileSystemXmlApplicationContext ctx = null; 
try{ 
     ctx = new FileSystemXmlApplicationContext(configFiles); 
    }catch(Exception e){ 
      log.info("context NOT created successfully"); 
    } 
我得到的第个例外是:

org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 5 in XML document from file [D:\config\spring\applicationContext-jdbc.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 5; columnNumber: 6; cvc-elt.1: Cannot find the declaration of element 'beans'. 
我使用的Spring版本是:org.springframework.beans-3.0.0.RC1.dll

代码在JVM中运行良好。 你能指出我做错了什么吗

谢谢和问候
Ankur

尝试在xml文件中使用它,我也遇到了同样的问题

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:security="http://www.springframework.org/schema/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans      
           http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
           http://www.springframework.org/schema/security
           http://www.springframework.org/schema/security/spring-security-3.1.xsd" >

Thx htc,这似乎对我不起作用。错误保持不变。我看到xsd是spring-context.jar的一部分(在visual Basic中转换为dll并添加了对c#的引用),我在c#端是否出现了与类路径相关的错误~安克尔