views:

13

answers:

1

Hi, I'm facing a problem with Websphere and RMS, followings are what I have:

  • Windows 2003, sp2, 64 bit, enterprise edition.
  • Microsoft Office word 2003 sp3.
  • The machine is connected to a domain, and I logged-in by a domain user (with email address).
  • RMS client installed.
  • RMS is worked correctly when trying to apply it from Word it self.
  • Websphere v6.1 (6.1.0.21), 32 bit, Java version : IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Windows Server 2003 x86-32 j9vmwi322 3ifx-20080811 (JIT enabled).

I'm trying to automate the MS word using JACOB library and I allocated the jacob dll (32) in the system32 folder, and I created a stand-alone java client which open MS Word, and open MS word file and do some automation (text-replacing) and this java-client is worked correctly and call the COM application (MS Word) correctly and everything is OK. After that I tried to improve this client by adding the RMS policy on the word document by invoking the method "ApplyPolicy" passing the path of RMS XML template file. I tried this client and it's working correctly.
After that I improved that client and converted it to a Web-Project and tried to deploy it on Websphere 6.1 (after i configured the JACOB library with websphere by putting the JACOB dll inside the /bin directory for websphere itself). But before that I removed the "ApplyPolicy" invocation and tried it, and it worked correctly, the MS word file opened and the text-replaced and the result file is saved correctly. After that I restored the invocation of "ApplyPolicy" and tried it, but the server hanged, and the page was still loading, I checked the process using TASK manager, I found that there were a process WINWORD.exe, and when I tried to kill it, the server returned back and printed error in it's log (A COM exception has been encountered: At Invoke of: ApplyPolicy Description: The remote procedure call failed.).
After investigating I found that when I run the stand-alone java application and opened the task manager, there was a java.exe *32 process and winword.exe *32 process, but when I converted it to a web application and run it from inside the websphere and checked the task manager there was already a process java.exe *32 (started at the server started up) and when I called my page, a winword.exe (without 32) process created and hanged and as a result the server hanged also. So please help me, any help will be appreciated.

A: 

Dears, Fortunately, I solved this problem as following: The reason was not the 64-bit environment but the user which is running the server... OK I'll explain:
The IBM Websphere Application Engine service was configured to be started by the local system, so the WASService.exe and the java.exe services are started by the local system and when jacob runs and calls msword.exe the msword.exe started by local system also, till now everything is OK but since I was invoking the "ApplyPolicy" method which apply the RMS on the document so the msword.exe was trying to apply policy using local system and that is wrong, because when you are trying to apply RMS you must apply it by the user you logged by it to the system (domain user), which can apply the RMS policy over a document. So to solve the problem I changed the user who is responsible for running the "IBM Websphere Application Engine service" from local system to real domain user (go to run -> services.exe : search for IBM service and changed the logon user), and everything is OK now.

Saeed