RE: [JBoss-user] strange error
I got a few of those errors as well when I was attempting to deploy. Check your deployment descriptors closely. I typically made the following errors multiple times before figuring out what was going on: 1. Having a different copy of the deployment descriptors in my classpath. 2. Having the case differ between matching XML tags. You could always post your XML files if nothing seems obvious. -Dave -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Mikhail Akopov Sent: Friday, May 25, 2001 5:28 PM To: [EMAIL PROTECTED] Subject: [JBoss-user] strange error Once I got following message and now it chases me: [Container factory] org.jboss.ejb.DeploymentException: expected only one enterprise-beans tag Sure - there is exactly one enterprise-beans tag. Did anybody met such error? Any help would be highly appreciated - I loose a lot of time on it already. Java version: 1.3.0_02,Sun Microsystems Inc. Java VM: Java HotSpot(TM) Client VM 1.3.0_02,Sun Microsystems Inc. System: Windows 2000 5.0,x86 JBoss 2.2.1 Started in 0m:21s embedded TOMCAT Version 3.2.1 Vale! - Mikhail Akopov ___ 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] Calling CORBA objects from JBoss
I think I replied to that thread, but it didn't appear to make it to the list. Here's my post again: Thanks Luke, That solved the problem. I didn't think to look through the development list - thanks for pointing it out. I only wish that your original reply would have gotten through... it would have saved me some time. :) Thanks again, -Dave ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Calling CORBA objects from JBoss
Hi, I recently posted an inquiry regarding the utilization of CORBA objects from within EJB's deployed in JBoss. Basically, I was unable to have a session bean make a call to a CORBA object. Since then, we have deployed the same bean to WebLogic, and it worked fine. So, the issue is not EJB specific. I looked at the FAQ, and saw that JBoss does not support RMI/IIOP. However, I didn't think this would prevent my session beans from making CORBA calls. Is there a limitation of JBoss which would make calling CORBA objects impossible? Thanks, -Dave ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Problem making CORBA call
org.omg.CORBA.ORB orb = ORB.init(new String[] {ior}, null); Why do you pass the IOR here? When I first went to write the CORBA connection, I copied and pasted from some sample code which I had found. It worked, so I never changed it. Sytem.err.println(e); Please change this to e.printStackTrace(System.err). I did. Oh, I thought you were getting a null back from string_to_object. If you're getting a NPE from the string_to_object call, then there's definitely a problem with the ORB. The stacktrace I got certainly supports that assertion. It would be helpful to see the complete stacktrace of the exception. Ask and you shall recieve. [TestBean] java.lang.NullPointerException [TestBean] at com.sun.corba.se.internal.core.IOR.getCodebase(Unknown Source) [TestBean] at com.sun.corba.se.internal.core.IOR.read(Unknown Source) [TestBean] at com.sun.corba.se.internal.iiop.CDRInputStream.read_Object(Unknown Source) [TestBean] at com.sun.corba.se.internal.iiop.CDRInputStream.read_Object(Unknown Source) [TestBean] at com.sun.corba.se.internal.corba.ORB.string_to_object(Unknown Source) [TestBean] at com.calpers.CORBA.client.CometManager.connect(com/calpers/corba/client/CometManag er.java:81) [TestBean] at psg.intranet.ejb.sessionbeans.TestBean.getIndivs(psg/intranet/ejb/sessionbeans/Te stBean.java:33) [TestBean] at java.lang.reflect.Method.invoke(Native Method) [TestBean] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSess ionContainer.java:472) [TestBean] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSession InstanceInterceptor.java:87) [TestBean] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:133) [TestBean] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java: 263) [TestBean] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99) [TestBean] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:190) [TestBean] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195) [TestBean] at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:271 ) [TestBean] at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoke r.java:392) [TestBean] at java.lang.reflect.Method.invoke(Native Method) [TestBean] at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source) [TestBean] at sun.rmi.transport.Transport$1.run(Unknown Source) [TestBean] at java.security.AccessController.doPrivileged(Native Method) [TestBean] at sun.rmi.transport.Transport.serviceCall(Unknown Source) [TestBean] at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source) [TestBean] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source) [TestBean] at java.lang.Thread.run(Unknown Source) Thanks, -Dave ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Problem making CORBA call
-- Stack Trace -- Hmm, well I can't complain about not enough information any more, so I'm going to have to admit that I have no idea. Sorry. No problem. I appreciate you're curiosity up to this point. And, it makes me feel slightly better to know that I'm not the only one without an answer. :) Is the source for these com.sun.corba classes available? You could try using a different ORB (e.g. JacORB) for which you have source. I don't have them... but I was going to go see if I could find them. If not, I guess I can try using a different ORB. I was just hoping that somebody out there had already hit this wall, so as to save me the time necessary to look into it. I think there's some debugging you can turn on that will show you all of the premission checks that the security manager is doing. This might provide some insight. I'll look into it. Thanks much, -Dave ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Problem making CORBA call
You shouldn't jump to conclusions like that - you might hurt yourself. Just a wild guess... I never assumed it would be correct. AFAIK, there shouldn't be any reason why you can't be a CORBA client. Well, at least that clears that up. I had looked through the spec for something saying You can't do this, but had no such luck. So I guess that narrows it down to user error. I placed the IOR string in the Java file, as I can't use I/O classes to read it from a file (as I'm doing in my Swing client). I've put some logging in the bean, and have found that the string_to_object method always returns a null object. Well, this means that the ORB wasn't able to convert the string to an object. If this were some security related problem I would expect an exception of some description. As would I. Are you sure that the IOR string is the same as you are using the Swing client? Are you running these things on the same machine? Perhaps there is an environment configuration problem. Are you using the same ORB? Are you initialising the ORB the same way? I'm 99% sure that everything is EXACTLY the same. I actually have the connection logic in a helper class - CorbaManager. The IOR string is hard coded in the class. I'm running both EJB and Swing client on the same machine. So, each create an instance of the CorbaManager object - one works, the other doesn't. I'll go and check for that extra 1% of confidence. Perhaps I'm doing something different... but I really don't think that to be the case. At any rate, knowing that it's not forbidden helps in now that I know there must be a problem somewhere Thanks, -Dave ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Problem making CORBA call
You might find that ORBs do some things that an EJB would be prohibited by the spec from doing, but I'm pretty sure JBoss wouldn't stop them from happening anyway. I had originally figured that perhaps the ORB was breaking some rule, but was unable to guess as to what that might be. Are you sure that the IOR string is the same as you are using the Swing client? Are you running these things on the same machine? Perhaps there is an environment configuration problem. Are you using the same ORB? Are you initialising the ORB the same way? I'm 99% sure that everything is EXACTLY the same. I actually have the connection logic in a helper class - CorbaManager. The IOR string is hard coded in the class. I'm running both EJB and Swing client on the same machine. So, each create an instance of the CorbaManager object - one works, the other doesn't. I'll go and check for that extra 1% of confidence. Perhaps I'm doing something different... but I really don't think that to be the case. At any rate, knowing that it's not forbidden helps in now that I know there must be a problem somewhere Which ORB are you using? You might find that you're picking up an orb.properties file in one but not the other, or something. I'm simply using the OMG classes which are distributed with the JDK. The ORB on the other end is a Forte server.. though that really shouldn't matter. Anyway, keep us updated. I plan to port an application at work to JBoss at some point, and we do a bit of CORBA, so I'm interested in how you get on, at least. I have no qualms with continuing to bug the fine people on this list, so no problem. :) I went back and checked... and found nothing that looked out of whack. As I said earlier, I wrapped some CORBA calls in a helper class really quick. I then create an instance of this helper object, have it connect to the CORBA server, then use it as a call through for subsequent CORBA calls. The connect logic (which works in normal client, but fails in a session bean) is as follows: public boolean connect(String fileName) { System.out.println(fileName); String ior = IOR:01001c0049444c3a436f726261534f2f436f7262615365727665723a312e3100b40001010a0077656273657276657200ed139c006652744501002b00536974652f436f726261534f5f434c302f436f726261534f5f636c302d436f726261536572766572534f0100010006002600436f726261534f5f636c302f436f726261534f5f434c302f436f726261536572766572534f000100; //System.out.println(ior); if (ior == null) { connected = false; } try { System.out.println(1); org.omg.CORBA.ORB orb = ORB.init(new String[] {ior}, null); System.out.println(2); if (orb == null) { System.out.println(orb is null damn it to hell!); } System.out.println(3); org.omg.CORBA.Object obj = orb.string_to_object(ior); System.out.println(4); server = CorbaServerHelper.narrow(obj); mediator = server.getCORBAMediator(); if (mediator == null) { System.out.println(Crap!); } } catch (java.lang.Exception e) { System.err.println(e); } connected = true; return connected; } I have the IOR string hard coded in the class. I did this to avoid the I/O issues within the bean, and to make sure that I was using the same IOR string in both cases. In the Swing client, this method works find. It obtains a reference to an object and stores it for future requests. However, when running within a session bean in JBoss, I receive a NullPointerException. Within the console on JBoss, I see the numbers 1, 2, and 3 get printed out - which means that it's dying on the string_to_object() method. The IOR is not null. The orb is not null (as I check for it directly above). So I assume the error is getting raised from inside the string_to_object method. Am I doing something really stupid? Thanks, -Dave ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Problem making CORBA call
Hi, I'm attempting to make a call to a CORBA service from within a session bean. The code below works perfectly fine when I run it from a Swing Java client. However, as soon as I place it in a session bean, I recieve a NULL exception. I'm assuming it has something to do with the I/O and the EJB container - it isn't letting me get a reference to an external object. Can somebody help me out? The code I'm using to obtain a reference to an external CORBA object is as follows: String ior = __IOR String here; ORB orb = ORB.init(new String[] {ior}, null); org.omg.CORBA.Object obj = orb.string_to_object(ior); System.out.println(ior); server = CorbaServerHelper.narrow(obj); mediator = server.getCORBAMediator(); if (mediator == null) { System.out.println(Crap!); } I placed the IOR string in the Java file, as I can't use I/O classes to read it from a file (as I'm doing in my Swing client). I've put some logging in the bean, and have found that the string_to_object method always returns a null object. Is this an easy fix? Thanks, -Dave Ortman ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] DefaultDS?
You're asking a bit much from the database with the timeout that you set - 18 miliseconds. Put 4 or 5 zeros at the end of that and it should work fine. attribute name=IdleTimeout18/attribute -Dave Ortman I'm not sure what I'm doing wrong, but it looks as if DefaultDS isn't coming up correctly. Can anyone tell me if I've got something wrong in my jboss.jcml? The pertinet parts of jboss.jcml and the log are attached. If I'm mistaken and just wasting electrons, sorry thanks for any help, Brian JBOSS_CLASSPATH=:run.jar:../lib/crimson.jar jboss.home = /home/vocalist/jboss/JBoss-2.2.1 Using configuration default [Info] Java version: 1.3.0,Blackdown Java-Linux Team [Info] Java VM: Java HotSpot(TM) Server VM Blackdown-1.3.0-FCS,Blackdown Java-Linux Team [Info] System: Linux 2.2.17,i386 [Shutdown] Shutdown hook added [Service Control] Registered with server [Service Control] Initializing 24 MBeans ... init messages [Service Control] Initialized 24 services [Service Control] Starting 24 MBeans .. some startup messages [Hypersonic] Starting [Hypersonic] Server 1.4 is running [Hypersonic] Database started [Hypersonic] Started [InstantDB] Starting [Hypersonic] Press [Ctrl]+[C] to abort [InstantDB] XA Connection pool InstantDB bound to java:/InstantDB Enhydra InstantDB - Version 3.26 [InstantDB] The Initial Developer of the Original Code is Lutris Technologies Inc. Portions created by Lutris are Copyright (C) 1997-2001 Lutris Technologies, Inc. All Rights Reserved. [InstantDB] org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl created new Connection (org.enhydra.instantdb.jdbc.idbConnection) with XAResource org.opentools.minerva.jdbc.xa.wrapper.XAResourceImpl and XAConnection org.opentools.minerva.jdbc.xa.wrapper.XAConnectionImpl. [InstantDB] No transaction right now. [InstantDB] Pool InstantDB [0/0/10] gave out new object: org.opentools.minerva.jdbc.xa.wrapper.XAConnectionImpl@5973ea [InstantDB] Pool InstantDB [0/1/10] returned object org.opentools.minerva.jdbc.xa.wrapper.XAConnectionImpl@5973ea to the pool. [InstantDB] Started [DefaultDS] Starting [DefaultDS] XA Connection pool DefaultDS bound to java:/DefaultDS [DefaultDS] java.sql.SQLException: Connection is broken: Connection timed out [DefaultDS] Pool DefaultDS factory org.opentools.minerva.jdbc.xa.XAConnectionFactory@632802 unable to create new object! [DefaultDS] Pool DefaultDS [0/0/10] couldn't find an object to return! [Container factory] Starting [Container factory] Started ... more startup messages [Default] JBoss 2.2.1 Started in 13m:33s ... etc, etc. mbean code=org.jboss.jdbc.XADataSourceLoader name=DefaultDomain:service=XADataSource,name=InstantDB attribute name=PoolNameInstantDB/attribute attribute name=DataSourceClassorg.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl/attribute attribute name=Properties/attribute attribute name=URLjdbc:idb:../conf/default/instantdb.properties/attribute attribute name=GCMinIdleTime120/attribute attribute name=JDBCUser sa/attribute attribute name=MaxSize10/attribute attribute name=Password / attribute name=GCEnabledfalse/attribute attribute name=InvalidateOnErrorfalse/attribute attribute name=TimestampUsedfalse/attribute attribute name=Blockingfalse/attribute attribute name=GCInterval12/attribute attribute name=IdleTimeout180/attribute attribute name=IdleTimeoutEnabledfalse/attribute attribute name=LoggingEnabledtrue/attribute attribute name=MaxIdleTimeoutPercent1.0/attribute attribute name=MinSize0/attribute /mbean mbean code=org.jboss.jdbc.XADataSourceLoader name=DefaultDomain:service=XADataSource,name=DefaultDS attribute name=PoolNameDefaultDS/attribute attribute name=DataSourceClassorg.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl/attribute attribute name=Properties/attribute attribute name=URLjdbc:HypersonicSQL:hsql://localhost:1476/attribute attribute name=GCMinIdleTime120/attribute attribute name=JDBCUsersa/attribute attribute name=MaxSize10/attribute attribute name=Passwordfoo/attribute attribute name=GCEnabledtrue/attribute attribute name=InvalidateOnErrorfalse/attribute attribute name=TimestampUsedfalse/attribute attribute name=Blockingfalse/attribute attribute name=GCInterval12/attribute attribute name=IdleTimeout18/attribute attribute name=IdleTimeoutEnabledtrue/attribute attribute name=LoggingEnabledtrue/attribute attribute name=MaxIdleTimeoutPercent1.0/attribute attribute name=MinSize0/attribute /mbean ___ 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
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 Chris Winters Sent: Monday, May 14, 2001 2:48 PM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] Using Xerces * Manuel Alzola ([EMAIL PROTECTED]) [010512 12:09]: Hello, I´m trying to use xerces on jboss-tomcat, as I was doing in standalone tomcat, but it continues using crimsom , and I suppose it becouse of this lines in jboss run.bat set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;../lib/crimson.jar set JAXP=-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.crimson.jaxp.Docu mentBuilderFactoryImpl set JAXP=%JAXP% -Djavax.xml.parsers.SAXParserFactory=org.apache.crimson.jaxp.SAX ParserFactoryImpl I have not found in xerces docs a JAXP equivalent, and I need Xerces becouse crimson fails me when working with Xalan for xsl processing. As long as you've got the xerces classes in the classpath, the following should work: set JAXP=-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.Docum entBuilderFactoryImpl set JAXP=%JAXP% -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAX ParserFactoryImpl Hope this helps. Chris ___ 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] jaws.xml
Plenty of info in the documentation: http://www.jboss.org/documentation/HTML/ch05.html -Dave Ortman -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Ray Sent: Monday, May 14, 2001 3:24 PM To: [EMAIL PROTECTED] Subject: [JBoss-user] jaws.xml What's the difference between jaws.xml and standardjaws.xml? Thanks. _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.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