Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » (eclipse helios,mandriva) Schema "dbo" cannot be resolved for table "t_address"(automatic generation of tables => error near @table annotation)
(eclipse helios,mandriva) Schema "dbo" cannot be resolved for table "t_address" [message #666017] Mon, 18 April 2011 16:09 Go to next message
SAINT-EVE Missing name is currently offline SAINT-EVE Missing name
Messages: 16
Registered: July 2009
Junior Member
hello,

I'm using eclipse helios on mandriva 2010.2 with SQL Anywhere.
I created a JPA project (with an EJB project aimed at manage the JPA project on a JBOSS server but it's not really the matter now).

there are many entities and this persistence.xml :

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
	<persistence-unit name="jpa_soho_2">
		<jta-data-source>java:SybaseDB</jta-data-source>
		<class>entities.Address</class>
		<class>entities.Category</class>
		<class>entities.CreditCard</class>
		<class>entities.Customer</class>
		<class>entities.Item</class>
		<class>entities.Order</class>
		<class>entities.OrderLine</class>
		<class>entities.Product</class>
		<class>entities.ValidationException</class>
		<properties>
			<property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>
			<property name="eclipselink.ddl-generation.output-mode" value="database"/>
			<property name="eclipselink.orm.validate.schema" value="false"/>
			<property name="eclipselink.target-database" value="Sybase"/>
			<property name="eclipselink.target-server" value="JBoss"/>
		</properties>
	</persistence-unit>
</persistence>


and here is the DS file (on JBOSS):

<?xml version="1.0" encoding="UTF-8"?>

<!-- ===================================================================== -->
<!--                                                                       -->
<!--  JBoss Server Configuration                                           -->
<!--                                                                       -->
<!-- New ConnectionManager setup for Sybase ASE/ASA jConnect driver        -->
<!-- Thanks to Marc Zampetti <zampetti@aol.net>                            -->
<!-- This is a minimal example.  See the generic example for other stuff   -->
<!-- ===================================================================== -->

<!-- $Id: sybase-ds.xml 23720 2004-09-15 14:37:40Z loubyansky $ -->


<datasources>
  <local-tx-datasource>
    <jndi-name>jdbc/SybaseDB</jndi-name>
    <!-- Sybase jConnect URL for the database. 
    NOTE: The hostname and port are made up values. The optional
          database name is provided, as well as some additinal Driver
          parameters.
    -->
    <connection-url>jdbc:sybase:Tds:localhost:2638/DB_numberOne_db?JCONNECT_VERSION=6</connection-url>
    <driver-class>com.sybase.jdbc2.jdbc.SybDataSource</driver-class>
    <user-name>olivier_DBA</user-name>
    <password>olivier</password>
    <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.SybaseExceptionSorter</exception-sorter-class-name>
        <!-- sql to call when connection is created
        <new-connection-sql>some arbitrary sql</new-connection-sql>
        -->

        <!-- sql to call on an existing pooled connection when it is obtained from pool 
        <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
        -->

      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
      <metadata>
         <type-mapping>Sybase</type-mapping>
      </metadata>
  </local-tx-datasource>

</datasources>


Eclipse allows me to create the tables from the entities, but when I do so I've got these errors near the annotation @table (of each entity) :

Quote:

Schema "dbo" cannot be resolved for table "t_address"



I really don't know how to find the answer.

can you help me?


Re: (eclipse helios,mandriva) Schema "dbo" cannot be resolved for table "t_address&qu [message #666067 is a reply to message #666017] Mon, 18 April 2011 21:04 Go to previous messageGo to next message
Neil Hauge is currently offline Neil Hauge
Messages: 469
Registered: July 2009
Senior Member
First try re-validating the project by right-clicking on the project and selecting "Validate". This will ensure that the validation isn't stale as sometimes the project won't be correctly validated after generating tables due to a Dali bug.

If that doesn't work, go to the project properties and override the default catalog and schema as necessary to match you DB connection (this is necessary if our built-in defaults are not able to resolve). After making these changes the project should re-validate and may resolve your issues.

Let me know if this doesn't resolve your validation issue.

Neil
Re: (eclipse helios,mandriva) Schema "dbo" cannot be resolved for table "t_address&am [message #666273 is a reply to message #666067] Tue, 19 April 2011 17:01 Go to previous message
SAINT-EVE Missing name is currently offline SAINT-EVE Missing name
Messages: 16
Registered: July 2009
Junior Member
hello neil,

I'm disappointed.
I do what you said( I mean validate the project), and the first time it was working.

but I made some changed and now it's no longer working.

now, the tables are finely generated, but I still have got these errors.
and in the properties the items 'override default schema' and 'override default catalog" are checkable, but the comboboxes still remain unselectables.

so I am stuck.

PS: thank you for your answer!
waiting for a new one!

Previous Topic:Separate project trouble
Next Topic:dbws pl/sql with custom schema
Goto Forum:
  


Current Time: Sun Oct 26 00:23:40 GMT 2014

Powered by FUDForum. Page generated in 0.08591 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software