ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Problem calling rpg/java in CGI Program

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem calling rpg/java in CGI Program

    Hello,

    Im trying to call an RPG/java JNI webservice program in a cgidev2 program. The CGI and rpg/java program run in the same activation group.

    The java program completes normally and passes data back to the cgi program. I have a transaction file that is being written after the web service completes.

    The apache server is giving me the "Internal Server Error", but there is no error anywhere. When I comment out the call to the RPG/JNI program it completes normally.

    I can run the rpg/jni program standalone(qinter/qbatch) and it runs normally. Im calling the jni program through a parameter list and and populating a parm with the webservice data. It is defined at 2048 alpha.
    The webservice goes to an external website.

    I can run the CGI program in debug and it completes normally, but, at the *inlr = *on point I get the internal server error.

    Can anyone think of what may be the issue here. Can I be getting a xcross domain error. There is no ajax action happening here.

  • #2
    Re: Problem calling rpg/java in CGI Program

    Maybe you misformatted (or forgot entirely) the HTTP keywords?

    Comment


    • #3
      Re: Problem calling rpg/java in CGI Program

      Im not sure what your referring to. I have the content-type set as text/html

      Comment


      • #4
        Re: Problem calling rpg/java in CGI Program

        Content-type is one example of an HTTP header keyword. It should look like this:
        Code:
        Content-type: text/html
        The blank line after this content type is mandatory.

        Also, make sure you've got wrtsection('*FINI') somewhere in your program.

        Also, make sure the JAva code isn't writing stuff to stdout prior to your stuff from CGIDEV2 -- if it's writing to stdout, that could be confusing Apache.

        Comment


        • #5
          Re: Problem calling rpg/java in CGI Program

          After days of research,, Im finding Im getting something that is generating a error msg.

          It says, it's unable to start the java source debugger, But, I'm not wanting to start the source debugger.

          I dont understand what it's doing

          Message ID . . . . . . : JVAB307 Severity . . . . . . . : 10
          Message type . . . . . : Diagnostic
          Date sent . . . . . . : 02/11/14 Time sent . . . . . . : 05:01:13

          Message . . . . : Unable to start Java system debug.
          Cause . . . . . : The JVM in job 741475/QTMHHTTP/APACHE02 was not started in
          a mode which allows debugging.
          Recovery . . . : When starting the JVM, use options which allow Java system
          debug to be started on the JVM. Additional information about Java system
          debug can be found in the IBM Developer Kit for Java topic collection in the
          i5/OS Information Center at http://www.ibm.com/systems/i/infocenter/.

          Comment

          Working...
          X