Anonymous_User Absent Member.
Absent Member.
643 views

Tomcat debug issue in IDM 4.5.2 on Windows 2012 R2


Hi

We are facing a problem with writing debug messages to the tomcat log
(catalina.log).

Normally it's possible to write messages to the application server log
(between forms) by using making a java call to
Packages.java.lang.System.out.println("Debug msg");

however this does not seem to work in IDM 4.5.2 running on Windows
Server 2012 R2 - nothing gets written to the log?

I've tried to restart the Tomcat service several times but with no
luck.

Does anyone have any experience with this matter?

Kind Regards
Carsten J


--
cajitq
------------------------------------------------------------------------
cajitq's Profile: https://forums.netiq.com/member.php?userid=8679
View this thread: https://forums.netiq.com/showthread.php?t=54952

Labels (1)
0 Likes
13 Replies
Knowledge Partner Knowledge Partner
Knowledge Partner

Re: Tomcat debug issue in IDM 4.5.2 on Windows 2012 R2

Does this thread help at all?

https://forums.netiq.com/showthread.php?53198

In summary, document the code you're using (you did), where/when that call
is made, if you've restarted Tomcat since installing or initially trying
this, which IDM components are on the box, etc.

--
Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below...
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Tomcat debug issue in IDM 4.5.2 on Windows 2012 R2

On 12/17/15 6:44 AM, cajitq wrote:
>
> Hi
>
> We are facing a problem with writing debug messages to the tomcat log
> (catalina.log).
>
> Normally it's possible to write messages to the application server log
> (between forms) by using making a java call to
> Packages.java.lang.System.out.println("Debug msg");
>
> however this does not seem to work in IDM 4.5.2 running on Windows
> Server 2012 R2 - nothing gets written to the log?
>
> I've tried to restart the Tomcat service several times but with no
> luck.
>
> Does anyone have any experience with this matter?
>
> Kind Regards
> Carsten J
>
>

Greetings,
We are looking into this "behavior". Please try starting Tomcat
in a terminal as compared to using the Windows Service. If this is the
case that I am looking into, you will see your statements in the log
file now.


--
Sincerely,
Steven Williams
Lead Software Engineer
Micro Focus
0 Likes
Knowledge Partner
Knowledge Partner

Re: Tomcat debug issue in IDM 4.5.2 on Windows 2012 R2


Packages.java.lang.System.out.println is printing to the terminal and on
widows that is cmd but tomcat is usually started as a service son
system.out is misplaced somewhere in cyberspace.

As Steven Wrote, try starting Tomcat from cmd. Be sure to start the cmd
"as administrator" or it will not start properly.


--
joakim_ganse
------------------------------------------------------------------------
joakim_ganse's Profile: https://forums.netiq.com/member.php?userid=159
View this thread: https://forums.netiq.com/showthread.php?t=54952

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Tomcat debug issue in IDM 4.5.2 on Windows 2012 R2

On Fri, 18 Dec 2015 11:04:01 +0000, joakim ganse wrote:

> Packages.java.lang.System.out.println is printing to the terminal and on
> widows that is cmd but tomcat is usually started as a service son
> system.out is misplaced somewhere in cyberspace.
>
> As Steven Wrote, try starting Tomcat from cmd. Be sure to start the cmd
> "as administrator" or it will not start properly.


That does indeed display the println statements.

We are a team working on this, so it would be nice not having to fight
over access to the console of the ua server.

Any ideas on what we could change to redirect the cmds output to a file?
Then we could use a share, and access the file individually
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Tomcat debug issue in IDM 4.5.2 on Windows 2012 R2

On Fri, 18 Dec 2015 12:36:55 +0000, Nicolai Jensen wrote:

> On Fri, 18 Dec 2015 11:04:01 +0000, joakim ganse wrote:
>
>> Packages.java.lang.System.out.println is printing to the terminal and
>> on widows that is cmd but tomcat is usually started as a service son
>> system.out is misplaced somewhere in cyberspace.
>>
>> As Steven Wrote, try starting Tomcat from cmd. Be sure to start the cmd
>> "as administrator" or it will not start properly.

>
> That does indeed display the println statements.
>
> We are a team working on this, so it would be nice not having to fight
> over access to the console of the ua server.
>
> Any ideas on what we could change to redirect the cmds output to a file?
> Then we could use a share, and access the file individually


Just noticed that the println stuff is output to the cmd window, and the
usual stuff is output to the catalina log.

2 different places to look. Oh man
0 Likes
Knowledge Partner
Knowledge Partner

Re: Tomcat debug issue in IDM 4.5.2 on Windows 2012 R2


I expect that is what Steven ment with "we are looking into that".
Hopefully they will find a good way to deal with this and we get that as
a Patch.

If it is a deal breaker open a SR for it to bring more attention to the
problem.


--
joakim_ganse
------------------------------------------------------------------------
joakim_ganse's Profile: https://forums.netiq.com/member.php?userid=159
View this thread: https://forums.netiq.com/showthread.php?t=54952

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Tomcat debug issue in IDM 4.5.2 on Windows 2012 R2

On 12/18/15 8:55 AM, joakim ganse wrote:
>
> I expect that is what Steven ment with "we are looking into that".
> Hopefully they will find a good way to deal with this and we get that as
> a Patch.
>
> If it is a deal breaker open a SR for it to bring more attention to the
> problem.
>
>

Greetings,
From the different research that I have been doing. Some of this is
a "known" issue with Tomcat on a Windows server when running as a
service. I have not completed all of my investigation or exploration
into some different options.



--
Sincerely,
Steven Williams
Lead Software Engineer
Micro Focus
0 Likes
Knowledge Partner
Knowledge Partner

Re: Tomcat debug issue in IDM 4.5.2 on Windows 2012 R2


> From the different research that I have been doing. Some of this is
> a "known" issue with Tomcat on a Windows server when running as a
> service. I have not completed all of my investigation or exploration
> into some different options.


Is the class that UA uses to write to Catalina.out available in ECMA?
Seems like that would be the way to go.


0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Tomcat debug issue in IDM 4.5.2 on Windows 2012 R2

On Fri, 18 Dec 2015 16:46:32 +0000, Geoffrey Carman wrote:

>> From the different research that I have been doing. Some of this
>> is
>> a "known" issue with Tomcat on a Windows server when running as a
>> service. I have not completed all of my investigation or exploration
>> into some different options.

>
> Is the class that UA uses to write to Catalina.out available in ECMA?
> Seems like that would be the way to go.


That would be nice.
0 Likes
Knowledge Partner
Knowledge Partner

Re: Tomcat debug issue in IDM 4.5.2 on Windows 2012 R2

On 12/18/2015 12:36 PM, Nicolai Jensen wrote:
> On Fri, 18 Dec 2015 16:46:32 +0000, Geoffrey Carman wrote:
>
>>> From the different research that I have been doing. Some of this
>>> is
>>> a "known" issue with Tomcat on a Windows server when running as a
>>> service. I have not completed all of my investigation or exploration
>>> into some different options.

>>
>> Is the class that UA uses to write to Catalina.out available in ECMA?
>> Seems like that would be the way to go.

>
> That would be nice.


It is log4j, so should be easy enough to figure out on your own.


0 Likes
Knowledge Partner
Knowledge Partner

Re: Tomcat debug issue in IDM 4.5.2 on Windows 2012 R2

On 12/18/2015 7:36 AM, Nicolai Jensen wrote:
> On Fri, 18 Dec 2015 11:04:01 +0000, joakim ganse wrote:
>
>> Packages.java.lang.System.out.println is printing to the terminal and on
>> widows that is cmd but tomcat is usually started as a service son
>> system.out is misplaced somewhere in cyberspace.
>>
>> As Steven Wrote, try starting Tomcat from cmd. Be sure to start the cmd
>> "as administrator" or it will not start properly.

>
> That does indeed display the println statements.
>
> We are a team working on this, so it would be nice not having to fight
> over access to the console of the ua server.
>
> Any ideas on what we could change to redirect the cmds output to a file?
> Then we could use a share, and access the file individually


I think what we need is the Java class/ECMA function we need to call to
write to the proper server.log/catalina.out.

You could always include the Engine tracer class, (is dirxml.jar on the
UA server? Hmm, maybe not) or one of the log4j classes that UA must be
using to log anyway.

0 Likes
jacmarpet1 Absent Member.
Absent Member.

Re: Tomcat debug issue in IDM 4.5.2 on Windows 2012 R2


geoffc;263566 Wrote:
> On 12/18/2015 7:36 AM, Nicolai Jensen wrote:
> > On Fri, 18 Dec 2015 11:04:01 +0000, joakim ganse wrote:
> >
> >> Packages.java.lang.System.out.println is printing to the terminal and

> on
> >> widows that is cmd but tomcat is usually started as a service son
> >> system.out is misplaced somewhere in cyberspace.
> >>
> >> As Steven Wrote, try starting Tomcat from cmd. Be sure to start the

> cmd
> >> "as administrator" or it will not start properly.

> >
> > That does indeed display the println statements.
> >
> > We are a team working on this, so it would be nice not having to

> fight
> > over access to the console of the ua server.
> >
> > Any ideas on what we could change to redirect the cmds output to a

> file?
> > Then we could use a share, and access the file individually

>
> I think what we need is the Java class/ECMA function we need to call to
> write to the proper server.log/catalina.out.
>
> You could always include the Engine tracer class, (is dirxml.jar on the
> UA server? Hmm, maybe not) or one of the log4j classes that UA must be
> using to log anyway.


We solved it like so:

Global script, internal on workflow:


Code:
--------------------

function log( string )
{
var logger = Packages.org.apache.log4j.Logger.getLogger( string );
var result = string;
return( "#### Workflow name #### - " + result );
}

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


Call log("test"); from workflow.

Jacob.


--
jacmarpet
------------------------------------------------------------------------
jacmarpet's Profile: https://forums.netiq.com/member.php?userid=415
View this thread: https://forums.netiq.com/showthread.php?t=54952

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Tomcat debug issue in IDM 4.5.2 on Windows 2012 R2

On Mon, 21 Dec 2015 09:57:14 +0000, jacmarpet wrote:

> geoffc;263566 Wrote:
>> On 12/18/2015 7:36 AM, Nicolai Jensen wrote:
>> > On Fri, 18 Dec 2015 11:04:01 +0000, joakim ganse wrote:
>> >
>> >> Packages.java.lang.System.out.println is printing to the terminal
>> >> and

>> on
>> >> widows that is cmd but tomcat is usually started as a service son
>> >> system.out is misplaced somewhere in cyberspace.
>> >>
>> >> As Steven Wrote, try starting Tomcat from cmd. Be sure to start the

>> cmd
>> >> "as administrator" or it will not start properly.
>> >
>> > That does indeed display the println statements.
>> >
>> > We are a team working on this, so it would be nice not having to

>> fight
>> > over access to the console of the ua server.
>> >
>> > Any ideas on what we could change to redirect the cmds output to a

>> file?
>> > Then we could use a share, and access the file individually

>>
>> I think what we need is the Java class/ECMA function we need to call to
>> write to the proper server.log/catalina.out.
>>
>> You could always include the Engine tracer class, (is dirxml.jar on the
>> UA server? Hmm, maybe not) or one of the log4j classes that UA must be
>> using to log anyway.

>
> We solved it like so:
>
> Global script, internal on workflow:
>
>
> Code:
> --------------------
>
> function log( string )
> {
> var logger = Packages.org.apache.log4j.Logger.getLogger( string );
> var result = string;
> return( "#### Workflow name #### - " + result );
> }
>
> --------------------
>
>
> Call log("test"); from workflow.
>
> Jacob.


In this function, you will also need to actually call "logger".
For example:
logger.info( "#### Workflow name #### - " + result );
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.