java.lang.ExceptionInInitializerError Ausnahme beim erstellen Anwendungskontext im Frühjahr

Ich bin beim üben mit Feder und bin immer ein java.lang.ExceptionInInitializerError Ausnahme, wenn ich versuche zum instanziieren des Kontext. Die Ausnahme der unten angezeigt wird, mit meinem folgenden code. Ich habe vereinfacht mein experiment von vor.

Ausnahme

Oct 17, 2012 5:54:22 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@570c16b7: startup date [Wed Oct 17 17:54:22 CDT 2012]; root of context hierarchy
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.springframework.context.support.AbstractRefreshableApplicationContext.createBeanFactory(AbstractRefreshableApplicationContext.java:195)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:128)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:535)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:449)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
at helloworld.HelloWorldTest.main(HelloWorldTest.java:13)
Caused by: java.lang.NullPointerException
at org.springframework.beans.factory.support.DefaultListableBeanFactory.<clinit>(DefaultListableBeanFactory.java:105)
... 7 more

Meine Konfiguration XML -

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:c="http://www.springframework.org/schema/c"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">

<bean id="messageContainer" class="helloworld.MessageContainer">
    <property name="message" value="Hello World">
    </property>
</bean>

<bean id="messageOutputService" class="helloworld.MessageOutputService">
</bean>

Meine test-Klasse.

package helloworld;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class HelloWorldTest {

/**
 * @param args
 */
public static void main(String[] args)
{
    ApplicationContext context = new ClassPathXmlApplicationContext("HelloWorldTest-context.xml");

    MessageContainer message = context.getBean(MessageContainer.class);

    MessageOutputService service = context.getBean(MessageOutputService.class);

    service.outputMessageToConsole(message);

}

}
sind Sie positiv, Sie sind mit der gleichen version für alle die Spring JARs im classpath?
Bearbeiten Sie Ihre post und die ganzen stacktrace.
Ich bin mit der neuesten Quellen Gläsern veröffentlicht auf den Frühling springspurce.org website.
Wie würde ich Sie bekommen, der rest der stack-trace aus Eclipse/STS. Dies ist, was angezeigt in der Konsole.
sind Sie mit Maven? wenn dem so ist, können Sie Ihre POM?

InformationsquelleAutor Robert Greathouse | 2012-10-10

Schreibe einen Kommentar