Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

getUserTransaction() problem or com.sybase.ejb.EJBContext vs. javax.ejb.EJBContext

0 views
Skip to first unread message

Victor Rasputnis

unread,
Feb 15, 2000, 3:00:00 AM2/15/00
to
Dear Newsgroup.

I am having run-time problem with getUserTransaction() method in my
BeanManaged
scenario. Specifically, I get "java.lang.NoSuchMethodError" in the server
log (see below).
What puzzles me also is the dual set of EJBContext and SessionContext, one
set
from com.sybase.ejb.*, another from javax.ejb.*.

Please advise.
Thanks,
Victor
. . . . . . . . . .

Feb 15 15:36:13 2000: Loading: D:\sybase\Jaguar CTS
3.5\html\classes\com\sybase\ejb\SessionContext.class
Feb 15 15:36:13 2000: Loading: D:\sybase\Jaguar CTS
3.5\html\classes\com\sybase\ejb\EJBContext.class
Feb 15 15:36:13 2000: Loading: D:\sybase\Jaguar CTS
3.5\html\classes\com\sybase\ejb\IdentityImpl.class

. . . . . . . . . . . . . . And then, in response to my method call with
getUserTransaction() in it:

Feb 15 15:36:24 2000: java.lang.NoSuchMethodError: javax.ejb.EJBContext:
method getUserTransaction()Ljavax/jts/UserTransaction; not found


Victor Rasputnis

unread,
Feb 15, 2000, 3:00:00 AM2/15/00
to
Dave,

actually I have this:

private javax.jts.UserTransaction _trx=null;
...
_trx = _sessionContext.getUserTransaction();

Thanks,
Victor


Dave Wolf [Sybase]

unread,
Feb 15, 2000, 3:00:00 AM2/15/00
to
So does your code look something like

javax.transaction.UserTransaction tx = _sessionContext.getUserTransaction()

Dave Wolf
Internet ApplicationsDivision

Victor Rasputnis <VictorR...@toast.net> wrote in message
news:Ut#1Ce$d$GA....@forums.sybase.com...

Dave Wolf [Sybase]

unread,
Feb 15, 2000, 3:00:00 AM2/15/00
to
Then there inlies the probelm. The prototype from javax.ejb.EJBObject is

public abstract javax.transaction.UserTransaction getUserTransaction();

Not javax.jts.UserTransaction.

You can see for yourself by doing

javap javax.ejb.EJBObject

Dave Wolf
Internet Applications Division

Victor Rasputnis <VictorR...@toast.net> wrote in message

news:W1yJfr$d$GA....@forums.sybase.com...

Dave Wolf [Sybase]

unread,
Feb 15, 2000, 3:00:00 AM2/15/00
to
Please open a case with support.  This is appearing to be a bug in PowerJ. 
 
javax.jts.UserTransaction is deprecated.  The proper class should be javax.transaction.UserTransaction.  PowerJ is confusing Jaguar with the object package mismatch.

Please copy me on the case number, and Ill open the CR.
 
Dave Wolf
Internet Applications Division
 
Victor Rasputnis <VictorR...@toast.net> wrote in message news:6y8Lq5$d$GA....@forums.sybase.com...
Dave,
 now I have :
 
 private javax.transaction.UserTransaction _trx=null;
......
   _trx = (javax.transaction.UserTransaction) _sessionContext.getUserTransaction();
Yet, the result remains the same:
 
: java.lang.NoSuchMethodError: javax.ejb.EJBContext: method getUserTransaction()Ljavax/jts/UserTransaction; not found
 
 
Thanks,
Victor
 
 

Reed Shilts

unread,
Mar 2, 2000, 3:00:00 AM3/2/00
to
If I'm reading things right, EJB 1.0 had specified the use of the deprecated API.
You may be able to use the new API by modifying your PowerJ code (which is
generated only once, so you can mess with it).

Hope this helps,
Reed Shilts
PowerBuilder / PowerJ Kernel Group
***Nothing I Say Is Official***


"Dave Wolf [Sybase]" wrote:

> Please open a case with support. This is appearing to be a bug in
> PowerJ. javax.jts.UserTransaction is deprecated. The proper class should be
> javax.transaction.UserTransaction. PowerJ is confusing Jaguar with the object package mismatch.

> Please copy me on the case number, and Ill open the CR. Dave WolfInternet Applications Division


>
> Victor Rasputnis <VictorR...@toast.net> wrote in message

> news:6y8Lq5$d$GA....@forums.sybase.com...Dave, now I have : private

Dave Wolf [Sybase]

unread,
Mar 2, 2000, 3:00:00 AM3/2/00
to
I believe PowerJ has an outdated copy of the javax.ejb package and needs to
be updated.

Dave Wolf
Internet Applications Division

"Reed Shilts" <nos...@sybase.com> wrote in message
news:38BEFAFC...@sybase.com...

0 new messages