Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access 7.1.243
  HXTT Cobol 5.0.242
  HXTT DBF 7.1.243
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Excel 6.1.246
  HXTT Json 1.0.214
  HXTT Paradox 7.1.242
  HXTT PDF 2.0.242
  HXTT Text(CSV) 7.1.242
  HXTT Word 1.1.242
  HXTT XML 4.0.243
Offshore Outsourcing
Free Resources
  Firewall Tunneling
  Search Indexing Robot
  Conditional Compilation
  Password Recovery for MS Access
  Password Recovery for Corel Paradox
  Checksum Tool for MD5
  Character Set Converter
  Pyramid - Poker of ZYH
   
   
   
Heng Xing Tian Tai Lab of Xi'an City (abbr, HXTT)

HXTT DBF
DBF TCP Server do not start
Stevie Braga
2006-11-20 10:41:11
Hi, I have created a java DBF TCP Server. When I was testing it in a local database running Windows OS it was working ok. But then when I tested it in a Linux OS Server, I got the following messages:

Exception in thread "main" java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which r
equires it.
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:1
59)
at java.awt.Window.(Window.java:310)
at java.awt.Frame.(Frame.java:419)
at java.awt.Frame.(Frame.java:384)
at javax.swing.JFrame.(JFrame.java:150)
at com.hxtt.sql.admin.ad.(Unknown Source)
at com.hxtt.sql.admin.Admin.(Unknown Source)
at packageName.DBFServer.main(DBFServer.java:61)

Do you have any idea of what is going on?
Re:DBF TCP Server do not start
HXTT Support
2006-11-20 16:44:12
>No X11 DISPLAY variable was set, but this program performed an operation
> which requires it.
You can use -Djava.awt.headless=true.

>at com.hxtt.sql.admin.Admin.(Unknown Source)
com.hxtt.sql.admin.Admin is for GUI Server. For a console call, from Run HXTT DBFServer as Windows Service or Linux(Solaris) Daemon, you can also run directly com.hxtt.sql.admin.HxttService.



Re:Re:DBF TCP Server do not start
Stevie Braga
2006-11-21 04:00:35
I tryed to use -Djava.awt.headless=true and got this message:
Exception in thread "main" java.awt.HeadlessException
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159)
at java.awt.Window.(Window.java:310)
at java.awt.Frame.(Frame.java:419)
at java.awt.Frame.(Frame.java:384)
at javax.swing.JFrame.(JFrame.java:150)
at com.hxtt.sql.admin.ad.(Unknown Source)
at com.hxtt.sql.admin.Admin.(Unknown Source)
at packageName.DBFServer.main(DBFServer.java:63)

The packageName.DBFServer.main(DBFServer.java:63) has the following code:
admin = new Admin();
where admin is an instance of com.hxtt.sql.admin.Admin

I'm still going to try a Linux Daemon, but I'd like to know what happened.

Thanks for the attention

Stevie Braga
Re:Re:Re:DBF TCP Server do not start
HXTT Support
2006-11-21 04:10:04
>The packageName.DBFServer.main(DBFServer.java:63) has the following code:
>admin = new Admin();
>where admin is an instance of com.hxtt.sql.admin.Admin
Because com.hxtt.sql.admin.Admin is a GUI admin, and your Linux command line doesn't support GUI because X11 DISPLAY variable wasn't set.

Re:Re:DBF TCP Server do not start
Stevie Braga
2006-11-21 05:05:46
I tryed to use -Djava.awt.headless=true and got this message:
Exception in thread "main" java.awt.HeadlessException
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159)
at java.awt.Window.(Window.java:310)
at java.awt.Frame.(Frame.java:419)
at java.awt.Frame.(Frame.java:384)
at javax.swing.JFrame.(JFrame.java:150)
at com.hxtt.sql.admin.ad.(Unknown Source)
at com.hxtt.sql.admin.Admin.(Unknown Source)
at packageName.DBFServer.main(DBFServer.java:63)

The packageName.DBFServer.main(DBFServer.java:63) has the following code:
admin = new Admin();
where admin is an instance of com.hxtt.sql.admin.Admin

I'm still going to try a Linux Daemon, but I'd like to know what happened.

Thanks for the attention

Stevie Braga
Re:Re:Re:Re:DBF TCP Server do not start
Stevie Braga
2006-11-21 07:19:08
I tryed a Linux Daemon following the instructions on the link you posted previously, but it's still not working. Do I have to implement the daemon interface in my main class? Do you any samples of classes that use a linux daemon or use the com.hxtt.sql.admin.HxttService directly?

Thanks again

Stevie Braga
Re:Re:Re:Re:Re:DBF TCP Server do not start
Stevie Braga
2006-11-21 14:31:43
The linux daemon didn't work out, so I started the com.hxtt.sql.admin.HxttService directly and got the following messages:
Load service setting from /[user_home directory]/urlconfig.properties
HXTT Service started

So I guess the service started ok, but when my application try to connect to the remote database, it shows the following exception:

java.sql.SQLException: Failed to connect to remote database: java.sql.SQLException: Failed to get response from remote server: java.net.ConnectException: Connection refused: connect at com.hxtt.global.SQLState.SQLException(Unknown Source) at com.hxtt.sql.remote.RemoteDriver.int(Unknown Source) at com.hxtt.sql.remote.RemoteDriver.connect(Unknown Source) at com.hxtt.global.SQLState.getConnection(Unknown Source) at com.hxtt.sql.HxttDriver.getRemoteAccessConnection(Unknown Source) at com.hxtt.sql.HxttDriver.connect(Unknown Source) at java.sql.DriverManager.getConnection(DriverManager.java:525) at java.sql.DriverManager.getConnection(DriverManager.java:193) at packageName.getDBFConnection(DbConnectionManager.java:72)

So what JDBC URL should I use to connect to my remote database, since jdbc:dbf://host:port/[DatabasePath] it's not working?

Thanks again for you attention

Stevie Braga
Re:Re:Re:Re:Re:Re:Re:DBF TCP Server do not start
HXTT Support
2006-11-22 08:18:30
Load service setting from /[user_home directory]/urlconfig.properties ?
It should tell you which property file is used by the daemon, or you should assign a property file. Are you assigned?

What's you linux server?
We tested in a redhat 9 server and it worked well following the instructions.
Re:Re:Re:Re:Re:Re:Re:DBF TCP Server do not start
Stevie Braga
2006-11-22 08:33:30
My server is a RedHat 9, but it has some custom kernel modifications.

The message from the HXTT Service was:
Load service setting from /root/urlconfig.properties
HXTT Service started.

My doubt now is with the HXTT Service running, what JDBC URL should I use in my client application so it can connect to the server database.

Stevie Braga
Re:Re:Re:Re:Re:Re:Re:DBF TCP Server do not start
Stevie Braga
2006-11-22 09:36:31
I don't know if this was my only mistake, but the client had the DBF_JDBC30 v3.0 and the server had the DBF_JDBC30 v2.2. Once I used both with v3.0 the HxttService worked fine!

Thanks for the patience

Stevie Braga

Search Key   Search by Last 50 Questions




Google
 

Email: webmaster@hxtt.com
Copyright © 2003-2019 Heng Xing Tian Tai Lab of Xi'an City. | All Rights Reserved. | Privacy | Legal | Sitemap