This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 59875 - Deployment problem with PostgreSQL
Summary: Deployment problem with PostgreSQL
Status: RESOLVED INVALID
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 4.x
Hardware: PC Windows XP
: P1 blocker (vote)
Assignee: Andrei Badea
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-11 14:29 UTC by gspathoulas
Modified: 2005-08-08 09:40 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gspathoulas 2005-06-11 14:29:27 UTC
Hello,
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
Hi,
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.