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 veninga
Sent: Friday, August 11, 2000 20:13
To: Orion-Interest
Subject: Re: CMP:Exception in thread "main" java.lang.InternalError

Hi 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.

Reply via email to