This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes JBoss/WildFly and the fly likes Failed to setup EJB remote context using jboss 7.1.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Failed to setup EJB remote context using jboss 7.1.1" Watch "Failed to setup EJB remote context using jboss 7.1.1" New topic

Failed to setup EJB remote context using jboss 7.1.1

Doan Long

Joined: Jul 26, 2012
Posts: 20
remote.connection.default.port = 4447

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16901

This has absolutely nothing to do with JavaServer Faces. So I'm moving it to the JBoss forum.

Customer surveys are for companies who didn't pay proper attention to begin with.
James Boswell

Joined: Nov 09, 2011
Posts: 1051

What exactly failed? Do you have a stacktrace?
Doan Long

Joined: Jul 26, 2012
Posts: 20
File .war

File .ear


remote.connection.default.port = 4447


<module-option name="principalsQuery" value="Select password_usr From im_users_usr Where blocked_usr = 0 And id_usr = ?"/>
pass DB = Security.calculateRFC2104HMAC("123",Security.HMAC_KEY);

Run app click button Test Lookup error

13:33:51,021 ERROR [stderr] (http-LOCALHOST- javax.naming.NamingException: Failed to create remoting connection [Root exception is java.lang.RuntimeException: Failed to setup EJB remote context]

13:33:51,032 ERROR [stderr] (http-LOCALHOST- at org.jboss.naming.remote.client.ClientUtil.namingException(

13:33:51,033 ERROR [stderr] (http-LOCALHOST- at org.jboss.naming.remote.client.InitialContextFactory.getInitialContext(

13:33:51,034 ERROR [stderr] (http-LOCALHOST- at javax.naming.spi.NamingManager.getInitialContext(

13:33:51,035 ERROR [stderr] (http-LOCALHOST- at javax.naming.InitialContext.getDefaultInitCtx(

13:33:51,036 ERROR [stderr] (http-LOCALHOST- at javax.naming.InitialContext.init(

13:33:51,037 ERROR [stderr] (http-LOCALHOST- at javax.naming.InitialContext.<init>(

13:33:51,038 ERROR [stderr] (http-LOCALHOST- at com.evnit.fmis.managedbean.appweb.LoginBean.testLookup(

13:33:51,039 ERROR [stderr] (http-LOCALHOST- at com.evnit.fmis.managedbean.appweb.LoginBean.checkLogin(

13:33:51,040 ERROR [stderr] (http-LOCALHOST- at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

13:33:51,040 ERROR [stderr] (http-LOCALHOST- at sun.reflect.NativeMethodAccessorImpl.invoke(

13:33:51,041 ERROR [stderr] (http-LOCALHOST- at sun.reflect.DelegatingMethodAccessorImpl.invoke(

13:33:51,042 ERROR [stderr] (http-LOCALHOST- at java.lang.reflect.Method.invoke(

13:33:51,043 ERROR [stderr] (http-LOCALHOST- at org.apache.el.parser.AstValue.invoke(

13:33:51,044 ERROR [stderr] (http-LOCALHOST- at org.apache.el.MethodExpressionImpl.invoke(

13:33:51,046 ERROR [stderr] (http-LOCALHOST- at com.sun.faces.facelets.el.TagMethodExpression.invoke(

13:33:51,047 ERROR [stderr] (http-LOCALHOST- at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(

13:33:51,048 ERROR [stderr] (http-LOCALHOST- at com.sun.faces.application.ActionListenerImpl.processAction(

13:33:51,049 ERROR [stderr] (http-LOCALHOST- at javax.faces.component.UICommand.broadcast(

13:33:51,050 ERROR [stderr] (http-LOCALHOST- at javax.faces.component.UIViewRoot.broadcastEvents(

13:33:51,051 ERROR [stderr] (http-LOCALHOST- at javax.faces.component.UIViewRoot.processApplication(

13:33:51,052 ERROR [stderr] (http-LOCALHOST- at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(

13:33:51,053 ERROR [stderr] (http-LOCALHOST- at com.sun.faces.lifecycle.Phase.doPhase(

13:33:51,053 ERROR [stderr] (http-LOCALHOST- at com.sun.faces.lifecycle.LifecycleImpl.execute(

13:33:51,054 ERROR [stderr] (http-LOCALHOST- at javax.faces.webapp.FacesServlet.service(

13:33:51,056 ERROR [stderr] (http-LOCALHOST- at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(

13:33:51,057 ERROR [stderr] (http-LOCALHOST- at org.apache.catalina.core.ApplicationFilterChain.doFilter(

13:33:51,058 ERROR [stderr] (http-LOCALHOST- at org.apache.catalina.core.StandardWrapperValve.invoke(

13:33:51,059 ERROR [stderr] (http-LOCALHOST- at org.apache.catalina.core.StandardContextValve.invoke(

13:33:51,060 ERROR [stderr] (http-LOCALHOST- at

13:33:51,061 ERROR [stderr] (http-LOCALHOST- at org.apache.catalina.core.StandardHostValve.invoke(

13:33:51,062 ERROR [stderr] (http-LOCALHOST- at org.apache.catalina.valves.ErrorReportValve.invoke(

13:33:51,063 ERROR [stderr] (http-LOCALHOST- at org.apache.catalina.core.StandardEngineValve.invoke(

13:33:51,064 ERROR [stderr] (http-LOCALHOST- at org.apache.catalina.connector.CoyoteAdapter.service(

13:33:51,064 ERROR [stderr] (http-LOCALHOST- at org.apache.coyote.http11.Http11Processor.process(

13:33:51,065 ERROR [stderr] (http-LOCALHOST- at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(

13:33:51,066 ERROR [stderr] (http-LOCALHOST- at$

13:33:51,067 ERROR [stderr] (http-LOCALHOST- at

13:33:51,068 ERROR [stderr] (http-LOCALHOST- Caused by: java.lang.RuntimeException: Failed to setup EJB remote context

13:33:51,069 ERROR [stderr] (http-LOCALHOST- at org.jboss.naming.remote.client.InitialContextFactory.setupEjbContext(

13:33:51,070 ERROR [stderr] (http-LOCALHOST- at org.jboss.naming.remote.client.InitialContextFactory.getInitialContext(

13:33:51,071 ERROR [stderr] (http-LOCALHOST- ... 35 more

13:33:51,071 ERROR [stderr] (http-LOCALHOST- Caused by: java.lang.reflect.InvocationTargetException

13:33:51,072 ERROR [stderr] (http-LOCALHOST- at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

13:33:51,073 ERROR [stderr] (http-LOCALHOST- at sun.reflect.NativeMethodAccessorImpl.invoke(

13:33:51,074 ERROR [stderr] (http-LOCALHOST- at sun.reflect.DelegatingMethodAccessorImpl.invoke(

13:33:51,075 ERROR [stderr] (http-LOCALHOST- at java.lang.reflect.Method.invoke(

13:33:51,076 ERROR [stderr] (http-LOCALHOST- at org.jboss.naming.remote.client.InitialContextFactory.setupEjbContext(

13:33:51,077 ERROR [stderr] (http-LOCALHOST- ... 36 more

13:33:51,077 ERROR [stderr] (http-LOCALHOST- Caused by: java.lang.SecurityException: EJB client context selector may not be changed

13:33:51,078 ERROR [stderr] (http-LOCALHOST- at org.jboss.ejb.client.EJBClientContext.setSelector(

13:33:51,079 ERROR [stderr] (http-LOCALHOST- at org.jboss.naming.remote.client.ejb.RemoteNamingEjbClientContextSelector.setupSelector(

13:33:51,080 ERROR [stderr] (http-LOCALHOST- ... 41 more
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16901

The following is not good JSF:

JSF Views are data templates, not programs and their EL expressions should be backing bean resource references, not logic. The proper syntax is:

I agree. Here's the link:
subject: Failed to setup EJB remote context using jboss 7.1.1
It's not a secret anymore!