'processSOAPRequest An error occurred when trying to read the trust store using JConfig. The JConfig file being used was null

'processSOAPRequest An error occurred when trying to read the trust store using JConfig. The JConfig file being used was null

I'm working on a webservice provider component.
I'm getting WSSecurityException.
PFB the exception

'processSOAPRequest An error occurred when trying to read the trust store using JConfig. The JConfig file being used was null
java.security.GeneralSecurityException: org.apache.ws.security.WSSecurityException: class org.apache.ws.security.components.crypto.Merlin cannot create instance'
I'm using WAS7.

Im struggling with this issue for a week.
Please help me out at the earliest.
I understand that you have a web service that is looking for a trust store path.
This trust store path is declared in a properties file managed by JConfig.
But JConfig can't find the properties file.

First thought, take a look to the JConfig descriptor config.xml and where is placed.
Is it placed in the classpath?
It is placed in the classpath only.
I little bit confused whether it is placed in classpath. But I got it confirmed by renaming the JKS file.
The log clearly showed that there is no such file like that.

The issue is resolved now.
The problem is that I mentioned filtering as true for JKS file in pom.xml.
So my JKS file was getting corrupted.

ariables can be included in your resources. These variables, denoted by the ${...} delimiters, can come from the system properties, your project properties, from your filter resources and from the command line.

For example, if we have a resource src/main/resources/hello.txt containing

Hello ${name}

And a POM like this

<project>
  ...
  <name>My Resources Plugin Practice Project</name>
  ...
  <build>
    ...
    <resources>
      <resource>
        <directory>src/main/resources</directory>
      </resource>
      ...
    </resources>
    ...
  </build>
  ...
</project>

Upon calling

mvn resources:resources

This will create a resource output in target/classes/hello.txt which contains exactly the same text.

Hello ${name}

However, if we add a <filtering> tag to our POM and set it to true like this:

      ...
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
      </resource>
      ...

Our target/classes/hello.txt after calling

[1] [2] [3] Next

Copyright © 2007-2012 www.chuibin.com Chuibin Copyright