[JBoss-user] Intra-VM JNDI Lookup Problem On Red Hat 7.1
A call to an InitialContext.lookup() from within an EJB never returns. External clients do not have a problem. I have placed System.out.println statements both immediately before and immediately after the lookup, as well as in a catch Throwable clause and a finally block. Only the before logging statement occurs. The problem section looks like this: InitialContext context = new InitialContext(); // create the 'new' UserSessionBean System.out.println(About to lookup user session in comp/env.); UserSessionHome userHome = (UserSessionHome)context.lookup(java:comp/env/ejb/UserSession); System.out.println(Looked up user session in comp/env.); And the output looks stops at: [LoginViewModel] About to lookup user session in comp/env. I have also tried looking up the bean in the global JNDI namespace, as an external client would, and the results are the same. If I lookup a name that is not bound, I immediately get a javax.naming.NameNotFoundException. The code runs fine on both Windows 2000 and Solaris 2.7. I am having the problem on Red Hat Linux 7.1 using Blackdown's JDK. The output of 'java -version' is: java version 1.3.0 Java(TM) 2 Runtime Environment, Standard Edition (build Blackdown-1.3.0-FCS) Java HotSpot(TM) Client VM (build Blackdown-1.3.0-FCS, mixed mode) Sun's JDK does not run for me on Red Hat 7.1; I can't even run 'java -version'. I am currently downloading IBM's JDK, but that will take quite a while with my slow connection. I am currently using JBoss 2.2.1, but I have had similar results on 2.2.2 and 2.4 beta. I have searched the mailing list archives, and found a few JNDI problems, but nothing that appears to be this; I apologize if this problem has already been addressed. Thanks in advance for any help, Xandy ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] ClassPathExtension mechanism does not seem towork...
Could you include the snippet from your jboss.conf where you have added the extra libs? It sounds like you might be adding individual jar files, but as far as I know, the ClassPathExtension is for adding directories that contain jar files. Also, are you running run.bat from within the jboss\bin directory? Xandy On Mon, 21 May 2001, Adam Lipscombe wrote: Hi All, Does anyone know how the org.jboss.util.ClassPathExtension mechanism works in jboss.conf? I added my libs there, and the server log reports that they have been loaded. However I get a ClassNotFoundException at runtime. The only way I can get JBoss/Tomcat to see the extra libs is to specify them as the -classpath arg when starting jboss via run.bat. Is the ClassPathExtension broken? Cheers - Adam ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Running JBoss as a Service on Windows NT/2k
I am aware that there is an 'ntservice' in the JBoss contrib module, which can be checked out from CVS on SourceForge. I have not yet been able to look at it. I am currently using JSL (the Java Service Launcher) http://www.roeschter.com/index.html. Xandy On Fri, 18 May 2001, Vineet Bhatia wrote: How can I run JBoss as a NT service so that I can NET start/stop it? - vineet ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Connection refused to host: 127.0.0.1 [was: Re: [JBoss-user] Re:JBoss-user -- confirmation of subscription -- request 343542]
I think the problem is that RedHat ships a broken /etc/hosts file. If you make yours look something like this it will probably help: 127.0.0.1 localhost.fgm.com localhost 216.2.54.97 tux.fgm.com tux Xandy On Tue, 15 May 2001, Guy Rouillier wrote: Connection refused to host: 127.0.0.1 Java is not getting the instruction to connect to a remote host - it is still trying to connect to JBoss locally. Where are you providing the remote host ip address? I put it in jndi.properties and everything works fine. - Original Message - From: Kobi Schecider [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, May 13, 2001 2:51 AM Subject: [JBoss-user] Re: JBoss-user -- confirmation of subscription -- request 343542 Hi everyone, I am new to JBoss and have been trying to get the interestclient example running (the client and the EBJ running on different machines) without success. This example is the one found in chapter 1 of JBoss' online documentation. I setup the software according to the tutorial and the FAQ (there is one entry that mentions how to run a client application remotely.) But I am consistantly getting exceptions. The following is my configuration: RedHat Linux 6.2 Sun JDK 1.3 standard edition, (jndi, rmiregistry, providerutil located in jdk1.3/jre/lib/ext) JBoss 2.2.1 Since I don't have a DSN server, I use the IP address of the server running JBoss for java.naming.provider.url. My machines, relying solely on hosts files, are on a home network. My client code is kept inside a directory together the EBJ jar and a copy of everything inside JBoss-2.2.1/client. The following is how I invoke the client and the results I got: java -cp all the jar files in the client directory InterestClient Got context 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: no further information] My CLASSPATH is empty. The same configuration (with the java.naming.provider.url set to localhost) works perfectly when both client and JBoss server are running on the same machine. I experienced the same problem with JONAS. Could this be caused by an incorrect JDK configuration? Basically, the examples (both JBoss and JONAS) work fine as long as both the client and the EJB server are on the same machine. I would greatly appreciate if anyone can shed some light on this. Thanks in advance. Kobi _ Get your FREE download of MSN Explorer at http://explorer.msn.com ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Using Xerces
First, I am cross-posting this message to jboss-dev because I think it may involve a development issue regarding class loaders. At the minimum, I think some explanatory material should be developed both for using other XML parsers and for migrating to 2.2.x from earlier versions. I am willing to do this, but I know I won't be able to look at it at least until next week, by which time I'm sure somebody else will have done something. Second, I apologize that this message is longer, less complete, and less clear than I would generally hope, but I thought it better to send it than to delay it until I have enough time, which may be never :-). It seems to me that this problem relates to class loaders and the JAXP mechanism for loading XML parsers, i.e. a factory method. If javax.xml.parsers.SAXParserFactory is loaded by the system ClassLoader from crimson.jar, which is specified in the classpath given on the command-line, then it will not have access to classes that are loaded either from jboss/lib/ext, an MBean, or from the libraries of deployed EAR files. One solution, then, is to modify the scripts to put the Xerces jar file in the classpath passed on the java command-line. Then the system ClassLoader will be able to see the classes. However, this seems incomplete to me, since you can still only have one value for the javax.xml.parsers.SAXParserFactory property, also passed on the command-line. I have not fully investigated this, but from a quick glance at one of the former messages on jboss-user, it appeared that JBoss itself would not work with Xerces specified as the parser. If this is not the case, I apologize to the developers for insinuating that it might be. If it is true, then I think part of the solution is to modify JBoss so that it can work with either Xerces or Crimson (or any other JAXP-compliant parser). Again, I can work on this, but not until at least next week. For those who may want to test this, put the Xerces jar file in the classpath passed on the java command-line *BEFORE OR INSTEAD OF CRIMSON* and specify -Djavax.xml.parsers.SAXParserFactory appropriately (I think it may be the following) set JAXP=-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl set JAXP=%JAXP% -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl Note: UNIX users will need to adjust that to JAXP=-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl JAXP=$JAXP -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl Finally, the potential jboss-dev issue is this: is there some way that beans or components (e.g Tomcat) could each be able to specify their own XML parser and factory? I'm not well-versed in the details of class loading, so JBoss may already be doing the best that can be done given Java classloading semantics, but I considered it worth asking the question. Xandy On Mon, 14 May 2001, Dave Ortman wrote: I got a similar error and I'm not sure why. Can anyone explain? In the meanwhile, if you change your scripts so that the Xerces jar files come AFTER all the JBoss jar files (run.jar, etc.) in the CLASSPATH, then all should work fine. -Dave Ortman Folks, I tried to configure JBoss to use Xerces as suggested but get the following error at start-up: JBOSS_CLASSPATH=;/lib/tools.jar;D:\Development\Landmark\Xerces\Xerces-1_3_1\ xerces.jar;run.jar;D:\Development\Landmark\Xerces\Xerces-1_3_1\xerces.jar;.. /lib/crimson.jar jboss.home = C:\JBoss-2.2.1_Tomcat-3.2.1\jboss Using configuration tomcat [Info] Java version: 1.3.0,Sun Microsystems Inc. [Info] Java VM: Java HotSpot(TM) Client VM 1.3.0-C,Sun Microsystems Inc. [Info] System: Windows NT 4.0,x86 [Shutdown] Shutdown hook added [Service Control] Registered with server Exception in thread main [Default] javax.xml.parsers.FactoryConfigurationError: org/apache/xerces/jaxp/DocumentBuilder FactoryImpl -Djavax/xml/parsers/SAXParserFactory=org/apache/xerces/jaxp/SAXP arserFactoryImpl [Default] at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory. java:154) [Default] at org.jboss.Main.init(Main.java:192) [Default] at org.jboss.Main$1.run(Main.java:107) [Default] at java.security.AccessController.doPrivileged(Native Method) [Default] at org.jboss.Main.main(Main.java:103) [Default] Shutting down [Service Control] Stopping 0 MBeans [Service Control] Stopped 0 services [Service Control] Destroying 0 MBeans [Service Control] Destroyed 0 services [Default] Shutdown complete Any ideas? The overall problem is that I want to use SOAP. JBoss ZOAP doesnt appear to be supported at the mo, so I downloaded Apache SOAP 2.1 whiuch needs the Xerces parser... Thanks in advance - Adam. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of