HC not working using a separate server

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

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

I also see this in the JSP you initially posted:

<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?

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 :)

I just saw that since the start I didn’t have any tools.jar in my lib folder! :oops:

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 :(

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 :?

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 ?

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:

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 :(

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:

Maybe a port conflict then ?

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:

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 ?

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
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.

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?!

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 ?

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:

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:

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

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 ?

Fixed ! :D

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:

Strange but it seems to be like that :lol:
I hope I’ll not have a new surprise later.

Many thx to all the people who helped me :wink: