1 Reply Latest reply: Aug 10, 2012 12:43 AM by Nils Iking RSS

    InDesign - ORB - Java not working

    zohaib.musaddiq

      I am trying to use InDesign using Java via ORB.

       

      When I run following java program

       

      package indesigntest;

      import java.io.BufferedReader;

      import java.io.FileReader;

      import org.omg.CORBA.ORB;

      import org.omg.CORBA.Object;

      import com.adobe.ids.IdsException;

      import com.adobe.ids.basics.Application;

      import com.adobe.ids.basics.ApplicationHelper;

      public class Main {

       

          public static void main(String[] args) {

              try {

                  ORB orb = ORB.init(args, null);

                  BufferedReader iorIn = new BufferedReader(new FileReader("d:\\ior.txt"));

                  String application_IOR = iorIn.readLine();

                  Object object = orb.string_to_object(application_IOR);

                  Application myApp = ApplicationHelper.narrow(object);

                  myApp.consoleerr("Error occur");

                  myApp.consoleout("First Hello Server");

              } catch (IdsException e) {

                  e.printStackTrace();

              } catch (Exception e) {

                  e.printStackTrace();           

              }

          }

      }

       

       

       

      I got following exception:

       

      com.adobe.ids.IdsException: IDL:com/adobe/ids/IdsException:1.0

              at com.adobe.ids.IdsExceptionHelper.read(Unknown Source)

              at com.adobe.ids.basics._ApplicationStub.consoleerr(Unknown Source)

              at indesigntest.Main.main(Main.java:18)

       

       

      ------------------------------------------------------------------------------------------ ---

       

      Here is InDesign server command that is running sucessfully at backend

       

      D:\>c:

       

      C:\>cd\

       

      C:\>cd C:\Program Files\Adobe\Adobe InDesign CS6 Server x64

       

      C:\Program Files\Adobe\Adobe InDesign CS6 Server x64>InDesignServer -iorfile d:\

      ior.txt -pluginpath Server\Corba

      ================================================================================

       

      .  InDesign CS6 Server Version 8.0 x64 Evaluation

      .  Copyright 1999-2012 Adobe Systems Incorporated and its licensors.

      .  All rights reserved. See the other legal notices in the ReadMe.

      ================================================================================

       

      08/09/12 17:41:07 INFO  [server] Initializing

      08/09/12 17:41:07 INFO  [server] Loading the application

      08/09/12 17:41:07 INFO  [server] Restoring Object Model

      08/09/12 17:41:07 INFO  [server] Scanning for plug-ins

      08/09/12 17:41:08 INFO  [server] Initializing plug-ins

      08/09/12 17:41:08 INFO  [server] Starting up Service Registry

      08/09/12 17:41:25 INFO  [server] Executing startup services

      08/09/12 17:41:25 INFO  [server] Using configuration configuration_noport

      08/09/12 17:41:28 INFO  [server] Initializing Application

      08/09/12 17:41:28 INFO  [server] Completing Initialization

      08/09/12 17:41:32 INFO  [server] Image previews are off

      08/09/12 17:41:32 INFO  [server] Server Running

      08/09/12 17:41:32 INFO  [javascript] Executing File: C:\Program Files\Adobe\Adob

      e InDesign CS6 Server x64\Scripts\startup scripts\ConnectInstancesToESTK.js

      08/09/12 17:41:32 INFO  [javascript] Executing File: C:\Program Files\Adobe\Adob

      e InDesign CS6 Server x64\Scripts\converturltohyperlink\startup scripts\ConvertU

      RLToHyperlinkMenuItemLoader.jsx

      08/09/12 17:41:32 INFO  [javascript] Executing File: C:\Program Files\Adobe\Adob

      e InDesign CS6 Server x64\Scripts\converturltohyperlink\ConvertURLToHyperlinkMen

      uItem.jsxbin

      08/09/12 17:41:36 INFO  [server] Initializing Corba API

      08/09/12 17:41:36 INFO  [server] ApplicationIOR:010000002200000049444c3a636f6d2f

      61646f62652f6964732f4170706c69636174696f6e3a312e30000000010000000000000068000000

      010102000b00000031302e302e302e3231390000380a000013000000ff6964735f706f61fe00b023

      50010008b40031000200000000000000080000000100000000545441010000001c00000001000000

      010001000100000001000105090101000100000009010100

      08/09/12 17:41:36 INFO  [server] Writing IOR to 'd:\ior.txt'

       

      Generated iot.txt file

       

      IOR:010000002200000049444c3a636f6d2f61646f62652f6964732f4170706c69636174696f6e3a312e300000 00010000000000000068000000010102000b00000031302e302e302e3231390000d008000013000000ff696473 5f706f61fe8fa023500100130c0031000200000000000000080000000100000000545441010000001c00000001 000000010001000100000001000105090101000100000009010100

       

      ------------------------------------------------------------------------------------------ --------------------------------

       

      Environment:

      Windows 7 64 bit

      JDK 6

      Adobe InDesign CS6 Server x64

      Adobe InDesign CS5.5 Server SDK

       

      Trial Activated using

      "adobe_prtk --tool=StartTrial --leid=InDesignServer-CS6-Win-GM"

       

       

      PLEASE LET ME KNOW WHAT I AM MISSING.

       

      I am also interested in Indesign purchase if it got working.

       

       

      Thanks in advance.