]
Simple San commented on AS7-5025:
---------------------------------
We have used below configurations. We have two separate JBoss servers on different
machines.
JBoss Server 1 - war file
MotdController.java
package com.incomm.wms.controller;
import org.myapp.ejb.Greeter;
import javax.faces.application.FacesMessage;
import javax.faces.bean.ManagedBean;
import javax.faces.context.FacesContext;
import javax.naming.Context;
import javax.naming.InitialContext;
import java.util.Properties;
@ManagedBean(name="motd")
public class MotdController {
private String motd;
public void findMotd() {
FacesMessage msg;
FacesContext ftx = FacesContext.getCurrentInstance();
try {
Properties jndiProps = new Properties();
jndiProps.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jboss.naming.remote.client.InitialContextFactory");
jndiProps.put(Context.PROVIDER_URL,
"remote://<serverip>:4447");
Context ctx = new InitialContext(jndiProps);
final Context context = new javax.naming.InitialContext(jndiProps);
final Greeter bean = (Greeter) context.lookup("GreeterBean");
final String greeting = bean.greet("Tom");
System.out.println("Received greeting: " + greeting);
} catch (Exception e) {
e.printStackTrace();
msg = new FacesMessage("failed to call Remote EJB");
ftx.addMessage(null, msg);
}
}
public String getMotd() {
return motd;
}
public void setMotd(String motd) {
this.motd = motd;
}
JBoss Server 2 - jar file
MotdController.java
package org.myapp.ejb;
import javax.ejb.Remote;
import javax.ejb.Stateless;
@Stateless
@Remote (Greeter.class)
public class GreeterBean implements Greeter {
@Override
public String greet(String user) {
return "Hello " + user + ", have a pleasant day!";
}
}
(Remoting "config-based-naming-client-endpoint" read-1)
JBREM000200: Remote connection failed: javax.security.sasl.SaslException: Authentication
failed: all available authentication mechanisms failed
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Key: AS7-5025
URL:
https://issues.jboss.org/browse/AS7-5025
Project: Application Server 7
Issue Type: Feature Request
Reporter: Simple San
16:22:45,545 WARN [org.jboss.ejb.client.remoting.ChannelAssociation] (Remoting
"slcdevaps02wms" task-3) Unsupported message received with header 0xffffffff
16:22:45,683 INFO [javax.enterprise.resource.webcontainer.jsf.config] (MSC service
thread 1-1) Initializing Mojarra 2.1.7-jbossorg-1 (20120227-1401) for context
'/motdWar'
16:22:46,121 INFO [org.primefaces.webapp.PostConstructApplicationEventListener] (MSC
service thread 1-1) Running on PrimeFaces 3.2
16:22:46,125 INFO [javax.enterprise.resource.webcontainer.jsf.config] (MSC service
thread 1-1) Monitoring jndi:/default-host/motdWar/WEB-INF/faces-config.xml for
modifications
16:22:46,130 INFO [org.jboss.web] (MSC service thread 1-1) JBAS018210: Registering web
context: /motdWar
16:22:46,145 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS018559:
Deployed "motdWar.war"
16:22:54,820 INFO [org.xnio] (http--0.0.0.0-8080-5) XNIO Version 3.0.0.GA
16:22:54,823 INFO [org.xnio.nio] (http--0.0.0.0-8080-5) XNIO NIO Implementation Version
3.0.0.GA
16:22:54,827 INFO [org.jboss.remoting] (http--0.0.0.0-8080-5) JBoss Remoting version
3.2.3.GA
16:22:54,914 ERROR [org.jboss.remoting.remote.connection] (Remoting
"config-based-naming-client-endpoint" read-1) JBREM000200: Remote connection
failed: javax.security.sasl.SaslException: Authentication failed: all available
authentication mechanisms failed
16:22:54,915 ERROR [stderr] (http--0.0.0.0-8080-5) javax.naming.NamingException: Failed
to create remoting connection [Root exception is java.lang.RuntimeException:
javax.security.sasl.SaslException: Authentication failed: all available authentication
mechanisms failed]
16:22:54,916 ERROR [stderr] (http--0.0.0.0-8080-5) at
org.jboss.naming.remote.client.ClientUtil.namingException(ClientUtil.java:51)
16:22:54,916 ERROR [stderr] (http--0.0.0.0-8080-5) at
org.jboss.naming.remote.client.InitialContextFactory.getInitialContext(InitialContextFactory.java:151)
16:22:54,917 ERROR [stderr] (http--0.0.0.0-8080-5) at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
16:22:54,917 ERROR [stderr] (http--0.0.0.0-8080-5) at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307)
16:22:54,919 ERROR [stderr] (http--0.0.0.0-8080-5) at
javax.naming.InitialContext.init(InitialContext.java:242)
16:22:54,919 ERROR [stderr] (http--0.0.0.0-8080-5) at
javax.naming.InitialContext.<init>(InitialContext.java:216)
16:22:54,920 ERROR [stderr] (http--0.0.0.0-8080-5) at
com.incomm.wms.controller.MotdController.findMotd(MotdController.java:32)
16:22:54,920 ERROR [stderr] (http--0.0.0.0-8080-5) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
16:22:54,924 ERROR [stderr] (http--0.0.0.0-8080-5) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
16:22:54,924 ERROR [stderr] (http--0.0.0.0-8080-5) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
16:22:54,925 ERROR [stderr] (http--0.0.0.0-8080-5) at
java.lang.reflect.Method.invoke(Method.java:601)
16:22:54,925 ERROR [stderr] (http--0.0.0.0-8080-5) at
org.apache.el.parser.AstValue.invoke(AstValue.java:262)
16:22:54,925 ERROR [stderr] (http--0.0.0.0-8080-5) at
org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278)
16:22:54,925 ERROR [stderr] (http--0.0.0.0-8080-5) at
com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
16:22:54,925 ERROR [stderr] (http--0.0.0.0-8080-5) at
javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
16:22:54,926 ERROR [stderr] (http--0.0.0.0-8080-5) at
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
16:22:54,930 ERROR [stderr] (http--0.0.0.0-8080-5) at
javax.faces.component.UICommand.broadcast(UICommand.java:315)
16:22:54,930 ERROR [stderr] (http--0.0.0.0-8080-5) at
javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
16:22:54,931 ERROR [stderr] (http--0.0.0.0-8080-5) at
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
16:22:54,931 ERROR [stderr] (http--0.0.0.0-8080-5) at
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
16:22:54,931 ERROR [stderr] (http--0.0.0.0-8080-5) at
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
16:22:54,931 ERROR [stderr] (http--0.0.0.0-8080-5) at
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
16:22:54,931 ERROR [stderr] (http--0.0.0.0-8080-5) at
javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
16:22:54,932 ERROR [stderr] (http--0.0.0.0-8080-5) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
16:22:54,934 ERROR [stderr] (http--0.0.0.0-8080-5) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
16:22:54,935 ERROR [stderr] (http--0.0.0.0-8080-5) at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
16:22:54,935 ERROR [stderr] (http--0.0.0.0-8080-5) at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
16:22:54,935 ERROR [stderr] (http--0.0.0.0-8080-5) at
org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
16:22:54,935 ERROR [stderr] (http--0.0.0.0-8080-5) at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
16:22:54,936 ERROR [stderr] (http--0.0.0.0-8080-5) at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
16:22:54,936 ERROR [stderr] (http--0.0.0.0-8080-5) at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
16:22:54,939 ERROR [stderr] (http--0.0.0.0-8080-5) at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
16:22:54,940 ERROR [stderr] (http--0.0.0.0-8080-5) at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
16:22:54,941 ERROR [stderr] (http--0.0.0.0-8080-5) at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
16:22:54,944 ERROR [stderr] (http--0.0.0.0-8080-5) at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
16:22:54,944 ERROR [stderr] (http--0.0.0.0-8080-5) at
java.lang.Thread.run(Thread.java:722)
16:22:54,945 ERROR [stderr] (http--0.0.0.0-8080-5) Caused by: java.lang.RuntimeException:
javax.security.sasl.SaslException: Authentication failed: all available authentication
mechanisms failed
16:22:54,945 ERROR [stderr] (http--0.0.0.0-8080-5) at
org.jboss.naming.remote.protocol.IoFutureHelper.get(IoFutureHelper.java:87)
16:22:54,946 ERROR [stderr] (http--0.0.0.0-8080-5) at
org.jboss.naming.remote.client.NamingStoreCache.getRemoteNamingStore(NamingStoreCache.java:68)
16:22:54,947 ERROR [stderr] (http--0.0.0.0-8080-5) at
org.jboss.naming.remote.client.InitialContextFactory.getOrCreateCachedNamingStore(InitialContextFactory.java:196)
16:22:54,947 ERROR [stderr] (http--0.0.0.0-8080-5) at
org.jboss.naming.remote.client.InitialContextFactory.getOrCreateNamingStore(InitialContextFactory.java:169)
16:22:54,947 ERROR [stderr] (http--0.0.0.0-8080-5) at
org.jboss.naming.remote.client.InitialContextFactory.getInitialContext(InitialContextFactory.java:134)
16:22:54,948 ERROR [stderr] (http--0.0.0.0-8080-5) ... 34 more
16:22:54,952 ERROR [stderr] (http--0.0.0.0-8080-5) Caused by:
javax.security.sasl.SaslException: Authentication failed: all available authentication
mechanisms failed
16:22:54,952 ERROR [stderr] (http--0.0.0.0-8080-5) at
org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:365)
16:22:54,953 ERROR [stderr] (http--0.0.0.0-8080-5) at
org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:214)
16:22:54,953 ERROR [stderr] (http--0.0.0.0-8080-5) at
org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:72)
16:22:54,953 ERROR [stderr] (http--0.0.0.0-8080-5) at
org.xnio.channels.TranslatingSuspendableChannel.handleReadable(TranslatingSuspendableChannel.java:189)
16:22:54,953 ERROR [stderr] (http--0.0.0.0-8080-5) at
org.xnio.channels.TranslatingSuspendableChannel$1.handleEvent(TranslatingSuspendableChannel.java:103)
16:22:54,954 ERROR [stderr] (http--0.0.0.0-8080-5) at
org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:72)
16:22:54,954 ERROR [stderr] (http--0.0.0.0-8080-5) at
org.xnio.nio.NioHandle.run(NioHandle.java:90)
16:22:54,955 ERROR [stderr] (http--0.0.0.0-8080-5) at
org.xnio.nio.WorkerThread.run(WorkerThread.java:184)
16:22:54,955 ERROR [stderr] (http--0.0.0.0-8080-5) at ...asynchronous
invocation...(Unknown Source)
16:22:54,955 ERROR [stderr] (http--0.0.0.0-8080-5) at
org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:270)
16:22:54,956 ERROR [stderr] (http--0.0.0.0-8080-5) at
org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:251)
16:22:54,958 ERROR [stderr] (http--0.0.0.0-8080-5) at
org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:349)
16:22:54,958 ERROR [stderr] (http--0.0.0.0-8080-5) at
org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:333)
16:22:54,959 ERROR [stderr] (http--0.0.0.0-8080-5) at
org.jboss.naming.remote.client.EndpointCache$EndpointWrapper.connect(EndpointCache.java:105)
16:22:54,959 ERROR [stderr] (http--0.0.0.0-8080-5) at
org.jboss.naming.remote.client.NamingStoreCache.getRemoteNamingStore(NamingStoreCache.java:67)
16:22:54,960 ERROR [stderr] (http--0.0.0.0-8080-5) ... 37 more
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: