1 Reply Latest reply: Jan 29, 2010 10:23 AM by Zoul AKHDAR RSS

Wise with JBoss Seam

Zoul AKHDAR Newbie

Hi all , I try to use wise-core in JBoss Seam application , the authentication method in seam need to consume a WS via wise-core.

the server start correctly , but when my seam ap consume my WS i have an exception.

My WS and Seam ap are deployed in the same server.

 

my configuration :

- Windows xp SP2

- JBoss AS 5.1.0.GA

- JDK 6

-JBoss Developper Studio

-  i have in my %JBOSS_HOME%\lib\endorsed : activation.jar , jaxb-api.jar , jaxb-impl.jar , jaxb-xjc.jar , jbossws-native-jaxrpc.jar ,jbossws-native-jaxws.jar , jbossws-native-jaxws-ext.jar , jbossws-native-saaj.jar , resolver.jar , serializer.jar , stax-api.jar , xalan.jar , xercesImpl.jar

- i have also in my classpath  tools.jar from jdk-XXX\lib    to allow wise-core to compile the classes

 

My WS code :

 

 

import javax.ejb.EJB;
import javax.ejb.Remote;
import javax.ejb.Stateless;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;

import ci.prosuma.prosumaauthenticationmodule.dao.ldap.IUserLdapLDAP;
import ci.prosuma.prosumaauthenticationmodule.dao.ldap.entity.User;
import ci.prosuma.prosumaauthenticationmodule.service.IWSLDAPService;


@Stateless
@Remote(IWSLDAPService.class)
@WebService
@SOAPBinding(style = SOAPBinding.Style.RPC)
public class WSLDAPServiceBean implements IWSLDAPService {

     
     
     @EJB
     private IUserLdapLDAP userLDAP;
     
     
     @WebMethod
     public User connectByIdAndPassword(@WebParam(name="name") String name,@WebParam(name="password")  String password) {
          return userLDAP.connectByIdAndPassword(name, password);
     }



     @WebMethod
     public User[] findAllUsers(@WebParam(name="firstName") String firstName,@WebParam(name="lastName") String lastName,@WebParam(name="maxResult") int maxResult) {
          return userLDAP.findAllUsers(firstName, lastName, maxResult);
     }


     @WebMethod
     public User findUserByLogin(@WebParam(name="login") String login) {
          return userLDAP.findByLogin(login);
     }


}

 

Interface I

 

package ci.prosuma.prosumaauthenticationmodule.service;

import ci.prosuma.prosumaauthenticationmodule.dao.ldap.entity.User;

public interface IWSLDAPService {

     public User connectByIdAndPassword(String name, String password);


     public User[] findAllUsers(String firstName, String lastName, int maxResult);


     public User findUserByLogin(String login);

}

 

My seam app

 

import java.util.HashMap;

import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Logger;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.log.Log;
import org.jboss.seam.security.Credentials;
import org.jboss.seam.security.Identity;
import org.jboss.wise.core.client.InvocationResult;
import org.jboss.wise.core.client.WSDynamicClient;
import org.jboss.wise.core.client.WSMethod;
import org.jboss.wise.core.client.builder.WSDynamicClientBuilder;
import org.jboss.wise.core.client.factories.WSDynamicClientFactory;
import org.jboss.wise.core.handlers.LoggingHandler;

@Name("authenticator")
public class Authenticator
{
    @Logger private Log log;

    @In Identity identity;
    @In Credentials credentials;

    public boolean authenticate()
    {
        log.info("authenticating {0}", credentials.getUsername());

       
        try{
       
        WSDynamicClientBuilder clientBuilder = WSDynamicClientFactory.getJAXWSClientBuilder();
         WSDynamicClient client = clientBuilder.tmpDir(System.getProperty("java.io.tmpdir")).verbose(true).keepSource(true)
              .wsdlURL(System.getProperty("ws.auth.wsdl")).build();
         WSMethod method = client.getWSMethod("IWSLDAPServiceBeanService", "WSLDAPServiceBeanPort", "findUserByLogin");
         method.getEndpoint().addHandler(new LoggingHandler());
         HashMap<String, Object> requestMap = new HashMap<String, Object>();
         requestMap.put("login", "zakhdar");
         InvocationResult result = method.invoke(requestMap, null);
         HashMap<String, Object> map =  (HashMap<String, Object>) result.getMapRequestAndResult(null, requestMap);
         for(Object s : map.values()){
              System.out.println(s +"  "+ s.getClass());
         }
         
         
         
         
         client.close();
        }catch (Exception e) {
               e.printStackTrace();
          }
        
        
        
      
        return false;
    }

}

 

 

My WSDL :

<definitions name="WSLDAPServiceBeanService" targetNamespace="http://impl.service.prosumaauthenticationmodule.prosuma.ci/">
−
<types>
−
<xs:schema targetNamespace="http://impl.service.prosumaauthenticationmodule.prosuma.ci/" version="1.0">
−
<xs:complexType name="user">
−
<xs:sequence>
<xs:element name="admin" type="xs:boolean"/>
<xs:element minOccurs="0" name="distinguishedName" type="xs:string"/>
<xs:element minOccurs="0" name="email" type="xs:string"/>
<xs:element name="enable" type="xs:boolean"/>
<xs:element minOccurs="0" name="familyName" type="xs:string"/>
<xs:element minOccurs="0" name="firstName" type="xs:string"/>
<xs:element minOccurs="0" name="localityCode" type="xs:string"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="memberOf" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="password" type="xs:string"/>
<xs:element minOccurs="0" name="phoneNumber" type="xs:string"/>
<xs:element minOccurs="0" name="promotionCode" type="xs:string"/>
<xs:element minOccurs="0" name="userName" type="xs:string"/>
</xs:sequence>
</xs:complexType>
−
<xs:complexType final="#all" name="userArray">
−
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="item" nillable="true" type="tns:user"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
</types>
−
<message name="WSLDAPServiceBean_findUserByLogin">
<part name="login" type="xsd:string"/>
</message>
−
<message name="WSLDAPServiceBean_findAllUsers">
<part name="firstName" type="xsd:string"/>
<part name="lastName" type="xsd:string"/>
<part name="maxResult" type="xsd:int"/>
</message>
−
<message name="WSLDAPServiceBean_connectByIdAndPasswordResponse">
<part name="return" type="tns:user"/>
</message>
−
<message name="WSLDAPServiceBean_connectByIdAndPassword">
<part name="name" type="xsd:string"/>
<part name="password" type="xsd:string"/>
</message>
−
<message name="WSLDAPServiceBean_findUserByLoginResponse">
<part name="return" type="tns:user"/>
</message>
−
<message name="WSLDAPServiceBean_findAllUsersResponse">
<part name="return" type="tns:userArray"/>
</message>
−
<portType name="WSLDAPServiceBean">
−
<operation name="connectByIdAndPassword" parameterOrder="name password">
<input message="tns:WSLDAPServiceBean_connectByIdAndPassword"/>
<output message="tns:WSLDAPServiceBean_connectByIdAndPasswordResponse"/>
</operation>
−
<operation name="findAllUsers" parameterOrder="firstName lastName maxResult">
<input message="tns:WSLDAPServiceBean_findAllUsers"/>
<output message="tns:WSLDAPServiceBean_findAllUsersResponse"/>
</operation>
−
<operation name="findUserByLogin" parameterOrder="login">
<input message="tns:WSLDAPServiceBean_findUserByLogin"/>
<output message="tns:WSLDAPServiceBean_findUserByLoginResponse"/>
</operation>
</portType>
−
<binding name="WSLDAPServiceBeanBinding" type="tns:WSLDAPServiceBean">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
−
<operation name="connectByIdAndPassword">
<soap:operation soapAction=""/>
−
<input>
<soap:body namespace="http://impl.service.prosumaauthenticationmodule.prosuma.ci/" use="literal"/>
</input>
−
<output>
<soap:body namespace="http://impl.service.prosumaauthenticationmodule.prosuma.ci/" use="literal"/>
</output>
</operation>
−
<operation name="findAllUsers">
<soap:operation soapAction=""/>
−
<input>
<soap:body namespace="http://impl.service.prosumaauthenticationmodule.prosuma.ci/" use="literal"/>
</input>
−
<output>
<soap:body namespace="http://impl.service.prosumaauthenticationmodule.prosuma.ci/" use="literal"/>
</output>
</operation>
−
<operation name="findUserByLogin">
<soap:operation soapAction=""/>
−
<input>
<soap:body namespace="http://impl.service.prosumaauthenticationmodule.prosuma.ci/" use="literal"/>
</input>
−
<output>
<soap:body namespace="http://impl.service.prosumaauthenticationmodule.prosuma.ci/" use="literal"/>
</output>
</operation>
</binding>
−
<service name="WSLDAPServiceBeanService">
−
<port binding="tns:WSLDAPServiceBeanBinding" name="WSLDAPServiceBeanPort">
<soap:address location="http://localhost:8080/ProsumaAuthenticationModule/WSLDAPServiceBean"/>
</port>
</service>
</definitions>

 

The stacktrace :

12:14:24,676 INFO  [ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221053)] Started in 2m:7s:348ms
12:16:23,649 INFO  [Authenticator] authenticating zakhdar
12:16:24,070 INFO  [STDOUT] parsing WSDL...
12:16:26,696 INFO  [STDOUT] generating code...
12:16:26,742 INFO  [STDOUT] ci\prosuma\prosumaauthenticationmodule\service\impl\ObjectFactory.java
12:16:26,758 INFO  [STDOUT] ci\prosuma\prosumaauthenticationmodule\service\impl\User.java
12:16:26,789 INFO  [STDOUT] ci\prosuma\prosumaauthenticationmodule\service\impl\UserArray.java
12:16:26,789 INFO  [STDOUT] ci\prosuma\prosumaauthenticationmodule\service\impl\WSLDAPServiceBean.java
12:16:26,805 INFO  [STDOUT] ci\prosuma\prosumaauthenticationmodule\service\impl\WSLDAPServiceBeanService.java
12:16:26,805 INFO  [STDOUT] ci\prosuma\prosumaauthenticationmodule\service\impl\package-info.java
12:16:30,336 ERROR [ServiceDelegateImpl] Cannot create proxy for SEI ci.prosuma.prosumaauthenticationmodule.service.impl.WSLDAPServiceBean from: file:/D:/jboss-5.1.0.GA/server/default/deploy/ProsumaAuthenticationModule.jar/
12:16:30,336 ERROR [STDERR] java.lang.reflect.InvocationTargetException
12:16:30,336 ERROR [STDERR]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
12:16:30,336 ERROR [STDERR]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
12:16:30,336 ERROR [STDERR]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
12:16:30,336 ERROR [STDERR]      at java.lang.reflect.Method.invoke(Method.java:597)
12:16:30,336 ERROR [STDERR]      at org.jboss.wise.core.client.impl.reflection.WSServiceImpl$WSEndPointbuilder.createEndPointUnderlyingObject(WSServiceImpl.java:171)
12:16:30,336 ERROR [STDERR]      at org.jboss.wise.core.client.impl.reflection.WSEndpointImpl.createInstance(WSEndpointImpl.java:92)
12:16:30,336 ERROR [STDERR]      at org.jboss.wise.core.client.impl.reflection.EndpointMethodCaller$1.initialValue(EndpointMethodCaller.java:38)
12:16:30,336 ERROR [STDERR]      at java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:141)
12:16:30,336 ERROR [STDERR]      at java.lang.ThreadLocal.get(ThreadLocal.java:131)
12:16:30,336 ERROR [STDERR]      at org.jboss.wise.core.client.impl.reflection.EndpointMethodCaller.addHandlers(EndpointMethodCaller.java:86)
12:16:30,336 ERROR [STDERR]      at org.jboss.wise.core.client.impl.reflection.EndpointMethodCaller.call(EndpointMethodCaller.java:66)
12:16:30,336 ERROR [STDERR]      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
12:16:30,336 ERROR [STDERR]      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
12:16:30,336 ERROR [STDERR]      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
12:16:30,336 ERROR [STDERR]      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
12:16:30,336 ERROR [STDERR]      at java.lang.Thread.run(Thread.java:619)
12:16:30,336 ERROR [STDERR] Caused by: javax.xml.ws.WebServiceException: Cannot create proxy
12:16:30,336 ERROR [STDERR]      at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.createProxy(ServiceDelegateImpl.java:420)
12:16:30,336 ERROR [STDERR]      at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.getPortInternal(ServiceDelegateImpl.java:273)
12:16:30,336 ERROR [STDERR]      at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.getPort(ServiceDelegateImpl.java:200)
12:16:30,336 ERROR [STDERR]      at javax.xml.ws.Service.getPort(Service.java:141)
12:16:30,336 ERROR [STDERR]      at ci.prosuma.prosumaauthenticationmodule.service.impl.WSLDAPServiceBeanService.getWSLDAPServiceBeanPort(WSLDAPServiceBeanService.java:50)
12:16:30,336 ERROR [STDERR]      ... 16 more
12:16:30,336 ERROR [STDERR] Caused by: java.lang.IllegalArgumentException: ci.prosuma.prosumaauthenticationmodule.service.impl.WSLDAPServiceBean is not an interface
12:16:30,336 ERROR [STDERR]      at java.lang.reflect.Proxy.getProxyClass(Proxy.java:362)
12:16:30,336 ERROR [STDERR]      at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:581)
12:16:30,336 ERROR [STDERR]      at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.createProxy(ServiceDelegateImpl.java:400)
12:16:30,336 ERROR [STDERR]      ... 20 more
12:16:30,336 INFO  [STDOUT] error invoking:public ci.prosuma.prosumaauthenticationmodule.dao.ldap.entity.User ci.prosuma.prosumaauthenticationmodule.service.impl.WSLDAPServiceBean.findUserByLogin(java.lang.String)
12:16:30,336 INFO  [STDOUT] error invoking:[Ljava.lang.Object;@13c5567
12:16:30,352 ERROR [STDERR] org.jboss.wise.core.exception.InvocationException: Unknown exception received: java.lang.NullPointerException
12:16:30,352 ERROR [STDERR]      at org.jboss.wise.core.client.impl.reflection.WSMethodImpl.invoke(WSMethodImpl.java:105)
12:16:30,352 ERROR [STDERR]      at org.jboss.wise.core.client.impl.reflection.WSMethodImpl.invoke(WSMethodImpl.java:128)
12:16:30,352 ERROR [STDERR]      at org.jboss.wise.core.client.impl.reflection.WSMethodImpl.invoke(WSMethodImpl.java:54)
12:16:30,352 ERROR [STDERR]      at ci.prosuma.ProsumaGPV.session.Authenticator.authenticate(Authenticator.java:40)
12:16:30,352 ERROR [STDERR]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
12:16:30,352 ERROR [STDERR]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
12:16:30,352 ERROR [STDERR]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
12:16:30,368 ERROR [STDERR]      at java.lang.reflect.Method.invoke(Method.java:597)
12:16:30,368 ERROR [STDERR]      at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
12:16:30,368 ERROR [STDERR]      at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32)
12:16:30,368 ERROR [STDERR]      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
12:16:30,368 ERROR [STDERR]      at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
12:16:30,368 ERROR [STDERR]      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
12:16:30,368 ERROR [STDERR]      at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77)
12:16:30,368 ERROR [STDERR]      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
12:16:30,368 ERROR [STDERR]      at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
12:16:30,368 ERROR [STDERR]      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
12:16:30,368 ERROR [STDERR]      at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
12:16:30,368 ERROR [STDERR]      at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)
12:16:30,368 ERROR [STDERR]      at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)
12:16:30,368 ERROR [STDERR]      at ci.prosuma.ProsumaGPV.session.Authenticator_$$_javassist_seam_2.authenticate(Authenticator_$$_javassist_seam_2.java)
12:16:30,368 ERROR [STDERR]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
12:16:30,368 ERROR [STDERR]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
12:16:30,368 ERROR [STDERR]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
12:16:30,368 ERROR [STDERR]      at java.lang.reflect.Method.invoke(Method.java:597)
12:16:30,368 ERROR [STDERR]      at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:335)
12:16:30,368 ERROR [STDERR]      at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:348)
12:16:30,368 ERROR [STDERR]      at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
12:16:30,368 ERROR [STDERR]      at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
12:16:30,368 ERROR [STDERR]      at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
12:16:30,368 ERROR [STDERR]      at org.jboss.seam.core.Expressions$2.invoke(Expressions.java:175)
12:16:30,368 ERROR [STDERR]      at org.jboss.seam.security.jaas.SeamLoginModule.login(SeamLoginModule.java:109)
12:16:30,368 ERROR [STDERR]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
12:16:30,368 ERROR [STDERR]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
12:16:30,368 ERROR [STDERR]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
12:16:30,368 ERROR [STDERR]      at java.lang.reflect.Method.invoke(Method.java:597)
12:16:30,368 ERROR [STDERR]      at javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)
12:16:30,368 ERROR [STDERR]      at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
12:16:30,368 ERROR [STDERR]      at javax.security.auth.login.LoginContext$5.run(LoginContext.java:706)
12:16:30,368 ERROR [STDERR]      at java.security.AccessController.doPrivileged(Native Method)
12:16:30,368 ERROR [STDERR]      at javax.security.auth.login.LoginContext.invokeCreatorPriv(LoginContext.java:703)
12:16:30,368 ERROR [STDERR]      at javax.security.auth.login.LoginContext.login(LoginContext.java:575)
12:16:30,368 ERROR [STDERR]      at org.jboss.seam.security.Identity.authenticate(Identity.java:344)
12:16:30,368 ERROR [STDERR]      at org.jboss.seam.security.Identity.authenticate(Identity.java:332)
12:16:30,368 ERROR [STDERR]      at org.jboss.seam.security.Identity.login(Identity.java:259)
12:16:30,368 ERROR [STDERR]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
12:16:30,368 ERROR [STDERR]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
12:16:30,368 ERROR [STDERR]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
12:16:30,368 ERROR [STDERR]      at java.lang.reflect.Method.invoke(Method.java:597)
12:16:30,368 ERROR [STDERR]      at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:335)
12:16:30,368 ERROR [STDERR]      at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:348)
12:16:30,368 ERROR [STDERR]      at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
12:16:30,368 ERROR [STDERR]      at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
12:16:30,368 ERROR [STDERR]      at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
12:16:30,368 ERROR [STDERR]      at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
12:16:30,368 ERROR [STDERR]      at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
12:16:30,368 ERROR [STDERR]      at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
12:16:30,368 ERROR [STDERR]      at javax.faces.component.UICommand.broadcast(UICommand.java:387)
12:16:30,368 ERROR [STDERR]      at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321)
12:16:30,368 ERROR [STDERR]      at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:296)
12:16:30,368 ERROR [STDERR]      at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:253)
12:16:30,368 ERROR [STDERR]      at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:466)
12:16:30,368 ERROR [STDERR]      at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
12:16:30,368 ERROR [STDERR]      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
12:16:30,368 ERROR [STDERR]      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
12:16:30,368 ERROR [STDERR]      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
12:16:30,368 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
12:16:30,368 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
12:16:30,368 ERROR [STDERR]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
12:16:30,368 ERROR [STDERR]      at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
12:16:30,368 ERROR [STDERR]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
12:16:30,368 ERROR [STDERR]      at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
12:16:30,368 ERROR [STDERR]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
12:16:30,368 ERROR [STDERR]      at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
12:16:30,368 ERROR [STDERR]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
12:16:30,368 ERROR [STDERR]      at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
12:16:30,368 ERROR [STDERR]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
12:16:30,368 ERROR [STDERR]      at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
12:16:30,368 ERROR [STDERR]      at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
12:16:30,368 ERROR [STDERR]      at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
12:16:30,368 ERROR [STDERR]      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
12:16:30,368 ERROR [STDERR]      at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
12:16:30,368 ERROR [STDERR]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
12:16:30,368 ERROR [STDERR]      at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
12:16:30,368 ERROR [STDERR]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
12:16:30,368 ERROR [STDERR]      at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
12:16:30,368 ERROR [STDERR]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
12:16:30,368 ERROR [STDERR]      at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
12:16:30,368 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
12:16:30,368 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
12:16:30,368 ERROR [STDERR]      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
12:16:30,368 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
12:16:30,368 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
12:16:30,368 ERROR [STDERR]      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
12:16:30,368 ERROR [STDERR]      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
12:16:30,368 ERROR [STDERR]      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
12:16:30,368 ERROR [STDERR]      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
12:16:30,368 ERROR [STDERR]      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
12:16:30,368 ERROR [STDERR]      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
12:16:30,368 ERROR [STDERR]      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
12:16:30,368 ERROR [STDERR]      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
12:16:30,368 ERROR [STDERR]      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
12:16:30,368 ERROR [STDERR]      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
12:16:30,368 ERROR [STDERR]      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
12:16:30,368 ERROR [STDERR]      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
12:16:30,368 ERROR [STDERR]      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
12:16:30,368 ERROR [STDERR]      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
12:16:30,368 ERROR [STDERR]      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
12:16:30,368 ERROR [STDERR]      at java.lang.Thread.run(Thread.java:619)
12:16:30,368 ERROR [STDERR] Caused by: java.util.concurrent.ExecutionException: java.lang.NullPointerException
12:16:30,368 ERROR [STDERR]      at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
12:16:30,368 ERROR [STDERR]      at java.util.concurrent.FutureTask.get(FutureTask.java:83)
12:16:30,368 ERROR [STDERR]      at org.jboss.wise.core.client.impl.reflection.WSMethodImpl.invoke(WSMethodImpl.java:91)
12:16:30,368 ERROR [STDERR]      ... 108 more
12:16:30,383 ERROR [STDERR] Caused by: java.lang.NullPointerException
12:16:30,383 ERROR [STDERR]      at org.jboss.wise.core.client.impl.reflection.EndpointMethodCaller.addHandlers(EndpointMethodCaller.java:86)
12:16:30,383 ERROR [STDERR]      at org.jboss.wise.core.client.impl.reflection.EndpointMethodCaller.call(EndpointMethodCaller.java:66)
12:16:30,383 ERROR [STDERR]      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
12:16:30,383 ERROR [STDERR]      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
12:16:30,383 ERROR [STDERR]      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
12:16:30,383 ERROR [STDERR]      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
12:16:30,383 ERROR [STDERR]      ... 1 more

 

Any idea concerning the source of this problem are welcome ,

 

thx

  • 1. Re: Wise with JBoss Seam
    Zoul AKHDAR Newbie

    I have modified my WS and it's works fine now

     

    Here my code :

     

    import javax.ejb.EJB;
    import javax.ejb.Stateless;
    import javax.jws.WebService;
    
    import ci.prosuma.prosumaauthenticationmodule.dao.ldap.IUserLdapLDAP;
    import ci.prosuma.prosumaauthenticationmodule.dao.ldap.entity.User;
    import ci.prosuma.prosumaauthenticationmodule.service.IWSLDAPService;
    
    
    @Stateless
    @WebService(endpointInterface = "ci.prosuma.prosumaauthenticationmodule.service.IWSLDAPService")
    public class WSLDAPServiceBean implements IWSLDAPService {
    
         
         
         @EJB
         private IUserLdapLDAP userLDAP;
         
         
         public User connectByIdAndPassword( String name, String password) {
              return userLDAP.connectByIdAndPassword(name, password);
         }
    
    
    
         public User[] findAllUsers( String firstName,String lastName, int maxResult) {
              return userLDAP.findAllUsers(firstName, lastName, maxResult);
         }
    
    
         public User findUserByLogin( String login) {
              return userLDAP.findByLogin(login);
         }
    
    
    }
    

    my interface :

     

    import javax.ejb.Remote;
    import javax.jws.WebMethod;
    import javax.jws.WebParam;
    import javax.jws.WebService;
    import javax.jws.soap.SOAPBinding;
    
    import ci.prosuma.prosumaauthenticationmodule.dao.ldap.entity.User;
    
    @Remote
    @WebService(name = "WSLDAPService")
    @SOAPBinding(style= SOAPBinding.Style.DOCUMENT, use=SOAPBinding.Use.LITERAL, parameterStyle= SOAPBinding.ParameterStyle.WRAPPED)
    public interface IWSLDAPService {
    
         
         @WebMethod
         public User connectByIdAndPassword(@WebParam(name="name") String name,@WebParam(name="password")  String password);
    
    
    
         @WebMethod
         public User[] findAllUsers(@WebParam(name="firstName") String firstName,@WebParam(name="lastName") String lastName,@WebParam(name="maxResult") int maxResult);
    
    
         @WebMethod
         public User findUserByLogin(@WebParam(name="login") String login);
    
    
    }