MalformedParameterizedTypeException with CDI on Java SE
<p>I want to write a little Java SE based tool using CDI services from our business layer. I'll have to package everything using maven into a 'jar-with-.dependencies'.
To start small I want to see a simple example running. So I went for a simple example:</p>

<pre><code>public static void main(final String[] args) throws Exception {

    Weld weld = new Weld();
    System.out.println("Weld constructed");
    WeldContainer initialize = weld.initialize();    // exception thrown
    System.out.println("Weld init");
    TestInject importConfigurationCommand = initialize.instance().select(TestInject.class).get();
    importConfigurationCommand.sayHello();
    weld.shutdown();
}
</code></pre>

<p>The Test inject class looks like this:</p>

<pre><code>public class TestInject {

public void sayHello() {

    System.out.println("Hallo");
    }
}
</code></pre>

<p>I get the following exception when starting:</p>

<pre><code>Exception in thread "main" java.lang.reflect.MalformedParameterizedTypeException
    at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.validate ConstructorArguments(Unknown Source)
</code></pre>

<p>What is the reason for this exception? Which parametrized type is it referring to?</p>