[EJB 3.0] - Pb with EJB Client(javax.naming.CommunicationException)
by valjjou
I use JBoss 4.0.5 with the installer and option EJB3. I'm getting the error:
Failed to initalize plugin: org.jboss.logging.Log4jLoggerPlugin@1a758cb, cause: org/apache/log4j/LogManager
| javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:8080 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to retrieve stub from server localhost:8080 [Root exception is java.io.EOFException]]
| at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1414)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:594)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
| at javax.naming.InitialContext.lookup(Unknown Source)
| at client.ClientPremierEJB3.main(ClientPremierEJB3.java:14)
| Caused by: javax.naming.CommunicationException: Failed to retrieve stub from server localhost:8080 [Root exception is java.io.EOFException]
| at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:263)
| at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1385)
| ... 4 more
| Caused by: java.io.EOFException
| at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source)
| at java.io.ObjectInputStream$BlockDataInputStream.readShort(Unknown Source)
| at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
| at java.io.ObjectInputStream.<init>(Unknown Source)
| at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:250)
| ... 5 more
For your information :
- my Interface:
@Remote
| public interface PremierEJB3 {
| public String ditBonjour(String aQui);
| }
- My Bean:
@Stateless
| public class PremierEJB3Bean implements PremierEJB3{
| public String ditBonjour(String aQui) {
| return "Réponse EJB Bean : Bonjour, "+aQui+" !!!";
| }}
-my jndi.properties:
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
| java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
| java.naming.provider.url=localhost:8080
- my client:
public class ClientPremierEJB3 {
|
| public static void main(String[] args) {
| try {
| Context context = new InitialContext();
| PremierEJB3 beanRemote = (PremierEJB3) context.lookup("ejbSession.PremierEJB3Bean/remote");
| System.out.println(beanRemote.ditBonjour("Julie ma princesse"));
| } catch (NamingException e) {e.printStackTrace();}
| }
| }
Please, i need help, i don't understand what i can do.... Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035313#4035313
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4035313
19 years
[Remoting] - Compression in Remoting
by hceylan
Hello,
I am in a very bad position. I have an application that two jboss'es makes EJB3 calls to each other. I see that the data going forth and back takes up a lot of bandwidth causing a bottleneck that my system suffers.
I saw a previous post of about CompressingMarshaller and CompressingUnMarshaller and wanted to give it a try. I was so happy with the result in the beginning. But my happiness turned into sadness after some time.
Because, I see in the logs errors like "not in GZIP format" on the server side and "254/0/62 (random number), wrong version, version 1,2 supported" like messages on the client side.
This might be just a small issue in the way related (Un)Marshallers work. We would really appreciate any help on the issue.
I had dived into the source before and did indeed submited couple of fixes to EJB3 and remoting project.
If I am given any directions, I might help solve the problem for all.
Thank you and once again, I request your immediate help on the issue.
Regards,
Hasan Ceylan
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035290#4035290
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4035290
19 years