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

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="" version="1.0">
<persistence-unit name="test" transaction-type="RESOURCE_LOCAL">
<provider> oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvi der
<property name="toplink.jdbc.driver"
<property name="toplink.jdbc.url"
<property name="toplink.jdbc.user" value="test"/>
<property name="toplink.jdbc.password" value="test"/>
<property name="toplink.logging.level" value="SEVERE"/>

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:

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: Fri Feb 24 19:35:30 GMT 2017

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

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