Skip to main content

[Migrated content. Thread originally posted on 14 June 2005]

Hello,

whe are testing the Acucobol 7 beta, with the interoperability for java whe are interest in that feature, while testing i stop on this problem, i'm trying to make a call on one of our classes that generates a chart graphic, to do that whe are using a graphic engine, i'm making a call to the public static void main, wich work for me on a simple program without the graphic generation, only the java window to see if it does it, and it did. so i tried to make a call the same way but with the graphic generation. the C$JAVA trows me the STATUS-VAL = 93, and i did`nt make it to display the window with the graphic.

this is the call in cobol for the public static void main, name of the class ejemplos.

CALL "C$JAVA" USING CJAVA-CREATEARRAY, CJAVA-STRINGARRAY, 1
GIVING ARRAY-HANDLE.
MOVE "99999999999999999999" TO STRING-TABLE(1)

CALL "C$JAVA" USING CJAVA-SETARRAYELEMENT, ARRAY-HANDLE, 1,
STRING-TABLE(1), GIVING STATUS-VAL.

CALL "C$JAVA" USING CJAVA-CALLSTATIC,"ejemplos", "main",
"([X)V", array-handle
GIVING STATUS-VAL.

below is the java code where it makes several call to other methods inside.


import java.awt.Frame;
import java.awt.Graphics;
import java.util.*;
import java.awt.image.BufferedImage;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import java.awt.Graphics;
import java.awt.Color;
import java.awt.Paint;
import java.awt.GradientPaint;
import com.jrefinery.chart.PiePlot;
import com.jrefinery.chart.JFreeChart;
import com.jrefinery.chart.ChartFactory;
.
.
.
.
public class ejemplos extends Frame {
BufferedImage grafica = null;
.
.
.
public ejemplos(){
initComponents();
}

private void initComponents(){
addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent evt){
exitForm(evt); }
});
pack();
}

private void exitForm(WindowEvent evt){
System.exit(0);
}

public static void main(String args[]){
ejemplos miventana = new ejemplos();
miventana.setSize(400,400);
miventana.show();
}

public BufferedImage creaImagen()
{
.
.
DoChart();
.
}
//////////////////////////////////////////////////////////////////////////////// private String GetChildItem(Element elemItem, String strElemName)
{
.
.
.
}
//////////////////////////////////////////////////////////////////////////////////
private void LoadDataDoc(String strDocURL)
{
.
.
}
//////////////////////////////////////////////////////////////////////////////////
private void LoadConfigDoc(String strConfigURL)
{
.
.
}
//////////////////////////////////////////////////////////////////////////////////
private void LoadSeries(String strSeries)
{
.
.
}
//////////////////////////////////////////////////////////////////////////////////
private void LoadCategories(String strCategories)
{
.
.
}
//////////////////////////////////////////////////////////////////////////////////
private void LoadSeriesTitles(String strSeriesTitles)
{
.
.
}
//////////////////////////////////////////////////////////////////////////////////
private void DoChart()
{
.
categoryData = createDataset();
.
.
}
////////////////////////////////////////////////////////////////////////////// //
private void setupChart()
{
.
.
}
////////////////////////////////////////////////////////////////////////////// //
private CategoryDataset createDataset()
{
.
.
}
public void paint(Graphics g){
if (grafica == null)
{
grafica = this.creaImagen();
}
g.drawImage(grafica,10,20,null);
}
////////////////////////////////////////////////////////////////////////////////////////
}

[Migrated content. Thread originally posted on 14 June 2005]

Hello,

whe are testing the Acucobol 7 beta, with the interoperability for java whe are interest in that feature, while testing i stop on this problem, i'm trying to make a call on one of our classes that generates a chart graphic, to do that whe are using a graphic engine, i'm making a call to the public static void main, wich work for me on a simple program without the graphic generation, only the java window to see if it does it, and it did. so i tried to make a call the same way but with the graphic generation. the C$JAVA trows me the STATUS-VAL = 93, and i did`nt make it to display the window with the graphic.

this is the call in cobol for the public static void main, name of the class ejemplos.

CALL "C$JAVA" USING CJAVA-CREATEARRAY, CJAVA-STRINGARRAY, 1
GIVING ARRAY-HANDLE.
MOVE "99999999999999999999" TO STRING-TABLE(1)

CALL "C$JAVA" USING CJAVA-SETARRAYELEMENT, ARRAY-HANDLE, 1,
STRING-TABLE(1), GIVING STATUS-VAL.

CALL "C$JAVA" USING CJAVA-CALLSTATIC,"ejemplos", "main",
"([X)V", array-handle
GIVING STATUS-VAL.

below is the java code where it makes several call to other methods inside.


import java.awt.Frame;
import java.awt.Graphics;
import java.util.*;
import java.awt.image.BufferedImage;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import java.awt.Graphics;
import java.awt.Color;
import java.awt.Paint;
import java.awt.GradientPaint;
import com.jrefinery.chart.PiePlot;
import com.jrefinery.chart.JFreeChart;
import com.jrefinery.chart.ChartFactory;
.
.
.
.
public class ejemplos extends Frame {
BufferedImage grafica = null;
.
.
.
public ejemplos(){
initComponents();
}

private void initComponents(){
addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent evt){
exitForm(evt); }
});
pack();
}

private void exitForm(WindowEvent evt){
System.exit(0);
}

public static void main(String args[]){
ejemplos miventana = new ejemplos();
miventana.setSize(400,400);
miventana.show();
}

public BufferedImage creaImagen()
{
.
.
DoChart();
.
}
//////////////////////////////////////////////////////////////////////////////// private String GetChildItem(Element elemItem, String strElemName)
{
.
.
.
}
//////////////////////////////////////////////////////////////////////////////////
private void LoadDataDoc(String strDocURL)
{
.
.
}
//////////////////////////////////////////////////////////////////////////////////
private void LoadConfigDoc(String strConfigURL)
{
.
.
}
//////////////////////////////////////////////////////////////////////////////////
private void LoadSeries(String strSeries)
{
.
.
}
//////////////////////////////////////////////////////////////////////////////////
private void LoadCategories(String strCategories)
{
.
.
}
//////////////////////////////////////////////////////////////////////////////////
private void LoadSeriesTitles(String strSeriesTitles)
{
.
.
}
//////////////////////////////////////////////////////////////////////////////////
private void DoChart()
{
.
categoryData = createDataset();
.
.
}
////////////////////////////////////////////////////////////////////////////// //
private void setupChart()
{
.
.
}
////////////////////////////////////////////////////////////////////////////// //
private CategoryDataset createDataset()
{
.
.
}
public void paint(Graphics g){
if (grafica == null)
{
grafica = this.creaImagen();
}
g.drawImage(grafica,10,20,null);
}
////////////////////////////////////////////////////////////////////////////////////////
}
The CALL "C$JAVA" USING CJAVA-CALLSTATIC,"ejemplos", "main",
"([X)V" especially the "([X)V" seems incorrect. I do not believe there is a signature type [

Also since you are receiving a -93 please insure that the RETURN-VALUE data field is a PIC S9(02) .

[Migrated content. Thread originally posted on 14 June 2005]

Hello,

whe are testing the Acucobol 7 beta, with the interoperability for java whe are interest in that feature, while testing i stop on this problem, i'm trying to make a call on one of our classes that generates a chart graphic, to do that whe are using a graphic engine, i'm making a call to the public static void main, wich work for me on a simple program without the graphic generation, only the java window to see if it does it, and it did. so i tried to make a call the same way but with the graphic generation. the C$JAVA trows me the STATUS-VAL = 93, and i did`nt make it to display the window with the graphic.

this is the call in cobol for the public static void main, name of the class ejemplos.

CALL "C$JAVA" USING CJAVA-CREATEARRAY, CJAVA-STRINGARRAY, 1
GIVING ARRAY-HANDLE.
MOVE "99999999999999999999" TO STRING-TABLE(1)

CALL "C$JAVA" USING CJAVA-SETARRAYELEMENT, ARRAY-HANDLE, 1,
STRING-TABLE(1), GIVING STATUS-VAL.

CALL "C$JAVA" USING CJAVA-CALLSTATIC,"ejemplos", "main",
"([X)V", array-handle
GIVING STATUS-VAL.

below is the java code where it makes several call to other methods inside.


import java.awt.Frame;
import java.awt.Graphics;
import java.util.*;
import java.awt.image.BufferedImage;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import java.awt.Graphics;
import java.awt.Color;
import java.awt.Paint;
import java.awt.GradientPaint;
import com.jrefinery.chart.PiePlot;
import com.jrefinery.chart.JFreeChart;
import com.jrefinery.chart.ChartFactory;
.
.
.
.
public class ejemplos extends Frame {
BufferedImage grafica = null;
.
.
.
public ejemplos(){
initComponents();
}

private void initComponents(){
addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent evt){
exitForm(evt); }
});
pack();
}

private void exitForm(WindowEvent evt){
System.exit(0);
}

public static void main(String args[]){
ejemplos miventana = new ejemplos();
miventana.setSize(400,400);
miventana.show();
}

public BufferedImage creaImagen()
{
.
.
DoChart();
.
}
//////////////////////////////////////////////////////////////////////////////// private String GetChildItem(Element elemItem, String strElemName)
{
.
.
.
}
//////////////////////////////////////////////////////////////////////////////////
private void LoadDataDoc(String strDocURL)
{
.
.
}
//////////////////////////////////////////////////////////////////////////////////
private void LoadConfigDoc(String strConfigURL)
{
.
.
}
//////////////////////////////////////////////////////////////////////////////////
private void LoadSeries(String strSeries)
{
.
.
}
//////////////////////////////////////////////////////////////////////////////////
private void LoadCategories(String strCategories)
{
.
.
}
//////////////////////////////////////////////////////////////////////////////////
private void LoadSeriesTitles(String strSeriesTitles)
{
.
.
}
//////////////////////////////////////////////////////////////////////////////////
private void DoChart()
{
.
categoryData = createDataset();
.
.
}
////////////////////////////////////////////////////////////////////////////// //
private void setupChart()
{
.
.
}
////////////////////////////////////////////////////////////////////////////// //
private CategoryDataset createDataset()
{
.
.
}
public void paint(Graphics g){
if (grafica == null)
{
grafica = this.creaImagen();
}
g.drawImage(grafica,10,20,null);
}
////////////////////////////////////////////////////////////////////////////////////////
}
Thank you Dilbert for answering,

I check on the documentation of Acucorp on the
Guide to Interoperating with ACUCOBOL-GT
Version 7.0

in

2.3.1.2 Supported parameter types

there is this signature [X - string array
and because i was trying to call the public static void main, this one contains a String Array as a parameter.

([X)V --> i`m using those like --> void main(String args[])

i corrected the RETURN-VALUE, i`m getting a -3 value. do you know what that means ? i haven`t found a document where it says what type of error is.

thanks for the support.

[Migrated content. Thread originally posted on 14 June 2005]

Hello,

whe are testing the Acucobol 7 beta, with the interoperability for java whe are interest in that feature, while testing i stop on this problem, i'm trying to make a call on one of our classes that generates a chart graphic, to do that whe are using a graphic engine, i'm making a call to the public static void main, wich work for me on a simple program without the graphic generation, only the java window to see if it does it, and it did. so i tried to make a call the same way but with the graphic generation. the C$JAVA trows me the STATUS-VAL = 93, and i did`nt make it to display the window with the graphic.

this is the call in cobol for the public static void main, name of the class ejemplos.

CALL "C$JAVA" USING CJAVA-CREATEARRAY, CJAVA-STRINGARRAY, 1
GIVING ARRAY-HANDLE.
MOVE "99999999999999999999" TO STRING-TABLE(1)

CALL "C$JAVA" USING CJAVA-SETARRAYELEMENT, ARRAY-HANDLE, 1,
STRING-TABLE(1), GIVING STATUS-VAL.

CALL "C$JAVA" USING CJAVA-CALLSTATIC,"ejemplos", "main",
"([X)V", array-handle
GIVING STATUS-VAL.

below is the java code where it makes several call to other methods inside.


import java.awt.Frame;
import java.awt.Graphics;
import java.util.*;
import java.awt.image.BufferedImage;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import java.awt.Graphics;
import java.awt.Color;
import java.awt.Paint;
import java.awt.GradientPaint;
import com.jrefinery.chart.PiePlot;
import com.jrefinery.chart.JFreeChart;
import com.jrefinery.chart.ChartFactory;
.
.
.
.
public class ejemplos extends Frame {
BufferedImage grafica = null;
.
.
.
public ejemplos(){
initComponents();
}

private void initComponents(){
addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent evt){
exitForm(evt); }
});
pack();
}

private void exitForm(WindowEvent evt){
System.exit(0);
}

public static void main(String args[]){
ejemplos miventana = new ejemplos();
miventana.setSize(400,400);
miventana.show();
}

public BufferedImage creaImagen()
{
.
.
DoChart();
.
}
//////////////////////////////////////////////////////////////////////////////// private String GetChildItem(Element elemItem, String strElemName)
{
.
.
.
}
//////////////////////////////////////////////////////////////////////////////////
private void LoadDataDoc(String strDocURL)
{
.
.
}
//////////////////////////////////////////////////////////////////////////////////
private void LoadConfigDoc(String strConfigURL)
{
.
.
}
//////////////////////////////////////////////////////////////////////////////////
private void LoadSeries(String strSeries)
{
.
.
}
//////////////////////////////////////////////////////////////////////////////////
private void LoadCategories(String strCategories)
{
.
.
}
//////////////////////////////////////////////////////////////////////////////////
private void LoadSeriesTitles(String strSeriesTitles)
{
.
.
}
//////////////////////////////////////////////////////////////////////////////////
private void DoChart()
{
.
categoryData = createDataset();
.
.
}
////////////////////////////////////////////////////////////////////////////// //
private void setupChart()
{
.
.
}
////////////////////////////////////////////////////////////////////////////// //
private CategoryDataset createDataset()
{
.
.
}
public void paint(Graphics g){
if (grafica == null)
{
grafica = this.creaImagen();
}
g.drawImage(grafica,10,20,null);
}
////////////////////////////////////////////////////////////////////////////////////////
}
The error -3 means that

CJAVA-CLASSNOTFOUND VALUE -3.

I would consider getting in touch with Acucorp Technical support.

Have you tried using CALL "C$JAVA" USING CJAVA-CALL versus the CJAVA-CALLSTATIC?

[Migrated content. Thread originally posted on 14 June 2005]

Hello,

whe are testing the Acucobol 7 beta, with the interoperability for java whe are interest in that feature, while testing i stop on this problem, i'm trying to make a call on one of our classes that generates a chart graphic, to do that whe are using a graphic engine, i'm making a call to the public static void main, wich work for me on a simple program without the graphic generation, only the java window to see if it does it, and it did. so i tried to make a call the same way but with the graphic generation. the C$JAVA trows me the STATUS-VAL = 93, and i did`nt make it to display the window with the graphic.

this is the call in cobol for the public static void main, name of the class ejemplos.

CALL "C$JAVA" USING CJAVA-CREATEARRAY, CJAVA-STRINGARRAY, 1
GIVING ARRAY-HANDLE.
MOVE "99999999999999999999" TO STRING-TABLE(1)

CALL "C$JAVA" USING CJAVA-SETARRAYELEMENT, ARRAY-HANDLE, 1,
STRING-TABLE(1), GIVING STATUS-VAL.

CALL "C$JAVA" USING CJAVA-CALLSTATIC,"ejemplos", "main",
"([X)V", array-handle
GIVING STATUS-VAL.

below is the java code where it makes several call to other methods inside.


import java.awt.Frame;
import java.awt.Graphics;
import java.util.*;
import java.awt.image.BufferedImage;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import java.awt.Graphics;
import java.awt.Color;
import java.awt.Paint;
import java.awt.GradientPaint;
import com.jrefinery.chart.PiePlot;
import com.jrefinery.chart.JFreeChart;
import com.jrefinery.chart.ChartFactory;
.
.
.
.
public class ejemplos extends Frame {
BufferedImage grafica = null;
.
.
.
public ejemplos(){
initComponents();
}

private void initComponents(){
addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent evt){
exitForm(evt); }
});
pack();
}

private void exitForm(WindowEvent evt){
System.exit(0);
}

public static void main(String args[]){
ejemplos miventana = new ejemplos();
miventana.setSize(400,400);
miventana.show();
}

public BufferedImage creaImagen()
{
.
.
DoChart();
.
}
//////////////////////////////////////////////////////////////////////////////// private String GetChildItem(Element elemItem, String strElemName)
{
.
.
.
}
//////////////////////////////////////////////////////////////////////////////////
private void LoadDataDoc(String strDocURL)
{
.
.
}
//////////////////////////////////////////////////////////////////////////////////
private void LoadConfigDoc(String strConfigURL)
{
.
.
}
//////////////////////////////////////////////////////////////////////////////////
private void LoadSeries(String strSeries)
{
.
.
}
//////////////////////////////////////////////////////////////////////////////////
private void LoadCategories(String strCategories)
{
.
.
}
//////////////////////////////////////////////////////////////////////////////////
private void LoadSeriesTitles(String strSeriesTitles)
{
.
.
}
//////////////////////////////////////////////////////////////////////////////////
private void DoChart()
{
.
categoryData = createDataset();
.
.
}
////////////////////////////////////////////////////////////////////////////// //
private void setupChart()
{
.
.
}
////////////////////////////////////////////////////////////////////////////// //
private CategoryDataset createDataset()
{
.
.
}
public void paint(Graphics g){
if (grafica == null)
{
grafica = this.creaImagen();
}
g.drawImage(grafica,10,20,null);
}
////////////////////////////////////////////////////////////////////////////////////////
}
thanks Dilbert, i`ll try and contact Acucorp Technical support, for this particular problem.

i try also the CJAVA-CALL but same problem.