# HC not working using a separate server

**URL:** <https://forum.servoy.com/t/hc-not-working-using-a-separate-server/10227>\
**Category:** Classic Servoy\
**Created:** [February 4, 2009, 9:02am UTC](https://forum.servoy.com/t/hc-not-working-using-a-separate-server/10227 "2009-02-04T09:02:24Z")\
**Posts on this page:** 16\
**Page:** 2

<div class="post-metadata">

**Author:** ![Andrei\_Costescu](https://avatars.discourse-cdn.com/v4/letter/a/e36b37/32.png) [@Andrei\_Costescu](https://forum.servoy.com/u/Andrei_Costescu)\
**Post date:** [February 26, 2009, 2:08pm UTC](https://forum.servoy.com/t/hc-not-working-using-a-separate-server/10227/21 "2009-02-26T14:08:25Z")

</div>

Please add a case to the support system that contains the HC solution that does not work.

> **[Servoy - Error](https://crm.servoy.com/servoy-webclient/solutions/solution/servoy_support)**

Maybe it’s something the solution does… We’ll have to see.

---

<div class="post-metadata">

**Author:** ![Andrei\_Costescu](https://avatars.discourse-cdn.com/v4/letter/a/e36b37/32.png) [@Andrei\_Costescu](https://forum.servoy.com/u/Andrei_Costescu)\
**Post date:** [February 26, 2009, 2:47pm UTC](https://forum.servoy.com/t/hc-not-working-using-a-separate-server/10227/22 "2009-02-26T14:47:07Z")

</div>

I also see this in the JSP you initially posted:

```auto
<meta http-equiv="refresh" content="2;url=doc2pdf3.jsp?idnb=<%= request.getParameter("idnb") %>; charset=UTF-8">

```

Does it work if you remove it or increase the delay before refresh?

---

<div class="post-metadata">

**Author:** ![Foobrother](https://avatars.discourse-cdn.com/v4/letter/f/50afbb/32.png) [@Foobrother](https://forum.servoy.com/u/Foobrother)\
**Post date:** [February 26, 2009, 3:35pm UTC](https://forum.servoy.com/t/hc-not-working-using-a-separate-server/10227/23 "2009-02-26T15:35:26Z")

</div>

I have changed the refresh value to 50 and I have waited 1min but still stuck.

I have posted my problem in the support system. If you have difficulties to run or understand the solution, don’t hesitate to ask!

Thanks ![:)]( "Smile")

---

<div class="post-metadata">

**Author:** ![Foobrother](https://avatars.discourse-cdn.com/v4/letter/f/50afbb/32.png) [@Foobrother](https://forum.servoy.com/u/Foobrother)\
**Post date:** [February 27, 2009, 9:32am UTC](https://forum.servoy.com/t/hc-not-working-using-a-separate-server/10227/24 "2009-02-27T09:32:36Z")

</div>

I just saw that since the start I didn’t have any tools.jar in my lib folder! ![:oops:]( "Embarassed")

So I’ve just copied the one of my Java\jdk1.6.0\_12\lib, but nothing changed. Still working using Developer but not with server service ![:(]( "Sad")

EDIT: on the server I’ve reinstalled everything, installed the headleass\_client\_demo which works perfectly on both developer and server service. I have modified it to make it generate a pdf from a local file (no database and second form used) and it also works perfectly on both developer and server service. I have modified the code again to make it generate a pdf from a source in the database and here is work with developer but not using the server service.

So I’m at the same point as using my laptop now ![:?]( "Confused")

---

<div class="post-metadata">

**Author:** ![lvostinar](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/lvostinar/32/5248_2.png) [@lvostinar](https://forum.servoy.com/u/lvostinar)\
**Post date:** [February 27, 2009, 2:07pm UTC](https://forum.servoy.com/t/hc-not-working-using-a-separate-server/10227/25 "2009-02-27T14:07:10Z")

</div>

If you enable java console there are not any errors there (when running the smart client)? Also maybe there is something different in servoy.properties between server and laptop ?

---

<div class="post-metadata">

**Author:** ![Foobrother](https://avatars.discourse-cdn.com/v4/letter/f/50afbb/32.png) [@Foobrother](https://forum.servoy.com/u/Foobrother)\
**Post date:** [February 27, 2009, 2:41pm UTC](https://forum.servoy.com/t/hc-not-working-using-a-separate-server/10227/26 "2009-02-27T14:41:22Z")

</div>

> lvostinar:  
> If you enable java console there are not any errors there (when running the smart client)?

I’ve tried it with the console ON on both client and server. But on the client there is nothing in the console because everything is done on the Server (by the headless client). And on the server, the console doesn’t pop-up but I should get the same stuff has in Tomcat and Servoy logs anyway. ![:roll:]( "Rolling Eyes")

> lvostinar:  
> Also maybe there is something different in servoy.properties between server and laptop ?

I never touched this file “directly” on both machines. But the configuration is the same, as I use the same database, same Servoy and same code. But now I’m at the same stage on both of them anyway: solution works on Developer but not using Server service.

The only difference between the version of my program which works on both modes and the version which causes a problem with the Server service, is the use of a database and the creation of a second form (linked to the table I need) to be able to work with the tables I want.

EDIT: I’ve modified my code to have only one form, but I get the same result ![:(]( "Sad")

---

<div class="post-metadata">

**Author:** ![Foobrother](https://avatars.discourse-cdn.com/v4/letter/f/50afbb/32.png) [@Foobrother](https://forum.servoy.com/u/Foobrother)\
**Post date:** [March 2, 2009, 9:54am UTC](https://forum.servoy.com/t/hc-not-working-using-a-separate-server/10227/27 "2009-03-02T09:54:47Z")

</div>

I’ve noticed something interesting.

If I don’t start Open Office service (service used for the pdf generation), the program will run normaly on both modes (developer and server service). But obviously no file generated!  
As soon as I start the Open Office service using this command (typed manually in MS-DOS command line): “soffice -headless -accept=“socket,host=127.0.0.1,port=8100;urp;” -nofirststartwizard”, it’s not working anymore with the Server service. However it works well using Developer. ![:roll:]( "Rolling Eyes")

---

<div class="post-metadata">

**Author:** ![lvostinar](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/lvostinar/32/5248_2.png) [@lvostinar](https://forum.servoy.com/u/lvostinar)\
**Post date:** [March 2, 2009, 10:06am UTC](https://forum.servoy.com/t/hc-not-working-using-a-separate-server/10227/28 "2009-03-02T10:06:06Z")

</div>

Maybe a port conflict then ?

---

<div class="post-metadata">

**Author:** ![Foobrother](https://avatars.discourse-cdn.com/v4/letter/f/50afbb/32.png) [@Foobrother](https://forum.servoy.com/u/Foobrother)\
**Post date:** [March 2, 2009, 10:27am UTC](https://forum.servoy.com/t/hc-not-working-using-a-separate-server/10227/29 "2009-03-02T10:27:04Z")

</div>

> lvostinar:  
> Maybe a port conflict then ?

Actually, I didn’t have the port 8100 open on the server. And in fact it shouldn’t matter as it is the headless client which is requesting the generation to OpenOffice. So the server itself.  
Now it’s open, but same problem. ![:cry:]( "Crying or Very sad")

---

<div class="post-metadata">

**Author:** ![lvostinar](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/lvostinar/32/5248_2.png) [@lvostinar](https://forum.servoy.com/u/lvostinar)\
**Post date:** [March 2, 2009, 12:54pm UTC](https://forum.servoy.com/t/hc-not-working-using-a-separate-server/10227/30 "2009-03-02T12:54:09Z")

</div>

I tried your sample but it works for me (if i don’t take the document location from database as that part is missing from solution). So, I just use a test from C:\test.doc and I can transform it to test.pdf . This works from developer and application server. Maybe you can try to modify some network settings to see if it works ? Or try without firewall. Also, I see some errors in the log you sent me; what errors do you have now when running application server ?

---

<div class="post-metadata">

**Author:** ![Foobrother](https://avatars.discourse-cdn.com/v4/letter/f/50afbb/32.png) [@Foobrother](https://forum.servoy.com/u/Foobrother)\
**Post date:** [March 2, 2009, 1:37pm UTC](https://forum.servoy.com/t/hc-not-working-using-a-separate-server/10227/31 "2009-03-02T13:37:35Z")

</div>

It’s also working with local files for me, when I don’t use the database.  
But once I use the database to get the files, it doesn’t work for the Server service mode.

Here are the logs I get after running the solution (smart client on another machine and Server service mode):

> .service\_log.txt:  
> STATUS | wrapper | 2009/03/02 13:28:03 | ← Wrapper Stopped  
> STATUS | wrapper | 2009/03/02 13:28:03 | → Wrapper Started as Service  
> STATUS | wrapper | 2009/03/02 13:28:04 | Launching a JVM…  
> INFO | jvm 1 | 2009/03/02 13:28:04 | Wrapper (Version 3.1.2) [http://wrapper.tanukisoftware.org](http://wrapper.tanukisoftware.org)  
> INFO | jvm 1 | 2009/03/02 13:28:04 |  
> INFO | jvm 1 | 2009/03/02 13:28:04 | 0 [WrapperSimpleAppMain] INFO com.servoy.j2db.util.Debug - Loading servoy.properties from C:\Program Files (x86)\Servoy\application\_server\servoy.properties  
> INFO | jvm 1 | 2009/03/02 13:28:04 | 327 [WrapperSimpleAppMain] INFO com.servoy.j2db.util.Debug - Loading - Done  
> INFO | jvm 1 | 2009/03/02 13:28:08 | 02-Mar-2009 13:28:08 org.apache.coyote.http11.Http11Protocol init  
> INFO | jvm 1 | 2009/03/02 13:28:08 | INFO: Initializing Coyote HTTP/1.1 on http-8080  
> INFO | jvm 1 | 2009/03/02 13:28:08 | 02-Mar-2009 13:28:08 org.apache.catalina.startup.Catalina load  
> INFO | jvm 1 | 2009/03/02 13:28:08 | INFO: Initialization processed in 149 ms  
> INFO | jvm 1 | 2009/03/02 13:28:08 | 02-Mar-2009 13:28:08 org.apache.catalina.core.StandardService start  
> INFO | jvm 1 | 2009/03/02 13:28:08 | INFO: Starting service Catalina  
> INFO | jvm 1 | 2009/03/02 13:28:08 | 02-Mar-2009 13:28:08 org.apache.catalina.core.StandardEngine start  
> INFO | jvm 1 | 2009/03/02 13:28:08 | INFO: Starting Servlet Engine: Apache Tomcat/6.0-snapshot  
> INFO | jvm 1 | 2009/03/02 13:28:08 | 02-Mar-2009 13:28:08 org.apache.catalina.startup.DigesterFactory register  
> INFO | jvm 1 | 2009/03/02 13:28:08 | WARNING: Could not get url for /javax/servlet/resources/web-app\_2\_5.xsd  
> INFO | jvm 1 | 2009/03/02 13:28:08 | 02-Mar-2009 13:28:08 org.apache.coyote.http11.Http11Protocol start  
> INFO | jvm 1 | 2009/03/02 13:28:08 | INFO: Starting Coyote HTTP/1.1 on http-8080  
> INFO | jvm 1 | 2009/03/02 13:28:08 | 02-Mar-2009 13:28:08 org.apache.catalina.startup.Catalina start  
> INFO | jvm 1 | 2009/03/02 13:28:08 | INFO: Server startup in 665 ms

> servoy\_log.txt:  
> 2009-03-02 13:28:05,932 WARN [WrapperSimpleAppMain] com.servoy.j2db.persistence.Server - Table name tbl\_documents\_controlled\_copies from server ag is too long (\>30 chars) – this is not supported by all databases

As there are in total 4 machines involved (the client, servoy server, file server and database server), I was thinking about maybe a problem of accounts which can’t access files or run something on other machines.  
But it’s working with Developer. It should also work with the Server service?  
When I run developer it is the Headless client which runs the conversion. Then the Open Office service reads the file (which is on another machine) and generates a pdf on the server.  
In don’t see any reason why I shouldn’t be the same when a foreign client launches it instead of the server himself? It the same user which runs the conversion in both cases, isn’t it?

I’ve also noticed an interesting thing. When the Server service is started and I start Developer. Then launch the application from Developer, I get exactly the same problem. I have to turn the server service off before opening Developer.

---

<div class="post-metadata">

**Author:** ![Foobrother](https://avatars.discourse-cdn.com/v4/letter/f/50afbb/32.png) [@Foobrother](https://forum.servoy.com/u/Foobrother)\
**Post date:** [March 2, 2009, 2:39pm UTC](https://forum.servoy.com/t/hc-not-working-using-a-separate-server/10227/32 "2009-03-02T14:39:12Z")

</div>

I think that we are getting closer!

As I don’t get any feedback from the log, I have tried to see exactly where the problem was using “plugins.file.writeTXTFile()” function on several part of the program.  
So, the program is stuck at this line: “application.executeProgram(“java”, “-jar”, jodConvertURL,docURL,pdfFinalURL);”

I have checked both docURL and pdfFinalURL, and they are ok (the same as using Developer):  
-docURL=//server/archive$/AG/Engineering/documents/DC8498/11464/ECS031\_AND1482\_1215\_01b.doc  
-pdfFinalURL =C:\Program Files (x86)\Servoy\application\_server\server\webapps\ROOT\pdfTool\file\ECS031\_AND1482\_1215\_01b.pdf (I verified also if there was a problem of '' character, but I double them, this is just the output result).

I’ll try to open the console using maybe the “-console” parameter to see if it pops-up on the server?!

---

<div class="post-metadata">

**Author:** ![lvostinar](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/lvostinar/32/5248_2.png) [@lvostinar](https://forum.servoy.com/u/lvostinar)\
**Post date:** [March 2, 2009, 3:03pm UTC](https://forum.servoy.com/t/hc-not-working-using-a-separate-server/10227/33 "2009-03-02T15:03:42Z")

</div>

I tested with database also and it works this way too. I also noticed that if docURL has a wrong value the call to jodconverter will not return. But, when I put a correct value in path/filename it works ok. (I used C:\ for path and test.doc for filename in database). Can you try a simple test like this and see if it works ?

---

<div class="post-metadata">

**Author:** ![Foobrother](https://avatars.discourse-cdn.com/v4/letter/f/50afbb/32.png) [@Foobrother](https://forum.servoy.com/u/Foobrother)\
**Post date:** [March 2, 2009, 4:09pm UTC](https://forum.servoy.com/t/hc-not-working-using-a-separate-server/10227/34 "2009-03-02T16:09:32Z")

</div>

I changed my program by just changing the docURL before doing the conversion (database are still done before).  
I’ve put a “C:\file name.doc” as URL.  
And it worked!  
So that means that there is a problem with this path:  
“//server/archive$/AG/Engineering/documents/DC8498/11464/ECS031\_AND1482\_1215\_01b.doc”

However, I tried to run this command using the command-line:

```auto
java -jar "C:\Program Files (x86)\Servoy\application_server\plugins\jodConverter\jodconverter-cli-2.2.1.jar" "//server/archive$/AG/Engineering/documents/DC8498/11464/ECS031_AND1482_1215_01b.doc" "C:\Program Files (x86)\Servoy\application_server\server\webapps\ROOT\pdfTool\file\ECS031_AND1482_1215_01b.pdf"

```

I don’t understand why it works on command line and Developer and not using Server Service?! ![:shock:]( "Shocked")

Could you try using an URL like “//server/path/file.doc” to see if you get the same problem?

---

<div class="post-metadata">

**Author:** ![lvostinar](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/lvostinar/32/5248_2.png) [@lvostinar](https://forum.servoy.com/u/lvostinar)\
**Post date:** [March 3, 2009, 8:47am UTC](https://forum.servoy.com/t/hc-not-working-using-a-separate-server/10227/35 "2009-03-03T08:47:52Z")

</div>

It works for me with //server url too. Maybe you have to put the ip instead of the server name? However, as this doesn’t seem to be a Servoy issue will close the case. Is there a problem with using the normal server path ?

---

<div class="post-metadata">

**Author:** ![Foobrother](https://avatars.discourse-cdn.com/v4/letter/f/50afbb/32.png) [@Foobrother](https://forum.servoy.com/u/Foobrother)\
**Post date:** [March 3, 2009, 9:24am UTC](https://forum.servoy.com/t/hc-not-working-using-a-separate-server/10227/36 "2009-03-03T09:24:01Z")

</div>

Fixed ! ![:D]( "Very Happy")

Was an account problem. I’ve created an account on the server with my username and password. Assigned this Login to Servoy Application Server Service. And it works now!

Apparently, when you run Developer it uses the login of the developer’s machine (laptop where remote desktop connection is used), but not the server login. And when you run the server service it uses the server login. ![:roll:]( "Rolling Eyes")

Strange but it seems to be like that ![:lol:]( "Laughing")  
I hope I’ll not have a new surprise later.

Many thx to all the people who helped me ![:wink:]( "Wink")

[Previous page](https://forum.servoy.com/t/hc-not-working-using-a-separate-server/10227.md?page=1)
