Ashish,

Are your users having the problem in production, or are you having it in
development?  Aaron has much more experience in RPG calling Java than I do,
but any time I foul up my environment by bailing out of debug or having a
program bomb, I have to sign off and sign back on.  Hopefully, I catch the
problems in development and the program doesn't bomb in production.

If the program could possibly bomb in production, I'd suggest you use the
MONITOR opcode to catch it and handle it gracefully rather than letting it
bomb.

Mike E.





                                                                                
                                                    
                      Ashish Kulkarni                                           
                                                    
                      <kulkarni_ash1312@y        To:       Java Programming on 
and around the iSeries / AS400                       
                      ahoo.com>                   <java400-l@xxxxxxxxxxxx>      
                                                    
                      Sent by:                   cc:                            
                                                    
                      java400-l-bounces@m        Subject:  RE: Error while 
calling java from RPG Java exception "java.lang.U        
                      idrange.com                 nknownError:"                 
                                                    
                                                                                
                                                    
                                                                                
                                                    
                      01/19/2004 12:47 PM                                       
                                                    
                      Please respond to                                         
                                                    
                      Java Programming on                                       
                                                    
                      and around the                                            
                                                    
                      iSeries / AS400                                           
                                                    
                                                                                
                                                    
                                                                                
                                                    




Hi
The problem is i cannot ask the end users to signoff
and signon
here is my RPG code, what wrong may i be doing
H thread(*serialize)
/define OS400_JVM_12
/Copy JNI
/Copy Prototype
d env             s               *
D crtPgm          pr              o   extproc(*java:

d
'com.pfizer.maps.data.PORPGToJava'
d                                     :*Constructor )

d dateFormat                      o
class(*java:'java.lang.String')
d                                     const

// i call a CL program to set env variable
 c                   eval      env =
getJniEnv('-Djava.version=1.4;')
 c                   callp     beginObjGroup(env:1000)

C                   eval
@dateFormat=crtString(Datfmt)
//it fails on this line....
C                   eval
popgm=crtPgm(@dateFormat)
// othe logic to call methods
c                   callp     endObjGroup (env)
C                   EVAL      *INLR = *ON

C                   RETURN

Ashish


--- "Bartell, Aaron L. (TC)"
<ALBartell@xxxxxxxxxxxxxx> wrote:
> Did you exit out of the program prematurely while in
> debug or something of
> that nature?  If so then a clearing of your
> environment is a must to make
> sure everything is in order, and the easiest and
> safest way to do so is to
> sign-off and back on again.  You could try and
> reclaim the activation group,
> but I don't know if that will take care of the Java
> cleanup and references.
> . .
>
> HTH,
> Aaron Bartell
>
> -----Original Message-----
> From: java400-l-bounces@xxxxxxxxxxxx
> [mailto:java400-l-bounces@xxxxxxxxxxxx]On Behalf Of
> Ashish Kulkarni
> Sent: Monday, January 19, 2004 11:21 AM
> To: Java Programming on and around the iSeries /
> AS400
> Subject: Re: Error while calling java from RPG Java
> exception
> "java.lang.UnknownError:"
>
>
> Hi
> Also in my job log i see error message
> Tried to refer to all or part of an object that no
> longer exists
>
> What should i do
>
> Ashish
> --- Ashish Kulkarni <kulkarni_ash1312@xxxxxxxxx>
> wrote:
> > Hi
> > I am using V5R2 and JDK1.4.1
> > and calling Java from RPG, and having a weird
> > problem
> > Every thing works when i call this RPG program
> first
> > time, but when i call the RPG program second time
> i
> > get
> > error saying
> >
> > Message ID . . . . . . :   RNQ0301       Severity
> .
> > .
> > . . . . . :   99
> >  Message type . . . . . :   Inquiry
>
> >
> >
> >  Date sent  . . . . . . :   01/19/04      Time
> sent
> > .
> > . . . . . :   10:54:23
> >
>
> >
> >
> >  Message . . . . :   Java exception received when
> > calling Java method (C G D
> >    F).
>
> >
> >
> >  Cause . . . . . :   RPG procedure PU610B01 in
> > program
> > CXSXA/PU610B received
> >    Java exception "java.lang.UnknownError:" when
> > calling method "<init>" with
> >    signature "(Ljava.lang.String;)V" in class
>
> >
> >
> >    "com.pfizer.maps.data.PORPGToJava".
>
> >
> >
> >  Recovery  . . . :   Contact the person
> responsible
> > for program maintenance to
> >    determine the cause of the problem.
>
> >
> >
> >  Possible choices for replying to message . . . .
> .
> > .
> > . . . . . . . . . :
> >    D -- Obtain RPG formatted dump.
>
> >
> >
> >    S -- Obtain system dump.
>
> >
> >
> >    G -- Continue processing at *GETIN.
>
> >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Hotjobs: Enter the "Signing Bonus"
> > Sweepstakes
> > http://hotjobs.sweepstakes.yahoo.com/signingbonus
> > _______________________________________________
> > This is the Java Programming on and around the
> > iSeries / AS400 (JAVA400-L) mailing list
> > To post a message email: JAVA400-L@xxxxxxxxxxxx
> > To subscribe, unsubscribe, or change list options,
> > visit:
> >
> http://lists.midrange.com/mailman/listinfo/java400-l
> > or email: JAVA400-L-request@xxxxxxxxxxxx
> > Before posting, please take a moment to review the
> > archives
> > at http://archive.midrange.com/java400-l.
> >
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Hotjobs: Enter the "Signing Bonus"
> Sweepstakes
> http://hotjobs.sweepstakes.yahoo.com/signingbonus
> _______________________________________________
> This is the Java Programming on and around the
> iSeries / AS400 (JAVA400-L)
> mailing list
> To post a message email: JAVA400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit:
> http://lists.midrange.com/mailman/listinfo/java400-l
> or email: JAVA400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the
> archives
> at http://archive.midrange.com/java400-l.
> _______________________________________________
> This is the Java Programming on and around the
> iSeries / AS400 (JAVA400-L) mailing list
> To post a message email: JAVA400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit:
> http://lists.midrange.com/mailman/listinfo/java400-l
> or email: JAVA400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the
> archives
> at http://archive.midrange.com/java400-l.
>


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus
_______________________________________________
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.






As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.