[JNDI/Naming/Network] - Problem to get from client
by jaleyba
Hi
I've a war application that bind an object with jndi.
Now I want to get this object from a desktop application that is not running in the same VM than JBoss but it couldn´t see my bound object.
I've been looking in FAQ's and now I know why my app couldn´t get my object but I couldn´t found the solution to the problem.
I've seen in usefull code here this code:
| env.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory"); env.put("java.naming.provider.url","jnp://172.31.112.9:2199"); env.put("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
|
| Context ctx = new InitialContext(env);
| System.out.println("Binds: " + ctx.listBindings("").toString());
|
When I run it I got:
| javax.naming.CommunicationException [Root exception is java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:
| java.net.ConnectException: Connection refused: connect]
| at org.jnp.interfaces.NamingContext.listBindings(NamingContext.java:872)
| at org.jnp.interfaces.NamingContext.listBindings(NamingContext.java:806)
| at javax.naming.InitialContext.listBindings(InitialContext.java:396)
| at CF.main(CF.java:25)
| Caused by: java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:
| java.net.ConnectException: Connection refused: connect
| at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:567)
| at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
| at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
| at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:101)
| at org.jnp.server.NamingServer_Stub.listBindings(Unknown Source)
| at org.jnp.interfaces.NamingContext.listBindings(NamingContext.java:821)
| ... 3 more
| Caused by: java.net.ConnectException: Connection refused: connect
| at java.net.PlainSocketImpl.socketConnect(Native Method)
| at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
| at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
| at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
| at java.net.Socket.connect(Socket.java:452)
| at java.net.Socket.connect(Socket.java:402)
| at java.net.Socket.<init>(Socket.java:309)
| at java.net.Socket.<init>(Socket.java:124)
| at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
| at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
| at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:562)
| ... 8 more
|
Which is the trick to allow my app to get the object ?
Thanks in advance
C
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994591#3994591
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994591
19 years, 4 months
[JBoss Portal] - Re: UserImpl not mapped
by thanvi
Hi
I am tryign to connect to UserModule using the JNDI anme /portal/UserModule. Its throwing the excpetion.
I need to connect to userModule from my plain java class. How to go about it.
I have tried the followig
UserModule mod = (UserModule) new InitialContext().lookup("java:/portal/UserModule");
It gives the following error
org.hibernate.HibernateException: Unable to locate current JTA transaction
at org.hibernate.context.JTASessionContext.currentSession(JTASessionContext.java:61)
at org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:541)
at org.jboss.portal.identity.db.UserModuleImpl.getCurrentSession(UserModuleImpl.java:327)
at org.jboss.portal.identity.db.UserModuleImpl.getUserCount(UserModuleImpl.java:304)
at com.reuters.lipper.dwr.UserDAO.countUsers(UserDAO.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at uk.ltd.getahead.dwr.impl.ExecuteQuery.execute(ExecuteQuery.java:239)
at uk.ltd.getahead.dwr.impl.DefaultExecProcessor.handle(DefaultExecProcessor.java:48)
at uk.ltd.getahead.dwr.impl.DefaultProcessor.handle(DefaultProcessor.java:81)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994589#3994589
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994589
19 years, 4 months
[JBoss Portal] - Re: UserModule via JNDI
by thanvi
Hi
I am tryign to connect to UserModule using the JNDI anme /portal/UserModule. Its throwing the excpetion.
I need to connect to userModule from my plain java class. How to go about it.
I have tried the followig
UserModule mod = (UserModule) new InitialContext().lookup("java:/portal/UserModule");
It gives the following error
org.hibernate.HibernateException: Unable to locate current JTA transaction
at org.hibernate.context.JTASessionContext.currentSession(JTASessionContext.java:61)
at org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:541)
at org.jboss.portal.identity.db.UserModuleImpl.getCurrentSession(UserModuleImpl.java:327)
at org.jboss.portal.identity.db.UserModuleImpl.getUserCount(UserModuleImpl.java:304)
at com.reuters.lipper.dwr.UserDAO.countUsers(UserDAO.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at uk.ltd.getahead.dwr.impl.ExecuteQuery.execute(ExecuteQuery.java:239)
at uk.ltd.getahead.dwr.impl.DefaultExecProcessor.handle(DefaultExecProcessor.java:48)
at uk.ltd.getahead.dwr.impl.DefaultProcessor.handle(DefaultProcessor.java:81)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994588#3994588
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994588
19 years, 4 months
[EJB 3.0] - Error persisting entities in EJB3 unknow entity java.lang.Il
by sreeraaman
Hi All,
I am using JSF/Seam/EJB3. Invoking a SLSB method from JSF via Seam throws the following exception:
| 15:05:14,375 ERROR [STDERR] java.lang.IllegalArgumentException: Unknown entity: entities.Client$$EnhancerByCGLIB$$78349cf5
| 15:05:14,375 ERROR [STDERR] at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:215)
| 15:05:14,375 ERROR [STDERR] at org.jboss.ejb3.entity.TransactionScopedEntityManager.persist(TransactionScopedEntityManager.java:175)
| 15:05:14,375 ERROR [STDERR] at sessionbeans.StandardClientService.sessionbeans$StandardClientService$createClientJSF$aop(StandardClientService.java:92)
| 15:05:14,375 ERROR [STDERR] at sessionbeans.StandardClientService$createClientJSF_N7759129025289692916.invokeNext(StandardClientService$createClientJSF_N7759129025289692916.java)
| 15:05:14,375 ERROR [STDERR] at aoptest.PermissionInterceptor.verifyPermissions(PermissionInterceptor.java:191)
|
I have a jboss aop interceptor for the session bean. Is this creating problems?
Any help would be appreciated.
Thanks in advance.
regards
sriraman.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994586#3994586
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994586
19 years, 4 months
[JBoss Seam] - problem to insert users into user table
by JoviJojo
hi,
i have problem to insert logged in users into user table, [org.hibernate.SQL] insert into users (name, password, username) values (?, ?, ?)
2006-12-18 10:28:40,406 INFO [STDOUT] Hibernate: insert into users (name, password, username) values (?, ?, ?)
but from the log file i can see that the user table was created, but i can not find out why the values are not inserted into the table
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994582#3994582
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994582
19 years, 4 months