[EJB 3.0] - Re: Could not obtain connection to any of these urls: Remote
by a0001428
Hi,
Thank for you replay.
Let me explain better.
In my computer(Local) I have a client test:
public static void main(String[] args) {
try {
Properties properties = new Properties();
properties.load(new FileInputStream("jndi.properties"));
Context contexto = null;
contexto = new InitialContext(properties);
GreeterFacade beanRemoto = (GreeterFacade)
contexto.lookup(BouncerFacadeBean.RemoteJNDIName);
Collection resultado = beanRemoto.listadoPedidos();
for (Iterator iterator = resultado.iterator(); iterator.hasNext();) {
String object = (String) iterator.next();
System.out.println("El resultado es:" + resultado);
}
}
This is the error(is a new error):
javax.naming.CommunicationException [Root exception is java.rmi.UnknownHostException: Unknown host: obelix; nested exception is:
java.net.UnknownHostException: obelix]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:724)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:589)
at javax.naming.InitialContext.lookup(Unknown Source)
at demoEJB.Testing.main(Testing.java:27)
Caused by: java.rmi.UnknownHostException: Unknown host: obelix; nested exception is:
java.net.UnknownHostException: obelix
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
... 3 more
Caused by: java.net.UnknownHostException: obelix
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.(Unknown Source)
at java.net.Socket.(Unknown Source)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
... 9 more
where obelix is the Sever remote name, this server has a IP Public(ISP): z.z.z.z
jndi.properties(for main client, local):
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
java.naming.provider.url=jnp:// z.z.z.z(IP Public):1099
==Server remote( win 2003 server, office server that is in another city)=============
On the server remote I did:
I restarted JBOSS with run.bat -b 0.0.0.0 (command line)
JBoss Bootstrap Environment
04:43:19,977 INFO [Server] Starting JBoss (MX MicroKernel)...
04:43:19,993 INFO [Server] Release ID: JBoss [Trinity] 4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=
200710221139)
04:43:25,212 INFO [WebService] Using RMI server codebase: http:// obelix :8083/
04:43:43,915 INFO [Http11Protocol] Inicializando Coyote HTTP/1.1 en puerto http-0.0.0.0-8080
I put on URL:(in server remote)
http://localhost:8080/jmx-console: (jboss.j2ee)
jar=ejb-jar-0.0.1-SNAPSHOT.jar,name=BixBox,service=EJB3
module=ejb-jar-0.0.1-SNAPSHOT.jar,service=EJB3
Server remote has:
Host file:
127.0.0.1 localhost
I hope I've explained well :) :)
Help me please!!
Thanks you!!
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4250788#4250788
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4250788
16 years, 8 months
[JCA/JBoss] - jboss 4.2.3 and WrappedConnection.checkTransactionStatus pro
by jay73
Hi,
When using jboss 4.2.3 with our app, we got an error of this sort (from memory):
Cannot Execute query.....Transaction status marked rollback
| Caused by: jboss.util.NestedSQLException
| at ...WrappedConnection.checkTransactionStatus
|
Scenario when the above error happens:
a) User submits request from a web page
b) A jta transaction is started in a filter
c) From UI layer, transaction is propagated to service layer with "Propation Required" setting.
d) Service layer throws an exception (validation) and transaction is marked for rollback. Note that it is marked for rollback and not rolledback
e) The ui layer now prepares the view which requires some db queries to be executed. As soon as the first query is tried to be executed, the above exception is thrown.
I tried the above same steps with jboss 4.2.1 and it works fine. On further probing, found that in jboss 4.2.3, there was a change made as part of:
https://jira.jboss.org/jira/browse/JBAS-5080
https://jira.jboss.org/jira/browse/JBAS-5083
>From jira links above, intention seems to be to prevent update sqls from getting exectuted when transaction is marked for rollback. But looks like the code that was added does not discriminate between read-only and update sqls and prevents even a prepared statement from getting created - WrappedConnection.checkTransactionStatus throws an exception "cannot execute query" transaction marked for rollback.
I believe that jca should discriminate between read only and update queries and should *allow* read only queries to go through when transaction is marked for rollback. These would allow the views to get generated in the same transaction. Ours is a 2-tier system (ui + service layer execute in the same jvm) and we are using Hibernate's recommended OpenSessionInViewPattern with one hib session+ one transaction per request. Else, we'll have to refactor our code to have one hib session + 2 transactions (one for service layer and the other for the view).
Anyone has any thoughts about this?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4250785#4250785
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4250785
16 years, 8 months
[Installation, Configuration & DEPLOYMENT] - Re: System properties not replaced in ds.xml when properties
by jaikiran
2009-08-20 11:03:34,198 INFO [com.archinsurance.commons.mbean.JNDIMapper] JNDIMapper.start() invoked
| 2009-08-20 11:03:34,198 DEBUG [com.archinsurance.commons.mbean.JNDIMapper] Starting MBean...
| 2009-08-20 11:03:34,370 INFO [org.springframework.context.support.ClassPathXmlApplicationContext] Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@40d98f: display name [org.springframework.context.support.ClassPathXmlApplicationContext@40d98f]; startup date [Thu Aug 20 11:03:34 EDT 2009]; root of context hierarchy
| 2009-08-20 11:03:34,495 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] Loading XML bean definitions from class path resource [mq-application-context.xml]
| 2009-08-20 11:03:34,682 INFO [org.springframework.context.support.ClassPathXmlApplicationContext] Bean factory for application context [org.springframework.context.support.ClassPathXmlApplicationContext@40d98f]: org.springframework.beans.factory.support.DefaultListableBeanFactory@4afc0a
| 2009-08-20 11:03:34,917 INFO [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer] Loading properties file from URL [file:/C:/jboss-4.2.2.GA/server/default/conf//props/rdm.properties]
These logs do show that the modules seem to be starting in the correct order. Although there appears to an issue with the path:
| Loading properties file from URL [file:/C:/jboss-4.2.2.GA/server/default/conf//props/rdm.properties
Notice, the double "/" characters after the conf. Try changing the jboss-service.xml to contain this:
${jboss.server.config.url}props/rdm.properties
instead of
${jboss.server.config.url}/props/rdm.properties
I am not really sure that this is causing the whole issue. But give it a try and see if it works. If it doesn't then post the contents of that properties file.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4250783#4250783
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4250783
16 years, 9 months
[EJB 3.0] - Re: Could not obtain connection to any of these urls: Remote
by a0001428
"a0001428" wrote : "a0001428" wrote : "jaikiran" wrote : How did you start the remote server? Use -b option as explained here http://www.jboss.org/community/wiki/JBoss42FAQ
| |
| | Hi jaikiran, thanks for you replay.
| |
| | I have a installservice.bat( it create a windows service) :
| |
| | Rem Start Here
| | set javadll=%JAVA_HOME%\jre\bin\client\jvm.dll
| | set javatool=%JAVA_HOME%\lib\tools.jar
| | set javarun=%JBOSS_HOME%\bin\run.jar
| | set outlog=%JBOSS_HOME%\bin\stdout.log
| | set errlog=%JBOSS_HOME%\bin\stderr.log
| |
| | JBossService.exe -install JBossTomcat "%javadll%" -Djava.class.path="%javatool%";"%javarun%" -start org.jboss.Main
| | -stop org.jboss.Main -method systemExit -out "%outlog%" -err "%errlog%" -current "%JBOSS_HOME%\bin" -manual
| |
| | net start JBossTomcat
| |
| | I go to try with -b option. You notice how I was.
| |
| |
|
| Hi,
| here is the new configuratuion app server Jboss a moment the restart.
|
| Before:
|
| 14:28:32,446 INFO [WebService] Using RMI server codebase: http://127.0.0.1:8083/
| 14:28:41,384 INFO [Http11Protocol] Inicializando Coyote HTTP/1.1 en puerto http-127.0.0.1-8080
| 14:28:41,399 INFO [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-127.0.0.1-8009
|
| Now:
|
| 14:25:13,137 INFO [WebService] Using RMI server codebase: http://Name-PC remote:8083/
| 14:25:22,528 INFO [Http11Protocol] Inicializando Coyote HTTP/1.1 en puerto http-0.0.0.0-8080
| 14:25:22,528 INFO [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-0.0.0.0-8009
|
| I'm traying...You notice how I was.
|
|
Hi all,
I restarted JBOSS with run.bat -b 0.0.0.0 (server remote windows 2003 server) :
JBoss Bootstrap Environment
===============================================
04:43:19,977 INFO [Server] Starting JBoss (MX MicroKernel)...
04:43:19,993 INFO [Server] Release ID: JBoss [Trinity] 4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=
200710221139)
04:43:25,212 INFO [WebService] Using RMI server codebase: http://Remote-Server-Name:8083/
04:43:43,915 INFO [Http11Protocol] Inicializando Coyote HTTP/1.1 en puerto http-0.0.0.0-8080
----------------------------------------------
jmx-console: (jboss.j2ee)
jar=ejb-jar-0.0.1-SNAPSHOT.jar,name=BixBox,service=EJB3
module=ejb-jar-0.0.1-SNAPSHOT.jar,service=EJB3
----------------------
Host file:
127.0.0.1 localhost
----------------------
IP Public> Remote-Server-Name/Ip server remote( windows 2003 server ).
-----------------------------------------
jndi.properties(in main client):
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
java.naming.provider.url=jnp://IP Public:1099
--------------------
main client localhost( my pc ): show error:
javax.naming.CommunicationException [Root exception is java.rmi.UnknownHostException: Unknown host: Remote-Server-Name; nested exception is:
java.net.UnknownHostException: Remote-Server-Name]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:724)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:589)
at javax.naming.InitialContext.lookup(Unknown Source)
at demoEJB.Testing.main(Testing.java:27)
Caused by: java.rmi.UnknownHostException: Unknown host: Remote-Server-Name; nested exception is:
java.net.UnknownHostException: Remote-Server-Name
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
... 3 more
Caused by: java.net.UnknownHostException: Remote-Server-Name
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.(Unknown Source)
at java.net.Socket.(Unknown Source)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
... 9 more
Help me please!!
Thanks you!!
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4250779#4250779
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4250779
16 years, 9 months