HC not working using a separate server

The forum to discuss the Headless version of Servoy. Web, Java and Servlet development questions can all be posted here.

Re: HC not working using a separate server

Postby Foobrother » Mon Mar 02, 2009 3:37 pm

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 wrote: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 wrote: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.
Current configuration: Servoy 5.2.6 Build 1011, Java 6u24, PostgreSQL 8.3, Windows Server 2003

Servoy / Java Developer
http://www.assetguardian.com
User avatar
Foobrother
 
Posts: 530
Joined: Tue Jan 13, 2009 5:46 pm

Re: HC not working using a separate server

Postby Foobrother » Mon Mar 02, 2009 4:39 pm

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?!
Current configuration: Servoy 5.2.6 Build 1011, Java 6u24, PostgreSQL 8.3, Windows Server 2003

Servoy / Java Developer
http://www.assetguardian.com
User avatar
Foobrother
 
Posts: 530
Joined: Tue Jan 13, 2009 5:46 pm

Re: HC not working using a separate server

Postby lvostinar » Mon Mar 02, 2009 5:03 pm

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 ?
Laurian Vostinar
Servoy
lvostinar
 
Posts: 1062
Joined: Tue Feb 19, 2008 10:53 am

Re: HC not working using a separate server

Postby Foobrother » Mon Mar 02, 2009 6:09 pm

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:
Code: Select all
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?
Current configuration: Servoy 5.2.6 Build 1011, Java 6u24, PostgreSQL 8.3, Windows Server 2003

Servoy / Java Developer
http://www.assetguardian.com
User avatar
Foobrother
 
Posts: 530
Joined: Tue Jan 13, 2009 5:46 pm

Re: HC not working using a separate server

Postby lvostinar » Tue Mar 03, 2009 10:47 am

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 ?
Laurian Vostinar
Servoy
lvostinar
 
Posts: 1062
Joined: Tue Feb 19, 2008 10:53 am

Re: HC not working using a separate server

Postby Foobrother » Tue Mar 03, 2009 11:24 am

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:
Current configuration: Servoy 5.2.6 Build 1011, Java 6u24, PostgreSQL 8.3, Windows Server 2003

Servoy / Java Developer
http://www.assetguardian.com
User avatar
Foobrother
 
Posts: 530
Joined: Tue Jan 13, 2009 5:46 pm

Previous

Return to Servoy Headless Client

Who is online

Users browsing this forum: No registered users and 2 guests