Gen Java Proxy build error "package server1 does not exist"
search cancel

Gen Java Proxy build error "package server1 does not exist"

book

Article ID: 422469

calendar_today

Updated On:

Products

Gen Gen - Workstation Toolset

Issue/Introduction

Trying to build Gen 8.6 Classic Java Proxy local model SERVER1.ief containing single Server Manager with name SERVER1.
The Build Tool fails with this in the Server1.out file

*****
    [javac] Compiling 3 source files to C:\Users\lw619155\Documents\CA\Gen 8.6\Models\SERVER1.ief\proxy\java\src
    [javac] C:\Users\lw619155\Documents\CA\Gen 8.6\Models\SERVER1.ief\proxy\java\src\Server1\Common\P1Input.java:13: error: package server1 does not exist
    [javac]   public server1.P1_IA importView;
    [javac]                 ^
    [javac] C:\Users\lw619155\Documents\CA\Gen 8.6\Models\SERVER1.ief\proxy\java\src\Server1\Common\P1Output.java:13: error: package server1 does not exist
    [javac]   public server1.P1_OA exportView;
    [javac]                 ^
    [javac] 2 errors

BUILD FAILED
C:\Users\lw619155\Documents\CA\Gen 8.6\Models\SERVER1.ief\proxy\java\Server1.XML:160: Compile failed; see the compiler error output for details.
*****

Environment

Gen 8.6 Workstation Toolset and Build Tool

Cause

There is no Java Package Name in the model i.e. it is not set in "Environment > Business System (MICA)" or in "Generation > Options > Model Generation Properties" and therefore the Java Package Name will default to the local model name in lowercase (server1).
However that will conflict with the Server Manager name SERVER1 when it comes to the generation process.
Two directories are normally created for generated code under proxy\java\src, one with the 'Server Manager name' (first letter in uppercase) & another with the 'Java Package Name'
As Windows is case insensitive it cannot create directory server1 after creating directory SERVER1.

Resolution

To resolve the problem:

  • EITHER: Set a value for the Java Package Name in the model which is different to any Server Manager name in the model

  • OR: Use a short model name like server1a.ief so the Java Package Name becomes server1a and does not conflict with the Server Manager name SERVER1.