Erro no teste UserSessionTest do curso Loja Virtual Completa
Olá, estou com um erro ao executar este teste.
Se alguém souber a solução eu agradeço muito.
Sou iniciante e ainda tenho problemas para identificar as causas através das mensagens de erro do console.
Segue a mensagem:
saveUsuario
30/04/2012 14:24:40 com.sun.enterprise.v3.server.CommonClassLoaderServiceImpl findDerbyClient
INFO: Cannot find javadb client jar file, derby jdbc driver will not be available by default.
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/Flavio/GlassFish_Server/glassfish/modules/weld-osgi-bundle.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/Flavio/GlassFish_Server/glassfish/modules/bean-validator.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
30/04/2012 14:24:43 org.hibernate.validator.util.Version <clinit>
INFO: Hibernate Validator 4.2.0.Final
30/04/2012 14:24:44 org.glassfish.ha.store.spi.BackingStoreFactoryRegistry register
INFO: Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry
30/04/2012 14:24:44 com.sun.enterprise.v3.server.AppServerStartup run
INFO: GlassFish Server Open Source Edition 3.1.2 (23) hora de inicialização : Embedded (2.386ms), serviços de inicialização(3.838ms), total(6.224ms)
30/04/2012 14:24:46 org.glassfish.admin.mbeanserver.JMXStartupService$JMXConnectorsStarterThread run
INFO: JMX006: JMXStartupService had disabled JMXConnector system
30/04/2012 14:24:49 org.glassfish.admin.mbeanserver.JMXStartupService shutdown
INFO: JMX001: JMXStartupService and JMXConnectors have been shut down.
30/04/2012 14:24:49 com.sun.enterprise.v3.server.AppServerStartup stop
INFO: Procedimento de shutdown finalizado
30/04/2012 14:24:49 AppServerStartup run
INFO: [Thread[GlassFish Kernel Main Thread,5,main]] exiting
30/04/2012 14:24:49 org.glassfish.ha.store.spi.BackingStoreFactoryRegistry register
INFO: Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry
30/04/2012 14:24:49 com.sun.enterprise.v3.server.AppServerStartup run
INFO: GlassFish Server Open Source Edition 3.1.2 (23) hora de inicialização : Embedded (10.920ms), serviços de inicialização(358ms), total(11.278ms)
30/04/2012 14:24:49 org.glassfish.admin.mbeanserver.JMXStartupService$JMXConnectorsStarterThread run
INFO: JMX006: JMXStartupService had disabled JMXConnector system
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: javax.servlet-api.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: javax.servlet.jsp-api.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: javax.persistence.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: weld-osgi-bundle.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: javax.transaction.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: jaxb-osgi.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: javax.security.auth.message.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: javax.servlet.jsp.jstl-api.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: javax.faces.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: javax.enterprise.deploy.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping entry with a Manifest file with a special attribute: webservices-api-osgi.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping entry with a Manifest file with a special attribute: javax.annotation.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: jersey-core.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: javax.resource.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: javax.el-api.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: javax.management.j2ee.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: javax.security.jacc.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: javax.ejb.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: bean-validator.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: javax.jms.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: javax.mail.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: webservices-osgi.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping entry with a Manifest file with a special attribute: glassfish-embedded-static-shell.jar
30/04/2012 14:24:51 org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding EJB module to ScatteredArchive classes
30/04/2012 14:24:51 org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding library to ScatteredArchive ant-junit4.jar
30/04/2012 14:24:51 org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding library to ScatteredArchive junit-4.10.jar
30/04/2012 14:24:51 org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding library to ScatteredArchive jaxm-api.jar
30/04/2012 14:24:51 org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding library to ScatteredArchive ant.jar
30/04/2012 14:24:51 org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding library to ScatteredArchive ant-launcher.jar
30/04/2012 14:24:51 org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding library to ScatteredArchive jaxb-api-osgi.jar
30/04/2012 14:24:51 org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding library to ScatteredArchive ant-junit.jar
30/04/2012 14:24:51 org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding library to ScatteredArchive classes
30/04/2012 14:24:51 org.glassfish.ejb.embedded.EJBContainerImpl deploy
INFO: [EJBContainerImpl] Deploying app: org.glassfish.embeddable.archive.ScatteredArchive@1e852be
30/04/2012 14:25:13 com.sun.ejb.containers.EjbContainerUtilImpl createThreadPoolExecutor
INFO: Created EjbThreadPoolExecutor with thread-core-pool-size 16 thread-max-pool-size 32 thread-keep-alive-seconds 60 thread-queue-capacity 2147483647 allow-core-thread-timeout false
30/04/2012 14:25:13 com.sun.enterprise.security.SecurityLifecycle <init>
INFO: SEC1002: Security Manager is OFF.
30/04/2012 14:25:13 com.sun.enterprise.security.SecurityLifecycle onInitialization
INFO: SEC1010: Entering Security Startup Service
30/04/2012 14:25:13 com.sun.enterprise.security.PolicyLoader loadPolicy
INFO: SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.
30/04/2012 14:25:13 com.sun.enterprise.security.auth.realm.Realm doInstantiate
INFO: SEC1115: Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
30/04/2012 14:25:13 com.sun.enterprise.security.auth.realm.Realm doInstantiate
INFO: SEC1115: Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
30/04/2012 14:25:13 com.sun.enterprise.security.auth.realm.Realm doInstantiate
INFO: SEC1115: Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.
30/04/2012 14:25:14 com.sun.enterprise.security.SecurityLifecycle onInitialization
INFO: SEC1011: Security Service(s) Started Successfully
30/04/2012 14:25:36 org.eclipse.persistence.session.file:/C:/Users/Flavio/AppData/Local/Temp/gfembed6974243943368357507tmp/applications/classes/_EcommercePU
INFO: EclipseLink, version: Eclipse Persistence Services - 2.3.2.v20111125-r10461
30/04/2012 14:25:38 org.eclipse.persistence.session.file:/C:/Users/Flavio/AppData/Local/Temp/gfembed6974243943368357507tmp/applications/classes/_EcommercePU
INFO: file:/C:/Users/Flavio/AppData/Local/Temp/gfembed6974243943368357507tmp/applications/classes/_EcommercePU login successful
30/04/2012 14:25:38 org.eclipse.persistence.session.file:/C:/Users/Flavio/AppData/Local/Temp/gfembed6974243943368357507tmp/applications/classes/_EcommercePU.server
AVISO: Failed to find MBean Server: null or empty List returned from MBeanServerFactory.findMBeanServer(null)
30/04/2012 14:25:39 org.glassfish.persistence.common.Java2DBProcessorHelper executeDDLs
AVISO: PER01000: Got SQLException executing statement CREATE TABLE CALLONAVALIABLE (id INTEGER NOT NULL, CALLED TINYINT(1) default 0, EMAIL VARCHAR(255), PRODUTO_ID INTEGER, PRIMARY KEY (id)): com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table callonavaliable already exists
30/04/2012 14:25:39 org.glassfish.persistence.common.Java2DBProcessorHelper executeDDLs
AVISO: PER01000: Got SQLException executing statement CREATE TABLE USUARIO (ID INTEGER NOT NULL, EMAIL VARCHAR(255) NOT NULL, NOME VARCHAR(255) NOT NULL, PASSWORD VARCHAR(32) NOT NULL, USERNAME VARCHAR(255) NOT NULL, PRIMARY KEY (ID)): com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table usuario already exists
30/04/2012 14:25:39 org.glassfish.persistence.common.Java2DBProcessorHelper executeDDLs
AVISO: PER01000: Got SQLException executing statement CREATE TABLE CREDITCARD (ID INTEGER NOT NULL, BANDEIRA VARCHAR(255) NOT NULL, DATADEVALIDADE DATE NOT NULL, NOMEDOTITULARDOCARTAO VARCHAR(255) NOT NULL, NUMERO VARCHAR(255) NOT NULL, PARCELAS INTEGER NOT NULL, USUARIO_ID INTEGER, PRIMARY KEY (ID)): com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table creditcard already exists
30/04/2012 14:25:39 org.glassfish.persistence.common.Java2DBProcessorHelper executeDDLs
AVISO: PER01000: Got SQLException executing statement CREATE TABLE CATEGORIA (ID INTEGER NOT NULL, ATIVA TINYINT(1) default 0, NOME VARCHAR(255) NOT NULL UNIQUE, PRIMARY KEY (ID)): com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table categoria already exists
30/04/2012 14:25:39 org.glassfish.persistence.common.Java2DBProcessorHelper executeDDLs
AVISO: PER01000: Got SQLException executing statement CREATE TABLE ENDERECO (ID INTEGER NOT NULL, CEP VARCHAR(255) NOT NULL, ENDERECO VARCHAR(255) NOT NULL, ESTADO VARCHAR(100) NOT NULL, NICKNAME VARCHAR(255) NOT NULL, NUMERO VARCHAR(255) NOT NULL, PAIS VARCHAR(2) NOT NULL, usuario INTEGER, PRIMARY KEY (ID)): com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table endereco already exists
30/04/2012 14:25:39 org.glassfish.persistence.common.Java2DBProcessorHelper executeDDLs
AVISO: PER01000: Got SQLException executing statement CREATE TABLE PRODUTO (ID INTEGER NOT NULL, DESCRICAO VARCHAR(255) NOT NULL, ESTOQUE INTEGER NOT NULL, NOME VARCHAR(255) NOT NULL UNIQUE, PRECO DECIMAL(38) NOT NULL, CATEGORIA_ID INTEGER, PRIMARY KEY (ID)): com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table produto already exists
30/04/2012 14:25:39 org.glassfish.persistence.common.Java2DBProcessorHelper executeDDLs
AVISO: PER01000: Got SQLException executing statement CREATE TABLE ITEMDEVENDA (ID INTEGER NOT NULL, QUANTIDADE INTEGER NOT NULL, PRODUTO_ID INTEGER, VENDA_ID INTEGER, PRIMARY KEY (ID)): com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table itemdevenda already exists
30/04/2012 14:25:39 org.glassfish.persistence.common.Java2DBProcessorHelper executeDDLs
AVISO: PER01000: Got SQLException executing statement CREATE TABLE VENDA (ID INTEGER NOT NULL, DATADAVENDA DATE NOT NULL, FECHADA TINYINT(1) default 0, STATUS VARCHAR(255) NOT NULL, VALORTOTAL DECIMAL(38) NOT NULL, CREDITCARD_ID INTEGER, ENDERECODEENVIO_ID INTEGER, USUARIO_ID INTEGER, PRIMARY KEY (ID)): com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table venda already exists
30/04/2012 14:25:39 org.glassfish.persistence.common.Java2DBProcessorHelper executeDDLs
AVISO: PER01000: Got SQLException executing statement ALTER TABLE CALLONAVALIABLE ADD CONSTRAINT FK_CALLONAVALIABLE_PRODUTO_ID FOREIGN KEY (PRODUTO_ID) REFERENCES PRODUTO (ID): java.sql.SQLException: Cant create table devmedia.#sql-76c_2e (errno: 121)
30/04/2012 14:25:39 org.glassfish.persistence.common.Java2DBProcessorHelper executeDDLs
AVISO: PER01000: Got SQLException executing statement ALTER TABLE CREDITCARD ADD CONSTRAINT FK_CREDITCARD_USUARIO_ID FOREIGN KEY (USUARIO_ID) REFERENCES USUARIO (ID): java.sql.SQLException: Cant create table devmedia.#sql-76c_2e (errno: 121)
30/04/2012 14:25:39 org.glassfish.persistence.common.Java2DBProcessorHelper executeDDLs
AVISO: PER01000: Got SQLException executing statement ALTER TABLE ENDERECO ADD CONSTRAINT FK_ENDERECO_usuario FOREIGN KEY (usuario) REFERENCES USUARIO (ID): java.sql.SQLException: Cant create table devmedia.#sql-76c_2e (errno: 121)
30/04/2012 14:25:40 org.glassfish.persistence.common.Java2DBProcessorHelper executeDDLs
AVISO: PER01000: Got SQLException executing statement ALTER TABLE PRODUTO ADD CONSTRAINT FK_PRODUTO_CATEGORIA_ID FOREIGN KEY (CATEGORIA_ID) REFERENCES CATEGORIA (ID): java.sql.SQLException: Cant create table devmedia.#sql-76c_2e (errno: 121)
30/04/2012 14:25:40 org.glassfish.persistence.common.Java2DBProcessorHelper executeDDLs
AVISO: PER01000: Got SQLException executing statement ALTER TABLE ITEMDEVENDA ADD CONSTRAINT FK_ITEMDEVENDA_PRODUTO_ID FOREIGN KEY (PRODUTO_ID) REFERENCES PRODUTO (ID): java.sql.SQLException: Cant create table devmedia.#sql-76c_2e (errno: 121)
30/04/2012 14:25:40 org.glassfish.persistence.common.Java2DBProcessorHelper executeDDLs
AVISO: PER01000: Got SQLException executing statement ALTER TABLE ITEMDEVENDA ADD CONSTRAINT FK_ITEMDEVENDA_VENDA_ID FOREIGN KEY (VENDA_ID) REFERENCES VENDA (ID): java.sql.SQLException: Cant create table devmedia.#sql-76c_2e (errno: 121)
30/04/2012 14:25:40 org.glassfish.persistence.common.Java2DBProcessorHelper executeDDLs
AVISO: PER01000: Got SQLException executing statement ALTER TABLE VENDA ADD CONSTRAINT FK_VENDA_USUARIO_ID FOREIGN KEY (USUARIO_ID) REFERENCES USUARIO (ID): java.sql.SQLException: Cant create table devmedia.#sql-76c_2e (errno: 121)
30/04/2012 14:25:40 org.glassfish.persistence.common.Java2DBProcessorHelper executeDDLs
AVISO: PER01000: Got SQLException executing statement ALTER TABLE VENDA ADD CONSTRAINT FK_VENDA_ENDERECODEENVIO_ID FOREIGN KEY (ENDERECODEENVIO_ID) REFERENCES ENDERECO (ID): java.sql.SQLException: Cant create table devmedia.#sql-76c_2e (errno: 121)
30/04/2012 14:25:40 org.glassfish.persistence.common.Java2DBProcessorHelper executeDDLs
AVISO: PER01000: Got SQLException executing statement ALTER TABLE VENDA ADD CONSTRAINT FK_VENDA_CREDITCARD_ID FOREIGN KEY (CREDITCARD_ID) REFERENCES CREDITCARD (ID): java.sql.SQLException: Cant create table devmedia.#sql-76c_2e (errno: 121)
30/04/2012 14:25:40 org.glassfish.persistence.common.Java2DBProcessorHelper executeDDLs
AVISO: PER01000: Got SQLException executing statement CREATE TABLE SEQUENCE (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT DECIMAL(38), PRIMARY KEY (SEQ_NAME)): com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table sequence already exists
30/04/2012 14:25:40 org.glassfish.persistence.common.Java2DBProcessorHelper executeDDLs
AVISO: PER01000: Got SQLException executing statement INSERT INTO SEQUENCE(SEQ_NAME, SEQ_COUNT) values (SEQ_GEN, 0): com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry SEQ_GEN for key PRIMARY
30/04/2012 14:25:41 com.sun.ejb.containers.BaseContainer initializeHome
INFO: EJB5181:Portable JNDI names for EJB VendaSession: [java:global/classes/VendaSession, java:global/classes/VendaSession!br.com.session.VendaSession]
30/04/2012 14:25:42 com.sun.ejb.containers.BaseContainer initializeHome
INFO: EJB5181:Portable JNDI names for EJB UsuarioSession: [java:global/classes/UsuarioSession, java:global/classes/UsuarioSession!br.com.session.UsuarioSession]
30/04/2012 14:25:42 com.sun.ejb.containers.EjbContainerUtilImpl deployEJBTimerService
INFO: Loading EJBTimerService. Please wait.
30/04/2012 14:25:47 org.eclipse.persistence.session.file:/C:/Users/Flavio/AppData/Local/Temp/gfembed6974243943368357507tmp/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App
INFO: EclipseLink, version: Eclipse Persistence Services - 2.3.2.v20111125-r10461
30/04/2012 14:26:04 org.eclipse.persistence.session.file:/C:/Users/Flavio/AppData/Local/Temp/gfembed6974243943368357507tmp/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App
INFO: file:/C:/Users/Flavio/AppData/Local/Temp/gfembed6974243943368357507tmp/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App login successful
classLoader = WebappClassLoader (delegate=true; repositories=WEB-INF/classes/)
SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7@647edd
30/04/2012 14:26:06 com.sun.ejb.containers.TimerBeanContainer <init>
INFO: [TimerBeanContainer] Created TimerBeanContainer: TimerBean
30/04/2012 14:26:06 com.sun.ejb.containers.BaseContainer initializeHome
INFO: EJB5181:Portable JNDI names for EJB TimerBean: [java:global/ejb-timer-service-app/TimerBean, java:global/ejb-timer-service-app/TimerBean!com.sun.ejb.containers.TimerLocal]
30/04/2012 14:26:06 com.sun.enterprise.web.WebContainer loadWebModule
INFO: WEB0356: Web module [ejb-timer-service-app] not loaded to any virtual servers
30/04/2012 14:26:06 com.sun.enterprise.web.WebApplication start
INFO: WEB0671: Loading application [ejb-timer-service-app] at [/ejb-timer-service-app]
30/04/2012 14:26:06 com.sun.ejb.containers.EjbContainerUtilImpl deployEJBTimerService
INFO: EJB5109:EJB Timer Service started successfully for data source [jdbc/__TimerPool]
30/04/2012 14:26:06 com.sun.ejb.containers.EjbContainerUtilImpl getEJBTimerService
INFO: Setting DBReadBeforeTimeout to false
30/04/2012 14:26:06 com.sun.ejb.containers.EjbContainerUtilImpl getEJBTimerService
INFO: ==> Restoring Timers ...
30/04/2012 14:26:07 com.sun.ejb.containers.EJBTimerService restoreEJBTimers
INFO: There are no EJB Timers owned by this server
30/04/2012 14:26:07 com.sun.ejb.containers.EjbContainerUtilImpl getEJBTimerService
INFO: <== ... Timers Restored.
30/04/2012 14:26:07 com.sun.ejb.containers.BaseContainer initializeHome
INFO: EJB5181:Portable JNDI names for EJB ProdutoSession: [java:global/classes/ProdutoSession, java:global/classes/ProdutoSession!br.com.session.ProdutoSession]
30/04/2012 14:26:07 com.sun.jts.CosTransactions.DefaultTransactionService setServerName
INFO: JTS5014: Recoverable JTS instance, serverId = [100]
30/04/2012 14:26:08 com.sun.ejb.containers.BaseContainer postInvoke
AVISO: EJB5184:A system exception occurred during an invocation on EJB UsuarioSession, method: public br.com.entity.Usuario br.com.session.UsuarioSession.saveUsuario(br.com.entity.Usuario)
30/04/2012 14:26:08 com.sun.ejb.containers.BaseContainer postInvoke
AVISO:
javax.ejb.EJBException
at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:5215)
at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:5113)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4915)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2045)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1994)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:222)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
at $Proxy124.saveUsuario(Unknown Source)
at br.com.session.__EJB31_Generated__UsuarioSession__Intf____Bean__.saveUsuario(Unknown Source)
at br.com.session.UsuarioSessionTest.testSaveUsuario(UsuarioSessionTest.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:518)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1052)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:906)
Caused by: javax.validation.ConstraintViolationException: Bean Validation constraint(s) violated while executing Automatic Bean Validation on callback event:prePersist. Please refer to embedded ConstraintViolations for details.
at org.eclipse.persistence.internal.jpa.metadata.listeners.BeanValidationListener.validateOnCallbackEvent(BeanValidationListener.java:90)
at org.eclipse.persistence.internal.jpa.metadata.listeners.BeanValidationListener.prePersist(BeanValidationListener.java:62)
at org.eclipse.persistence.descriptors.DescriptorEventManager.notifyListener(DescriptorEventManager.java:698)
at org.eclipse.persistence.descriptors.DescriptorEventManager.notifyEJB30Listeners(DescriptorEventManager.java:641)
at org.eclipse.persistence.descriptors.DescriptorEventManager.executeEvent(DescriptorEventManager.java:200)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNewObjectClone(UnitOfWorkImpl.java:4257)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNotRegisteredNewObjectForPersist(UnitOfWorkImpl.java:4234)
at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.registerNotRegisteredNewObjectForPersist(RepeatableWriteUnitOfWork.java:513)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNewObjectForPersist(UnitOfWorkImpl.java:4176)
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.persist(EntityManagerImpl.java:440)
at com.sun.enterprise.container.common.impl.EntityManagerWrapper.persist(EntityManagerWrapper.java:269)
at br.com.session.UsuarioSession.saveUsuario(UsuarioSession.java:81)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5388)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:619)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:162)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:144)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:861)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:370)
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5360)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5348)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:214)
... 29 more
Se alguém souber a solução eu agradeço muito.
Sou iniciante e ainda tenho problemas para identificar as causas através das mensagens de erro do console.
Segue a mensagem:
saveUsuario
30/04/2012 14:24:40 com.sun.enterprise.v3.server.CommonClassLoaderServiceImpl findDerbyClient
INFO: Cannot find javadb client jar file, derby jdbc driver will not be available by default.
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/Flavio/GlassFish_Server/glassfish/modules/weld-osgi-bundle.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/Flavio/GlassFish_Server/glassfish/modules/bean-validator.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
30/04/2012 14:24:43 org.hibernate.validator.util.Version <clinit>
INFO: Hibernate Validator 4.2.0.Final
30/04/2012 14:24:44 org.glassfish.ha.store.spi.BackingStoreFactoryRegistry register
INFO: Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry
30/04/2012 14:24:44 com.sun.enterprise.v3.server.AppServerStartup run
INFO: GlassFish Server Open Source Edition 3.1.2 (23) hora de inicialização : Embedded (2.386ms), serviços de inicialização(3.838ms), total(6.224ms)
30/04/2012 14:24:46 org.glassfish.admin.mbeanserver.JMXStartupService$JMXConnectorsStarterThread run
INFO: JMX006: JMXStartupService had disabled JMXConnector system
30/04/2012 14:24:49 org.glassfish.admin.mbeanserver.JMXStartupService shutdown
INFO: JMX001: JMXStartupService and JMXConnectors have been shut down.
30/04/2012 14:24:49 com.sun.enterprise.v3.server.AppServerStartup stop
INFO: Procedimento de shutdown finalizado
30/04/2012 14:24:49 AppServerStartup run
INFO: [Thread[GlassFish Kernel Main Thread,5,main]] exiting
30/04/2012 14:24:49 org.glassfish.ha.store.spi.BackingStoreFactoryRegistry register
INFO: Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry
30/04/2012 14:24:49 com.sun.enterprise.v3.server.AppServerStartup run
INFO: GlassFish Server Open Source Edition 3.1.2 (23) hora de inicialização : Embedded (10.920ms), serviços de inicialização(358ms), total(11.278ms)
30/04/2012 14:24:49 org.glassfish.admin.mbeanserver.JMXStartupService$JMXConnectorsStarterThread run
INFO: JMX006: JMXStartupService had disabled JMXConnector system
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: javax.servlet-api.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: javax.servlet.jsp-api.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: javax.persistence.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: weld-osgi-bundle.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: javax.transaction.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: jaxb-osgi.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: javax.security.auth.message.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: javax.servlet.jsp.jstl-api.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: javax.faces.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: javax.enterprise.deploy.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping entry with a Manifest file with a special attribute: webservices-api-osgi.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping entry with a Manifest file with a special attribute: javax.annotation.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: jersey-core.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: javax.resource.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: javax.el-api.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: javax.management.j2ee.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: javax.security.jacc.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: javax.ejb.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: bean-validator.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: javax.jms.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: javax.mail.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping module: webservices-osgi.jar
30/04/2012 14:24:50 org.glassfish.ejb.embedded.EJBContainerProviderImpl skipJar
INFO: ... skipping entry with a Manifest file with a special attribute: glassfish-embedded-static-shell.jar
30/04/2012 14:24:51 org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding EJB module to ScatteredArchive classes
30/04/2012 14:24:51 org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding library to ScatteredArchive ant-junit4.jar
30/04/2012 14:24:51 org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding library to ScatteredArchive junit-4.10.jar
30/04/2012 14:24:51 org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding library to ScatteredArchive jaxm-api.jar
30/04/2012 14:24:51 org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding library to ScatteredArchive ant.jar
30/04/2012 14:24:51 org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding library to ScatteredArchive ant-launcher.jar
30/04/2012 14:24:51 org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding library to ScatteredArchive jaxb-api-osgi.jar
30/04/2012 14:24:51 org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding library to ScatteredArchive ant-junit.jar
30/04/2012 14:24:51 org.glassfish.ejb.embedded.DeploymentElement getOrCreateApplication
INFO: [DeploymentElement] adding library to ScatteredArchive classes
30/04/2012 14:24:51 org.glassfish.ejb.embedded.EJBContainerImpl deploy
INFO: [EJBContainerImpl] Deploying app: org.glassfish.embeddable.archive.ScatteredArchive@1e852be
30/04/2012 14:25:13 com.sun.ejb.containers.EjbContainerUtilImpl createThreadPoolExecutor
INFO: Created EjbThreadPoolExecutor with thread-core-pool-size 16 thread-max-pool-size 32 thread-keep-alive-seconds 60 thread-queue-capacity 2147483647 allow-core-thread-timeout false
30/04/2012 14:25:13 com.sun.enterprise.security.SecurityLifecycle <init>
INFO: SEC1002: Security Manager is OFF.
30/04/2012 14:25:13 com.sun.enterprise.security.SecurityLifecycle onInitialization
INFO: SEC1010: Entering Security Startup Service
30/04/2012 14:25:13 com.sun.enterprise.security.PolicyLoader loadPolicy
INFO: SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.
30/04/2012 14:25:13 com.sun.enterprise.security.auth.realm.Realm doInstantiate
INFO: SEC1115: Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
30/04/2012 14:25:13 com.sun.enterprise.security.auth.realm.Realm doInstantiate
INFO: SEC1115: Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
30/04/2012 14:25:13 com.sun.enterprise.security.auth.realm.Realm doInstantiate
INFO: SEC1115: Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.
30/04/2012 14:25:14 com.sun.enterprise.security.SecurityLifecycle onInitialization
INFO: SEC1011: Security Service(s) Started Successfully
30/04/2012 14:25:36 org.eclipse.persistence.session.file:/C:/Users/Flavio/AppData/Local/Temp/gfembed6974243943368357507tmp/applications/classes/_EcommercePU
INFO: EclipseLink, version: Eclipse Persistence Services - 2.3.2.v20111125-r10461
30/04/2012 14:25:38 org.eclipse.persistence.session.file:/C:/Users/Flavio/AppData/Local/Temp/gfembed6974243943368357507tmp/applications/classes/_EcommercePU
INFO: file:/C:/Users/Flavio/AppData/Local/Temp/gfembed6974243943368357507tmp/applications/classes/_EcommercePU login successful
30/04/2012 14:25:38 org.eclipse.persistence.session.file:/C:/Users/Flavio/AppData/Local/Temp/gfembed6974243943368357507tmp/applications/classes/_EcommercePU.server
AVISO: Failed to find MBean Server: null or empty List returned from MBeanServerFactory.findMBeanServer(null)
30/04/2012 14:25:39 org.glassfish.persistence.common.Java2DBProcessorHelper executeDDLs
AVISO: PER01000: Got SQLException executing statement CREATE TABLE CALLONAVALIABLE (id INTEGER NOT NULL, CALLED TINYINT(1) default 0, EMAIL VARCHAR(255), PRODUTO_ID INTEGER, PRIMARY KEY (id)): com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table callonavaliable already exists
30/04/2012 14:25:39 org.glassfish.persistence.common.Java2DBProcessorHelper executeDDLs
AVISO: PER01000: Got SQLException executing statement CREATE TABLE USUARIO (ID INTEGER NOT NULL, EMAIL VARCHAR(255) NOT NULL, NOME VARCHAR(255) NOT NULL, PASSWORD VARCHAR(32) NOT NULL, USERNAME VARCHAR(255) NOT NULL, PRIMARY KEY (ID)): com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table usuario already exists
30/04/2012 14:25:39 org.glassfish.persistence.common.Java2DBProcessorHelper executeDDLs
AVISO: PER01000: Got SQLException executing statement CREATE TABLE CREDITCARD (ID INTEGER NOT NULL, BANDEIRA VARCHAR(255) NOT NULL, DATADEVALIDADE DATE NOT NULL, NOMEDOTITULARDOCARTAO VARCHAR(255) NOT NULL, NUMERO VARCHAR(255) NOT NULL, PARCELAS INTEGER NOT NULL, USUARIO_ID INTEGER, PRIMARY KEY (ID)): com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table creditcard already exists
30/04/2012 14:25:39 org.glassfish.persistence.common.Java2DBProcessorHelper executeDDLs
AVISO: PER01000: Got SQLException executing statement CREATE TABLE CATEGORIA (ID INTEGER NOT NULL, ATIVA TINYINT(1) default 0, NOME VARCHAR(255) NOT NULL UNIQUE, PRIMARY KEY (ID)): com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table categoria already exists
30/04/2012 14:25:39 org.glassfish.persistence.common.Java2DBProcessorHelper executeDDLs
AVISO: PER01000: Got SQLException executing statement CREATE TABLE ENDERECO (ID INTEGER NOT NULL, CEP VARCHAR(255) NOT NULL, ENDERECO VARCHAR(255) NOT NULL, ESTADO VARCHAR(100) NOT NULL, NICKNAME VARCHAR(255) NOT NULL, NUMERO VARCHAR(255) NOT NULL, PAIS VARCHAR(2) NOT NULL, usuario INTEGER, PRIMARY KEY (ID)): com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table endereco already exists
30/04/2012 14:25:39 org.glassfish.persistence.common.Java2DBProcessorHelper executeDDLs
AVISO: PER01000: Got SQLException executing statement CREATE TABLE PRODUTO (ID INTEGER NOT NULL, DESCRICAO VARCHAR(255) NOT NULL, ESTOQUE INTEGER NOT NULL, NOME VARCHAR(255) NOT NULL UNIQUE, PRECO DECIMAL(38) NOT NULL, CATEGORIA_ID INTEGER, PRIMARY KEY (ID)): com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table produto already exists
30/04/2012 14:25:39 org.glassfish.persistence.common.Java2DBProcessorHelper executeDDLs
AVISO: PER01000: Got SQLException executing statement CREATE TABLE ITEMDEVENDA (ID INTEGER NOT NULL, QUANTIDADE INTEGER NOT NULL, PRODUTO_ID INTEGER, VENDA_ID INTEGER, PRIMARY KEY (ID)): com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table itemdevenda already exists
30/04/2012 14:25:39 org.glassfish.persistence.common.Java2DBProcessorHelper executeDDLs
AVISO: PER01000: Got SQLException executing statement CREATE TABLE VENDA (ID INTEGER NOT NULL, DATADAVENDA DATE NOT NULL, FECHADA TINYINT(1) default 0, STATUS VARCHAR(255) NOT NULL, VALORTOTAL DECIMAL(38) NOT NULL, CREDITCARD_ID INTEGER, ENDERECODEENVIO_ID INTEGER, USUARIO_ID INTEGER, PRIMARY KEY (ID)): com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table venda already exists
30/04/2012 14:25:39 org.glassfish.persistence.common.Java2DBProcessorHelper executeDDLs
AVISO: PER01000: Got SQLException executing statement ALTER TABLE CALLONAVALIABLE ADD CONSTRAINT FK_CALLONAVALIABLE_PRODUTO_ID FOREIGN KEY (PRODUTO_ID) REFERENCES PRODUTO (ID): java.sql.SQLException: Cant create table devmedia.#sql-76c_2e (errno: 121)
30/04/2012 14:25:39 org.glassfish.persistence.common.Java2DBProcessorHelper executeDDLs
AVISO: PER01000: Got SQLException executing statement ALTER TABLE CREDITCARD ADD CONSTRAINT FK_CREDITCARD_USUARIO_ID FOREIGN KEY (USUARIO_ID) REFERENCES USUARIO (ID): java.sql.SQLException: Cant create table devmedia.#sql-76c_2e (errno: 121)
30/04/2012 14:25:39 org.glassfish.persistence.common.Java2DBProcessorHelper executeDDLs
AVISO: PER01000: Got SQLException executing statement ALTER TABLE ENDERECO ADD CONSTRAINT FK_ENDERECO_usuario FOREIGN KEY (usuario) REFERENCES USUARIO (ID): java.sql.SQLException: Cant create table devmedia.#sql-76c_2e (errno: 121)
30/04/2012 14:25:40 org.glassfish.persistence.common.Java2DBProcessorHelper executeDDLs
AVISO: PER01000: Got SQLException executing statement ALTER TABLE PRODUTO ADD CONSTRAINT FK_PRODUTO_CATEGORIA_ID FOREIGN KEY (CATEGORIA_ID) REFERENCES CATEGORIA (ID): java.sql.SQLException: Cant create table devmedia.#sql-76c_2e (errno: 121)
30/04/2012 14:25:40 org.glassfish.persistence.common.Java2DBProcessorHelper executeDDLs
AVISO: PER01000: Got SQLException executing statement ALTER TABLE ITEMDEVENDA ADD CONSTRAINT FK_ITEMDEVENDA_PRODUTO_ID FOREIGN KEY (PRODUTO_ID) REFERENCES PRODUTO (ID): java.sql.SQLException: Cant create table devmedia.#sql-76c_2e (errno: 121)
30/04/2012 14:25:40 org.glassfish.persistence.common.Java2DBProcessorHelper executeDDLs
AVISO: PER01000: Got SQLException executing statement ALTER TABLE ITEMDEVENDA ADD CONSTRAINT FK_ITEMDEVENDA_VENDA_ID FOREIGN KEY (VENDA_ID) REFERENCES VENDA (ID): java.sql.SQLException: Cant create table devmedia.#sql-76c_2e (errno: 121)
30/04/2012 14:25:40 org.glassfish.persistence.common.Java2DBProcessorHelper executeDDLs
AVISO: PER01000: Got SQLException executing statement ALTER TABLE VENDA ADD CONSTRAINT FK_VENDA_USUARIO_ID FOREIGN KEY (USUARIO_ID) REFERENCES USUARIO (ID): java.sql.SQLException: Cant create table devmedia.#sql-76c_2e (errno: 121)
30/04/2012 14:25:40 org.glassfish.persistence.common.Java2DBProcessorHelper executeDDLs
AVISO: PER01000: Got SQLException executing statement ALTER TABLE VENDA ADD CONSTRAINT FK_VENDA_ENDERECODEENVIO_ID FOREIGN KEY (ENDERECODEENVIO_ID) REFERENCES ENDERECO (ID): java.sql.SQLException: Cant create table devmedia.#sql-76c_2e (errno: 121)
30/04/2012 14:25:40 org.glassfish.persistence.common.Java2DBProcessorHelper executeDDLs
AVISO: PER01000: Got SQLException executing statement ALTER TABLE VENDA ADD CONSTRAINT FK_VENDA_CREDITCARD_ID FOREIGN KEY (CREDITCARD_ID) REFERENCES CREDITCARD (ID): java.sql.SQLException: Cant create table devmedia.#sql-76c_2e (errno: 121)
30/04/2012 14:25:40 org.glassfish.persistence.common.Java2DBProcessorHelper executeDDLs
AVISO: PER01000: Got SQLException executing statement CREATE TABLE SEQUENCE (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT DECIMAL(38), PRIMARY KEY (SEQ_NAME)): com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table sequence already exists
30/04/2012 14:25:40 org.glassfish.persistence.common.Java2DBProcessorHelper executeDDLs
AVISO: PER01000: Got SQLException executing statement INSERT INTO SEQUENCE(SEQ_NAME, SEQ_COUNT) values (SEQ_GEN, 0): com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry SEQ_GEN for key PRIMARY
30/04/2012 14:25:41 com.sun.ejb.containers.BaseContainer initializeHome
INFO: EJB5181:Portable JNDI names for EJB VendaSession: [java:global/classes/VendaSession, java:global/classes/VendaSession!br.com.session.VendaSession]
30/04/2012 14:25:42 com.sun.ejb.containers.BaseContainer initializeHome
INFO: EJB5181:Portable JNDI names for EJB UsuarioSession: [java:global/classes/UsuarioSession, java:global/classes/UsuarioSession!br.com.session.UsuarioSession]
30/04/2012 14:25:42 com.sun.ejb.containers.EjbContainerUtilImpl deployEJBTimerService
INFO: Loading EJBTimerService. Please wait.
30/04/2012 14:25:47 org.eclipse.persistence.session.file:/C:/Users/Flavio/AppData/Local/Temp/gfembed6974243943368357507tmp/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App
INFO: EclipseLink, version: Eclipse Persistence Services - 2.3.2.v20111125-r10461
30/04/2012 14:26:04 org.eclipse.persistence.session.file:/C:/Users/Flavio/AppData/Local/Temp/gfembed6974243943368357507tmp/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App
INFO: file:/C:/Users/Flavio/AppData/Local/Temp/gfembed6974243943368357507tmp/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App login successful
classLoader = WebappClassLoader (delegate=true; repositories=WEB-INF/classes/)
SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7@647edd
30/04/2012 14:26:06 com.sun.ejb.containers.TimerBeanContainer <init>
INFO: [TimerBeanContainer] Created TimerBeanContainer: TimerBean
30/04/2012 14:26:06 com.sun.ejb.containers.BaseContainer initializeHome
INFO: EJB5181:Portable JNDI names for EJB TimerBean: [java:global/ejb-timer-service-app/TimerBean, java:global/ejb-timer-service-app/TimerBean!com.sun.ejb.containers.TimerLocal]
30/04/2012 14:26:06 com.sun.enterprise.web.WebContainer loadWebModule
INFO: WEB0356: Web module [ejb-timer-service-app] not loaded to any virtual servers
30/04/2012 14:26:06 com.sun.enterprise.web.WebApplication start
INFO: WEB0671: Loading application [ejb-timer-service-app] at [/ejb-timer-service-app]
30/04/2012 14:26:06 com.sun.ejb.containers.EjbContainerUtilImpl deployEJBTimerService
INFO: EJB5109:EJB Timer Service started successfully for data source [jdbc/__TimerPool]
30/04/2012 14:26:06 com.sun.ejb.containers.EjbContainerUtilImpl getEJBTimerService
INFO: Setting DBReadBeforeTimeout to false
30/04/2012 14:26:06 com.sun.ejb.containers.EjbContainerUtilImpl getEJBTimerService
INFO: ==> Restoring Timers ...
30/04/2012 14:26:07 com.sun.ejb.containers.EJBTimerService restoreEJBTimers
INFO: There are no EJB Timers owned by this server
30/04/2012 14:26:07 com.sun.ejb.containers.EjbContainerUtilImpl getEJBTimerService
INFO: <== ... Timers Restored.
30/04/2012 14:26:07 com.sun.ejb.containers.BaseContainer initializeHome
INFO: EJB5181:Portable JNDI names for EJB ProdutoSession: [java:global/classes/ProdutoSession, java:global/classes/ProdutoSession!br.com.session.ProdutoSession]
30/04/2012 14:26:07 com.sun.jts.CosTransactions.DefaultTransactionService setServerName
INFO: JTS5014: Recoverable JTS instance, serverId = [100]
30/04/2012 14:26:08 com.sun.ejb.containers.BaseContainer postInvoke
AVISO: EJB5184:A system exception occurred during an invocation on EJB UsuarioSession, method: public br.com.entity.Usuario br.com.session.UsuarioSession.saveUsuario(br.com.entity.Usuario)
30/04/2012 14:26:08 com.sun.ejb.containers.BaseContainer postInvoke
AVISO:
javax.ejb.EJBException
at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:5215)
at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:5113)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4915)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2045)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1994)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:222)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
at $Proxy124.saveUsuario(Unknown Source)
at br.com.session.__EJB31_Generated__UsuarioSession__Intf____Bean__.saveUsuario(Unknown Source)
at br.com.session.UsuarioSessionTest.testSaveUsuario(UsuarioSessionTest.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:518)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1052)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:906)
Caused by: javax.validation.ConstraintViolationException: Bean Validation constraint(s) violated while executing Automatic Bean Validation on callback event:prePersist. Please refer to embedded ConstraintViolations for details.
at org.eclipse.persistence.internal.jpa.metadata.listeners.BeanValidationListener.validateOnCallbackEvent(BeanValidationListener.java:90)
at org.eclipse.persistence.internal.jpa.metadata.listeners.BeanValidationListener.prePersist(BeanValidationListener.java:62)
at org.eclipse.persistence.descriptors.DescriptorEventManager.notifyListener(DescriptorEventManager.java:698)
at org.eclipse.persistence.descriptors.DescriptorEventManager.notifyEJB30Listeners(DescriptorEventManager.java:641)
at org.eclipse.persistence.descriptors.DescriptorEventManager.executeEvent(DescriptorEventManager.java:200)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNewObjectClone(UnitOfWorkImpl.java:4257)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNotRegisteredNewObjectForPersist(UnitOfWorkImpl.java:4234)
at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.registerNotRegisteredNewObjectForPersist(RepeatableWriteUnitOfWork.java:513)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNewObjectForPersist(UnitOfWorkImpl.java:4176)
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.persist(EntityManagerImpl.java:440)
at com.sun.enterprise.container.common.impl.EntityManagerWrapper.persist(EntityManagerWrapper.java:269)
at br.com.session.UsuarioSession.saveUsuario(UsuarioSession.java:81)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5388)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:619)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:162)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:144)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:861)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:370)
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5360)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5348)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:214)
... 29 more
Flávio Xavier
Curtidas 0
Respostas
Davi Costa
30/04/2012
Me parece que o erro está aki:
AVISO: PER01000: Got SQLException executing statement INSERT INTO SEQUENCE(SEQ_NAME, SEQ_COUNT) values (SEQ_GEN, 0): com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry SEQ_GEN for key PRIMARY
30/04/2012 14:25:41 com.sun.ejb.containers.BaseContainer initializeHome...
Confere se já n temregistro para essa tabela, se o seu sequence está realmente para seu próximo valor ideal.
O próximo valor do sequence n pode ser o mesmo que já tenha um registro no seu banco
att Davi
AVISO: PER01000: Got SQLException executing statement INSERT INTO SEQUENCE(SEQ_NAME, SEQ_COUNT) values (SEQ_GEN, 0): com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry SEQ_GEN for key PRIMARY
30/04/2012 14:25:41 com.sun.ejb.containers.BaseContainer initializeHome...
Confere se já n temregistro para essa tabela, se o seu sequence está realmente para seu próximo valor ideal.
O próximo valor do sequence n pode ser o mesmo que já tenha um registro no seu banco
att Davi
GOSTEI 0
Flávio Xavier
30/04/2012
Me parece que o erro está aki:
AVISO: PER01000: Got SQLException executing statement INSERT INTO SEQUENCE(SEQ_NAME, SEQ_COUNT) values (SEQ_GEN, 0): com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry SEQ_GEN for key PRIMARY
30/04/2012 14:25:41 com.sun.ejb.containers.BaseContainer initializeHome...
Confere se já n temregistro para essa tabela, se o seu sequence está realmente para seu próximo valor ideal.
O próximo valor do sequence n pode ser o mesmo que já tenha um registro no seu banco
att Davi
AVISO: PER01000: Got SQLException executing statement INSERT INTO SEQUENCE(SEQ_NAME, SEQ_COUNT) values (SEQ_GEN, 0): com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry SEQ_GEN for key PRIMARY
30/04/2012 14:25:41 com.sun.ejb.containers.BaseContainer initializeHome...
Confere se já n temregistro para essa tabela, se o seu sequence está realmente para seu próximo valor ideal.
O próximo valor do sequence n pode ser o mesmo que já tenha um registro no seu banco
att Davi
Olá Davi,
Não existe nenhum registro na tabela sequence. E só para me certificar eu apaguei todas as tabelas e criei elas novamente. Mas quando eu rodo este teste ele apaga todas as tabelas menos esta Sequence. Mas não chega a salver nenhum registro nela.
Aproveitando, gostaria de saber pq é gerada esta tabela. Pois quando eu faço o MER das tabelas esta tabela Sequence não tem relacionamento com nenhuma outra tabela.
Queria saber tmb se vc sabe pq ao iniciar o teste esta aparecendo esta msg:
01/05/2012 11:58:35 com.sun.enterprise.v3.server.CommonClassLoaderServiceImpl findDerbyClient
INFO: Cannot find javadb client jar file, derby jdbc driver will not be available by default.
Pq ele tenta acessar o Java DB se as tabelas estão no banco MySql?
Vlw!
GOSTEI 0
Davi Costa
30/04/2012
Ele não salva na tabela sequence justamente pq o erro tá dando ao inserir nela,
mas com isso que vc falou do derby, será que seu datasource está 100%?
realmente não era p ter referencia nenhuma a outro banco a não ser o seu mysql
att Davi
mas com isso que vc falou do derby, será que seu datasource está 100%?
realmente não era p ter referencia nenhuma a outro banco a não ser o seu mysql
att Davi
GOSTEI 0
Robson Teixeira
30/04/2012
Revise também as anotações nas suas classes de modelo pois muitas vezes quando se obtem esse comportamento nas consultas geradas pode ser as anotações que podem esta com erro.
GOSTEI 0