[RESOLU] [TP12]MAC OS environment issues

Modérateurs : graffion, jmdouin, agoncal, mlebihan

Répondre
renjunzhou
Messages : 5
Inscription : 06 nov. 2016 17:50

[RESOLU] [TP12]MAC OS environment issues

Message par renjunzhou » 15 janv. 2017 12:57

Bonjour,

I changed password in
./build.xml
./test/META-INF/persistence.xml
(./src/META-INF/persistence.xml, this file didn't exist this kind of property?)
./web/WEB-INF
./src/config ...
last time even in glassfish.

And at TP12 there still said

Code : Tout sélectionner

Caused by: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO)


and in TP12's ./src/config/application.xml
there is a line

Code : Tout sélectionner

 <web>

            <web-uri>yapswtp11.war</web-uri>
            <context-root>yapswtp11</context-root>
        </web>
the last question is when i run glassfish it it seem have some errors.

Code : Tout sélectionner

[#|2017-01-15T10:14:25.545+0100|WARNING|glassfish 4.1|javax.enterprise.system.tools.deployment.autodeploy|_ThreadID=67;_ThreadName=AutoDeployer;_TimeMillis=1484471665545;_LevelValue=900;_MessageID=NCLS-DEPLOYMENT-02041;|
  
Attempt to create file /Users/renjunzhou/development/glassfish4/glassfish/domains/domain1/autodeploy/.autodeploystatus/yapswtp12.war failed; no further information.|#]

graffion
Messages : 633
Inscription : 21 juin 2005 14:05

Re: [TP12]MAC OS environment issues

Message par graffion » 15 janv. 2017 19:59

Bonjour,

The password (and other connection information) is defined in ./Yaps/web/WEB-INF/glassfish-resources.xml

The file application.xml is not used (and not deployed).

Concerning the last problem, have a look to $GLASSFISH_HOME/domains/domain1/logs/server.log

(an undeploy yapswtp11 to avoid JNDI name conflicts.)

GL1M
Messages : 4
Inscription : 05 oct. 2015 21:39

Re: [TP12]MAC OS environment issues

Message par GL1M » 16 janv. 2017 1:36

Bonjour,

Concernant le premier point, je rencontre le même problème sur OSX.
Pour la commande ant yaps-mark:

Code : Tout sélectionner

     ...
     [java] [EL Severe]: 2017-01-16 00:25:15.753--ServerSession(611563982)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.1.v20150605-31e8258): org.eclipse.persistence.exceptions.DatabaseException
     [java] Internal Exception: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO)
     [java] Error Code: 1045
     ...
J'ai remplacé password = root dans tous les fichiers de config du projet.
Par ailleurs les tests ant test et les tests selenium passent sans problème.

Y aurait t'il le même problème concernant le password que le premier TP sur la persistance ?

Guillaume

graffion
Messages : 633
Inscription : 21 juin 2005 14:05

Re: [TP12]MAC OS environment issues

Message par graffion » 16 janv. 2017 12:55

Voir la cible yaps-test dans build.xml :

Code : Tout sélectionner

$ awk '/target name="yaps-test"/{ print; for (i=1; i<8; i++) { getline; print;} }' build.xml
    <target name="yaps-test" depends="check, yaps-compile">
        <echo message="Tests the application"/>
        <copy file="${yaps.test.src.dir}/META-INF/persistence.xml" todir="${yaps.test.classes.dir}/META-INF" overwrite="true" preservelastmodified="true"/>
        <junit printsummary="on" fork="yes">
            <classpath refid="classpath"/>
            <classpath refid="yaps-classpath"/>
            <formatter type="plain" usefile="false"/>
            <test name="AllTests"/>
AllTests pour ce TP 12 se contente d'exécuter AllDomainTests, documenté dans l'énoncé :
Tests des DAO
La classe de test AllDomainTests contient les tests de chaque DAO ainsi que des tests spécifiques JPA.
La cible ant yaps-domain-test permet de lancer ce test en utilisant le fichier de test ${yaps.test.src.dir}/META-INF/persistence.xml configuré pour utiliser eclipse-link.
Il faut donc modifier aussi ./Yaps/test/src/META-INF/persistence.xml sur Linux et Mac pour pouvoir exécuter les cibles yaps-test et yaps-mark

renjunzhou
Messages : 5
Inscription : 06 nov. 2016 17:50

Re: [TP12]MAC OS environment issues

Message par renjunzhou » 16 janv. 2017 17:26

bonjour,
I changed password in Build.xml, web's glassfish-resources.xml, test's persostence.xml

this is test's persostence.xml

Code : Tout sélectionner

<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="2.0">
<persistence-unit name="petstorePU" transaction-type="RESOURCE_LOCAL">
        <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    	<class>com.yaps.petstore.server.domain.customer.Customer</class>
    	<class>com.yaps.petstore.server.domain.Address</class>
    	<class>com.yaps.petstore.server.domain.CreditCard</class>
    	<class>com.yaps.petstore.server.domain.category.Category</class>
    	<class>com.yaps.petstore.server.domain.product.Product</class>
    	<class>com.yaps.petstore.server.domain.item.Item</class>
    	<class>com.yaps.petstore.server.domain.order.Order</class>
    	<class>com.yaps.petstore.server.domain.orderline.OrderLine</class>
    	<class>com.yaps.petstore.server.util.uidgen.Counter</class>
        <properties>
            <property name="eclipselink.target-database" value="MYSQL"/>
             <property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>    
            <property name="eclipselink.logging.level" value="INFO"/>
            <property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
            <property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/petstoreDB12"/>
            <property name="javax.persistence.jdbc.user" value="root"/>
            <property name="javax.persistence.jdbc.password" value="root"/>
        </properties>
    </persistence-unit>
</persistence>
I run whole system directly on browser it is no error, but when i cant't pass test.

I changed it as same as yaps/src's still don't work

Code : Tout sélectionner

<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="petstorePU" transaction-type="JTA">
    <jta-data-source>java:app/jdbc/petstoreDS12</jta-data-source>
    <class>com.yaps.petstore.server.domain.customer.Customer</class>
    <class>com.yaps.petstore.server.domain.Address</class>
    <class>com.yaps.petstore.server.domain.CreditCard</class>
    <class>com.yaps.petstore.server.domain.category.Category</class>
    <class>com.yaps.petstore.server.domain.product.Product</class>
    <class>com.yaps.petstore.server.domain.item.Item</class>
    <class>com.yaps.petstore.server.domain.order.Order</class>
    <class>com.yaps.petstore.server.domain.orderline.OrderLine</class>
    <class>com.yaps.petstore.server.util.uidgen.Counter</class>
    <properties>
      <property name="eclipselink.target-database" value="MYSQL"/>
      <!--  <property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>     -->
    </properties>
  </persistence-unit>
</persistence>

graffion
Messages : 633
Inscription : 21 juin 2005 14:05

Re: [TP12]MAC OS environment issues

Message par graffion » 16 janv. 2017 17:39

There are 2 persistence.xml files for the petstore application:
. one deployed on Glassfish : Yaps/src/java/META-INF/persistence.xml
. another one used by yaps-test and yaps-mark targets : Yaps/test/src/META-INF/persistence.xml

Code : Tout sélectionner

$ find Yaps -name persistence.xml
Yaps/src/java/META-INF/persistence.xml
Yaps/test/src/META-INF/persistence.xml
In order to run yaps-test (then yaps-mark) on Linux or Mac, you should modify the password in the file Yaps/test/src/META-INF/persistence.xml

"ant yaps-test" should then work

GL1M
Messages : 4
Inscription : 05 oct. 2015 21:39

Re: [TP12]MAC OS environment issues

Message par GL1M » 16 janv. 2017 20:57

Bonsoir,

As I said in my first post, I already changed the password in the Yaps/test/src/META-INF/persistence.xml file as renjunzhou did.
Tests passed perfectly when running 'yasp-test'.
Errors occurred only when running 'yaps-mark'...
Any clues? I already submit my work.

Guillaume

graffion
Messages : 633
Inscription : 21 juin 2005 14:05

Re: [TP12]MAC OS environment issues

Message par graffion » 17 janv. 2017 11:42

Verify the date of the file test12.jar provided in the archive file :

Code : Tout sélectionner

$ unzip -l /d/tmp/downloads/SourcesFournis_TP12.zip | fgrep test12.jar
   151938  01-12-2017 13:27   Yaps/test12.jar
(If you have dowloaded SourcesFournis_TP12.zip before 13h30 on 12 january, test12.jar may be wrong for Linux users!)

renjunzhou
Messages : 5
Inscription : 06 nov. 2016 17:50

Re: [TP12]MAC OS environment issues

Message par renjunzhou » 17 janv. 2017 17:38

Bonjour,
Thanks , I download the latest files and changed the password in everywhere.
Than i passed test in command.
but when i marked it, there are 3 error in my html page.

one warning look like it still want me provide password and two Exception form testUpdate and testRefresh, which I never changed.
(ps:I am sure I changed password in right place and I checked persistence.xml and some other files, they are coped to right place too.)

Code : Tout sélectionner

Voici les tests qui ont posé des problèmes à votre exécutable. Cette liste est vide si tous se sont déroulés sans incident.

//**************************************************************************************************
testUpdate(com.yaps.petstore.server.domain.f): Votre exécutable a échoué en levant une exception.

Exception levée: java.lang.IllegalStateException

Message : Attempting to execute an operation on a closed EntityManager.

Pile d'appel: 
java.lang.IllegalStateException: Attempting to execute an operation on a closed EntityManager.
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.verifyOpen(EntityManagerImpl.java:1924)
at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.begin(EntityTransactionImpl.java:92)
at com.yaps.petstore.server.domain.f.c(Unknown Source)
at com.yaps.petstore.server.domain.f.setUp(Unknown Source)
at junit.framework.TestCase.runBare(TestCase.java:132)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at B.tester(Unknown Source)
at B.testerEtQuitter(Unknown Source)
at Tests.main(Unknown Source)

testUpdate(com.yaps.petstore.server.domain.f): Attempting to execute an operation on a closed EntityManager.

//**************************************************************************************************
warning(junit.framework.TestSuite$1): Le résultat que vous avez produit n'est pas celui attendu.

warning(junit.framework.TestSuite$1): Exception in constructor: testDomainUpdateOrderWithInvalidValues (javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.1.v20150605-31e8258): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO) Error Code: 1045 at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:815) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getAbstractSession(EntityManagerFactoryDelegate.java:205) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:305) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:337) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:303) at com.yaps.petstore.server.util.persistence.AbstractDataAccessObject.initEntityManager(Unknown Source) at com.yaps.petstore.server.util.persistence.AbstractDataAccessObject.(Unknown Source) at com.yaps.petstore.server.domain.customer.CustomerDAO.(Unknown Source) at com.yaps.petstore.server.domain.customer.CustomerDAO.(Unknown Source) at com.yaps.petstore.server.domain.i.(Unknown Source) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:422) at junit.framework.TestSuite.createTest(TestSuite.java:65) at junit.framework.TestSuite.addTestMethod(TestSuite.java:283) at junit.framework.TestSuite.(TestSuite.java:146) at com.yaps.petstore.server.domain.i.suite(Unknown Source) at AllDomainTests.suite(Unknown Source) at AllTests.suite(Unknown Source) at Tests.main(Unknown Source) Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.1.v20150605-31e8258): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO) Error Code: 1045 at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:331) at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:326) at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:138) at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162) at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connectInternal(DatasourceAccessor.java:346) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.connectInternal(DatabaseAccessor.java:309) at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connect(DatasourceAccessor.java:434) at org.eclipse.persistence.sessions.server.ConnectionPool.buildConnection(ConnectionPool.java:217) at org.eclipse.persistence.sessions.server.ConnectionPool.startUp(ConnectionPool.java:505) at org.eclipse.persistence.sessions.server.ServerSession.connect(ServerSession.java:488) at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:764) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:267) at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:731) ... 20 more Caused by: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1074) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4074) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4006) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:919) at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1694) at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1244) at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2397) at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2430) at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2215) at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:813) at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:47) at sun.reflect.GeneratedConstructorAccessor10.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:422) at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:399) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:334) at java.sql.DriverManager.getConnection(DriverManager.java:664) at java.sql.DriverManager.getConnection(DriverManager.java:208) at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:98) ... 30 more )

//**************************************************************************************************
testRefresh(com.yaps.petstore.server.domain.f): Votre exécutable a échoué en levant une exception.

Exception levée: java.lang.IllegalStateException

Message : Attempting to execute an operation on a closed EntityManager.

Pile d'appel: 
java.lang.IllegalStateException: Attempting to execute an operation on a closed EntityManager.
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.verifyOpen(EntityManagerImpl.java:1924)
at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.begin(EntityTransactionImpl.java:92)
at com.yaps.petstore.server.domain.f.c(Unknown Source)
at com.yaps.petstore.server.domain.f.setUp(Unknown Source)
at junit.framework.TestCase.runBare(TestCase.java:132)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at B.tester(Unknown Source)
at B.testerEtQuitter(Unknown Source)
at Tests.main(Unknown Source)

testRefresh(com.yaps.petstore.server.domain.f): Attempting to execute an operation on a closed EntityManager.


GL1M
Messages : 4
Inscription : 05 oct. 2015 21:39

Re: [TP12]MAC OS environment issues

Message par GL1M » 17 janv. 2017 23:22

Même chose pour moi:

Code : Tout sélectionner

Voici les tests qui ont posé des problèmes à votre exécutable. Cette liste est vide si tous se sont déroulés sans incident.

testDomainFindAllProductsInDogs(com.yaps.petstore.server.domain.h): Votre exécutable a échoué en levant une exception.

Exception levée: java.lang.IllegalStateException

Message : Attempting to execute an operation on a closed EntityManager.

Pile d'appel: 
java.lang.IllegalStateException: Attempting to execute an operation on a closed EntityManager.
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.verifyOpen(EntityManagerImpl.java:1924)
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.createNamedQuery(EntityManagerImpl.java:1133)
at com.yaps.petstore.server.domain.h.testDomainFindAllProductsInDogs(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:36)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at B.tester(Unknown Source)
at B.testerEtQuitter(Unknown Source)
at Tests.main(Unknown Source)

testDomainFindAllProductsInDogs(com.yaps.petstore.server.domain.h): Attempting to execute an operation on a closed EntityManager.


testUpdate(com.yaps.petstore.server.domain.f): Votre exécutable a échoué en levant une exception.

Exception levée: java.lang.IllegalStateException

Message : Attempting to execute an operation on a closed EntityManager.

Pile d'appel: 
java.lang.IllegalStateException: Attempting to execute an operation on a closed EntityManager.
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.verifyOpen(EntityManagerImpl.java:1924)
at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.begin(EntityTransactionImpl.java:92)
at com.yaps.petstore.server.domain.f.c(Unknown Source)
at com.yaps.petstore.server.domain.f.setUp(Unknown Source)
at junit.framework.TestCase.runBare(TestCase.java:132)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at B.tester(Unknown Source)
at B.testerEtQuitter(Unknown Source)
at Tests.main(Unknown Source)

testUpdate(com.yaps.petstore.server.domain.f): Attempting to execute an operation on a closed EntityManager.


warning(junit.framework.TestSuite$1): Le résultat que vous avez produit n'est pas celui attendu.

warning(junit.framework.TestSuite$1): Exception in constructor: testDomainUpdateOrderWithInvalidValues (javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.1.v20150605-31e8258): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO) Error Code: 1045 at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:815) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getAbstractSession(EntityManagerFactoryDelegate.java:205) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:305) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:337) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:303) at com.yaps.petstore.server.util.persistence.AbstractDataAccessObject.initEntityManager(Unknown Source) at com.yaps.petstore.server.util.persistence.AbstractDataAccessObject.(Unknown Source) at com.yaps.petstore.server.domain.customer.CustomerDAO.(Unknown Source) at com.yaps.petstore.server.domain.customer.CustomerDAO.(Unknown Source) at com.yaps.petstore.server.domain.i.(Unknown Source) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:422) at junit.framework.TestSuite.createTest(TestSuite.java:65) at junit.framework.TestSuite.addTestMethod(TestSuite.java:283) at junit.framework.TestSuite.(TestSuite.java:146) at com.yaps.petstore.server.domain.i.suite(Unknown Source) at AllDomainTests.suite(Unknown Source) at AllTests.suite(Unknown Source) at Tests.main(Unknown Source) Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.1.v20150605-31e8258): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO) Error Code: 1045 at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:331) at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:326) at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:138) at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162) at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connectInternal(DatasourceAccessor.java:346) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.connectInternal(DatabaseAccessor.java:309) at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connect(DatasourceAccessor.java:434) at org.eclipse.persistence.sessions.server.ConnectionPool.buildConnection(ConnectionPool.java:217) at org.eclipse.persistence.sessions.server.ConnectionPool.startUp(ConnectionPool.java:505) at org.eclipse.persistence.sessions.server.ServerSession.connect(ServerSession.java:488) at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:764) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:267) at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:731) ... 20 more Caused by: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1074) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4074) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4006) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:919) at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1694) at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1244) at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2397) at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2430) at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2215) at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:813) at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:47) at sun.reflect.GeneratedConstructorAccessor7.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:422) at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:399) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:334) at java.sql.DriverManager.getConnection(DriverManager.java:664) at java.sql.DriverManager.getConnection(DriverManager.java:208) at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:98) ... 30 more )


testDomainFindAllCustomers(com.yaps.petstore.server.domain.b): Votre exécutable a échoué en levant une exception.

Exception levée: javax.persistence.PersistenceException

Message : Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.1.v20150605-31e8258): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO) Error Code: 1045

Pile d'appel: 
javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.1.v20150605-31e8258): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO)
Error Code: 1045
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:815)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getAbstractSession(EntityManagerFactoryDelegate.java:205)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:305)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:337)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:303)
at com.yaps.petstore.server.util.persistence.AbstractDataAccessObject.initEntityManager(Unknown Source)
at com.yaps.petstore.server.util.persistence.AbstractDataAccessObject.(Unknown Source)
at com.yaps.petstore.server.util.uidgen.UniqueIdGeneratorDAO.(Unknown Source)
at com.yaps.petstore.server.util.uidgen.UniqueIdGeneratorDAO.(Unknown Source)
at com.yaps.petstore.server.util.uidgen.UniqueIdGenerator.(Unknown Source)
at com.yaps.petstore.server.util.uidgen.UniqueIdGenerator.getInstance(Unknown Source)
at com.yaps.petstore.server.util.persistence.AbstractDataAccessObject.getUniqueId(Unknown Source)
at com.yaps.petstore.server.domain.b.b(Unknown Source)
at com.yaps.petstore.server.domain.b.testDomainFindAllCustomers(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at B.tester(Unknown Source)
at B.testerEtQuitter(Unknown Source)
at Tests.main(Unknown Source)
Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.1.v20150605-31e8258): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO)
Error Code: 1045
at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:331)
at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:326)
at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:138)
at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connectInternal(DatasourceAccessor.java:346)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.connectInternal(DatabaseAccessor.java:309)
at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connect(DatasourceAccessor.java:434)
at org.eclipse.persistence.sessions.server.ConnectionPool.buildConnection(ConnectionPool.java:217)
at org.eclipse.persistence.sessions.server.ConnectionPool.startUp(ConnectionPool.java:505)
at org.eclipse.persistence.sessions.server.ServerSession.connect(ServerSession.java:488)
at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:764)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:267)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:731)
... 32 more
Caused by: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1074)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4074)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4006)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:919)
at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1694)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1244)
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2397)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2430)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2215)
at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:813)
at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:47)
at sun.reflect.GeneratedConstructorAccessor7.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:399)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:334)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:208)
at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:98)
... 42 more

testDomainFindAllCustomers(com.yaps.petstore.server.domain.b): Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.1.v20150605-31e8258): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO) Error Code: 1045


testDomainMatchPasswordCustomer(com.yaps.petstore.server.domain.b): Votre exécutable a échoué en levant une exception.

Exception levée: javax.persistence.PersistenceException

Message : Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.1.v20150605-31e8258): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO) Error Code: 1045

Pile d'appel: 
javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.1.v20150605-31e8258): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO)
Error Code: 1045
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:815)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getAbstractSession(EntityManagerFactoryDelegate.java:205)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:305)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:337)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:303)
at com.yaps.petstore.server.util.persistence.AbstractDataAccessObject.initEntityManager(Unknown Source)
at com.yaps.petstore.server.util.persistence.AbstractDataAccessObject.(Unknown Source)
at com.yaps.petstore.server.util.uidgen.UniqueIdGeneratorDAO.(Unknown Source)
at com.yaps.petstore.server.util.uidgen.UniqueIdGeneratorDAO.(Unknown Source)
at com.yaps.petstore.server.util.uidgen.UniqueIdGenerator.(Unknown Source)
at com.yaps.petstore.server.util.uidgen.UniqueIdGenerator.getInstance(Unknown Source)
at com.yaps.petstore.server.util.persistence.AbstractDataAccessObject.getUniqueId(Unknown Source)
at com.yaps.petstore.server.domain.b.b(Unknown Source)
at com.yaps.petstore.server.domain.b.testDomainMatchPasswordCustomer(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at B.tester(Unknown Source)
at B.testerEtQuitter(Unknown Source)
at Tests.main(Unknown Source)
Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.1.v20150605-31e8258): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO)
Error Code: 1045
at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:331)
at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:326)
at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:138)
at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connectInternal(DatasourceAccessor.java:346)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.connectInternal(DatabaseAccessor.java:309)
at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connect(DatasourceAccessor.java:434)
at org.eclipse.persistence.sessions.server.ConnectionPool.buildConnection(ConnectionPool.java:217)
at org.eclipse.persistence.sessions.server.ConnectionPool.startUp(ConnectionPool.java:505)
at org.eclipse.persistence.sessions.server.ServerSession.connect(ServerSession.java:488)
at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:764)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:267)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:731)
... 32 more
Caused by: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1074)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4074)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4006)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:919)
at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1694)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1244)
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2397)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2430)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2215)
at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:813)
at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:47)
at sun.reflect.GeneratedConstructorAccessor7.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:399)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:334)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:208)
at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:98)
... 42 more

testDomainMatchPasswordCustomer(com.yaps.petstore.server.domain.b): Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.1.v20150605-31e8258): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO) Error Code: 1045


testRefresh(com.yaps.petstore.server.domain.f): Votre exécutable a échoué en levant une exception.

Exception levée: java.lang.IllegalStateException

Message : Attempting to execute an operation on a closed EntityManager.

Pile d'appel: 
java.lang.IllegalStateException: Attempting to execute an operation on a closed EntityManager.
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.verifyOpen(EntityManagerImpl.java:1924)
at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.begin(EntityTransactionImpl.java:92)
at com.yaps.petstore.server.domain.f.c(Unknown Source)
at com.yaps.petstore.server.domain.f.setUp(Unknown Source)
at junit.framework.TestCase.runBare(TestCase.java:132)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at B.tester(Unknown Source)
at B.testerEtQuitter(Unknown Source)
at Tests.main(Unknown Source)

testRefresh(com.yaps.petstore.server.domain.f): Attempting to execute an operation on a closed EntityManager.


testDomainDeleteUnknownCustomer(com.yaps.petstore.server.domain.b): Votre exécutable a échoué en levant une exception.

Exception levée: javax.persistence.PersistenceException

Message : Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.1.v20150605-31e8258): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO) Error Code: 1045

Pile d'appel: 
javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.1.v20150605-31e8258): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO)
Error Code: 1045
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:815)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getAbstractSession(EntityManagerFactoryDelegate.java:205)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:305)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:337)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:303)
at com.yaps.petstore.server.util.persistence.AbstractDataAccessObject.initEntityManager(Unknown Source)
at com.yaps.petstore.server.util.persistence.AbstractDataAccessObject.(Unknown Source)
at com.yaps.petstore.server.util.uidgen.UniqueIdGeneratorDAO.(Unknown Source)
at com.yaps.petstore.server.util.uidgen.UniqueIdGeneratorDAO.(Unknown Source)
at com.yaps.petstore.server.util.uidgen.UniqueIdGenerator.(Unknown Source)
at com.yaps.petstore.server.util.uidgen.UniqueIdGenerator.getInstance(Unknown Source)
at com.yaps.petstore.server.util.persistence.AbstractDataAccessObject.getUniqueId(Unknown Source)
at com.yaps.petstore.server.domain.b.b(Unknown Source)
at com.yaps.petstore.server.domain.b.testDomainDeleteUnknownCustomer(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at B.tester(Unknown Source)
at B.testerEtQuitter(Unknown Source)
at Tests.main(Unknown Source)
Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.1.v20150605-31e8258): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO)
Error Code: 1045
at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:331)
at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:326)
at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:138)
at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connectInternal(DatasourceAccessor.java:346)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.connectInternal(DatabaseAccessor.java:309)
at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connect(DatasourceAccessor.java:434)
at org.eclipse.persistence.sessions.server.ConnectionPool.buildConnection(ConnectionPool.java:217)
at org.eclipse.persistence.sessions.server.ConnectionPool.startUp(ConnectionPool.java:505)
at org.eclipse.persistence.sessions.server.ServerSession.connect(ServerSession.java:488)
at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:764)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:267)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:731)
... 32 more
Caused by: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1074)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4074)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4006)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:919)
at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1694)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1244)
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2397)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2430)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2215)
at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:813)
at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:47)
at sun.reflect.GeneratedConstructorAccessor7.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:399)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:334)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:208)
at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:98)
... 42 more

testDomainDeleteUnknownCustomer(com.yaps.petstore.server.domain.b): Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.1.v20150605-31e8258): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO) Error Code: 1045

J'ai remarqué ceci dans server.log de Glassfish:

Code : Tout sélectionner

[2017-01-17T21:52:40.430+0100] [glassfish 4.1] [WARNING] [] [org.eclipse.persistence.default] [tid: _ThreadID=63 _ThreadName=AutoDeployer] [timeMillis: 1484686360430] [levelValue: 900] [[
  
java.lang.NullPointerException
	at org.eclipse.persistence.platform.server.ServerPlatformUtils.createServerPlatform(ServerPlatformUtils.java:99)
	at org.eclipse.persistence.sessions.factories.SessionManager.init(SessionManager.java:77)
	at org.eclipse.persistence.sessions.factories.SessionManager.<clinit>(SessionManager.java:71)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.addSessionToGlobalSessionManager(EntityManagerSetupImpl.java:907)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.initSession(EntityManagerSetupImpl.java:2671)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:675)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getAbstractSession(EntityManagerFactoryDelegate.java:205)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:305)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:337)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:303)
	at org.glassfish.persistence.jpa.JPADeployer$2.visitPUD(JPADeployer.java:451)
	at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:510)
	at org.glassfish.persistence.jpa.JPADeployer.iterateInitializedPUsAtApplicationPrepare(JPADeployer.java:492)
	at org.glassfish.persistence.jpa.JPADeployer.event(JPADeployer.java:398)
	at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:131)
	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:487)
	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
	at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:539)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:360)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:360)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846)
	at org.glassfish.deployment.autodeploy.AutoOperation.run(AutoOperation.java:164)
	at org.glassfish.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:597)
	at org.glassfish.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:484)
	at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:412)
	at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:403)
	at org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeployService.java:233)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)
]]
Trois soirées à débugger cette histoire alors que les tests passent en local, selenium aussi.

Au final QUATRE fichiers de config contenant la valeur du mot de passe à modifier:

Code : Tout sélectionner

Yaps/src/config/DataSource.for.domain.xml
Yaps/web/WEB-INF/glassfish-resources.xml
Yaps/test/src/META-INF/persistence.xml
build.xml
Guillaume

graffion
Messages : 633
Inscription : 21 juin 2005 14:05

Re: [TP12]MAC OS environment issues

Message par graffion » 17 janv. 2017 23:35

Yaps/src/config/DataSource.for.domain.xml is not used anymore (but replaced by Yaps/web/WEB-INF/glassfish-resources.xml).

I have run yaps-test ant yaps-mark succesfully on Windows with Guillaume source code.

There should be a problem on Linux with the provided Yaps/test12.jar file!!????

graffion
Messages : 633
Inscription : 21 juin 2005 14:05

Re: [TP12]MAC OS environment issues

Message par graffion » 18 janv. 2017 11:26

Eureka!
The problem is that the provided test12.jar file contains a file META-INF/persistence.xml !!?

Code : Tout sélectionner

$ unzip -l Yaps/test12.jar | fgrep persist
     1556  2017-01-12 13:27   META-INF/persistence.xml
$ unzip -p Yaps/test12.jar META-INF/persistence.xml | fgrep root
            <property name="javax.persistence.jdbc.user" value="root"/>
I have rebuild test12.jar (removing persistence.xml) and delivered http://java.cnam.fr/iagl/glg203/tp/TPzi ... s_TP12.zip again.

Dowload it and Linux and Mac user will solve their problem running yaps-mark.

(I apologize!)

GL1M
Messages : 4
Inscription : 05 oct. 2015 21:39

Re: [RESOLU] [TP12]MAC OS environment issues

Message par GL1M » 19 janv. 2017 0:35

Je confirme, sur ma machine en OSX tous les tests passent sans problème avec la nouvelle version de test12.jar.
Merci

Répondre

Qui est en ligne ?

Utilisateurs parcourant ce forum : Aucun utilisateur inscrit et 1 invité