Bonjour tout le monde,
j'essaye d'installer une "application" Eclipse (qui marche ailleurs) sur mon poste mais je n'arrive pas à communiquer avec ma base de données via mon projet JSF.
Mon application est composé de 5 projets :
- un projet avec les entités et la persistence
- un projet avec mes session Facade (pattern abstract Facade)
- un projet avec les interfaces (utilisé dans les managedBean)
- un projet web en JSF 2.0
- un projet EAR
Lorsque je créer une entité et que j'effectue l'action "Generate table from entities", cela marche parfaitement.
J'arrive à accéder à ma base de données via la vue "Data Source Explorer" et je peux l’interroger avec open SQL Scrapbook.
Mais lorsque je lance Glassfish et que je lance une page qui affiche des données provenant de ma base de données, elle reste vide.
Et voilà ce que me dit ma console :
je vous mets quand ma persistence qui fonctionne sur l'autre poste :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 ATTENTION: Local Exception Stack: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLSyntaxErrorException: Le schéma 'DEV' n'existe pas Error Code: -1 Call: SELECT ID FROM data Query: ReadAllQuery(referenceClass=DataForm sql="SELECT ID FROM data") at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:333) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:644) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:535) ...
je tourne un peu en rond avec cette erreur. Si quelqu'un à une solution, je suis preneur
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 <?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="applitest-DC"> <class>com.logica.csl.applitest.entity.Data</class> <properties> <property name="eclipselink.target-database" value="DERBY" /> <property name="eclipselink.jdbc.driver" value="org.apache.derby.jdbc.ClientDriver" /> <property name="eclipselink.jdbc.url" value="jdbc:derby://localhost:1527/bdDerby" /> <property name="eclipselink.jdbc.user" value="dev" /> <property name="eclipselink.jdbc.password" value="dev" /> </properties> </persistence-unit> </persistence>
ps : J'utilise Glassfish 3.1.2
merci![]()
Partager