CMP:Exception in thread main java.lang.InternalError
Hello, I am trying to access an Entity bean from a client on a seperate JVM. I can access everything and the EntityBean is also successfully deployed. The EntityBean adds a row to the table. When i call home.create(id,name,age) from the client ... I get the following Exception. Exception in thread "main" java.lang.InternalError: Object was null but still part of the cache at com.evermind.server.rmi.a8.invokeMethod(JAX) at com.evermind.server.rmi.a_.invoke(JAX) at com.evermind.server.rmi.a0.invoke(JAX) at __Proxy0.create(Unknown Source) at ProfileClient.main(ProfileClient.java:48) My Client code is:--- ProfileHome profilehome = (ProfileHome)PortableRemoteObject.narrow(objref,ProfileHome.class); Profile = profilehome.create(id,name,age); I have also tried with ... profilehome.create(id,name,age); The ProfileBean code for create is as:-- public ProfilePK ejbCreate(int id,String name,int age){ this.id=id; this.name=name; this.age=age; return null; }//ejbCreate ProfilePK is the primary key class... . The value gets added in the database. But the client terminates by throwing the above exception. Where could I go wrong. Please help.. Thanks, Ishpal.
RE: Jive
Right, but this is fairly normal - there's nothing unique about doing this as compared to, for example, using Oracle or any other external database. The problem is in how hsql stores data in local mode - it stores it as raw SQL, which isn't very efficient on startup, and isn't very secure. What you're doing is the "normal" way to run hsql in server mode, which requires two VMs to be running. While the new linux jvm (1.3.0 beta-refresh) is MUCH improved in terms of memory requirements, it's still too hefty for my poor machine to just allocate a new VM for DB access (esp. when postgres is already running - but hsql is *great* for debugging purposes.) What I'd like to see is if someone managed to run hsql along with the web applications, inside *one* VM, instead of running the two VMs. On Fri, 11 Aug 2000, Neville Burnell wrote: We are using hSQL + Orion in server mode as follows: 1) snip from data-source.xml note the line url="jdbc:HypersonicSQL:hsql://jaguar" which is the hsql "server mode" jdbc url data-source name="Default data-source" class="com.evermind.sql.ConnectionDataSource" location="jdbc/DefaultDS" pooled-location="jdbc/DefaultPooledDS" xa-location="jdbc/xa/DefaultXADS" ejb-location="jdbc/DefaultEJBDS" url="jdbc:HypersonicSQL:hsql://jaguar" connection-driver="org.hsql.jdbcDriver" username="sa" password="" schema="database-schemas/hypersonic.xml" / b) start hsql using "java -cp \orion\lib\hSql.jar org.hsql.Server" Works fine you can connect to the hsql server using the hSql DataBase manager concurrently with orion also to see what is being stored. Kind Regards Neville Burnell Business Manager Software -Original Message- From: Joseph B. Ottinger [mailto:[EMAIL PROTECTED]] Sent: Thursday, 10 August 2000 4:56 AM To: Orion-Interest Cc: [EMAIL PROTECTED] Subject: RE: Jive Sure. hsql serves just as a sort of "default database" for orion, so you'll always have SOMETHING, even though the default mode of hsql kinda sucks. (Anyone looked into getting hsql to run in server mode from inside orion?) On Wed, 9 Aug 2000, J.T. Wenting wrote: Will Orion survive without hSQL installed? I do not use it for anything myself, so if Orion can do without, so can I. I could always replace it with another database if that is possible (instantDb, Interbase, Oracle (at work), even MS Access...). Jeroen T Wenting [EMAIL PROTECTED] ICQ UIN #9191966 It's the end of the world as we know it and I feel fine (Michael Stipe) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Joseph B. Ottinger Sent: 09 August 2000 19:06 To: Orion-Interest Cc: Orion-Interest; Matt Adam Tucker Subject: Re: Jive Um, no. It's not a bug in orion. It's a classpath issue, and literally a problem with hsql.jar, as stated. $ORION/lib jars get put in the classpath, and since Tree.class in hsql is in the default package, it's exposed according to java's rules. If you want to blame Java, fine. Go for it. If you want to blame hsql, fine. Go for it. In either case, blame is deserved (well, mostly for hsql, but hey.) Orion is doing nothing to the classpath to make it behave oddly. The solution is to fix hsql.jar, really, not modify orion or jive. On Wed, 9 Aug 2000, Chris Miller wrote: Thanks for the reply Jeroen. As far as I can see, this is actually a bug in Orion - it's exposing the classes in hsql.jar (and probably the other /lib jars?) to JSP pages when it shouldn't be. I don't think Jive needs fixing? As for the hSQL scripts, I'm sorry but I don't have any - I'm actually using SQL Server (but I have a script for that if you want it?). My solution to the problem I described was to simply remove the hsql.jar file from /orion/lib since I'm not using it. - Original Message - From: "J.T. Wenting" [EMAIL PROTECTED] To: "Orion-Interest" [EMAIL PROTECTED] Cc: "Matt Adam Tucker" [EMAIL PROTECTED] Sent: Wednesday, August 09, 2000 3:38 PM Subject: RE: Jive I'm working on building Jive. I'll look into it and forward your message to the main maintainers. Jive probably does not see the class, but the JSP engine does. Maybe that's what is causing problems. Have you been able to create the Jive database on hSQL? If so, can you send in the SQL scripts for it? We want to have broad support. Jeroen T. Wenting [EMAIL PROTECTED] Murphy was wrong, things that can't go wrong will anyway -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Chris Miller Sent: Wednesday, August 09, 2000 15:13 To: Orion-Interest Cc: [EMAIL PROTECTED]
O/R mapping
Hi I guess it should be possible to make CMP Entity bean out of more than one table. I guess i have to make my own orion-ejb-jar.xml. Is somebody out there who has done that? rgds Srikanth
Re: Orion and Cloudscape
JavierG wrote: Hi all: Can I make Orion and Clouscape run in the same VM? In that case, how? Wrapping Cloudscape in a servlet and running it within Orion? Any particular measure I should take in that case? All suggestions would be very welcome. Thanks J. Hi Javier, What do you mean with running cloudscape in the same VM. Are you just using cloudscape or do you have a framework (rmijdbc or cloud connector) that you want to run cloudscape in. If you just want to use cloudscape as an embedded db you can use it with orion and run it in the same VM as orion. You have to supply an datasource in datasources.xml and provide a schema for cloudscape and set the cloudscape.system.home property in orion.properties or at the command line when starting orion. Put the cloudscape.jar in the orion/lib directory and the client.jar in the client classpath (for exception etc..) What would be the purpose of wrapping cloudscape in an servlet ? Do you mean that you want to program the acces to the database yourself in the servet? Note I couldn't get cloudscape working with CMP, with BMP there were no problems but with cmp I get an strange error at the client side (object was null but still part of the cache). So if you get cloudscape working with CMP will you please let me know how you did it ? The xml files are supplied as an zip attachment. Hope this helps. Greetings Wim Veninga cloudscapeXML.zip
Re: IllegalArgumentException
I figured it out. I had it deployed in application-deployments instead of the applications directory. Maybe Orion should prevent this by disallowing deployments into a directory other than the one configured as application-directory in server.xml? [EMAIL PROTECTED] Sent by: To: Orion-Interest [EMAIL PROTECTED] owner-orion-interest@orioncc: server.comSubject: IllegalArgumentException 08/10/00 04:03 PM Does anybody know what causes this exception when running a client application that is trying to connect to an EJB? C:\orion\application-deployments\demo\accountjava -classpath .;c: \orion\orion.jar;c:\orion\ejb.jar;c:\orion\jndi.jar AccountClient Getting initial context Looking up home Class: __Proxy1 Creating bean Caught an exception. java.lang.IllegalArgumentException: object is not an instance of declaring class at com.evermind.server.rmi.a8.invokeMethod(Compiled Code) at com.evermind.server.rmi.a_.invoke(JAX) at com.evermind.server.rmi.a0.invoke(Compiled Code) at __Proxy1.create(Unknown Source) at AccountClient.main(Compiled Code) application.xml: ?xml version="1.0"? !DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN" "http://java.sun.com/j2ee/dtds/application_1_2.dtd" application display-nameDemo/display-name module ejbaccount/ejb /module /application ejb-jar.xml: ?xml version="1.0"? !DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.2//EN" "http://java.sun.com/j2ee/dtds/ejb-jar_1_2.dtd" ejb-jar display-nameDemo/display-name descriptionDemo BMP entity EJB example/description enterprise-beans entity descriptionAccount EJB/description ejb-nameMyAccount/ejb-name homeAccountHome/home remoteAccount/remote ejb-classAccountEJB/ejb-class primkey-classjava.lang.String/primkey-class reentrantFalse/reentrant persistence-typeBean/persistence-type /entity /enterprise-beans assembly-descriptor /assembly-descriptor /ejb-jar application-client.xml: ?xml version="1.0"? !DOCTYPE application-client PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.2//EN" "http://java.sun.com/j2ee/dtds/application-client_1_2.dtd" application-client ejb-ref ejb-ref-nameMyAccount/ejb-ref-name ejb-ref-typeEntity/ejb-ref-type homeAccountHome/home remoteAccount/remote /ejb-ref /application-client
RE: CMP:Exception in thread main java.lang.InternalError
in Java, issue conn.setAutoCommit(true) to set autocommit on for Connection conn (if the database engine supports it), or setAutoCommit(false) to turn it off. Default is usually on, for some reason. Jeroen T. Wenting[EMAIL PROTECTED]Murphy was wrong, things that can't go wrong will anyway -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of wim veningaSent: Friday, August 11, 2000 20:13To: Orion-InterestSubject: Re: CMP:Exception in thread "main" java.lang.InternalErrorHi Ishpal, Do you use cloudscape as your db, because I got this error using cloudscape as my database. Look in your application.log file, if you get the following error 7/29/00 3:49 PM Error in bean Klant SQL Exception: Cannot issue commit when autoCommit is on. at c8e.k.j.l_(Unknown Source) at c8e.k.j.l_(Unknown Source) at c8e.k.j.d(Unknown Source) at c8e.k.q.commit(Unknown Source) at com.evermind.sql.an.commit(JAX) at com.evermind.sql.aj.commit(JAX) at com.evermind.server.ejb.DataSourceConnection.commit(JAX) at KlantHome_EntityHomeWrapper35.create(KlantHome_EntityHomeWrapper35.java:451) at java.lang.reflect.Method.invoke(Native Method) at com.evermind.server.rmi.bd.run(JAX) at com.evermind.server.rmi.bb.hv(JAX) at com.evermind.server.rmi.bb.run(JAX) at com.evermind.util.f.run(JAX) 7/29/00 3:51 PM Stopped Your db (in my case cloudscape) has autocommit on, look in your db's documentation on how to set the autocommit on. I have looked for this in the cloudscape docs but couldn't find it. Hope this helps. Greetings Wim Veninga Ishpal wrote: Hello, I am trying to access an Entity bean from a client on a seperate JVM. I can access everything and the EntityBean is also successfully deployed. The EntityBean adds a row to the table. When i call home.create(id,name,age) from the client ... I get the following Exception. Exception in thread "main" java.lang.InternalError: Object was null but still part of the cache at com.evermind.server.rmi.a8.invokeMethod(JAX) at com.evermind.server.rmi.a_.invoke(JAX) at com.evermind.server.rmi.a0.invoke(JAX) at __Proxy0.create(Unknown Source) at ProfileClient.main(ProfileClient.java:48) My Client code is:--- ProfileHome profilehome = (ProfileHome)PortableRemoteObject.narrow(objref,ProfileHome.class); Profile = profilehome.create(id,name,age); I have also tried with ... profilehome.create(id,name,age); The ProfileBean code for create is as:-- public ProfilePK ejbCreate(int id,String name,int age){ this.id=id; this.name=name; this.age=age; return null; }//ejbCreate ProfilePK is the primary key class... . The value gets added in the database. But the client terminates by throwing the above exception. Where could I go wrong. Please help.. Thanks, Ishpal.
EJB maker won't reload saved files
Hi, EJB maker saves (skeleton) files but is not able to reload them. I'm using 1.1.37, earlier versons I tested worked OK. Anyone had the same ? Bug ? Or am I doing something wrong now. Regards, Martin. Martin van der Werff KPN Research, PO Box 15000, 9700 CD Groningen, The Netherlands Tel (+31 50 58) 21005, Fax (+31 50) 3122415 [EMAIL PROTECTED]
Follow up - 1.1.x is slower than 1.0.x
I created some simple CMP test beans and found that 1.1 is just plain slower than 1.0. The test beans are: long pk, long field - a zero string test bean long pk, string - a one string test bean ... long pk, 5 strings - a five string test bean The test program is also simple - create(pk), set all fields, get all fields in a loop, followed by a loop that removes all the beans. I ran this on both 1.1.37 and 1.0 (not 1.0.3b), changing only orion.jar between test sessions to rule out other issues, and got the following elapsed times. These are ms/pass for 1000 passes, and repeatable: 1.1.37 1.0 create/set/get removecreate/set/getremove Zero1713 8 4 One 1712 8 5 Two 231311 4 Three 291215 4 Four351218 5 Five411222 5 1.1.37 runs 2x slower than 1.0 in this sample. The beans and test programs come out of a production code generator, and the test was intended to do some bean verification rather than checking performance. These results are consistent with my earlier hand-coded BMP tests, which also ran consistently slower, and with similar runs against our production code's beans. My test platform is still rather crude (more and better hardware is on order...), a P3-550/128MB/Win98/JDK 1.2.2/Hypersonic (in server mode, same machine (thanks for the example!)). Please, some explanation. Is this a bug, debug code in Orion, or a trend for future versions? We're getting concerned, particularly since we don't have any explanation or feedback. Kirk Yarina [EMAIL PROTECTED]
turning off XML XSL verification/processing in orion.
I am trying to port a web application to Orion. The application does the xml/xsl transformation in the web browser. When I attempt to serve up an XML page to a browser I get the following error: Source XML Error: Error in C:\orion\default-web-app\xml\User.xml at line 3: Processing Instruction target names must be unqualified. The line Orion does not like is: ?xml:stylesheet type=text/xsl href=MainPage.xsl? I do not wish Orion to do any processing on the xml, I just want it to send the file, no questions asked. I believe the XSLServlet is trying to do something with this file. If this is the case how do I disable this behaviour. Thanks, Peter
RE: Jive
What I'd like to see is if someone managed to run hsql along with the web applications, inside *one* VM, instead of running the two VMs. You can actually run hsql inside one VM, although with some caveats. For development, I run hsql in client-server mode. If my 'test' database was in c:\test, I'd start it up like: runServer -database c:\db\test and would connect to it using the following jdbc connection string: jdbc:HypersonicSQL:hsql://localhost The nice thing about running it in client-server mode is that I can make multiple connections to the database (ie orion and the DatabaseManager) Or, you can run hsql in the same VM as Orion, if you run it in standalone mode. You can use the exact same database as above, but change the jdbc connection string to: jdbc:HypersonicSQL:c:\db\test Note that there can only be one connection to hsql when it is running in standalone mode, so if you want to run the DatabaseManager, you'll have to shut down Orion. HypersonicSQL is a pretty useful database for basic applications. Anything serious and I'd move to Oracle, but for simple apps it does the job. Darren. -- Darren Gibbons[EMAIL PROTECTED] OpenRoad Communications ph: 604.681.0516 Internet Application Development fax: 604.681.0916 Vancouver, B.C. http://www.openroad.ca