You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Pam Holzner (JIRA)" <ji...@apache.org> on 2011/09/22 04:25:26 UTC

[jira] [Created] (CXF-3818) Provide Better Error Messages?

Provide Better Error Messages?
------------------------------

                 Key: CXF-3818
                 URL: https://issues.apache.org/jira/browse/CXF-3818
             Project: CXF
          Issue Type: Improvement
          Components: WS-* Components
    Affects Versions: 2.4.2
         Environment: Windows Vista; jdk 1.6.0_23; netbeans 6.9.1;soap-ui plugin
            Reporter: Pam Holzner
            Priority: Minor


This is probably not really an issue for cxf but I'm a bit stumped.

Any advice on how to debug my attempt to configure cxf to pass the username and token in the soap header?  I am getting the cryptic NoSuchMethod error which isn't helping me much.

<bean id="serverPasswordCallback" class="com.mycompany.myproj.security.ServerPasswordCallback" />
<bean id="wss4jInInterceptor" class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
<constructor-arg>
<map>
<entry key="action" value="UsernameToken" />
<entry key="passwordType" value="PasswordText" />
<entry key="signaturePropFile" value="c:/java/myproj/signature.properties" />
<entry key="passwordCallbackRef">
<ref bean="serverPasswordCallback" />
</entry>
</map>
</bean>

<jaxws:endpoint id="MyServImpl"
implementor="com.mycompany.myproj.myserv.MyServImpl"
endpointName="e:myserv"
serviceName="e:myserv"
address="myserv"
xmlns:e:urn:myserv.services.mycompany.com"
/>

The endpoint was working fine before I added in the WSS4J configuration. 

com.mycompany.myproj.security.ServerPasswordCallback.java

has 

public class ServerPasswordCallback implements CallbackHandler {

public ServerPasswordCallback()
{
System.out.println("inside constructor");
}
public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
System.out.println("inside handle method");
}

When I run, I see that the constructor is called, but when I try to exercise the service using soap-ui (with the login/password) I get 

SEVERE: Servlet.service() for servlet WebServicePort threw exception
java.lang.NoSuchMethodError: org.apache.ws.security.WSSecurityEngine.getWssConfig()Lorg/apache/ws/security/WSSConfig:
at org.apache.cxf.ws.security.wss4j.WSS4JIjInterceptor.handleMessage(WSS4JInInterceptor.java:193)
 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-3818) Provide Better Error Messages?

Posted by "Pam Holzner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13112489#comment-13112489 ] 

Pam Holzner commented on CXF-3818:
----------------------------------

Related to this is my inability to open the source code in netbeans and break point into WSS4jInInterceptor.  I open the pom at the top level of apache-cxf-2.4.2-src.  Netbeans complains in WSS4JInInterceptor.java that org.apache.cxf.ws.security.WSConstants.java doesn't exist. And indeed, I don't see it in the source,  I have 7 subfolders but only SecurityConstants.java at that level and I am missing CustomTokenPrincipal, WSDerivedKeyTokenPrincipal, etc.  Perhaps this should be a new and different issue?

> Provide Better Error Messages?
> ------------------------------
>
>                 Key: CXF-3818
>                 URL: https://issues.apache.org/jira/browse/CXF-3818
>             Project: CXF
>          Issue Type: Improvement
>          Components: WS-* Components
>    Affects Versions: 2.4.2
>         Environment: Windows Vista; jdk 1.6.0_23; netbeans 6.9.1;soap-ui plugin
>            Reporter: Pam Holzner
>            Priority: Minor
>              Labels: wss4j
>
> This is probably not really an issue for cxf but I'm a bit stumped.
> Any advice on how to debug my attempt to configure cxf to pass the username and token in the soap header?  I am getting the cryptic NoSuchMethod error which isn't helping me much.
> <bean id="serverPasswordCallback" class="com.mycompany.myproj.security.ServerPasswordCallback" />
> <bean id="wss4jInInterceptor" class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
> <constructor-arg>
> <map>
> <entry key="action" value="UsernameToken" />
> <entry key="passwordType" value="PasswordText" />
> <entry key="signaturePropFile" value="c:/java/myproj/signature.properties" />
> <entry key="passwordCallbackRef">
> <ref bean="serverPasswordCallback" />
> </entry>
> </map>
> </bean>
> <jaxws:endpoint id="MyServImpl"
> implementor="com.mycompany.myproj.myserv.MyServImpl"
> endpointName="e:myserv"
> serviceName="e:myserv"
> address="myserv"
> xmlns:e:urn:myserv.services.mycompany.com"
> />
> The endpoint was working fine before I added in the WSS4J configuration. 
> com.mycompany.myproj.security.ServerPasswordCallback.java
> has 
> public class ServerPasswordCallback implements CallbackHandler {
> public ServerPasswordCallback()
> {
> System.out.println("inside constructor");
> }
> public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
> System.out.println("inside handle method");
> }
> When I run, I see that the constructor is called, but when I try to exercise the service using soap-ui (with the login/password) I get 
> SEVERE: Servlet.service() for servlet WebServicePort threw exception
> java.lang.NoSuchMethodError: org.apache.ws.security.WSSecurityEngine.getWssConfig()Lorg/apache/ws/security/WSSConfig:
> at org.apache.cxf.ws.security.wss4j.WSS4JIjInterceptor.handleMessage(WSS4JInInterceptor.java:193)
>  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CXF-3818) Provide Better Error Messages?

Posted by "Daniel Kulp (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3818?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-3818.
------------------------------

       Resolution: Not A Problem
    Fix Version/s: Invalid
         Assignee: Daniel Kulp


Marking resolved as it was a wss4j/xerces version issue.

The pom heirachy does work fine with the eclipse:eclipse thing and displays fine in Eclipse as well as Intellij so it does sound like a NetBeans issue.
                
> Provide Better Error Messages?
> ------------------------------
>
>                 Key: CXF-3818
>                 URL: https://issues.apache.org/jira/browse/CXF-3818
>             Project: CXF
>          Issue Type: Improvement
>          Components: WS-* Components
>    Affects Versions: 2.4.2
>         Environment: Windows Vista; jdk 1.6.0_23; netbeans 6.9.1;soap-ui plugin
>            Reporter: Pam Holzner
>            Assignee: Daniel Kulp
>            Priority: Minor
>              Labels: wss4j
>             Fix For: Invalid
>
>
> This is probably not really an issue for cxf but I'm a bit stumped.
> Any advice on how to debug my attempt to configure cxf to pass the username and token in the soap header?  I am getting the cryptic NoSuchMethod error which isn't helping me much.
> <bean id="serverPasswordCallback" class="com.mycompany.myproj.security.ServerPasswordCallback" />
> <bean id="wss4jInInterceptor" class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
> <constructor-arg>
> <map>
> <entry key="action" value="UsernameToken" />
> <entry key="passwordType" value="PasswordText" />
> <entry key="signaturePropFile" value="c:/java/myproj/signature.properties" />
> <entry key="passwordCallbackRef">
> <ref bean="serverPasswordCallback" />
> </entry>
> </map>
> </bean>
> <jaxws:endpoint id="MyServImpl"
> implementor="com.mycompany.myproj.myserv.MyServImpl"
> endpointName="e:myserv"
> serviceName="e:myserv"
> address="myserv"
> xmlns:e:urn:myserv.services.mycompany.com"
> />
> The endpoint was working fine before I added in the WSS4J configuration. 
> com.mycompany.myproj.security.ServerPasswordCallback.java
> has 
> public class ServerPasswordCallback implements CallbackHandler {
> public ServerPasswordCallback()
> {
> System.out.println("inside constructor");
> }
> public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
> System.out.println("inside handle method");
> }
> When I run, I see that the constructor is called, but when I try to exercise the service using soap-ui (with the login/password) I get 
> SEVERE: Servlet.service() for servlet WebServicePort threw exception
> java.lang.NoSuchMethodError: org.apache.ws.security.WSSecurityEngine.getWssConfig()Lorg/apache/ws/security/WSSConfig:
> at org.apache.cxf.ws.security.wss4j.WSS4JIjInterceptor.handleMessage(WSS4JInInterceptor.java:193)
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-3818) Provide Better Error Messages?

Posted by "Pam Holzner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13112551#comment-13112551 ] 

Pam Holzner commented on CXF-3818:
----------------------------------

I've made progress on this.  I think the root cause was not having the right versions of all of the jars.  In particular, I upgraded the version of wss4j to 1.6.2 (from looking at the pom) and added xercesImpl 2.9.1  
and now I'm happily getting a different (and less cryptic) error.

As for building the source, Netbeans is still complaining about various files in ...ws.security.policy, sts, and trust but fortunately, not anything I am using so I can breakpoint in the source  although I must manually pull up the java file.  This is probably an issue with NetBeans not being able to handle your very fancy hierarchical tree of pom projects.

> Provide Better Error Messages?
> ------------------------------
>
>                 Key: CXF-3818
>                 URL: https://issues.apache.org/jira/browse/CXF-3818
>             Project: CXF
>          Issue Type: Improvement
>          Components: WS-* Components
>    Affects Versions: 2.4.2
>         Environment: Windows Vista; jdk 1.6.0_23; netbeans 6.9.1;soap-ui plugin
>            Reporter: Pam Holzner
>            Priority: Minor
>              Labels: wss4j
>
> This is probably not really an issue for cxf but I'm a bit stumped.
> Any advice on how to debug my attempt to configure cxf to pass the username and token in the soap header?  I am getting the cryptic NoSuchMethod error which isn't helping me much.
> <bean id="serverPasswordCallback" class="com.mycompany.myproj.security.ServerPasswordCallback" />
> <bean id="wss4jInInterceptor" class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
> <constructor-arg>
> <map>
> <entry key="action" value="UsernameToken" />
> <entry key="passwordType" value="PasswordText" />
> <entry key="signaturePropFile" value="c:/java/myproj/signature.properties" />
> <entry key="passwordCallbackRef">
> <ref bean="serverPasswordCallback" />
> </entry>
> </map>
> </bean>
> <jaxws:endpoint id="MyServImpl"
> implementor="com.mycompany.myproj.myserv.MyServImpl"
> endpointName="e:myserv"
> serviceName="e:myserv"
> address="myserv"
> xmlns:e:urn:myserv.services.mycompany.com"
> />
> The endpoint was working fine before I added in the WSS4J configuration. 
> com.mycompany.myproj.security.ServerPasswordCallback.java
> has 
> public class ServerPasswordCallback implements CallbackHandler {
> public ServerPasswordCallback()
> {
> System.out.println("inside constructor");
> }
> public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
> System.out.println("inside handle method");
> }
> When I run, I see that the constructor is called, but when I try to exercise the service using soap-ui (with the login/password) I get 
> SEVERE: Servlet.service() for servlet WebServicePort threw exception
> java.lang.NoSuchMethodError: org.apache.ws.security.WSSecurityEngine.getWssConfig()Lorg/apache/ws/security/WSSConfig:
> at org.apache.cxf.ws.security.wss4j.WSS4JIjInterceptor.handleMessage(WSS4JInInterceptor.java:193)
>  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira