[EJB 3.0] - urgent .. help needed in javax.naming.CommunicationException
by deepali.bhosale
Hi All,
I have created one small EJB application to learn EJB with JBoss. I have deployed the BookBean.jar file in the JBOS.
the foloowing message i get while starting the JBoss server.
11:47:30,312 INFO [EjbModule] Deploying BookBean
11:47:30,609 INFO [EJBDeployer] Deployed: file:/C:/JBOSS/jboss-4.0.2/jboss-4.0.2/server/default/deploy/book.jar
Which mean my ejb is deployed successfully.
now i have a BookClient.java file whcih when i run using command java BookClient it gives me following error
javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed
out]
at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1302)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1382)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:579)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
at javax.naming.InitialContext.lookup(Unknown Source)
at BookClient.main(BookClient.java:20)
Caused by: java.net.SocketTimeoutException: Receive timed out
at java.net.PlainDatagramSocketImpl.receive0(Native Method)
at java.net.PlainDatagramSocketImpl.receive(Unknown Source)
at java.net.DatagramSocket.receive(Unknown Source)
at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1272)
... 5 more
and when i try
java -classpath %LIBDIR%\jnp-client.jar;%LIBDIR%\jboss-common-client.jar;%LIBDIR%\jboss-j2ee.jar;%LIBDIR%\jboss-net-client.jar;%LIBDIR%\jbossall-client.jar;;%LIBDIR%\jnet.jar;C:\Books; BookClient
then i get the following error.
javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed
out]
at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1302)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1382)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:579)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
at javax.naming.InitialContext.lookup(Unknown Source)
at BookClient.main(BookClient.java:20)
Caused by: java.net.SocketTimeoutException: Receive timed out
at java.net.PlainDatagramSocketImpl.receive0(Native Method)
at java.net.PlainDatagramSocketImpl.receive(Unknown Source)
at java.net.DatagramSocket.receive(Unknown Source)
at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1272)
... 5 more
I have created the jndi.properties file and put that in C:\Books. the same path is in my classpath as well as in path varaible of the system. Whats the problem. Plz help
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4015619#4015619
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4015619
19Â years, 2Â months
[JBoss Portal] - Re: HOWTO: Replace portal authentication and authorization
by dleerob
I had some issues when enabling LDAP authentication using JBoss Portal 2.4.1. The authentication worked, but the securities did not. This is what I ended up doing. Maybe it will help you in some way:
- I downloaded the source (2.4.1) so I could build the JBoss Portal myself.
- I DID NOT enable LDAP authenitcation and used the standard setup that comes with JBoss Portal.
- I created all the users I wanted in JBoss Portal the usual way, all with the same password, for example, "mypassword", but made sure that each username corresponded to the user name in my LDAP directory.
- I downloaded the JLdap library from www.openldap.org.
- I put the jar file in the portal lib directory.
- I added the jar file to jboss-portal-2.4.1-src\thirdparty.
- Added the classpath to jboss-portal-2.4.1-src\identity\build.xml.
- I edited jboss-portal-2.4.1-src\identity\src\main\org\jboss\portal\identity\auth\IdentityLoginModule in the JBoss Portal source code and added my own LDAPAuthentication method.
- In IdentityLoginModule, I edited the method validatePassword, and at the top of it, I called my LDAPAuthentication method with the supplied username and password, which then returned true if LDAP authenitcation passed, or false if it failed. If true was returned, I changed the supplied password to "mypassword" in validatePassword method, otherwise I changed it to "incorrect" or some other incorrect string. Now the rest of validatePassword method continues normally, and will login the user locally if they used their correct LDAP password.
- I built the portal source from scratch, and my customized LDAP authentication worked perfectly.
A workaround I know, but it works, and hopefully will help someone else.
When JBoss Portal 2.6 is stable, I will upgrade to that, and all of this will probably fall away
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4015615#4015615
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4015615
19Â years, 2Â months
[JBoss Seam] - Re: how to redirecto back to intented page after login
by spambob
Sorry to hijack this because my problem isn't related to the security stuff but more to redirect.captureCurrentView & redirect.returnToCapturedView.
What I'm really missing is the possiblity to start a new pageflow within an existing one and to return upon the end of the inner one to the page where one has left the outer / started the inner pageflow.
I.e. one has a "Buy product" pageflow which includes a "Register new account" pageflow if a user doesn't have an account.
AFAIK - please correct me if I'm wrong on this - this is currently only possible with some individual hacks / extensions although this is a pretty common usecase so it would be _very_ nice to have something like this "out of the box".
So my question is: could you _please_ extend this redirect.captureCurrentView & redirect.returnToCapturedView to work with pageflows ?
If I - again - fail to see the forest because of all the trees I would greatly appreciate an hint in which example such stuff can be found.
Thanks a bunch :)
PS: Also thanks a lot for the security framework, this is just great !
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4015604#4015604
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4015604
19Â years, 2Â months