Please use the Apache issue tracking system for new NetBeans issues ( !!

Bug 59875

Summary: Deployment problem with PostgreSQL
Product: db Reporter: gspathoulas <gspathoulas>
Component: CodeAssignee: Andrei Badea <abadea>
Status: RESOLVED INVALID QA Contact: issues <>
Priority: P1 CC: raccah
Version: 4.x   
Target Milestone: 4.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Report:

Description gspathoulas 2005-06-11 14:29:27 UTC
I am developing an enterprise application which consists of a PostreSQL
database, an entity bean, a session bean, and a servlet. I try to follow the
guide "NetBeans IDE 4.1 Quick Start Guide for Enterprise Applications". During
the deployment of the application I get the following message:

Deploying application in domain  failed; Fatal Error from EJB Compiler --
JDO74025: JDOCodeGenerator: Caught an Exception validating CMP bean
'CustomersBean' in application 'driverexperiment' module
'driverexperiment-EJBModule': JDO72335: If the table customers for the bean
corresponding to the generated class ejb.CustomersBean154215118_JDOState is
mapped as the primary table, it must have a primary key.
Choose a different primary table or verify that the contents of the schema file
are correct.; requested operation cannot be completed

Is this a problem with the JDBC drivers for MySQL and PostgreSQL. I have tried
all the possible drivers for PostgreSQL. Could you please provide me with a
solution to this problem?
Comment 1 Andrei Badea 2005-06-13 07:40:59 UTC
I think this message says that you should have a primary key in your customers
table. Do you have one? If you are very sure you do, it may be possible that for
some reason the database description doesn't contain the primary key definition.
In the src/conf directory your EJB module project there is a .dbschema file.
Could you please attach this file to the issue? Also please state which version
of PostgreSQL and driver you are using.
Comment 2 Andrei Badea 2005-06-13 09:39:12 UTC
I've just checked out the .dbschema file generation from a PostgreSQL database.
It seems to me the primary key definition is present in the dbschema file. I
used PostgreSQL 7.4 and the JDBC driver pg74.1jdbc3.jar.
Comment 3 Petr Blaha 2005-06-13 10:34:13 UTC
I tested generation of CMP bean from table that includes PK. I could confirm
that correct dbschema was created. Then the deployment and creation of beans on
Sun Application server 8.1 was also OK.
I used folowing configuration:
 - Postgres: 7.4.2
 - JDBC driver: postgresql-8.1dev-400.jdbc3.jar

  JDBC connection pool setup:
 - DataSource class name: org.postgresql.jdbc3.Jdbc3ConnectionPool
 - javax.sql.ConnectionPoolDataSource

I think that could be useful to attach DDL statement as well. 
Comment 4 gspathoulas 2005-06-14 00:46:24 UTC
I use PostgreSQL 8.0. I have tried all possible drivers from 7.2 and forward.
Is it possible that the problem is with PostgreSQL server?

I will give it a shot with PostgreSQL 7.4

Comment 5 Andrei Badea 2005-07-11 13:53:23 UTC
gspathoulas, did you try Postgres 7.4? Any luck? Did the bug persist? By the
way, to answer your question: in my opinion it's very unlikely that this is a
problem with the server itself. 
Comment 6 Andrei Badea 2005-08-08 09:26:06 UTC
No response from the submitter for a long time and no details/steps how to
reproduce, so closing. Please reopen with more details if necessary.
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo