Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Access returned datetime from EJB cause PB crash

2 posts in EJB Client Last posting was on 2007-03-27 20:43:03.0Z
Jim Xu Posted on 2007-03-16 15:59:25.0Z
From: "Jim Xu" <xzhentian@yahoo.ca>
Newsgroups: sybase.public.powerbuilder.ejbclient
Organization: 198.73.111.1
X-Newsreader: AspNNTP 1.50 (JodoHost)
Subject: Access returned datetime from EJB cause PB crash
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 64.187.108.200
X-Original-NNTP-Posting-Host: 64.187.108.200
Message-ID: <45fabedd$1@forums-1-dub>
Date: 16 Mar 2007 07:59:25 -0800
X-Trace: forums-1-dub 1174060765 64.187.108.200 (16 Mar 2007 07:59:25 -0800)
X-Original-Trace: 16 Mar 2007 07:59:25 -0800, 64.187.108.200
Lines: 15
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:733
Article PK: 424834

Hi All,

I am using EJB client to access the EJB deployed to WAS6.0. I push one class in
a collection, the class includes a method return java.util.date. In PB, I can
get this class through the PB proxy object and access some methods which return
integer, long, string,etc. No problem. But when I assign the returned datetime
to a datetime varialbe and use the variable. It cause PB(PB10.2.0 BUILD 8100)
crash. I also tried to debug it but PB crashed on the code line that is using
the variable. Can anyone give me a hand?

Thanks,

Jim Xu
---== Posted via the PFCGuide Web Newsreader ==---
http://www.pfcguide.com/_newsgroups/group_list.asp


Gokhan Demir Posted on 2007-03-27 20:43:03.0Z
From: Gokhan Demir <gokhan.demir@igonline.biz>
User-Agent: Thunderbird 1.5.0.10 (Windows/20070221)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Re: Access returned datetime from EJB cause PB crash
References: <45fabedd$1@forums-1-dub>
In-Reply-To: <45fabedd$1@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-9; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 85.105.196.163
X-Original-NNTP-Posting-Host: 85.105.196.163
Message-ID: <460981d7@forums-1-dub>
Date: 27 Mar 2007 12:43:03 -0800
X-Trace: forums-1-dub 1175028183 85.105.196.163 (27 Mar 2007 12:43:03 -0800)
X-Original-Trace: 27 Mar 2007 12:43:03 -0800, 85.105.196.163
Lines: 62
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:735
Article PK: 424836

Hi,

This is just a guess but, since java.sql.Date is a descendent of
java.util.Date, there is a possibility that your actual received class
might be a descendent of java.util.Date such as java.sql.Date.
Powerbuilder does not generate proxies for java.sql.Date for I don't
know what reason, most probably the naming conflict. I hence would
recommend that you manually write a java.sql.Date proxy object and
import it into one of your Powerbuilder workspace pbls. I did that for
myself, for some other reason, and I will paste its code, so that you
can more easily take a look at into, and maybe use it directly:

<code>
<filename>java_sql_date.srx</filename>
<content>
$PBExportHeader$java_sql_date.srx
$PBExportComments$Proxy imported from EJB via EJB Proxy generator.
global type java_sql_Date from nonvisualobject
end type

type variables
protected:
string java_sql_Date_javaname= "java.sql.Date"
end variables

forward prototypes
public:
subroutine java_sql_Date( long long_1, long long_2, long long_3) alias
for "<init>,(III)V"
subroutine java_sql_Date( longlong longlong_1) alias for "<init>,(J)V"
subroutine setTime( longlong longlong_1) alias for "setTime,(J)V"
function java_sql_Date valueOf( string string_1) alias for
"valueOf,(Ljava/lang/String;)Ljava/sql/Date;"
function string toString() alias for "toString,()Ljava/lang/String;"
function long getHours() alias for "getHours,()I"
function long getMinutes() alias for "getMinutes,()I"
function long getSeconds() alias for "getSeconds,()I"
function longlong getTime() alias for "getTime,(),J"
subroutine setHours( long long_1) alias for "setHours,(I)V"
subroutine setMinutes( long long_1) alias for "setMinutes,(I)V"
subroutine setSeconds( long long_1) alias for "setSeconds,(I)V"
end prototypes
</content>
</code>

Jim Xu wrote:
> Hi All,
>
> I am using EJB client to access the EJB deployed to WAS6.0. I push one class in
> a collection, the class includes a method return java.util.date. In PB, I can
> get this class through the PB proxy object and access some methods which return
> integer, long, string,etc. No problem. But when I assign the returned datetime
> to a datetime varialbe and use the variable. It cause PB(PB10.2.0 BUILD 8100)
> crash. I also tried to debug it but PB crashed on the code line that is using
> the variable. Can anyone give me a hand?
>
> Thanks,
>
> Jim Xu
> ---== Posted via the PFCGuide Web Newsreader ==---
> http://www.pfcguide.com/_newsgroups/group_list.asp