Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v7.1
  HXTT Cobol v5.0
  HXTT DBF v7.1
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Excel v6.1
  HXTT Paradox v7.1
  HXTT PDF v2.0
  HXTT Text(CSV) v7.1
  HXTT Word v1.1
  HXTT XML v4.0
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
Glassfish 3.1.2.2 and Entity Classes (JPA)
Jason E.
2012-09-18 20:17:23.0
Hello,

I am attempting to develop a Java EE application which will run on Oracle's Glassfish 3.1.2.2 application server. I have deployed the driver to the glassfish server so I know it is available however I keep getting the following exceptions:

WARNING: RAR5038:Unexpected exception while creating resource for pool jdbc_dbf__c__data_Pool. Exception : javax.resource.ResourceException: com.hxtt.sql.dbf.DBFDriver cannot be cast to javax.sql.DataSource
WARNING: RAR5117 : Failed to obtain/create connection from connection pool [ jdbc_dbf__c__data_Pool ]. Reason : com.sun.appserv.connectors.internal.api.PoolingException: com.hxtt.sql.dbf.DBFDriver cannot be cast to javax.sql.DataSource
WARNING: RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: com.hxtt.sql.dbf.DBFDriver cannot be cast to javax.sql.DataSource]
SEVERE: Local Exception Stack:
Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: com.hxtt.sql.dbf.DBFDriver cannot be cast to javax.sql.DataSource

Do you have any documentation/experience creating JEE applications on the Glassfish platform using your driver? Also am I correct in assuming that I can use this driver for entity classes (JPA)? Any help here would be greatly appreciated.
Re:Glassfish 3.1.2.2 and Entity Classes (JPA)
Jason E.
2012-09-18 21:55:10.0
I have just found this in your faq:

http://www.hxtt.com/dbf/faq.html#index
http://www.hxtt.com/test/dbf_type4_datasource.xml

I need to examine these settings to be sure that I am using something similar. I will report my results tomorrow.
Re:Re:Glassfish 3.1.2.2 and Entity Classes (JPA)
HXTT Support
2012-09-18 22:09:04.0
>com.hxtt.sql.dbf.DBFDriver cannot be cast to javax.sql.DataSource
Try com.hxtt.sql.HxttDataSource .
Re:Re:Re:Glassfish 3.1.2.2 and Entity Classes (JPA)
Jason E.
2012-09-19 07:58:40.0
Ok I've got that part working now I am having trouble with GeneratedValues:

Exception Description: SEQ_GEN_IDENTITY: platform DatabasePlatform does not support NativeSequence.

Could you post a simple example Entity Class? Thanks.
Re:Re:Re:Glassfish 3.1.2.2 and Entity Classes (JPA)
Jason E.
2012-09-19 08:40:33.0
I went ahead and changed the generationStrategy to AUTO and now I am getting the following errors:

WARNING: PER01000: Got SQLException executing statement "CREATE TABLE dtc.Subscriptions (id NUMBER(10) NOT NULL, emailAddress VARCHAR(50) NOT NULL, nightlyReport NUMBER(1) NOT NULL, qaAlarms NUMBER(1) NOT NULL, PRIMARY KEY (id))": java.sql.SQLException: Syntax error: Stopped parse at NUMBER(id131)

WARNING: PER01000: Got SQLException executing statement "CREATE TABLE SEQUENCE (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT NUMBER(19), PRIMARY KEY (SEQ_NAME))": java.sql.SQLException: Syntax error: Stopped parse at NUMBER(id131)

WARNING: PER01000: Got SQLException executing statement "INSERT INTO SEQUENCE(SEQ_NAME, SEQ_COUNT) values ('SEQ_GEN', 0)": java.sql.SQLException: Table C:\data\SEQUENCE.dbf doesn't exist.

First, It doesn't look like the driver knows what to do when the type NUMBER is used. Shouldn't the driver select something appropriate when given number? For example, id NUMBER(10) should clearly be an integer due to the size given and the fact that no precision is specified where as id NUMBER(10, 5) should use a double because of the precision specified. For the time being I can tell the driver which to use however this is incontinent and makes my code less portable to another database. Can this functionality be added?

Second, it looks like the driver does not support FoxPros built in auto increment strategy and instead must rely on a Table for id generation. It would be ideal if I could utilize FoxPro's auto-increment functionality. I can get around this by using a table however I would prefer to avoid this. Could you look into this? Thanks.
Re:Re:Re:Re:Re:Glassfish 3.1.2.2 and Entity Classes (JPA)
Jason E.
2012-09-20 15:21:31.0
Any news on this issue?
Re:Glassfish 3.1.2.2 and Entity Classes (JPA)
Jason E.
2012-10-15 08:26:14.0
Any updates? We are eagerly awaiting these fixes / features. Thanks.
Re:Glassfish 3.1.2.2 and Entity Classes (JPA)
Jason E.
2012-10-15 14:12:03.0
Something else I just noticed, is if you do not set a column length in the definition, the driver does not use the default of 255.

@Id
@Column(name = "ID", columnDefinition = "INTEGER NOT NULL", nullable = false)
private Integer id;
@JoinColumn(name = "STATNAME", referencedColumnName = "STATNAME", nullable = false)
@ManyToOne(optional = false)
private Station stationRef;
@Basic(optional = false)
@Column(name = "PROPNAME", nullable = false)
private String propName;
@Basic(optional = false)
@Column(name = "PROPVALUE", nullable = false, length = 1024)
private String propValue;
@Basic(optional = false)
@Column(name = "VALUEDESC", nullable = false, length = 1024)
private String description;

WARNING: PER01000: Got SQLException executing statement "CREATE TABLE STATIONCONFIG (ID INTEGER NOT NULL, VALUEDESC VARCHAR(1024) NOT NULL, PROPNAME VARCHAR NOT NULL, PROPVALUE VARCHAR(1024) NOT NULL, STATNAME VARCHAR(255) NOT NULL, PRIMARY KEY (ID))": java.sql.SQLException: Syntax error: Stopped parse at NOT(id65)
Re:Re:Re:Re:Re:Re:Re:Re:Glassfish 3.1.2.2 and Entity Classes (JPA)
HXTT Support
2012-10-19 17:06:02.0
Sorry for missed that thread for mailbox issue. We will check it soon.
Re:Re:Re:Re:Re:Re:Re:Re:Glassfish 3.1.2.2 and Entity Classes (JPA)
HXTT Support
2012-10-20 03:32:25.0
>WARNING: PER01000: Got SQLException executing statement "CREATE TABLE
>dtc.Subscriptions (id NUMBER(10) NOT NULL, emailAddress VARCHAR(50) NOT NULL,
> nightlyReport NUMBER(1) NOT NULL, qaAlarms NUMBER(1) NOT NULL, PRIMARY KEY
> (id))": java.sql.SQLException: Syntax error: Stopped parse at NUMBER(id131)
INT, DOUBLE, NUMERIC(10,5), DECIMAL(10,5), and other standard number are provided.

>First, It doesn't look like the driver knows what to do when the type NUMBER is
> used. Shouldn't the driver select something appropriate when given number?
NUMBER is not standard data type, but Oracle is using it, and we will provide it in 24 hours.
Re:Re:Re:Re:Re:Re:Re:Re:Glassfish 3.1.2.2 and Entity Classes (JPA)
HXTT Support
2012-10-20 04:05:29.0
>Second, it looks like the driver does not support FoxPros built in auto increment
> strategy and instead must rely on a Table for id generation. It would be ideal
> if I could utilize FoxPro's auto-increment functionality. I can get around this
> by using a table however I would prefer to avoid this.
It supports AUTO_INCREMENT. The correct sql syntax should be:
CREATE TABLE dtc.Subscriptions (id NUMBER(10) AUTO_INCREMENT , emailAddress VARCHAR(50) NOT NULL, nightlyReport NUMBER(1) NOT NULL, qaAlarms NUMBER(1) NOT NULL, PRIMARY KEY (id))
Re:Re:Re:Re:Re:Re:Re:Re:Glassfish 3.1.2.2 and Entity Classes (JPA)
HXTT Support
2012-10-20 04:10:14.0
>Something else I just noticed, is if you do not set a column length in the definition, the driver does not use the default of 255.
>PROPNAME VARCHAR NOT NULL
Yeah. It will be supported soon too.
Re:Re:Re:Re:Re:Re:Re:Re:Glassfish 3.1.2.2 and Entity Classes (JPA)
HXTT Support
2012-10-20 07:42:32.0
Supported those syntax now. Please download it.
Re:Re:Re:Re:Re:Re:Re:Re:Glassfish 3.1.2.2 and Entity Classes (JPA)
Jason E.
2012-10-22 14:31:11.0
Where can I download this new release? The download page and changelog is showing that it was last updated on 9-04-2012. Is this because our support ran out on 9-13-2012? Thanks. Also let me provide the Glassfish error when @AutoGenerate is enabled.
Re:Re:Re:Re:Re:Re:Re:Re:Glassfish 3.1.2.2 and Entity Classes (JPA)
HXTT Support
2012-10-22 17:15:23.0
>Is this because our support ran out on 9-13-2012?
Yeah. I have changed it so that you can download it. Please consider renewing your license to get continuous support and latest version.

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