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.