Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » It works, but does not compile (only half a joke!)
It works, but does not compile (only half a joke!) [message #605521] Fri, 07 September 2007 21:17
Richard Gomes is currently offline Richard GomesFriend
Messages: 15
Registered: June 2010
Junior Member
Hi Chaps,

I was able to manage a simple test project to use toplink and postgresql.
It's getting data from database and seems to work fine.

To be honest, the project compiles, otherwise the binary code would never
work! The problem seems to be Dali is not able to access properly the
database and reports a weird error on the imports. The error is:

Schema "test" cannot be resolved for table "Holiday"

and occours around the end of the second line below and beginning of third
line.

import javax.persistence.Embeddable;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;

I've deleted my orm.xml (I use annotations) and my persistence.xml is:

<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
<persistence-unit name="test" transaction-type="RESOURCE_LOCAL">
<provider> oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvi der
</provider>
<class>com.jaacoo.tguide.model.dao.Holiday</class>
<class>com.jaacoo.tguide.model.dao.House</class>
<class>com.jaacoo.tguide.model.dao.QuoteDay</class>
<class>com.jaacoo.tguide.model.dao.StockOption</class>
<class>com.jaacoo.tguide.model.dao.Symbol</class>
<class>com.jaacoo.tguide.model.dao.TickNasdaq</class>
<properties>
<property name="toplink.jdbc.driver"
value="org.postgresql.Driver"/>
<property name="toplink.jdbc.url"
value="jdbc:postgresql://localhost:5432/test"/>
<property name="toplink.jdbc.user" value="test"/>
<property name="toplink.jdbc.password" value="test"/>
<property name="toplink.logging.level" value="SEVERE"/>
</properties>
</persistence-unit>
</persistence>




I've already tried to put toplink-essentials-agent.jar in the CLASSPATH and
also in the command line when calling Eclipse. I've tried this:

export
CLASSPATH=/opt/JavaIDE/glassfish-persistence/toplink-essenti als-agent.jar:/opt/JavaIDE/glassfish-persistence/toplink-ess entials.jar
/opt/JavaIDE/eclipse3.3-amd64/eclipse -vm /opt/JavaIDE/jdk1.5.0_12-amd64/jre/bin/java

and also this:

/opt/JavaIDE/eclipse3.3-amd64/eclipse -vm /opt/JavaIDE/jdk1.5.0_12-amd64/jre/bin/java -cp /opt/JavaIDE/glassfish-persistence/toplink-essentials-agent. jar:/opt/JavaIDE/glassfish-persistence/toplink-essentials.ja r

and also this:

/opt/JavaIDE/eclipse3.3-amd64/eclipse -vm /opt/JavaIDE/jdk1.5.0_12-amd64/jre/bin/java -javaagent:/opt/JavaIDE/glassfish-persistence/toplink-essent ials-agent.jar

and also this:

export CLASSPATH=/opt/JavaIDE/glassfish-persistence/toplink-essenti als.jar
/opt/JavaIDE/eclipse3.3-amd64/eclipse -vm /opt/JavaIDE/jdk1.5.0_12-amd64/jre/bin/java -javaagent:/opt/JavaIDE/glassfish-persistence/toplink-essent ials-agent.jar


Any idea?

Thank you in advance

--
Richard Gomes
Previous Topic:can't add java persistence to java project
Next Topic:NPE Generating Entity
Goto Forum:
  


Current Time: Thu Apr 25 22:09:32 GMT 2024

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

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

Back to the top