Re: Word.Applicaiton acvivex components tomcat Windows 7

2012-12-09 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Jan,

On 12/7/12 6:06 PM, Jan Kostelansky wrote:
 I am experiencing problems running vb script under tomcat.
 
 [...]
 
 I created servlet which does precisely the same as simple java
 program.

If it's on the server side, there are a whole bunch of issues you
could be encountering. Please post the Java code you are using to
launch the script on the server.

 If I run servlet in tomcat7 under Win XP - everything is fine
 
 If I run servlet in tomcat7 under Win 7 64 bit - program stops
 when Word.Applicaiton ActiveX component opens docx document.

Do you mean that the thread blocks and you never get a response from
Tomcat? You are probably not managing your streams -- or the
underlying process -- properly.

Or, André's suggestion is right that Microsoft Office has lots of
failure modes when running under a Service.

 This is not tomcat error precisely as it works on XP. I have a
 feeling enhanced Windows7 security causes this issues.

Possibly. Are there any log messages (catalina.log, etc.) or error
events in the Windows event viewer?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iEYEAREIAAYFAlDExJoACgkQ9CaO5/Lv0PBb1gCfXepZI+bWDYSfJbB1Ruv5ugmk
L4sAn3n58QoDhCsfGolXlRSfRa/DYbwa
=Fs9b
-END PGP SIGNATURE-

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



Re: Word.Applicaiton acvivex components tomcat Windows 7

2012-12-09 Thread André Warnier

Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Jan,

On 12/7/12 6:06 PM, Jan Kostelansky wrote:

I am experiencing problems running vb script under tomcat.

[...]

I created servlet which does precisely the same as simple java
program.


If it's on the server side, there are a whole bunch of issues you
could be encountering. Please post the Java code you are using to
launch the script on the server.


If I run servlet in tomcat7 under Win XP - everything is fine

If I run servlet in tomcat7 under Win 7 64 bit - program stops
when Word.Applicaiton ActiveX component opens docx document.


Do you mean that the thread blocks and you never get a response from
Tomcat? You are probably not managing your streams -- or the
underlying process -- properly.

Or, André's suggestion is right that Microsoft Office has lots of
failure modes when running under a Service.


This is not tomcat error precisely as it works on XP. I have a
feeling enhanced Windows7 security causes this issues.


Possibly. Are there any log messages (catalina.log, etc.) or error
events in the Windows event viewer?

From personal experience : it has not much to do with Windows 7 security, rather more 
with the slightly different way in which Windows 7 runs services, as compared to XP.
There will probably not be any error in the logs of Tomcat (apart maybe from an error 
related to the bad end of the process).  The errors will happen in the MS-Office software 
itself, and will typically be of the types listed in the MS article earlier mentioned.



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



Re: Word.Applicaiton acvivex components tomcat Windows 7

2012-12-08 Thread André Warnier

Jan Kostelansky wrote:

Thank you André,

here are details for your questions
- when you have this problem, is Tomcat running as a Windows Service ?
Yes it is running as service. I tried to run under local system account, and my 
account, which can open MS WORD, behavior is the same
- where is the document that you are trying to open ? on a local disk of the 
Tomcat host, or on a network drive ?
The file is on local HDD of tomcat host, outside of program files directory.
- what version of Java is running Tomcat ? a 32-bit or 64-bit version ?
It is Windows 7 64 bit release.



Well, then you are probable having exactly the kind of problem that is described in the 
Microsoft KB article.
And there is nothing that the people on the Tomcat list can do to help.  It is not a 
problem related to Tomcat or Java.  It is a problem related to running Microsoft Office 
Interop modules in the context of a Windows Service.


As an easy way to verify this :
Instead of running Tomcat as a Service, run it as an application in a command 
window.
For that, you will need to download the zip version of tomcat, and unzip it in your 
Tomcat directory (or somewhere else).  Then use the startup.bat file to start Tomcat as 
an application in the console. And then try your application again.

It then it works without problems, it confirms the diagnostic above.


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



Word.Applicaiton acvivex components tomcat Windows 7

2012-12-07 Thread Jan Kostelansky
Hi,

 

I am experiencing problems running vb script under tomcat.

 

More information.

 

The script

Creates instance of Word.Applicaiton ActiveX component 

Opens document

Prints to dedicated printer

 

I created simple java program which

Creates new process

Executes vb script

 

I created servlet which does precisely the same as simple java program.

 

If I run simple program - everything is fine

If I run servlet in tomcat7 under Win XP - everything is fine

If I run servlet in tomcat7 under Win 7 64 bit - program stops when
Word.Applicaiton ActiveX component opens docx document.

 

This is not tomcat error precisely as it works on XP. I have a feeling
enhanced Windows7 security causes this issues.

However I hope somebody from tomcat community solved this issue.

 

Thank you in advance, 

Jan

 

 



Re: Word.Applicaiton acvivex components tomcat Windows 7

2012-12-07 Thread André Warnier

Jan Kostelansky wrote:

Hi,

 


I am experiencing problems running vb script under tomcat.

 


More information.

 


The script

Creates instance of Word.Applicaiton ActiveX component 


Opens document

Prints to dedicated printer

 


I created simple java program which

Creates new process

Executes vb script

 


I created servlet which does precisely the same as simple java program.

 


If I run simple program - everything is fine

If I run servlet in tomcat7 under Win XP - everything is fine

If I run servlet in tomcat7 under Win 7 64 bit - program stops when
Word.Applicaiton ActiveX component opens docx document.

 


This is not tomcat error precisely as it works on XP. I have a feeling
enhanced Windows7 security causes this issues.

However I hope somebody from tomcat community solved this issue.

 
It may be that Tomcat - which is open-source software - just does not like these 
proprietary programs.  So it stops when you try.
That may also be revenge, for all the times Windows stops working when you try to run 
open-source programs on it.


Now some serious questions :
- when you have this problem, is Tomcat running as a Windows Service ?
- where is the document that you are trying to open ? on a local disk of the Tomcat host, 
or on a network drive ?

- what version of Java is running Tomcat ? a 32-bit or 64-bit version ?

And then a note : if you are having this issue when Tomcat is running as a 
Service :

Microsoft explicitly warns that Microsoft Office components are /not/ supported for 
running as a Windows Service, and that they may not work or cause strange errors.
That is because Microsoft Office programs expect to be running in a process that has a 
console, and Services do not have one (among other reasons).


See this : http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2

Of course, it may also be because they like to sell their programs on a per-workstation 
base, and running as a Service usually means that you are using them for more than one 
user. (They even say so in that article, see the licensing part).


Note that I do not work for Microsoft and I do not necessarily agree with what they say or 
the reasons that they give.  But I have tried similar things myself, and I know that it is 
very difficult, and not guaranteed to be stable, to run this in a service context.
You /do/ get strange errors, you get errors in Word that you do not get in Excel and 
vice-versa, you get problems under Windows7 that you do not get under Windows XP and 
vice-versa.  Just like what you are seeing.



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



RE: Word.Applicaiton acvivex components tomcat Windows 7

2012-12-07 Thread Jan Kostelansky
Thank you André,

here are details for your questions
- when you have this problem, is Tomcat running as a Windows Service ?
Yes it is running as service. I tried to run under local system account, and my 
account, which can open MS WORD, behavior is the same
- where is the document that you are trying to open ? on a local disk of the 
Tomcat host, or on a network drive ?
The file is on local HDD of tomcat host, outside of program files directory.
- what version of Java is running Tomcat ? a 32-bit or 64-bit version ?
It is Windows 7 64 bit release.

Thank you, Jan
-Original Message-
From: André Warnier [mailto:a...@ice-sa.com] 
Sent: Friday, December 07, 2012 6:49 PM
To: Tomcat Users List
Subject: Re: Word.Applicaiton acvivex components  tomcat  Windows 7

Jan Kostelansky wrote:
 Hi,
 
  
 
 I am experiencing problems running vb script under tomcat.
 
  
 
 More information.
 
  
 
 The script
 
 Creates instance of Word.Applicaiton ActiveX component
 
 Opens document
 
 Prints to dedicated printer
 
  
 
 I created simple java program which
 
 Creates new process
 
 Executes vb script
 
  
 
 I created servlet which does precisely the same as simple java program.
 
  
 
 If I run simple program - everything is fine
 
 If I run servlet in tomcat7 under Win XP - everything is fine
 
 If I run servlet in tomcat7 under Win 7 64 bit - program stops when 
 Word.Applicaiton ActiveX component opens docx document.
 
  
 
 This is not tomcat error precisely as it works on XP. I have a feeling 
 enhanced Windows7 security causes this issues.
 
 However I hope somebody from tomcat community solved this issue.
 
  
It may be that Tomcat - which is open-source software - just does not like 
these proprietary programs.  So it stops when you try.
That may also be revenge, for all the times Windows stops working when you try 
to run open-source programs on it.

Now some serious questions :
- when you have this problem, is Tomcat running as a Windows Service ?
- where is the document that you are trying to open ? on a local disk of the 
Tomcat host, or on a network drive ?
- what version of Java is running Tomcat ? a 32-bit or 64-bit version ?

And then a note : if you are having this issue when Tomcat is running as a 
Service :

Microsoft explicitly warns that Microsoft Office components are /not/ supported 
for running as a Windows Service, and that they may not work or cause strange 
errors.
That is because Microsoft Office programs expect to be running in a process 
that has a console, and Services do not have one (among other reasons).

See this : http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2

Of course, it may also be because they like to sell their programs on a 
per-workstation 
base, and running as a Service usually means that you are using them for more 
than one user. (They even say so in that article, see the licensing part).

Note that I do not work for Microsoft and I do not necessarily agree with what 
they say or the reasons that they give.  But I have tried similar things 
myself, and I know that it is very difficult, and not guaranteed to be stable, 
to run this in a service context.
You /do/ get strange errors, you get errors in Word that you do not get in 
Excel and vice-versa, you get problems under Windows7 that you do not get under 
Windows XP and vice-versa.  Just like what you are seeing.


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


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