Announcement Announcement Module
Collapse
No announcement yet.
java.lang.reflect.MalformedParameterizedTypeExcept ion Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • java.lang.reflect.MalformedParameterizedTypeExcept ion

    Has anyone encountered a MalformedParameterziedTypeException before?

    I am encountering it when I attempt to define any properties at all in the CryptoFactoryBean.

    Here is a snippet of the file that I am using for my context.

    <bean id="cryptoFactoryBean" class="org.springframework.ws.soap.security.wss4j. support.CryptoFactoryBean" >
    <property name="keyStorePassword" value="${javax.net.ssl.keyAliasPassword}"/>
    <property name="keyStoreLocation" value="file:${javax.net.ssl.keyStore}"/>
    <property name="keyStoreType" value="JKS"/>
    </bean>

    Now, if I do not define any properties at all, then the SpringFramework can successfully instantiate the bean.

    Of course, the bean cannot be used because it is doesn't know where the keystore is.

    If it helps I've tracked through the SpringFramework source code and isolated the issue down to this line:

    258: extractTypeVariablesFromGenericInterfaces(clazz.ge tGenericInterfaces(), typeVariableMap);

    in the class org.springframework.core.GenericTypeResolver.java

    Any insight would be appreciated cause after 1 1/2 days, I've exhausted all my ideas.

    Thanks

  • #2
    Well, I was able to get past this issue !!

    I read in other areas of the forum that classpath problems could cause this issue.

    However, I did not see how it could be related to my situation so that was the last thing I looked at.

    Turns out I should have started there first...

    So, to make a long story short I had another project's pom.xml which also used the SpringFramework's security and using that project's pom.xml dependency list as a model, I re-ordered my current project's pom.xml and it worked!

    So, to save those who follow me a lot of headaches, I'll post what I believe to be the relevant parts of the dependency list from my project's pom.xml:

    <dependencies>
    <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-beans</artifactId>
    <version>3.1.2.RELEASE</version>
    </dependency>
    <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-webmvc</artifactId>
    <version>3.1.2.RELEASE</version>
    </dependency>
    <dependency>
    <groupId>org.springframework.ws</groupId>
    <artifactId>spring-ws-core</artifactId>
    <version>2.1.0.RELEASE</version>
    </dependency>
    <dependency>
    <groupId>org.springframework.ws</groupId>
    <artifactId>spring-ws-security</artifactId>
    <version>2.1.0.RELEASE</version>
    </dependency>
    <dependency>
    <groupId>org.springframework.ws</groupId>
    <artifactId>spring-ws-test</artifactId>
    <version>2.1.0.RELEASE</version>
    </dependency>

    .
    .
    .

    <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-aop</artifactId>
    <version>3.1.2.RELEASE</version>
    </dependency>
    <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-core</artifactId>
    <version>3.1.2.RELEASE</version>
    </dependency>
    <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-struts</artifactId>
    <version>3.1.2.RELEASE</version>
    </dependency>
    .
    .
    .
    <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-context</artifactId>
    <version>3.1.2.RELEASE</version>
    </dependency>
    </dependencies>

    Comment

    Working...
    X