EclipseLink causing problems...

I have been using Eclipselink for some time now, but today it started causing problems for me. I am attempting to incorporate the LazyQueryContainer into my program and failing miserably, but that seems to be because I’m using Java 6 instead of Java 7 (that is another thread discussion). At home, I was trying to get the container working with an all Java 7 environment, but now Eclipselink appears to fail before it even gets to the container. I hope someone can help me with this - I’m way outside my area of expertise here…

The situation is this - I have a database table that I am trying to load, and Eclipselink started telling me that one of the fields is missing. But it is in the table

Here is the table definition and the code used to read it:


--
-- Table structure for table `interface_detail`
--

DROP TABLE IF EXISTS `interface_detail`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `interface_detail` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `asset_member_id` int(11) DEFAULT NULL,
  `interface_type` int(11) DEFAULT NULL,
  `admin_status` varchar(32) COLLATE latin1_general_cs DEFAULT NULL,
  `link_speed` int(11) DEFAULT NULL,
  `mac_address` varchar(32) COLLATE latin1_general_cs DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `ki_asset_member_id` (`asset_member_id`),
  CONSTRAINT `ki_asset_member_id` FOREIGN KEY (`asset_member_id`) REFERENCES `asset_member` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=460111 DEFAULT CHARSET=latin1 COLLATE=latin1_general_cs;
/*!40101 SET character_set_client = @saved_cs_client */;


        List<InterfaceDetail> l_Interface_Detail = null;

        em = getEntityManager();
	Query q = em.createQuery("select idet from InterfaceDetail as idet");
	l_Interface_Detail = q.getResultList();
	em.close();

        return(l_Interface_Detail);

Here is my persistence.xml file. I’ve changed some pathnames and removed some extraneous classes…


<persistence-unit name="JART_DB_Lib" transaction-type="RESOURCE_LOCAL">
		<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
		<class>com.verisign.jart.common.dm.HostInfo</class>
		<class>com.verisign.jart.common.dm.InterfaceDetail</class>
		...
		<class>com.verisign.jart.common.dm.User</class>
		<properties>
			<property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver" />
			<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/mydatabase" />
			<property name="javax.persistence.jdbc.user"   value="username" />
			<property name="javax.persistence.jdbc.password" value="mypassword" />
			<property name="eclipselink.logging.file" value="/tmp/eclipselink.log"/>
			<property name="eclipselink.logging.logger" value="JavaLogger"/>
			<property name="eclipselink.logging.level" value="FINEST"/>
			<property name="eclipselink.logging.level.sql" value="FINEST"/>
			<property name="eclipselink.logging.parameters" value="true"/>
		</properties>
	</persistence-unit>

With the debugging, I see that eclipselink is changing the field names from lower case to upper case on other database tables - like this:


CONFIG: The column name for element [id]
 is being defaulted to: ID.

But not for this table. The error I see is this:


Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'interface_type' in 'field list'
Error Code: 1054
Call: SELECT id, admin_status, interface_type, link_speed, mac_address, asset_member_id FROM interface_detail
Query: ReadAllQuery(referenceClass=InterfaceDetail sql="SELECT id, admin_status, interface_type, link_speed, mac_address, asset_member_id FROM interface_detail")

If I copy the select statement from the log file (SELECT id, admin_status, interface_type…) and run it on the command line, it returns 400k valid records. So the data is there
and the field names are valid. But it looks like Eclipselink thinks they should be upper case, and they are not.

I really hope someone can clue me in here. I’m not sure where to look at this point… Any help or pointers would be greatly appreciated.

Thanks in advance

nbc

IGNORE THIS QUESTION - Problem solved. Too much time staring at it - could not see the forest for the trees. Turned out to be a typo…

Sorry about that…

nbc