Page 1 of 2 1 2 >
Topic Options
Rate This Topic
#135045 - 08/01/06 09:01 AM Run Java under mid-tier
mrpresto Offline
Stealth Member

Registered: 07/27/06
Posts: 15
We need to run a Java class across the mid-tier platform. Because the classpath is so long I thought perhaps we could use a batch file to run the Java. The path to the .BAT is C:\Program Files\AR System\Mid-Tier\test . I am calling a Run Process command to call the batch file in an AL. The logs tell me the Run Process executed successfully but the results of my BAT call are not applied. From the web page, when I click the AL I get an error 9366 - "active link run process not supported". What needs to happen in order for us to run this script in a command-line environment?

TIA,
Mike

Top
#135046 - 08/01/06 09:16 AM Re: Run Java under mid-tier [Re: mrpresto]
Vincent_RIEDWEG Offline

Old Hand
****

Registered: 05/24/05
Posts: 1454
Loc: France
Hi,

It's a Mid-Tier limitation...

Since 6.3, you can include your java or javascript code in the header or footer of the forms.
_________________________
Vincent.

Top
#135047 - 08/01/06 09:21 AM Re: Run Java under mid-tier [Re: Vincent_RIEDWEG]
mrpresto Offline
Stealth Member

Registered: 07/27/06
Posts: 15
Any suggestions how I can get this task done in 6.0.1?

Top
#135073 - 08/07/06 08:47 AM Re: Run Java under mid-tier [Re: mrpresto]
mrpresto Offline
Stealth Member

Registered: 07/27/06
Posts: 15
Changed our approach to run via filter. Our command line, which works in a cmd window when we substitute a valid order number, is "C:\Program Files\AR System\plt-app\ARServer\test\test.bat" $Order Number$. When we try to execute this from the filter in the User Tool, everything appears to execute correctly - no errors appear in the log - but the results never appear in that folder. Since we are executing on server-side, seems like this should run. Is it a permissions issue? Or something else? I've tried about all the permutations I can think of to no avail. How can I tell what's breaking and why?

Another approach we can try is to put the code server-side into a mid-tier JSP page. Vincent's hint above sounds promising but we are currently not in a position to attempt a migration to a new version. Has anyone encountered a similar situation, and can you provide advice on how we can achieve the results we require?

TIA,
Mike

Top
#135076 - 08/07/06 10:50 AM Re: Run Java under mid-tier [Re: mrpresto]
Vincent_RIEDWEG Offline

Old Hand
****

Registered: 05/24/05
Posts: 1454
Loc: France
Hi,

What you want to do?

May be there are another simplest approch...
_________________________
Vincent.

Top
#135080 - 08/07/06 01:50 PM Re: Run Java under mid-tier [Re: Vincent_RIEDWEG]
mrpresto Offline
Stealth Member

Registered: 07/27/06
Posts: 15
The short answer is we are using Jasper Reports to generate PDFs. I can get the PDF to generate using the JSP but can't get Adobe to open it appropriately...

Top
#135081 - 08/07/06 02:23 PM Re: Run Java under mid-tier [Re: mrpresto]
Vincent_RIEDWEG Offline

Old Hand
****

Registered: 05/24/05
Posts: 1454
Loc: France
Hi,

Is the pdf file generated on the web server or on client side?
_________________________
Vincent.

Top
#135082 - 08/07/06 03:33 PM Re: Run Java under mid-tier [Re: Vincent_RIEDWEG]
mrpresto Offline
Stealth Member

Registered: 07/27/06
Posts: 15
Alas, my installation of Adobe Reader 7.0.8 was whacked. As soon as I deleted the installation from the defaults (C:\Program files\Adobe\...) and gave it a different path (C:\Adobe\...) it works just spiffy.

As a reference, using the JSP I of course had to write the PDFs to the web server, set permissions, etc. It's not terribly fast but it does work. And now we can export to Excel, CSV, ... all kinds of formats.

Thanks for staying with me as I worked through this. There are enough different places it can break that I was starting to lose it...

cheers,
Mike

Top
#135147 - 08/15/06 08:09 AM Re: Run Java under mid-tier [Re: mrpresto]
mrpresto Offline
Stealth Member

Registered: 07/27/06
Posts: 15
Just to add to the fun...the JSP solution works just fine on our test box, but our production web server resides on its own DMZ domain and I can't even ping the database box from the web box. So I guess we're back to running the batch application on the AR server and moving the files over to prod when they are built. Which brings we back to the original problem - how can I execute a batch file on the AR server?

Top
#135149 - 08/15/06 01:47 PM Re: Run Java under mid-tier [Re: mrpresto]
mrpresto Offline
Stealth Member

Registered: 07/27/06
Posts: 15
Here's what I see in the log...runs fine from the command line of the AR Server machine. Syntactically something must be amiss but feel like I am following the manual. Yes? No? Dunno?

> 0: Process

> @@:"C:\Program Files\AR System\plt-app\Arserver\Reports\HybridReport.bat" HYBRID000000104 PDF

> **** Error while performing filter action

> /* Tue Aug 15 2006 13:43:10.2970 */Stop filter processing

Top
#135180 - 08/21/06 01:16 PM Re: Run Java under mid-tier [Re: mrpresto]
remedybuff Offline
Stealth Member

Registered: 05/05/06
Posts: 76
Loc: New Jersey, USA
Either use "\\" in the path (singe '\' is an escape character) or use '/'

C:/Program files/AR system............

Anuj.

Top
Page 1 of 2 1 2 >