Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » Error: Schema "MARCOS" cannot be resolved for table "GE_FUNCIONARIOS"
Error: Schema "MARCOS" cannot be resolved for table "GE_FUNCIONARIOS" [message #434451] Fri, 08 June 2007 14:23 Go to next message
Marcos is currently offline MarcosFriend
Messages: 68
Registered: July 2009
Member
- Eclipse 3.3RC2 (Build id: I20070525-1350)
- WTP 2.0RC2 (complete)
- Java 5 Update 11
- JBoss 4.2.0GA

Hello, everybody!
I'm getting the following error at design time in an EJB 3.0 project:

Schema "MARCOS" cannot be resolved for table "GE_FUNCIONARIOS"

===========================================================

This table, GE_FUNCIONARIOS, exists in my database. This is the content of
my
persistence.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.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_1_0.xsd">
<persistence-unit name="laboratorio-informatica">
<provider>org.hibernate.ejb.HibernatePersistence</provider >
<jta-data-source>java:/LaboratorioInformaticaDS</jta-data-source >
<class>br.urca.www.laboratorioinformatica.entidade.Funcionario </class>
<!-- other classes -->
<properties>
<property name="hibernate.dialect"
value="org.hibernate.dialect.HSQLDialect" />
<property name="hibernate.hbm2ddl.auto" value="create-drop" />
</properties>
</persistence-unit>
</persistence>

===========================================================

And this is the configuration of the datasource referenced in the element
<jta-data-source> in the file
C:\jboss-4.2.0.GA\server\default\deploy\laboratorio-informat ica-ds.xml:

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

<!-- $Id: mssql-ds.xml 61002 2007-02-28 16:13:00Z weston.price@jboss.com $
-->

<datasources>
<local-tx-datasource>
<jndi-name>LaboratorioInformaticaDS</jndi-name>

<connection-url>jdbc:sqlserver://SERVDEG;databaseName=DBTESEUS</connection-url>

<driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class >
<user-name>MARCOS</user-name>
<password><!-- there's a valid password here --></password>

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

</datasources>

This datasource configuration is valid as the server doesn't report any
problem
about it when it is started.

===========================================================

This is my mapped class:

package br.urca.www.laboratorioinformatica.entidade;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "GE_FUNCIONARIOS") // Error message is here
public class Funcionario
{
private String fMatricula;

@Id
@Column(name = "MATRICULA")
public String getMatricula()
{
return fMatricula;
}

public void setMatricula(String matricula)
{
fMatricula = matricula;
}
}

===========================================================

So, I would like to know what I'm doing wrong to get this error and how
I solve it.

Thank you.

Marcos
Re: Error: Schema "MARCOS" cannot be resolved for table "GE_FUNCIONARIOS" [message #434452 is a reply to message #434451] Fri, 08 June 2007 19:40 Go to previous messageGo to next message
Neil Hauge is currently offline Neil HaugeFriend
Messages: 475
Registered: July 2009
Senior Member
Hi Marcos,

The JPA Tooling uses the chosen DTP connection to determine what is valid
in your Entities. It looks like MARCOS is the user name of your
connection and therefore the default schema. Are you able to browse this
schema in the Data Source Explorer?

Also, click on the Schema combo box in the Entity UI in the JPA Details
View and see if there are other schema choices displayed.

Neil


Marcos wrote:

> - Eclipse 3.3RC2 (Build id: I20070525-1350)
> - WTP 2.0RC2 (complete)
> - Java 5 Update 11
> - JBoss 4.2.0GA

> Hello, everybody!
> I'm getting the following error at design time in an EJB 3.0 project:

> Schema "MARCOS" cannot be resolved for table "GE_FUNCIONARIOS"

> ===========================================================

> This table, GE_FUNCIONARIOS, exists in my database. This is the content of
> my
> persistence.xml file:

> <?xml version="1.0" encoding="UTF-8"?>
> <persistence version="1.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_1_0.xsd">
> <persistence-unit name="laboratorio-informatica">
> <provider>org.hibernate.ejb.HibernatePersistence</provider >
> <jta-data-source>java:/LaboratorioInformaticaDS</jta-data-source >
> <class>br.urca.www.laboratorioinformatica.entidade.Funcionario </class>
> <!-- other classes -->
> <properties>
> <property name="hibernate.dialect"
> value="org.hibernate.dialect.HSQLDialect" />
> <property name="hibernate.hbm2ddl.auto" value="create-drop" />
> </properties>
> </persistence-unit>
> </persistence>

> ===========================================================

> And this is the configuration of the datasource referenced in the element
> <jta-data-source> in the file
> C:jboss-4.2.0.GAserverdefaultdeploylaboratorio-informatica-d s.xml:

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

> <!-- $Id: mssql-ds.xml 61002 2007-02-28 16:13:00Z weston.price@jboss.com $
> -->

> <datasources>
> <local-tx-datasource>
> <jndi-name>LaboratorioInformaticaDS</jndi-name>

>
<connection-url>jdbc:sqlserver://SERVDEG;databaseName=DBTESEUS</connection-url>

> <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class >
> <user-name>MARCOS</user-name>
> <password><!-- there's a valid password here --></password>

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

> </datasources>

> This datasource configuration is valid as the server doesn't report any
> problem
> about it when it is started.

> ===========================================================

> This is my mapped class:

> package br.urca.www.laboratorioinformatica.entidade;

> import javax.persistence.Column;
> import javax.persistence.Entity;
> import javax.persistence.Id;
> import javax.persistence.Table;

> @Entity
> @Table(name = "GE_FUNCIONARIOS") // Error message is here
> public class Funcionario
> {
> private String fMatricula;

> @Id
> @Column(name = "MATRICULA")
> public String getMatricula()
> {
> return fMatricula;
> }

> public void setMatricula(String matricula)
> {
> fMatricula = matricula;
> }
> }

> ===========================================================

> So, I would like to know what I'm doing wrong to get this error and how
> I solve it.

> Thank you.

> Marcos
Re: Error: Schema "MARCOS" cannot be resolved for table "GE_FUNCIONARIOS" [message #434455 is a reply to message #434452] Mon, 11 June 2007 13:35 Go to previous messageGo to next message
Marcos is currently offline MarcosFriend
Messages: 68
Registered: July 2009
Member
Hello, Neil!

> It looks like MARCOS is the user name of your connection and therefore the
default schema.

Yes, MARCOS is the user name of my connection. I just didn't know that
would be
the name of the default schema. Here is my connection settings:

Database.: DBTESEUS
URL......: jdbc:sqlserver://SERVDEG;databaseName=DBTESEUS
User name: MARCOS
Password.: ---

> Are you able to browse this schema in the Data Source Explorer?

Yes, and it is connected there. The Data Source Explorer shows:

Databases -> SQL Server (Microsoft SQL Server v. 8.0.2039) -> DBTESEUS ->
Catalogs -> DBTeseus -> Schemas

There are other Catalogs too other than DBTeseus, but there's nothing
under Schemas.

> Also, click on the Schema combo box in the Entity UI in the JPA Details View
> and see if there are other schema choices displayed.

I have to say that the project where are my entities is not a JPA Project,
but
an EJB Project. But I choose to the JPA Development perspective and there's
nothing in the JPA Details View, only the message
"Details are not available for the current selection", even though I'm
with the
entity Funcionario selected in the Package Explorer and in the editor.
However,
the entity is listed in the JPA Structure, but when I click on it I get a
dialog
with this error message:

An error has ocurred. See error log for more details.

Reason:
java.util.NoSuchElementException

and the .log file reports this for the error:

!ENTRY org.eclipse.jface 4 2 2007-06-11 10:23:48.468
!MESSAGE Problems occurred when invoking code from plug-in:
"org.eclipse.jface".
!STACK 0
java.util.NoSuchElementException
at
org.eclipse.jpt.db.internal.DTPDatabaseWrapper.getDefaultCat alogName(DTPDatabaseWrapper.java:197)
at
org.eclipse.jpt.ui.internal.mappings.details.CatalogCombo.po pulateDefaultCatalogName(CatalogCombo.java:243)
at
org.eclipse.jpt.ui.internal.mappings.details.CatalogCombo.po pulateCatalogCombo(CatalogCombo.java:223)
at
org.eclipse.jpt.ui.internal.mappings.details.CatalogCombo.do Populate(CatalogCombo.java:197)
at
org.eclipse.jpt.ui.internal.details.BaseJpaController.popula te(BaseJpaController.java:69)
at
org.eclipse.jpt.ui.internal.mappings.details.TableComposite. doPopulate(TableComposite.java:111)
at
org.eclipse.jpt.ui.internal.details.BaseJpaController.popula te(BaseJpaController.java:69)
at
org.eclipse.jpt.ui.internal.mappings.details.EntityComposite .doPopulate(EntityComposite.java:185)
at
org.eclipse.jpt.ui.internal.details.BaseJpaController.popula te(BaseJpaController.java:69)
at
org.eclipse.jpt.ui.internal.details.PersistentTypeDetailsPag e.populateMappingPage(PersistentTypeDetailsPage.java:223)
at
org.eclipse.jpt.ui.internal.details.PersistentTypeDetailsPag e.populateMappingComboAndPage(PersistentTypeDetailsPage.java :216)
at
org.eclipse.jpt.ui.internal.details.PersistentTypeDetailsPag e.doPopulate(PersistentTypeDetailsPage.java:179)
at
org.eclipse.jpt.ui.internal.details.BaseJpaDetailsPage.doPop ulate(BaseJpaDetailsPage.java:52)
at
org.eclipse.jpt.ui.internal.details.BaseJpaController.popula te(BaseJpaController.java:69)
at
org.eclipse.jpt.ui.internal.details.BaseJpaDetailsPage.popul ate(BaseJpaDetailsPage.java:47)
at
org.eclipse.jpt.ui.internal.views.JpaDetailsView.setCurrentP age(JpaDetailsView.java:135)
at
org.eclipse.jpt.ui.internal.views.JpaDetailsView.select(JpaD etailsView.java:60)
at
org.eclipse.jpt.ui.internal.selection.JpaDetailsSelectionPar ticipant.selectionChanged(JpaDetailsSelectionParticipant.jav a:31)
at
org.eclipse.jpt.ui.internal.selection.SelectionManager.fireS electionChange(SelectionManager.java:178)
at
org.eclipse.jpt.ui.internal.selection.SelectionManager.selec t(SelectionManager.java:157)
at
org.eclipse.jpt.ui.internal.selection.JpaStructureSelectionP articipant$StructureViewSelectionListener.selectionChanged(J paStructureSelectionParticipant.java:53)
at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:850)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:46)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:19 3)
at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer .java:160)
at
org.eclipse.jface.viewers.StructuredViewer.updateSelection(S tructuredViewer.java:2044)
at
org.eclipse.jface.viewers.StructuredViewer.handleSelect(Stru cturedViewer.java:1138)
at
org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected( StructuredViewer.java:1168)
at
org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenS trategy.java:227)
at org.eclipse.jface.util.OpenStrategy.access$3(OpenStrategy.ja va:221)
at
org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrate gy.java:388)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3293)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:106)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:153)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:363)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 504)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
at org.eclipse.equinox.launcher.Main.run(Main.java:1169)

I would like to have your help to solve this problem
(the error Schema "MARCOS" cannot be resolved for table "GE_FUNCIONARIOS")
as I'm stuck with it and unable to proceed. It seems like a simple
problem, but
the solution is getting hard to appear. Another user advised me to create
an
orm.xml file with this content:

<?xml version="1.0" encoding="UTF-8"?>
<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm
http://java.sun.com/xml/ns/persistence/orm_1_0.xsd" version="1.0">

<persistence-unit-metadata>
<persistence-unit-defaults>
<schema>MARCOS</schema>
</persistence-unit-defaults>
</persistence-unit-metadata>

</entity-mappings>

but it also didn't help. The error message didn't disappear.

Thank you very much.

Marcos
Re: Error: Schema "MARCOS" cannot be resolved for table "GE_FUNCIONARIOS" [message #434456 is a reply to message #434455] Mon, 11 June 2007 20:43 Go to previous messageGo to next message
Neil Hauge is currently offline Neil HaugeFriend
Messages: 475
Registered: July 2009
Senior Member
>> Are you able to browse this schema in the Data Source Explorer?

> Yes, and it is connected there. The Data Source Explorer shows:

> Databases -> SQL Server (Microsoft SQL Server v. 8.0.2039) -> DBTESEUS ->
> Catalogs -> DBTeseus -> Schemas

> There are other Catalogs too other than DBTeseus, but there's nothing
> under Schemas.

You say there is nothing under Schemas. Are you able to browse the Tables
you are interested in mapping in the Data Source Explorer? I just want to
make sure I understand what you are seeing. It is possible that the DTP
component isn't functioning correctly for some reason.

Neil
Re: Error: Schema "MARCOS" cannot be resolved for table "GE_FUNCIONARIOS" [message #434459 is a reply to message #434456] Tue, 12 June 2007 11:16 Go to previous messageGo to next message
Marcos is currently offline MarcosFriend
Messages: 68
Registered: July 2009
Member
Neil Hauge wrote:

> You say there is nothing under Schemas. Are you able to browse the Tables
> you are interested in mapping in the Data Source Explorer? I just want to
> make sure I understand what you are seeing. It is possible that the DTP
> component isn't functioning correctly for some reason.

> Neil

Hello, Neil!

Yes, in my last reply there was nothing under Schemas, but for some reason
there are now. I can see now many schemas (user names) listed there,
inclusive the "MARCOS" schema, but there is nothing in the schema folders
of the "MARCOS" schema (the same with the other schema folders). I mean
that the Tables folder under the schema folder has nothing. There are not
tables there. The same happens with the Dependencies, Stored Procedures,
User-Defined Functions and Views folders. Do you know the reason why it's
happaning and what I can do to make the tables appear?

Thank you.

Marcos
Re: Error: Schema "MARCOS" cannot be resolved for table "GE_FUNCIONARIOS" [message #434461 is a reply to message #434459] Tue, 12 June 2007 13:44 Go to previous messageGo to next message
Neil Hauge is currently offline Neil HaugeFriend
Messages: 475
Registered: July 2009
Senior Member
Marcos,

You should take this thread over to the eclipse.dtp newsgroup so we can
get to the root of the issue. I am unable to cross post it from here, but
I recommend you take the information that we have gathered here and post
to eclipse.dtp with this information and ask for help. You can cross post
to the dali newsgroup as well. The DTP group won't be able to help you
with Dali specific problems, but can better help you specific database
metadata related issues it seems you are having.

Hope this helps,
Neil



Marcos wrote:

> Neil Hauge wrote:

>> You say there is nothing under Schemas. Are you able to browse the Tables
>> you are interested in mapping in the Data Source Explorer? I just want to
>> make sure I understand what you are seeing. It is possible that the DTP
>> component isn't functioning correctly for some reason.

>> Neil

> Hello, Neil!

> Yes, in my last reply there was nothing under Schemas, but for some reason
> there are now. I can see now many schemas (user names) listed there,
> inclusive the "MARCOS" schema, but there is nothing in the schema folders
> of the "MARCOS" schema (the same with the other schema folders). I mean
> that the Tables folder under the schema folder has nothing. There are not
> tables there. The same happens with the Dependencies, Stored Procedures,
> User-Defined Functions and Views folders. Do you know the reason why it's
> happaning and what I can do to make the tables appear?

> Thank you.

> Marcos
Re: Error: Schema "MARCOS" cannot be resolved for table "GE_FUNCIONARIOS" [message #434462 is a reply to message #434461] Tue, 12 June 2007 13:51 Go to previous messageGo to next message
Marcos is currently offline MarcosFriend
Messages: 68
Registered: July 2009
Member
Neil Hauge wrote:

> Marcos,

> You should take this thread over to the eclipse.dtp newsgroup so we can
> get to the root of the issue. I am unable to cross post it from here, but
> I recommend you take the information that we have gathered here and post
> to eclipse.dtp with this information and ask for help. You can cross post
> to the dali newsgroup as well. The DTP group won't be able to help you
> with Dali specific problems, but can better help you specific database
> metadata related issues it seems you are having.

> Hope this helps,
> Neil

Hello, Neil!
Yesterday I have already posted this issue in the DTP newsgroup.

http://www.eclipse.org/newsportal/article.php?id=724&gro up=eclipse.dtp#724

I just hope that I got some answer from there because this is very
important to me. Everything is working well, just this is getting in the
way and I can't proceed with my project until there's a solution to this.

Thank you very much.

Marcos
Re: Error: Schema "MARCOS" cannot be resolved for table "GE_FUNCIONARIOS" [message #434478 is a reply to message #434462] Thu, 14 June 2007 21:04 Go to previous messageGo to next message
Neil Hauge is currently offline Neil HaugeFriend
Messages: 475
Registered: July 2009
Senior Member
Marcos,

RC3 is now available, so you may want to try to see if your issues have
been resolved with changes to Dali and DTP. We have made some changes on
the Dali side that might help your situation, but since you still can't
browse tables in the DS Explorer, I doubt that Dali is going to be able to
see them.

Neil
Re: Error: Schema "MARCOS" cannot be resolved for table "GE_FUNCIONARIOS" [message #434482 is a reply to message #434478] Fri, 15 June 2007 12:41 Go to previous message
Marcos is currently offline MarcosFriend
Messages: 68
Registered: July 2009
Member
Hello, Neil!
I have just upgraded to RC3 and unfortunately I still can't browse the
tables in the Data Source Explorer view. It's almost clear now that the
problem is not related with Dali, but with DTP or something that I'm doing
wrong or driver related, I don't know. I have a post in the DTP newsgroup
about this issue:

http://www.eclipse.org/newsportal/article.php?id=724&gro up=eclipse.dtp#724

but until now I haven't got any answer from there.

Thank you, Neil.

Marcos

Neil Hauge wrote:

> Marcos,

> RC3 is now available, so you may want to try to see if your issues have
> been resolved with changes to Dali and DTP. We have made some changes on
> the Dali side that might help your situation, but since you still can't
> browse tables in the DS Explorer, I doubt that Dali is going to be able to
> see them.

> Neil
Re: Error: Schema "MARCOS" cannot be resolved for table "GE_FUNCIONARIOS" [message #599517 is a reply to message #434451] Fri, 08 June 2007 19:40 Go to previous message
Neil Hauge is currently offline Neil HaugeFriend
Messages: 475
Registered: July 2009
Senior Member
Hi Marcos,

The JPA Tooling uses the chosen DTP connection to determine what is valid
in your Entities. It looks like MARCOS is the user name of your
connection and therefore the default schema. Are you able to browse this
schema in the Data Source Explorer?

Also, click on the Schema combo box in the Entity UI in the JPA Details
View and see if there are other schema choices displayed.

Neil


Marcos wrote:

> - Eclipse 3.3RC2 (Build id: I20070525-1350)
> - WTP 2.0RC2 (complete)
> - Java 5 Update 11
> - JBoss 4.2.0GA

> Hello, everybody!
> I'm getting the following error at design time in an EJB 3.0 project:

> Schema "MARCOS" cannot be resolved for table "GE_FUNCIONARIOS"

> ===========================================================

> This table, GE_FUNCIONARIOS, exists in my database. This is the content of
> my
> persistence.xml file:

> <?xml version="1.0" encoding="UTF-8"?>
> <persistence version="1.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_1_0.xsd">
> <persistence-unit name="laboratorio-informatica">
> <provider>org.hibernate.ejb.HibernatePersistence</provider >
> <jta-data-source>java:/LaboratorioInformaticaDS</jta-data-source >
> <class>br.urca.www.laboratorioinformatica.entidade.Funcionario </class>
> <!-- other classes -->
> <properties>
> <property name="hibernate.dialect"
> value="org.hibernate.dialect.HSQLDialect" />
> <property name="hibernate.hbm2ddl.auto" value="create-drop" />
> </properties>
> </persistence-unit>
> </persistence>

> ===========================================================

> And this is the configuration of the datasource referenced in the element
> <jta-data-source> in the file
> C:jboss-4.2.0.GAserverdefaultdeploylaboratorio-informatica-d s.xml:

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

> <!-- $Id: mssql-ds.xml 61002 2007-02-28 16:13:00Z weston.price@jboss.com $
> -->

> <datasources>
> <local-tx-datasource>
> <jndi-name>LaboratorioInformaticaDS</jndi-name>

>
<connection-url>jdbc:sqlserver://SERVDEG;databaseName=DBTESEUS</connection-url>

> <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class >
> <user-name>MARCOS</user-name>
> <password><!-- there's a valid password here --></password>

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

> </datasources>

> This datasource configuration is valid as the server doesn't report any
> problem
> about it when it is started.

> ===========================================================

> This is my mapped class:

> package br.urca.www.laboratorioinformatica.entidade;

> import javax.persistence.Column;
> import javax.persistence.Entity;
> import javax.persistence.Id;
> import javax.persistence.Table;

> @Entity
> @Table(name = "GE_FUNCIONARIOS") // Error message is here
> public class Funcionario
> {
> private String fMatricula;

> @Id
> @Column(name = "MATRICULA")
> public String getMatricula()
> {
> return fMatricula;
> }

> public void setMatricula(String matricula)
> {
> fMatricula = matricula;
> }
> }

> ===========================================================

> So, I would like to know what I'm doing wrong to get this error and how
> I solve it.

> Thank you.

> Marcos
Re: Error: Schema "MARCOS" cannot be resolved for table "GE_FUNCIONARIOS" [message #599537 is a reply to message #434452] Mon, 11 June 2007 13:35 Go to previous message
Marcos is currently offline MarcosFriend
Messages: 68
Registered: July 2009
Member
Hello, Neil!

> It looks like MARCOS is the user name of your connection and therefore the
default schema.

Yes, MARCOS is the user name of my connection. I just didn't know that
would be
the name of the default schema. Here is my connection settings:

Database.: DBTESEUS
URL......: jdbc:sqlserver://SERVDEG;databaseName=DBTESEUS
User name: MARCOS
Password.: ---

> Are you able to browse this schema in the Data Source Explorer?

Yes, and it is connected there. The Data Source Explorer shows:

Databases -> SQL Server (Microsoft SQL Server v. 8.0.2039) -> DBTESEUS ->
Catalogs -> DBTeseus -> Schemas

There are other Catalogs too other than DBTeseus, but there's nothing
under Schemas.

> Also, click on the Schema combo box in the Entity UI in the JPA Details View
> and see if there are other schema choices displayed.

I have to say that the project where are my entities is not a JPA Project,
but
an EJB Project. But I choose to the JPA Development perspective and there's
nothing in the JPA Details View, only the message
"Details are not available for the current selection", even though I'm
with the
entity Funcionario selected in the Package Explorer and in the editor.
However,
the entity is listed in the JPA Structure, but when I click on it I get a
dialog
with this error message:

An error has ocurred. See error log for more details.

Reason:
java.util.NoSuchElementException

and the .log file reports this for the error:

!ENTRY org.eclipse.jface 4 2 2007-06-11 10:23:48.468
!MESSAGE Problems occurred when invoking code from plug-in:
"org.eclipse.jface".
!STACK 0
java.util.NoSuchElementException
at
org.eclipse.jpt.db.internal.DTPDatabaseWrapper.getDefaultCat alogName(DTPDatabaseWrapper.java:197)
at
org.eclipse.jpt.ui.internal.mappings.details.CatalogCombo.po pulateDefaultCatalogName(CatalogCombo.java:243)
at
org.eclipse.jpt.ui.internal.mappings.details.CatalogCombo.po pulateCatalogCombo(CatalogCombo.java:223)
at
org.eclipse.jpt.ui.internal.mappings.details.CatalogCombo.do Populate(CatalogCombo.java:197)
at
org.eclipse.jpt.ui.internal.details.BaseJpaController.popula te(BaseJpaController.java:69)
at
org.eclipse.jpt.ui.internal.mappings.details.TableComposite. doPopulate(TableComposite.java:111)
at
org.eclipse.jpt.ui.internal.details.BaseJpaController.popula te(BaseJpaController.java:69)
at
org.eclipse.jpt.ui.internal.mappings.details.EntityComposite .doPopulate(EntityComposite.java:185)
at
org.eclipse.jpt.ui.internal.details.BaseJpaController.popula te(BaseJpaController.java:69)
at
org.eclipse.jpt.ui.internal.details.PersistentTypeDetailsPag e.populateMappingPage(PersistentTypeDetailsPage.java:223)
at
org.eclipse.jpt.ui.internal.details.PersistentTypeDetailsPag e.populateMappingComboAndPage(PersistentTypeDetailsPage.java :216)
at
org.eclipse.jpt.ui.internal.details.PersistentTypeDetailsPag e.doPopulate(PersistentTypeDetailsPage.java:179)
at
org.eclipse.jpt.ui.internal.details.BaseJpaDetailsPage.doPop ulate(BaseJpaDetailsPage.java:52)
at
org.eclipse.jpt.ui.internal.details.BaseJpaController.popula te(BaseJpaController.java:69)
at
org.eclipse.jpt.ui.internal.details.BaseJpaDetailsPage.popul ate(BaseJpaDetailsPage.java:47)
at
org.eclipse.jpt.ui.internal.views.JpaDetailsView.setCurrentP age(JpaDetailsView.java:135)
at
org.eclipse.jpt.ui.internal.views.JpaDetailsView.select(JpaD etailsView.java:60)
at
org.eclipse.jpt.ui.internal.selection.JpaDetailsSelectionPar ticipant.selectionChanged(JpaDetailsSelectionParticipant.jav a:31)
at
org.eclipse.jpt.ui.internal.selection.SelectionManager.fireS electionChange(SelectionManager.java:178)
at
org.eclipse.jpt.ui.internal.selection.SelectionManager.selec t(SelectionManager.java:157)
at
org.eclipse.jpt.ui.internal.selection.JpaStructureSelectionP articipant$StructureViewSelectionListener.selectionChanged(J paStructureSelectionParticipant.java:53)
at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:850)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:46)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:19 3)
at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer .java:160)
at
org.eclipse.jface.viewers.StructuredViewer.updateSelection(S tructuredViewer.java:2044)
at
org.eclipse.jface.viewers.StructuredViewer.handleSelect(Stru cturedViewer.java:1138)
at
org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected( StructuredViewer.java:1168)
at
org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenS trategy.java:227)
at org.eclipse.jface.util.OpenStrategy.access$3(OpenStrategy.ja va:221)
at
org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrate gy.java:388)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3293)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:106)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:153)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:363)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 504)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
at org.eclipse.equinox.launcher.Main.run(Main.java:1169)

I would like to have your help to solve this problem
(the error Schema "MARCOS" cannot be resolved for table "GE_FUNCIONARIOS")
as I'm stuck with it and unable to proceed. It seems like a simple
problem, but
the solution is getting hard to appear. Another user advised me to create
an
orm.xml file with this content:

<?xml version="1.0" encoding="UTF-8"?>
<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm
http://java.sun.com/xml/ns/persistence/orm_1_0.xsd" version="1.0">

<persistence-unit-metadata>
<persistence-unit-defaults>
<schema>MARCOS</schema>
</persistence-unit-defaults>
</persistence-unit-metadata>

</entity-mappings>

but it also didn't help. The error message didn't disappear.

Thank you very much.

Marcos
Re: Error: Schema "MARCOS" cannot be resolved for table "GE_FUNCIONARIOS" [message #599540 is a reply to message #434455] Mon, 11 June 2007 20:43 Go to previous message
Neil Hauge is currently offline Neil HaugeFriend
Messages: 475
Registered: July 2009
Senior Member
>> Are you able to browse this schema in the Data Source Explorer?

> Yes, and it is connected there. The Data Source Explorer shows:

> Databases -> SQL Server (Microsoft SQL Server v. 8.0.2039) -> DBTESEUS ->
> Catalogs -> DBTeseus -> Schemas

> There are other Catalogs too other than DBTeseus, but there's nothing
> under Schemas.

You say there is nothing under Schemas. Are you able to browse the Tables
you are interested in mapping in the Data Source Explorer? I just want to
make sure I understand what you are seeing. It is possible that the DTP
component isn't functioning correctly for some reason.

Neil
Re: Error: Schema "MARCOS" cannot be resolved for table "GE_FUNCIONARIOS" [message #600034 is a reply to message #434456] Tue, 12 June 2007 11:16 Go to previous message
Marcos is currently offline MarcosFriend
Messages: 68
Registered: July 2009
Member
Neil Hauge wrote:

> You say there is nothing under Schemas. Are you able to browse the Tables
> you are interested in mapping in the Data Source Explorer? I just want to
> make sure I understand what you are seeing. It is possible that the DTP
> component isn't functioning correctly for some reason.

> Neil

Hello, Neil!

Yes, in my last reply there was nothing under Schemas, but for some reason
there are now. I can see now many schemas (user names) listed there,
inclusive the "MARCOS" schema, but there is nothing in the schema folders
of the "MARCOS" schema (the same with the other schema folders). I mean
that the Tables folder under the schema folder has nothing. There are not
tables there. The same happens with the Dependencies, Stored Procedures,
User-Defined Functions and Views folders. Do you know the reason why it's
happaning and what I can do to make the tables appear?

Thank you.

Marcos
Re: Error: Schema "MARCOS" cannot be resolved for table "GE_FUNCIONARIOS" [message #600047 is a reply to message #434459] Tue, 12 June 2007 13:44 Go to previous message
Neil Hauge is currently offline Neil HaugeFriend
Messages: 475
Registered: July 2009
Senior Member
Marcos,

You should take this thread over to the eclipse.dtp newsgroup so we can
get to the root of the issue. I am unable to cross post it from here, but
I recommend you take the information that we have gathered here and post
to eclipse.dtp with this information and ask for help. You can cross post
to the dali newsgroup as well. The DTP group won't be able to help you
with Dali specific problems, but can better help you specific database
metadata related issues it seems you are having.

Hope this helps,
Neil



Marcos wrote:

> Neil Hauge wrote:

>> You say there is nothing under Schemas. Are you able to browse the Tables
>> you are interested in mapping in the Data Source Explorer? I just want to
>> make sure I understand what you are seeing. It is possible that the DTP
>> component isn't functioning correctly for some reason.

>> Neil

> Hello, Neil!

> Yes, in my last reply there was nothing under Schemas, but for some reason
> there are now. I can see now many schemas (user names) listed there,
> inclusive the "MARCOS" schema, but there is nothing in the schema folders
> of the "MARCOS" schema (the same with the other schema folders). I mean
> that the Tables folder under the schema folder has nothing. There are not
> tables there. The same happens with the Dependencies, Stored Procedures,
> User-Defined Functions and Views folders. Do you know the reason why it's
> happaning and what I can do to make the tables appear?

> Thank you.

> Marcos
Re: Error: Schema "MARCOS" cannot be resolved for table "GE_FUNCIONARIOS" [message #600050 is a reply to message #434461] Tue, 12 June 2007 13:51 Go to previous message
Marcos is currently offline MarcosFriend
Messages: 68
Registered: July 2009
Member
Neil Hauge wrote:

> Marcos,

> You should take this thread over to the eclipse.dtp newsgroup so we can
> get to the root of the issue. I am unable to cross post it from here, but
> I recommend you take the information that we have gathered here and post
> to eclipse.dtp with this information and ask for help. You can cross post
> to the dali newsgroup as well. The DTP group won't be able to help you
> with Dali specific problems, but can better help you specific database
> metadata related issues it seems you are having.

> Hope this helps,
> Neil

Hello, Neil!
Yesterday I have already posted this issue in the DTP newsgroup.

http://www.eclipse.org/newsportal/article.php?id=724&gro up=eclipse.dtp#724

I just hope that I got some answer from there because this is very
important to me. Everything is working well, just this is getting in the
way and I can't proceed with my project until there's a solution to this.

Thank you very much.

Marcos
Re: Error: Schema "MARCOS" cannot be resolved for table "GE_FUNCIONARIOS" [message #600120 is a reply to message #434462] Thu, 14 June 2007 21:04 Go to previous message
Neil Hauge is currently offline Neil HaugeFriend
Messages: 475
Registered: July 2009
Senior Member
Marcos,

RC3 is now available, so you may want to try to see if your issues have
been resolved with changes to Dali and DTP. We have made some changes on
the Dali side that might help your situation, but since you still can't
browse tables in the DS Explorer, I doubt that Dali is going to be able to
see them.

Neil
Re: Error: Schema "MARCOS" cannot be resolved for table "GE_FUNCIONARIOS" [message #600142 is a reply to message #434478] Fri, 15 June 2007 12:41 Go to previous message
Marcos is currently offline MarcosFriend
Messages: 68
Registered: July 2009
Member
Hello, Neil!
I have just upgraded to RC3 and unfortunately I still can't browse the
tables in the Data Source Explorer view. It's almost clear now that the
problem is not related with Dali, but with DTP or something that I'm doing
wrong or driver related, I don't know. I have a post in the DTP newsgroup
about this issue:

http://www.eclipse.org/newsportal/article.php?id=724&gro up=eclipse.dtp#724

but until now I haven't got any answer from there.

Thank you, Neil.

Marcos

Neil Hauge wrote:

> Marcos,

> RC3 is now available, so you may want to try to see if your issues have
> been resolved with changes to Dali and DTP. We have made some changes on
> the Dali side that might help your situation, but since you still can't
> browse tables in the DS Explorer, I doubt that Dali is going to be able to
> see them.

> Neil
Previous Topic:Table Generator combos in JPA Details view not populated
Next Topic:Problems closing and reopening DALI projects
Goto Forum:
  


Current Time: Mon Sep 23 15:59:00 GMT 2024

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

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

Back to the top