RE:Component working in Console not as Service

2019-08-01 Thread Potgieter, Carlo
On 01.08.2019 13:02, Potgieter, Carlo wrote:
> On 31.07.2019 20:26, Potgieter, Carlo wrote:
>> On 31.07.2019 14:49, Mark Thomas wrote:
>>> On 31/07/2019 13:03, Potgieter, Carlo wrote:


 On 31/07/2019 12:48, Potgieter, Carlo wrote:
> I was hoping to obtain some assistance. We have used a library to convert 
> MS Office documents (docx and pptx) to PDF.
>
> This works perfectly in the development environment and also when running 
> Tomcat in a console window.
>
> The moment we run Tomcat as a service this specific component gives and 
> error. Unfortunately the error is non-specific so we cannot troubleshoot 
> the origin.
>
> My question is, what would be the difference in running Tomcat as a 
> Service as oppose to running it in Console that might cause this problem?

 Tomcat runs as a different user with different access permissions, 
 particularly to network shares.

 You probably want to set up a Tomcat specific user with the appropriate 
 permissions.

 Mark

 Thank you Mark for the quick response.

 My first thought was permissions also, however I have attempted to run it 
 with local, domain and system user, however the same result.

 Both local and domain user was part of the local admin group. Is there 
 anything else I can check?
>>>
>>> Are you sure the DDL is being loaded? That normally needs explicit
>>> configuration to point the JVM at the right path.
>>>
>>> Look at the docs for for
>>> org.apache.catalina.startup.VersionLoggerListener and configure it
>>> to dump everything. Then compare the console start with the service start.
>>>
>>
>> What is also different when Tomcat runs as a Service or in a console, is 
>> where the JVM that runs tomcat, picks up its environment and command-line 
>> switches.
>> If you are not familiar with this matter, this may help :
>> verbose explanation :
>> https://secure-web.cisco.com/16LxnNI0vUhSt5WCJq8xkkulFgI8kkE6jU6nNTTW
>> H
>> 8Edc36MeIASjeU6nUbSA_zE1ivz6c5TGLRI5-1Pf6_zuQkUOEaw8utUuFpuUnCrCLIeiS
>> 7
>> dhXxvll2giIW3fHOBe1_gpGzPiGufx1vE50Dzs9UUSm5Rc1iB9G9UILBUZ6dhLaGa3vAE
>> U
>> t8bmVvfaGcwlM8tmxid6q8PydRkxPkVHu_02IIO1w4c2yyYp4O9vhwKqUq1OeApnpAj1c
>> 0
>> e2G-t0fT-lxYS5ofL92-i2ZpXEQk9bpTnCXLs0bT0wnFZYQsrFJZ8GQQckDdY-8eBWc94
>> 6
>> XK9enjcTwIMehHfk013zuw/https%3A%2F%2Fcwiki.apache.org%2Fconfluence%2F
>> d
>> isplay%2FTOMCAT%2FWindows#Windows-Q11
>> Official page :
>> https://secure-web.cisco.com/1BYhcwXb2ofGRuNXu8K-JZBV4sFyWUkMe0XaNSYX
>> c
>> ey93JyiAhWVVK1zM0iJzrwal62xEQvv7bWZTbZIMuGTP_S_2qZdoXT4tLt78CPHzpOJND
>> 9
>> 6h28X7R95_fnapxZO1zDvqNUPkrh23BUmyvnfKvqfef2panME2Z0l8GOvPAP4lZdyaSwg
>> c
>> D0L2TM7oClsAQ4TPAeM8hVEtWCsJsoeQjwh7m4IHyvpPDfPDJ28gRGkBoLQWETM9alb7R
>> H
>> jMtvclQ7-lMp3IYS9kOzQBDVHACmGkdIqgx-XAWNBjM6Wce6IoYmAeiwIgYmPZ0oClxso
>> v
>> Fcb1-dH06wAs3t938YQVvw/https%3A%2F%2Ftomcat.apache.org%2Ftomcat-8.5-d
>> o
>> c%2Fwindows-service-howto.html
>>
>> (Perhaps the application expects some value to be set somewhere..)
>>
>> Also, above you mention "Unfortunately the error is non-specific..", but 
>> maybe you want to copy the error message here, so that someone else can have 
>> a look at it ?
>> Maybe it triggers some recognition by another user having had the same issue 
>> with that library.
>>
>>
>> Quickly answering both posts from Mark and Andrei:
>>
>> Mark: Yes, the DLL is being loaded. There is error handling in place should 
>> it be unsuccessful in accessing any of the components.
>> I also compared the output of the VersionLoggerListners:
>> When running as a service and executing the Tomcat8.exe from cmd the 
>> information is the same, however the functionality only works when the .exe 
>> is run from cmd.
>> When using the Startup.bat script to start the server there are three less 
>> entries and one extra:
>>
>> Entries not included:
>> 31-Jul-2019 19:34:37.398 INFO [main]
>> org.apache.catalina.startup.VersionLoggerListener.log Command line
>> argument: exit
>> 31-Jul-2019 19:34:37.399 INFO [main]
>> org.apache.catalina.startup.VersionLoggerListener.log Command line
>> argument: -Xms128m
>> 31-Jul-2019 19:34:37.399 INFO [main]
>> org.apache.catalina.startup.VersionLoggerListener.log Command line
>> argument: -Xmx256m
>>
>> Entry included but not in the other two:
>> 31-Jul-2019 19:37:11.434 INFO [main]
>> org.apache.catalina.startup.VersionLoggerListener.log Command line
>> argument: -Djdk.tls.ephemeralDHKeySize=2048
>>
>> Again using this method to run the server allows the functionality to work.
>>
>> Andre: From what I could see, everything is loaded the same as all of them 
>> uses the sae JVM. Unless I missed something...which is entirely possible.
>> The zeonpadpdf we are using consists of 3 components, 2 .jar's and 1
>> .dll. zeonpadpdf.jar, jacob-1.18.jar, jacob-1.18-x64.dll The error we are 
>> receiving states: "Conversion error" and is generated from the 
>> zeonpadpdf.jar which handles the

RE:Component working in Console not as Service

2019-08-01 Thread Potgieter, Carlo
On 31.07.2019 20:26, Potgieter, Carlo wrote:
> On 31.07.2019 14:49, Mark Thomas wrote:
>> On 31/07/2019 13:03, Potgieter, Carlo wrote:
>>>
>>>
>>> On 31/07/2019 12:48, Potgieter, Carlo wrote:
 I was hoping to obtain some assistance. We have used a library to convert 
 MS Office documents (docx and pptx) to PDF.

 This works perfectly in the development environment and also when running 
 Tomcat in a console window.

 The moment we run Tomcat as a service this specific component gives and 
 error. Unfortunately the error is non-specific so we cannot troubleshoot 
 the origin.

 My question is, what would be the difference in running Tomcat as a 
 Service as oppose to running it in Console that might cause this problem?
>>>
>>> Tomcat runs as a different user with different access permissions, 
>>> particularly to network shares.
>>>
>>> You probably want to set up a Tomcat specific user with the appropriate 
>>> permissions.
>>>
>>> Mark
>>>
>>> Thank you Mark for the quick response.
>>>
>>> My first thought was permissions also, however I have attempted to run it 
>>> with local, domain and system user, however the same result.
>>>
>>> Both local and domain user was part of the local admin group. Is there 
>>> anything else I can check?
>>
>> Are you sure the DDL is being loaded? That normally needs explicit
>> configuration to point the JVM at the right path.
>>
>> Look at the docs for for
>> org.apache.catalina.startup.VersionLoggerListener and configure it to
>> dump everything. Then compare the console start with the service start.
>>
>
> What is also different when Tomcat runs as a Service or in a console, is 
> where the JVM that runs tomcat, picks up its environment and command-line 
> switches.
> If you are not familiar with this matter, this may help :
> verbose explanation :
> https://secure-web.cisco.com/16LxnNI0vUhSt5WCJq8xkkulFgI8kkE6jU6nNTTWH
> 8Edc36MeIASjeU6nUbSA_zE1ivz6c5TGLRI5-1Pf6_zuQkUOEaw8utUuFpuUnCrCLIeiS7
> dhXxvll2giIW3fHOBe1_gpGzPiGufx1vE50Dzs9UUSm5Rc1iB9G9UILBUZ6dhLaGa3vAEU
> t8bmVvfaGcwlM8tmxid6q8PydRkxPkVHu_02IIO1w4c2yyYp4O9vhwKqUq1OeApnpAj1c0
> e2G-t0fT-lxYS5ofL92-i2ZpXEQk9bpTnCXLs0bT0wnFZYQsrFJZ8GQQckDdY-8eBWc946
> XK9enjcTwIMehHfk013zuw/https%3A%2F%2Fcwiki.apache.org%2Fconfluence%2Fd
> isplay%2FTOMCAT%2FWindows#Windows-Q11
> Official page :
> https://secure-web.cisco.com/1BYhcwXb2ofGRuNXu8K-JZBV4sFyWUkMe0XaNSYXc
> ey93JyiAhWVVK1zM0iJzrwal62xEQvv7bWZTbZIMuGTP_S_2qZdoXT4tLt78CPHzpOJND9
> 6h28X7R95_fnapxZO1zDvqNUPkrh23BUmyvnfKvqfef2panME2Z0l8GOvPAP4lZdyaSwgc
> D0L2TM7oClsAQ4TPAeM8hVEtWCsJsoeQjwh7m4IHyvpPDfPDJ28gRGkBoLQWETM9alb7RH
> jMtvclQ7-lMp3IYS9kOzQBDVHACmGkdIqgx-XAWNBjM6Wce6IoYmAeiwIgYmPZ0oClxsov
> Fcb1-dH06wAs3t938YQVvw/https%3A%2F%2Ftomcat.apache.org%2Ftomcat-8.5-do
> c%2Fwindows-service-howto.html
>
> (Perhaps the application expects some value to be set somewhere..)
>
> Also, above you mention "Unfortunately the error is non-specific..", but 
> maybe you want to copy the error message here, so that someone else can have 
> a look at it ?
> Maybe it triggers some recognition by another user having had the same issue 
> with that library.
>
>
> Quickly answering both posts from Mark and Andrei:
>
> Mark: Yes, the DLL is being loaded. There is error handling in place should 
> it be unsuccessful in accessing any of the components.
> I also compared the output of the VersionLoggerListners:
> When running as a service and executing the Tomcat8.exe from cmd the 
> information is the same, however the functionality only works when the .exe 
> is run from cmd.
> When using the Startup.bat script to start the server there are three less 
> entries and one extra:
>
> Entries not included:
> 31-Jul-2019 19:34:37.398 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Command line
> argument: exit
> 31-Jul-2019 19:34:37.399 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Command line
> argument: -Xms128m
> 31-Jul-2019 19:34:37.399 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Command line
> argument: -Xmx256m
>
> Entry included but not in the other two:
> 31-Jul-2019 19:37:11.434 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Command line
> argument: -Djdk.tls.ephemeralDHKeySize=2048
>
> Again using this method to run the server allows the functionality to work.
>
> Andre: From what I could see, everything is loaded the same as all of them 
> uses the sae JVM. Unless I missed something...which is entirely possible.
> The zeonpadpdf we are using consists of 3 components, 2 .jar's and 1
> .dll. zeonpadpdf.jar, jacob-1.18.jar, jacob-1.18-x64.dll The error we are 
> receiving states: "Conversion error" and is generated from the zeonpadpdf.jar 
> which handles the conversion from .docx to pdf.
> This is also the error in the stack trace which doesn't provide much more 
> information.
> Based on what I could find in the zeonpadpdf.jar this is generic error 
> mes

RE:Component working in Console not as Service

2019-07-31 Thread Potgieter, Carlo
On 31.07.2019 14:49, Mark Thomas wrote:
> On 31/07/2019 13:03, Potgieter, Carlo wrote:
>>
>>
>> On 31/07/2019 12:48, Potgieter, Carlo wrote:
>>> I was hoping to obtain some assistance. We have used a library to convert 
>>> MS Office documents (docx and pptx) to PDF.
>>>
>>> This works perfectly in the development environment and also when running 
>>> Tomcat in a console window.
>>>
>>> The moment we run Tomcat as a service this specific component gives and 
>>> error. Unfortunately the error is non-specific so we cannot troubleshoot 
>>> the origin.
>>>
>>> My question is, what would be the difference in running Tomcat as a Service 
>>> as oppose to running it in Console that might cause this problem?
>>
>> Tomcat runs as a different user with different access permissions, 
>> particularly to network shares.
>>
>> You probably want to set up a Tomcat specific user with the appropriate 
>> permissions.
>>
>> Mark
>>
>> Thank you Mark for the quick response.
>>
>> My first thought was permissions also, however I have attempted to run it 
>> with local, domain and system user, however the same result.
>>
>> Both local and domain user was part of the local admin group. Is there 
>> anything else I can check?
>
> Are you sure the DDL is being loaded? That normally needs explicit
> configuration to point the JVM at the right path.
>
> Look at the docs for for
> org.apache.catalina.startup.VersionLoggerListener and configure it to
> dump everything. Then compare the console start with the service start.
>

What is also different when Tomcat runs as a Service or in a console, is where 
the JVM that runs tomcat, picks up its environment and command-line switches.
If you are not familiar with this matter, this may help :
verbose explanation : 
https://secure-web.cisco.com/16LxnNI0vUhSt5WCJq8xkkulFgI8kkE6jU6nNTTWH8Edc36MeIASjeU6nUbSA_zE1ivz6c5TGLRI5-1Pf6_zuQkUOEaw8utUuFpuUnCrCLIeiS7dhXxvll2giIW3fHOBe1_gpGzPiGufx1vE50Dzs9UUSm5Rc1iB9G9UILBUZ6dhLaGa3vAEUt8bmVvfaGcwlM8tmxid6q8PydRkxPkVHu_02IIO1w4c2yyYp4O9vhwKqUq1OeApnpAj1c0e2G-t0fT-lxYS5ofL92-i2ZpXEQk9bpTnCXLs0bT0wnFZYQsrFJZ8GQQckDdY-8eBWc946XK9enjcTwIMehHfk013zuw/https%3A%2F%2Fcwiki.apache.org%2Fconfluence%2Fdisplay%2FTOMCAT%2FWindows#Windows-Q11
Official page : 
https://secure-web.cisco.com/1BYhcwXb2ofGRuNXu8K-JZBV4sFyWUkMe0XaNSYXcey93JyiAhWVVK1zM0iJzrwal62xEQvv7bWZTbZIMuGTP_S_2qZdoXT4tLt78CPHzpOJND96h28X7R95_fnapxZO1zDvqNUPkrh23BUmyvnfKvqfef2panME2Z0l8GOvPAP4lZdyaSwgcD0L2TM7oClsAQ4TPAeM8hVEtWCsJsoeQjwh7m4IHyvpPDfPDJ28gRGkBoLQWETM9alb7RHjMtvclQ7-lMp3IYS9kOzQBDVHACmGkdIqgx-XAWNBjM6Wce6IoYmAeiwIgYmPZ0oClxsovFcb1-dH06wAs3t938YQVvw/https%3A%2F%2Ftomcat.apache.org%2Ftomcat-8.5-doc%2Fwindows-service-howto.html

(Perhaps the application expects some value to be set somewhere..)

Also, above you mention "Unfortunately the error is non-specific..", but maybe 
you want to copy the error message here, so that someone else can have a look 
at it ?
Maybe it triggers some recognition by another user having had the same issue 
with that library.


Quickly answering both posts from Mark and Andrei:

Mark: Yes, the DLL is being loaded. There is error handling in place should it 
be unsuccessful in accessing any of the components.
I also compared the output of the VersionLoggerListners:
When running as a service and executing the Tomcat8.exe from cmd the 
information is the same, however the functionality only works when the .exe is 
run from cmd.
When using the Startup.bat script to start the server there are three less 
entries and one extra:

Entries not included:
31-Jul-2019 19:34:37.398 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
exit
31-Jul-2019 19:34:37.399 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
-Xms128m
31-Jul-2019 19:34:37.399 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
-Xmx256m

Entry included but not in the other two:
31-Jul-2019 19:37:11.434 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
-Djdk.tls.ephemeralDHKeySize=2048

Again using this method to run the server allows the functionality to work.

Andre: From what I could see, everything is loaded the same as all of them uses 
the sae JVM. Unless I missed something...which is entirely possible.
The zeonpadpdf we are using consists of 3 components, 2 .jar's and 1 .dll. 
zeonpadpdf.jar, jacob-1.18.jar, jacob-1.18-x64.dll
The error we are receiving states: "Conversion error" and is generated from the 
zeonpadpdf.jar which handles the conversion from .docx to pdf.
This is also the error in the stack trace which doesn't provide much more 
information.
Based on what I could find in the zeonpadpdf.jar this is generic error message.

Hope that gives some more context.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@to

RE:Component working in Console not as Service

2019-07-31 Thread Potgieter, Carlo


On 31/07/2019 12:48, Potgieter, Carlo wrote:
> I was hoping to obtain some assistance. We have used a library to convert MS 
> Office documents (docx and pptx) to PDF.
>
> This works perfectly in the development environment and also when running 
> Tomcat in a console window.
>
> The moment we run Tomcat as a service this specific component gives and 
> error. Unfortunately the error is non-specific so we cannot troubleshoot the 
> origin.
>
> My question is, what would be the difference in running Tomcat as a Service 
> as oppose to running it in Console that might cause this problem?

Tomcat runs as a different user with different access permissions, particularly 
to network shares.

You probably want to set up a Tomcat specific user with the appropriate 
permissions.

Mark

Thank you Mark for the quick response.

My first thought was permissions also, however I have attempted to run it with 
local, domain and system user, however the same result.

Both local and domain user was part of the local admin group. Is there anything 
else I can check?

Carlo

*Disclaimer:* This email is subject to important restrictions, qualifications 
and disclaimers ("the Disclaimer") that must be accessed and read by visiting 
our website and viewing the webpage at the following address: 
http://www.deloitte.com/za/disclaimer. The Disclaimer forms part of the content 
of this email. If you cannot access the Disclaimer, please obtain a copy 
thereof from us by sending an email to zaitserviced...@deloitte.co.za. Deloitte 
refers to a Deloitte member firm, one of its related entities, or Deloitte 
Touche Tohmatsu Limited (“DTTL”). Each Deloitte member firm is a separate legal 
entity and a member of DTTL. DTTL does not provide services to clients. Please 
see www.deloitte.com/about to learn more.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org