java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.remedy.arsys.api.ARException

So I think your catch block should catch an ARException, but... I
would try to add a block to deal with ARException separately. ( I am
not sure what the ARException class does for a reflected
printStackTrace() either. It might be that that also errors and you
get thrown into your finally block? )

And I would also suggest that you take a snip of code from the
JavaDriver for how to print the ARException too...

ARS v7.1
OutputWriter.java (lines 289 ... 310 [ I removed a few blank lines in
this post] )

    public static void PrintARException( ARException e )
    {
        StatusInfo[] statusList = e.getLastStatus();
        if (statusList != null)
        {
           PrintStatusInfoList( "", "   Results", statusList );
           return;
        }
        String message = e.toString( );
        if( message != null && message.length( ) > 0 )
        {
            DriverPrintResult( message );
        }
        else
        {
            DriverPrintResult( "No Error Message..." );
        }
        PrintNewLine( );
    }

HTH.

-- 
Carey Matthew Black
Remedy Skilled Professional (RSP)
ARS = Action Request System(Remedy)

Love, then teach
Solution = People + Process + Tools
Fast, Accurate, Cheap.... Pick two.


On 9/24/07, Thilo Stapff <[EMAIL PROTECTED]> wrote:
> The create() function probably gets executed but the entry isn't created
> in the database. This might be caused by
> - missing value for required field
> - permission problem
> - entry creation rejected by filter
> or something like that.
>
> You should call ARServerUser.getLastStatus() after create() to find out
> about the cause of the problem.
>
>
> Regards,
> Thilo Stapff
>
>
> Tadeu Augusto Dutra Pinto wrote:
> > **
> > Hi friends!
> >
> >
> > A long time ago I have trying to execute a application java that fill a
> > entry of object came from Mainframe to ARS...
> >
> > My resume code is almost like this:
> >
> > I have an "insert( )" method...
> >
> > public String insert( )
> > {
> >    try
> >    {
> >        com.remedy.arsys.api.Entry entry = null;
> >        com.remedy.arsys.api.EntryFactory entryMan =
> > com.remedy.arsys.api.EntryFactory.getFactory();
> >        entry = (com.remedy.arsys.api.Entry) entryMan.newInstance();
> >        entry.setContext(login());            // login at AR Server
> >
> >        // Get the name Schema
> >        NameID name = new NameID("MyForm");
> >
> >        entry.setSchemaID(name);
> >        entry.activate();
> >
> >        com.remedy.arsys.api.EntryItem[] entryItems = new
> > EntryItem[ARRAY.length];
> >        entryItems[0] = new EntryItem(new FieldID((new
> > Long(ARRAY[0])).longValue()), new Value(this.getFirstName()));
> >        entryItems[1] = new EntryItem(new FieldID((new
> > Long(ARRAY[1])).longValue()), new Value(this.getLastName()));
> >        entryItems[2] = new EntryItem(new FieldID((new
> > Long(ARRAY[2])).longValue()), new Value(this.getDescription()));
> >
> >        // set the entry items...
> >        entry.setEntryItems(entryItems);
> >
> >        *entry.create();         *// doesn't execute this method... why
> > ??? goes to "finnaly" block
> >
> >        entryMan.releaseInstance(entry);
> >    }
> >    catch ( Exception e )
> >    {
> >        e.printStackTrace();
> >    }
> >    *finally*
> >    {
> >        if ( mm != null )
> >            logout();
> >
> >        return sEntryId;
> >   }
> > }
> >
> >
> > I'm debugging the application and all the Data are comming correctly ...
> > but when it arrives at *entry.create() *the application finish.
> >
> >
> > Can somebody help me?
> >
> >
> > Thanx...
> >
> >
> > *Tadeu Augusto Dutra Pinto*
> > -----------------------------------------------------------------
> > IT Web Services ATM
> > *Cinq Technologies*
> > http://www.cinq.com.br </exchweb/bin/redir.asp?URL=http://www.cinq.com.br/>
> > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> > *Fone: 41 3018-2833 - Cinq*
> > *Fone: 41 3340-5736* *- HSBC Bank Brasil*
> > -----------------------------------------------------------------
> > *C*onfiabilidade, *In*ovação e *Q*ualidade em T.I.
> > __20060125_______________________This posting was submitted with HTML in
> > it___
>
> _______________________________________________________________________________
> UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the 
> Answers Are"
>

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the 
Answers Are"

Reply via email to