Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

IOException: connection refused on retrieveRecordFormat

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

  • IOException: connection refused on retrieveRecordFormat

    Try to start your host servers. The Java toolkit requires the host servers to be active. STRHOSTSVR *ALL Joe

  • #2
    IOException: connection refused on retrieveRecordFormat

    My retrieveRecordFormat method is throwing an IOException error "Connection refused: connect". I am new to Java and have read Don Denoncourt's Java: Application Strategies for ISeries & AS/400. I am patterning my class after the Customer class in the ListCustomers sample in the book. It's seems fairly straight forward. I have all the sample programs running from the book; however, when I tried to adopt the same strategy in my own Email class, I am getting this error. I have beefed up the catch routines and added a trace so that I can get more info. I can't find anything that could be causing this problem. Can someone please help me? I'm stuck! The application is designed as a prototype to interface our legacy program that is used in our legacy AS/400 applications to send E-mail. It currently uses SNDDST, but we want to change it to use our new JavaMail EJB on our Web EJB server that will allow options to encrypt messages as well as log all application sent e-mails so we can track and troubleshoot in support. This code is a prototype. The idea is that our legacy application would write a record to an AS/400 table called EMAIL that has all the attributes to send to the JavaMail EJB. This code is designed to be a service running on the AS/400 JVM that would constantly (every 60 seconds) monitor the EMAIL table and then send the RMI call to the JavaMail EJB. Currently, it's just printing the messages to System.out.println. There is a Email class which encapsulates all the logic and data of the EMAIL table on the AS/400. The EmailMonitor class is the application that will monitor the table and forward requests to the EJB (currently just printing.) There is a static Profile class containing signon information. I appreciate any ideas or suggestion!
    Code

    Comment


    • #3
      IOException: connection refused on retrieveRecordFormat

      I had gone back through the setup instructions for the AS/400 Toolbox for Java and found that none of us had created the control unit QCNSKSVR or the device descriptions. We always STRHOSTSVR *ALL. What we also didn't do is STRTCPSVR *DDM. As soon as I completed these steps, it worked like a charm. For others with the same problem, what follows is the exact instructions from the IBM website: After the PTF for the OS/400 record-level access server has been applied, you must run the following commands on the AS/400 system: CRTCTLAPPC CTLD(QCNSKSVR) LINKTYPE(*LOCAL) CRTDEVAPPC DEVD(QCNSKSVS) RMTLOCNAME(QCNSKSVT) LCLOCNAME(QCNSKSVS) CTL(QCNSKSVR) APPN(*NO) MODE (BLANK) CRTDEVAPPC DEVD(QCNSKSVT) RMTLOCNAME(QCNSKSVS) LCLLOCNAME(QCNSKSVT) CTL(QCNSKVR) APPN(*NO) MODE(BLANK) VRYCFG CFGOBJ(QCNSKSVR) CFGTYPE(*CTL) STATUS(*ON) Ensure that the QUSER profile is enabled and has a valid password. To do this, enter DSPUSRPRF USRPRF(QUSER) on an AS/400 command line. The resulting display shows the status for QUSER. Start the OS/400 host servers by running STRHOSTSVR *ALL from an AS/400 command line. If you have OS/400 Version 4 Release 2 or later and you plan to use record-level database access, you also need to start the distributed data management (DDM) server with the STRTCPSVR *DDM command.

      Comment

      Working...
      X