DevMedia

Erro de deploy

0
Colega, sou novo no java e estou fazendo umas videos aulas, o que pega  é que geralmente da erro não sei (ou sabemos) como consertar.
O erro é o seguinte:

init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
compile:
compile-jsps:
In-place deployment at C:\Devmedia\EcommerceDevmedia\build\web

Initializing...
deploy?path=C:\Devmedia\EcommerceDevmedia\build\web&name=EcommerceDevmedia&force=true failed on GlassFish Server 3
C:\Devmedia\EcommerceDevmedia\nbproject\build-impl.xml:684: The module has not been deployed.
BUILD FAILED (total time: 7 seconds)

Alguém poderia me dar uma ajuda de como consertar esse erro?
Obrigado!

Respostas (31)

0
Cara, contextualiza um pouco mais,
acontece as vezes, ou não está conseguindo levantar a aplicação de jeito nenhum?
As vezes quando alteramos algum código com o servidor do glassfish no ar, ele dá esse tipo de erro.
Basta quando ele acontecer ir sempre dando um clean no projeto.

Att Davi
0
Acontece que quando eu mando rodar a aplicação ao inves de aparecer a mensagem de boas vindas o firefox
aparece essa que te enviei.
Começando do zero, quando mandava rodar de uma mensagem que o glasfish estava com falha, ai troquei para a porta 51399 e o glasfish conectou, mas ao fazer essa segunda parte, deu esse erro e não gerou nenhuma entidade (tabela) no meu schema.
0
Cole aqui a saida do console do servidor de aplicação...

esta saida que voce colou é do aplicativo ! preciso saber o que ocorre no servidor (possivelmente a aba do lado)


0

Ola Dyego, 

o erro abaixo esta postado na aula 16 do curso de loja virtual, copiei e colei para vc conforme pediu.

Um abraço



Abaixo o erro do glasfish
19/12/2010 23:50:46 com.sun.enterprise.glassfish.bootstrap.ASMain main
INFO: Launching GlassFish on Felix platform
Welcome to Felix
================
INFO: Perform lazy SSL initialization for the listener 'http-listener-2'
INFO: Starting Grizzly Framework 1.9.18-o - Sun Dec 19 23:50:51 BRST 2010
INFO: Starting Grizzly Framework 1.9.18-o - Sun Dec 19 23:50:52 BRST 2010
INFO: Grizzly Framework 1.9.18-o started in: 426ms listening on port 29584
INFO: Grizzly Framework 1.9.18-o started in: 348ms listening on port 29579
INFO: Grizzly Framework 1.9.18-o started in: 391ms listening on port 29540
INFO: Grizzly Framework 1.9.18-o started in: 419ms listening on port 29551
INFO: Grizzly Framework 1.9.18-o started in: 488ms listening on port 29583
INFO: GlassFish Server Open Source Edition 3.0.1 (22) startup time : Felix(4781ms) startup services(1604ms) total(6385ms)
INFO: Binding RMI port to *:29589
INFO: Hibernate Validator bean-validator-3.0-JBoss-4.0.2
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: Grizzly Framework 1.9.18-o started in: 116ms listening on port 29583
INFO: JMXStartupService: Started JMXConnector, JMXService URL = service:jmx:rmi://Nilo-PC:29589/jndi/rmi://Nilo-PC:29589/jmxrmi
INFO: Perform lazy SSL initialization for the listener 'http-listener-2'
INFO: Using com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate as the delegate
INFO: Grizzly Framework 1.9.18-o started in: 89ms listening on port 29584
INFO: [Thread[GlassFish Kernel Main Thread,5,main]] started
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = C:\Program Files (x86)\glassfish-3.0.1\glassfish\modules\autostart, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = C:\Users\Nilo\AppData\Local\Temp\fileinstall-6919617671604283668, felix.fileinstall.filter = null}
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = C:\Program Files (x86)\glassfish-3.0.1\glassfish\domains\domain2\autodeploy\bundles, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = C:\Users\Nilo\AppData\Local\Temp\fileinstall--7431731066387498102, felix.fileinstall.filter = null}
INFO: Started bundle: file:/C:/Program%20Files%20(x86)/glassfish-3.0.1/glassfish/modules/autostart/osgi-web-container.jar
INFO: Updating configuration from org.apache.felix.fileinstall-autodeploy-bundles.cfg
INFO: Installed C:\Program Files (x86)\glassfish-3.0.1\glassfish\modules\autostart\org.apache.felix.fileinstall-autodeploy-bundles.cfg
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = C:\Program Files (x86)\glassfish-3.0.1\glassfish\domains\domain2\autodeploy\bundles, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = C:\Users\Nilo\AppData\Local\Temp\fileinstall-4104646457483612137, felix.fileinstall.filter = null}
INFO: SEC1002: Security Manager is OFF.
INFO: Security startup service called
INFO: SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.
INFO: Realm admin-realm of classtype com.sun.enterprise.security.auth.realm.file.FileRealm successfully created.
INFO: Realm file of classtype com.sun.enterprise.security.auth.realm.file.FileRealm successfully created.
INFO: Realm certificate of classtype com.sun.enterprise.security.auth.realm.certificate.CertificateRealm successfully created.
INFO: Security service(s) started successfully....
INFO: Created HTTP listener http-listener-1 on port 29583
INFO: Created HTTP listener http-listener-2 on port 29584
INFO: Created HTTP listener admin-listener on port 29551
INFO: Created virtual server server
INFO: Created virtual server __asadmin
INFO: Virtual server server loaded system default web module
INFO: WS00018: Webservice Endpoint deployed
NewWebService listening at address at http://localhost:29583/EcommerceDevmedia/NewWebServiceService
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
SEVERE: Exception while invoking class org.glassfish.persistence.jpa.JPADeployer prepare method
javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [EcommerceDevmediaPU] failed.
Internal Exception: Exception [EclipseLink-7154] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.ValidationException
Exception Description: The attribute [sells] in entity class [class br.com.devmedia.entity.CreditCard] has a mappedBy value of [creditcard] which does not exist in its owning entity class [class br.com.devmedia.entity.Sell]. If the owning entity class is a @MappedSuperclass, this is invalid, and your attribute should reference the correct subclass.
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:991)
at org.eclipse.persistence.jpa.PersistenceProvider.createContainerEntityManagerFactory(PersistenceProvider.java:202)
at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:181)
at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:96)
at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:121)
at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:644)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:296)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
at java.lang.Thread.run(Thread.java:619)
Caused by: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [EcommerceDevmediaPU] failed.
Internal Exception: Exception [EclipseLink-7154] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.ValidationException
Exception Description: The attribute [sells] in entity class [class br.com.devmedia.entity.CreditCard] has a mappedBy value of [creditcard] which does not exist in its owning entity class [class br.com.devmedia.entity.Sell]. If the owning entity class is a @MappedSuperclass, this is invalid, and your attribute should reference the correct subclass.
at org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:210)
... 34 more
Caused by: Exception [EclipseLink-7154] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.ValidationException
Exception Description: The attribute [sells] in entity class [class br.com.devmedia.entity.CreditCard] has a mappedBy value of [creditcard] which does not exist in its owning entity class [class br.com.devmedia.entity.Sell]. If the owning entity class is a @MappedSuperclass, this is invalid, and your attribute should reference the correct subclass.
at org.eclipse.persistence.exceptions.ValidationException.noMappedByAttributeFound(ValidationException.java:1313)
at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.RelationshipAccessor.getOwningMapping(RelationshipAccessor.java:298)
at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.OneToManyAccessor.processOneToManyMapping(OneToManyAccessor.java:168)
at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.OneToManyAccessor.process(OneToManyAccessor.java:111)
at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.RelationshipAccessor.processRelationship(RelationshipAccessor.java:546)
at org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processRelationshipAccessors(MetadataProject.java:1085)
at org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processStage3(MetadataProject.java:1364)
at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processORMMetadata(MetadataProcessor.java:462)
at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:390)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:945)
... 33 more

SEVERE: Exception while preparing the app
javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [EcommerceDevmediaPU] failed.
Internal Exception: Exception [EclipseLink-7154] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.ValidationException
Exception Description: The attribute [sells] in entity class [class br.com.devmedia.entity.CreditCard] has a mappedBy value of [creditcard] which does not exist in its owning entity class [class br.com.devmedia.entity.Sell]. If the owning entity class is a @MappedSuperclass, this is invalid, and your attribute should reference the correct subclass.
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:991)
at org.eclipse.persistence.jpa.PersistenceProvider.createContainerEntityManagerFactory(PersistenceProvider.java:202)
at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:181)
at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:96)
at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:121)
at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:644)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:296)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
at java.lang.Thread.run(Thread.java:619)
Caused by: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [EcommerceDevmediaPU] failed.
Internal Exception: Exception [EclipseLink-7154] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.ValidationException
Exception Description: The attribute [sells] in entity class [class br.com.devmedia.entity.CreditCard] has a mappedBy value of [creditcard] which does not exist in its owning entity class [class br.com.devmedia.entity.Sell]. If the owning entity class is a @MappedSuperclass, this is invalid, and your attribute should reference the correct subclass.
at org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:210)
... 34 more
Caused by: Exception [EclipseLink-7154] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.ValidationException
Exception Description: The attribute [sells] in entity class [class br.com.devmedia.entity.CreditCard] has a mappedBy value of [creditcard] which does not exist in its owning entity class [class br.com.devmedia.entity.Sell]. If the owning entity class is a @MappedSuperclass, this is invalid, and your attribute should reference the correct subclass.
at org.eclipse.persistence.exceptions.ValidationException.noMappedByAttributeFound(ValidationException.java:1313)
at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.RelationshipAccessor.getOwningMapping(RelationshipAccessor.java:298)
at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.OneToManyAccessor.processOneToManyMapping(OneToManyAccessor.java:168)
at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.OneToManyAccessor.process(OneToManyAccessor.java:111)
at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.RelationshipAccessor.processRelationship(RelationshipAccessor.java:546)
at org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processRelationshipAccessors(MetadataProject.java:1085)
at org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processStage3(MetadataProject.java:1364)
at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processORMMetadata(MetadataProcessor.java:462)
at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:390)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:945)
... 33 more

INFO: WS00018: Webservice Endpoint deployed
NewWebService listening at address at http://localhost:29583/EcommerceDevmedia/NewWebServiceService
SEVERE: Exception while invoking class org.glassfish.persistence.jpa.JPADeployer prepare method
javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [EcommerceDevmediaPU] failed.
Internal Exception: Exception [EclipseLink-7154] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.ValidationException
Exception Description: The attribute [sells] in entity class [class br.com.devmedia.entity.CreditCard] has a mappedBy value of [creditcard] which does not exist in its owning entity class [class br.com.devmedia.entity.Sell]. If the owning entity class is a @MappedSuperclass, this is invalid, and your attribute should reference the correct subclass.
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:991)
at org.eclipse.persistence.jpa.PersistenceProvider.createContainerEntityManagerFactory(PersistenceProvider.java:202)
at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:181)
at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:96)
at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:121)
at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:644)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:296)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
at java.lang.Thread.run(Thread.java:619)
Caused by: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [EcommerceDevmediaPU] failed.
Internal Exception: Exception [EclipseLink-7154] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.ValidationException
Exception Description: The attribute [sells] in entity class [class br.com.devmedia.entity.CreditCard] has a mappedBy value of [creditcard] which does not exist in its owning entity class [class br.com.devmedia.entity.Sell]. If the owning entity class is a @MappedSuperclass, this is invalid, and your attribute should reference the correct subclass.
at org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:210)
... 34 more
Caused by: Exception [EclipseLink-7154] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.ValidationException
Exception Description: The attribute [sells] in entity class [class br.com.devmedia.entity.CreditCard] has a mappedBy value of [creditcard] which does not exist in its owning entity class [class br.com.devmedia.entity.Sell]. If the owning entity class is a @MappedSuperclass, this is invalid, and your attribute should reference the correct subclass.
at org.eclipse.persistence.exceptions.ValidationException.noMappedByAttributeFound(ValidationException.java:1313)
at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.RelationshipAccessor.getOwningMapping(RelationshipAccessor.java:298)
at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.OneToManyAccessor.processOneToManyMapping(OneToManyAccessor.java:168)
at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.OneToManyAccessor.process(OneToManyAccessor.java:111)
at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.RelationshipAccessor.processRelationship(RelationshipAccessor.java:546)
at org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processRelationshipAccessors(MetadataProject.java:1085)
at org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processStage3(MetadataProject.java:1364)
at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processORMMetadata(MetadataProcessor.java:462)
at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:390)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:945)
... 33 more

SEVERE: Exception while preparing the app
javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [EcommerceDevmediaPU] failed.
Internal Exception: Exception [EclipseLink-7154] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.ValidationException
Exception Description: The attribute [sells] in entity class [class br.com.devmedia.entity.CreditCard] has a mappedBy value of [creditcard] which does not exist in its owning entity class [class br.com.devmedia.entity.Sell]. If the owning entity class is a @MappedSuperclass, this is invalid, and your attribute should reference the correct subclass.
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:991)
at org.eclipse.persistence.jpa.PersistenceProvider.createContainerEntityManagerFactory(PersistenceProvider.java:202)
at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:181)
at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:96)
at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:121)
at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:644)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:296)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
at java.lang.Thread.run(Thread.java:619)
Caused by: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [EcommerceDevmediaPU] failed.
Internal Exception: Exception [EclipseLink-7154] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.ValidationException
Exception Description: The attribute [sells] in entity class [class br.com.devmedia.entity.CreditCard] has a mappedBy value of [creditcard] which does not exist in its owning entity class [class br.com.devmedia.entity.Sell]. If the owning entity class is a @MappedSuperclass, this is invalid, and your attribute should reference the correct subclass.
at org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:210)
... 34 more
Caused by: Exception [EclipseLink-7154] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.ValidationException
Exception Description: The attribute [sells] in entity class [class br.com.devmedia.entity.CreditCard] has a mappedBy value of [creditcard] which does not exist in its owning entity class [class br.com.devmedia.entity.Sell]. If the owning entity class is a @MappedSuperclass, this is invalid, and your attribute should reference the correct subclass.
at org.eclipse.persistence.exceptions.ValidationException.noMappedByAttributeFound(ValidationException.java:1313)
at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.RelationshipAccessor.getOwningMapping(RelationshipAccessor.java:298)
at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.OneToManyAccessor.processOneToManyMapping(OneToManyAccessor.java:168)
at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.OneToManyAccessor.process(OneToManyAccessor.java:111)
at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.RelationshipAccessor.processRelationship(RelationshipAccessor.java:546)
at org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processRelationshipAccessors(MetadataProject.java:1085)
at org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processStage3(MetadataProject.java:1364)
at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processORMMetadata(MetadataProcessor.java:462)
at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:390)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:945)
... 33 more


No output do ecommerceDevMedia da o seguinte erro:

C:\Devmedia\EcommerceDevmedia\nbproject\build-impl.xml:695: The module has not been deployed.
BUILD FAILED (total time: 7 seconds)


init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
compile:
compile-jsps:
In-place deployment at C:\Devmedia\EcommerceDevmedia\build\web
Initializing...
deploy?path=C:\Devmedia\EcommerceDevmedia\build\web&name=EcommerceDevmedia&force=true failed on GlassFish DevMedia
C:\Devmedia\EcommerceDevmedia\nbproject\build-impl.xml:695: The module has not been deployed.
BUILD FAILED (total time: 7 seconds)

0
A anotação mappedSuperClass deve ser usada na superclasse de suas entidades ou de todas as suas entidades do sistema e a classe com a mappedSuperClass não deve ser entidade.Remova a anotação e teste se não funfar poste aqui as classes CreditCard e a Sell que são apontadas pelo stackTrace.Ahh antes que eu esqueça reveja como você as relacionou também.


Att
  Robson Passarella
0
Opa !

Resolvido ?
0
Ainda não, acontece o mesmo erro!
0
Olá NSouza
  você removeu a anotação MappedSuperClass das suas entidades?? Pois no stackTrace e apontado ela como a causa do erro.
 Verifique também as entidades CreditCard e Sell pois tem algum erro na relação entre elas verifique , corriga  e teste se não funcionar post aqui a CreditCard e Sell.
0
Complementando
  The attribute [sells] in entity class [class br.com.devmedia.entity.CreditCard] has a mappedBy value of [creditcard] which does not exist in its owning entity class [class br.com.devmedia.entity.Sell]. If the owning entity class is a @MappedSuperclass, this is invalid, and your attribute should reference the correct subclass.

Att
  Robson Passarella
0
Devido minha falta de experiencie, revi as aulas mas não consegui acertar a classe até tive uma noção do que vc falo sobre o erro, mas desculpe não encontrei. Postei as duas classes, poderia dar uma olhada para mim por favor?


CREDITCARD

package br.com.devmedia.entity;

import br.com.devmedia.entity.Types.FlagType;
import java.io.Serializable;
import java.util.Date;
import java.util.LinkedList;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.validation.Valid;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.NotEmpty;

/**
 *
 * @author Nilo
 */
@Entity
@Table
public class CreditCard implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column
    @Basic(optional=false)
    private Integer id;
   
    @NotEmpty
    @NotNull
    @Column(nullable=false)
    private String number;
        
    @Temporal(javax.persistence.TemporalType.DATE)
    @Column(nullable=false)
    @NotNull
    private Date dateOfValidation;
   
    @Column(nullable=false)
    @NotNull
    @NotEmpty
    private String nameOfCard;
   
    @Column(nullable=false)
    @Enumerated(EnumType.STRING)
    private FlagType flag;

    @Column(nullable=false)
    @Min(1)
    private int times;

    @JoinColumn(referencedColumnName="id")
    @ManyToOne(optional=false)
    @Valid
    private User userOf;

    @OneToMany(cascade=CascadeType.ALL,mappedBy="creditcard")
    private LinkedList<Sell> sells = new LinkedList<Sell>();

    public int getTimes() {
        return times;
    }

    public void setTimes(int times) {
        this.times = times;
    }
   
   
   
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Date getDateOfValidation() {
        return dateOfValidation;
    }

    public void setDateOfValidation(Date dateOfValidation) {
        this.dateOfValidation = dateOfValidation;
    }

    public FlagType getFlag() {
        return flag;
    }

    public void setFlag(FlagType flag) {
        this.flag = flag;
    }

    public String getNameOfCard() {
        return nameOfCard;
    }

    public void setNameOfCard(String nameOfCard) {
        this.nameOfCard = nameOfCard;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public User getUserOf() {
        return userOf;
    }

    public void setUserOf(User userOf) {
        this.userOf = userOf;
    }

    public LinkedList<Sell> getSells() {
        return sells;
    }

    public void setSells(LinkedList<Sell> sells) {
        this.sells = sells;
    }


    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CreditCard)) {
            return false;
        }
        CreditCard other = (CreditCard) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "br.com.devmedia.entity.CreditCard[id=" + id + "]";
    }

}



CLASSE SELL

package br.com.devmedia.entity;

import br.com.devmedia.entity.Types.StatusSellType;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.validation.Valid;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 *
 * @author Nilo
 */
@Entity
@Table
public class Sell implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column
    @Basic(optional=false)
    private Integer id;

    @NotNull
    @Enumerated(EnumType.STRING)
    @Column(nullable=false)
    private StatusSellType status = StatusSellType.START;
   
    @NotNull
    @Temporal(javax.persistence.TemporalType.DATE)
    @Column(nullable=false)
    private Date dateOfSell;
   
    @NotNull
    @Min(0)
    @Column(nullable=false)
    private BigDecimal total;

    @NotNull
    @JoinColumn(referencedColumnName="id")
    @ManyToOne(optional=false)
    @Valid
    private User userOf;

    @NotNull
    @JoinColumn(referencedColumnName="id")
    @ManyToOne(optional=false)
    @Valid
    private Address addressToSend;

    @NotNull
    @JoinColumn(referencedColumnName="id")
    @ManyToOne(optional=false)
    @Valid
    private CreditCard creditCard;

    @OneToMany(cascade=CascadeType.ALL,mappedBy="sell")
    private List<SellItem> sellItems = new LinkedList<SellItem>();

    @Column
    private boolean closed = false;

    public void addItem(SellItem item){
        item.setSell(this);
        getSellItems().add(item);
        if (total == null){
            total = item.getProduct().getCost();
        }else{
            total.add(item.getProduct().getCost());
        }
    }

    public void setClosed(boolean closed) {
        this.closed = closed;
    }


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Address getAddressToSend() {
        return addressToSend;
    }

    public void setAddressToSend(Address addressToSend) {
        this.addressToSend = addressToSend;
    }

    public CreditCard getCreditCard() {
        return creditCard;
    }

    public void setCreditCard(CreditCard creditCard) {
        this.creditCard = creditCard;
    }

    public Date getDateOfSell() {
        return dateOfSell;
    }

    public void setDateOfSell(Date dateOfSell) {
        this.dateOfSell = dateOfSell;
    }

   public List<SellItem> getSellItems() {
        return sellItems;
    }

    public void setSellItems(List<SellItem> sellItems) {
        this.sellItems = sellItems;
    }

    public StatusSellType getStatus() {
        return status;
    }

    public void setStatus(StatusSellType status) {
        this.status = status;
    }

    public BigDecimal getTotal() {
        return total;
    }

    public void setTotal(BigDecimal total) {
        this.total = total;
    }

    public User getUserOf() {
        return userOf;
    }

    public void setUser(User userOf) {
        this.userOf = userOf;
    }



    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Sell)) {
            return false;
        }
        Sell other = (Sell) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "br.com.devmedia.entity.Sell[id=" + id + "]";
    }

}

0
Olá NSouza
  
   Olhei as suas classes CreditCard e Sell notei o seguinte na annotation OneToMany o atributo mappedBy deve receber a String com o nome do atributo na classe onde está sendo relacionada, veja abaixo
  // classe CreditCard
    @OneToMany(cascade=CascadeType.ALL,mappedBy="creditcard")
    private LinkedList<Sell> sells = new LinkedList<Sell>();
// classe Sell
    @NotNull
    @JoinColumn(referencedColumnName="id")
    @ManyToOne(optional=false)
    @Valid
    private CreditCard creditCard;

na sua lista sells o atributo mappedBy recebe "creditcard" e o declarado na classe Sell e "creditCard" corrija e diga-nos se funcionou.
 
 att
   robson Passarella Teixeira
0
Caro Robson, acima de tudo quero deixar evidente minha gratidão pela sua atenção.

Corrigi a falha que para mim era um "monstro" deu certo surgiram as mensagens:

BUILD SUCCESSFUL (total time: 1 minute 3 seconds) e no firefox Hello from Facelets
acho que é evidencia de que aquele erro foi resolvido.


No glassfish apareceu a extensa mensagem que nao sei de novo onde esta o erro, mas  pelo que percebi deve ser alguma configuração, abaixo o extenso codigo de erro, por favor gostaria de sua ajuda de novo.

17/01/2011 19:38:21 com.sun.enterprise.glassfish.bootstrap.ASMain main
INFO: Launching GlassFish on Felix platform
Welcome to Felix
================
INFO: Perform lazy SSL initialization for the listener 'http-listener-2'
INFO: Starting Grizzly Framework 1.9.18-o - Mon Jan 17 19:38:36 BRST 2011
INFO: Starting Grizzly Framework 1.9.18-o - Mon Jan 17 19:38:36 BRST 2011
INFO: Grizzly Framework 1.9.18-o started in: 483ms listening on port 29540
INFO: Grizzly Framework 1.9.18-o started in: 592ms listening on port 29584
INFO: Grizzly Framework 1.9.18-o started in: 484ms listening on port 29579
INFO: Grizzly Framework 1.9.18-o started in: 562ms listening on port 29551
INFO: Grizzly Framework 1.9.18-o started in: 639ms listening on port 29583
INFO: Using com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate as the delegate
INFO: SEC1002: Security Manager is OFF.
INFO: Security startup service called
INFO: SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.
INFO: Realm admin-realm of classtype com.sun.enterprise.security.auth.realm.file.FileRealm successfully created.
INFO: Realm file of classtype com.sun.enterprise.security.auth.realm.file.FileRealm successfully created.
INFO: Realm certificate of classtype com.sun.enterprise.security.auth.realm.certificate.CertificateRealm successfully created.
INFO: Security service(s) started successfully....
INFO: Created HTTP listener http-listener-1 on port 29583
INFO: Created HTTP listener http-listener-2 on port 29584
INFO: Created HTTP listener admin-listener on port 29551
INFO: Created virtual server server
INFO: Created virtual server __asadmin
INFO: Virtual server server loaded system default web module
INFO: WS00018: Webservice Endpoint deployed
 NewWebService  listening at address at http://localhost:29583/EcommerceDevmedia/NewWebServiceService
INFO: Hibernate Validator bean-validator-3.0-JBoss-4.0.2
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
WARNING: Element [field sells] within entity class [class br.com.devmedia.entity.CreditCard] uses a collection type [class java.util.LinkedList] when the JPA specification only supports java.util.Collection, java.util.Set, java.util.List, or java.util.Map.  This type is supported with eager loading; using lazy loading with this collection type requires additional configuration and an IndirectContainer implementation that extends [class java.util.LinkedList] or setting the mapping to use basic indirection and the type to be ValueholderInterface.
INFO: Portable JNDI names for EJB SellSession : [java:global/EcommerceDevmedia/SellSession!br.com.devmedia.session.SellSession, java:global/EcommerceDevmedia/SellSession]
INFO: Loading EJBTimerService. Please wait.
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: [TimerBeanContainer] Created  TimerBeanContainer: TimerBean
INFO: 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]
INFO: EJB5109:EJB Timer Service started successfully for datasource [jdbc/__TimerPool]
INFO: ==> Restoring Timers ...
INFO: <== ... Timers Restored.
INFO: Loading application ejb-timer-service-app at /ejb-timer-service-app
INFO: Portable JNDI names for EJB ProductSession : [java:global/EcommerceDevmedia/ProductSession!br.com.devmedia.session.ProductSession, java:global/EcommerceDevmedia/ProductSession]
INFO: Portable JNDI names for EJB UserSession : [java:global/EcommerceDevmedia/UserSession, java:global/EcommerceDevmedia/UserSession!br.com.devmedia.session.UserSession]
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: EclipseLink, version: Eclipse Persistence Services - 2.0.1.v20100213-r6600
INFO: JTS5014: Recoverable JTS instance, serverId = [100]
INFO: file:/C:/Program Files (x86)/glassfish-3.0.1/glassfish/domains/domain2/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App login successful
INFO: Rescheduling missed expiration for periodic timer '1@@1295100344477@@server@@domain2' 'TimedObject = ProductSession' 'Application = EcommerceDevmedia' 'CREATED' 'PERIODIC' 'Container ID = 84875674143031296' 'Sun Jan 16 00:30:00 BRST 2011' '0' '0 # 30 # 0 # * # * # * # * # null # null # null # true # callTheUserProductAvaliable # 0' . Timer expirations should  have been delivered starting at Sun Jan 16 00:30:00 BRST 2011
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: EclipseLink, version: Eclipse Persistence Services - 2.0.1.v20100213-r6600
SEVERE: RAR5099 : Wrong class name or classpath for Datasource Object
java.lang.ClassNotFoundException: com.mysql.jdbc.jdbc2.optional.MysqlDataSource
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:247)
        at com.sun.gjc.common.DataSourceObjectBuilder.getDataSourceObject(DataSourceObjectBuilder.java:279)
        at com.sun.gjc.common.DataSourceObjectBuilder.constructDataSourceObject(DataSourceObjectBuilder.java:108)
        at com.sun.gjc.spi.ManagedConnectionFactory.getDataSource(ManagedConnectionFactory.java:1168)
        at com.sun.gjc.spi.DSManagedConnectionFactory.getDataSource(DSManagedConnectionFactory.java:135)
        at com.sun.gjc.spi.DSManagedConnectionFactory.createManagedConnection(DSManagedConnectionFactory.java:90)
        at com.sun.enterprise.resource.allocator.LocalTxConnectorAllocator.createResource(LocalTxConnectorAllocator.java:73)
        at com.sun.enterprise.resource.pool.ConnectionPool.createSingleResource(ConnectionPool.java:841)
        at com.sun.enterprise.resource.pool.ConnectionPool.createResource(ConnectionPool.java:1110)
        at com.sun.enterprise.resource.pool.datastructure.ListDataStructure.addResource(ListDataStructure.java:121)
        at com.sun.enterprise.resource.pool.ConnectionPool.addResource(ConnectionPool.java:277)
        at com.sun.enterprise.resource.pool.ConnectionPool.createResourceAndAddToPool(ConnectionPool.java:1404)
        at com.sun.enterprise.resource.pool.ConnectionPool.createResources(ConnectionPool.java:869)
        at com.sun.enterprise.resource.pool.ConnectionPool.initPool(ConnectionPool.java:229)
        at com.sun.enterprise.resource.pool.ConnectionPool.internalGetResource(ConnectionPool.java:455)
        at com.sun.enterprise.resource.pool.ConnectionPool.getResource(ConnectionPool.java:369)
        at com.sun.enterprise.resource.pool.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:226)
        at com.sun.enterprise.resource.pool.PoolManagerImpl.getResource(PoolManagerImpl.java:150)
        at com.sun.enterprise.connectors.ConnectionManagerImpl.getResource(ConnectionManagerImpl.java:327)
        at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:290)
        at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:182)
        at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:159)
        at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:154)
        at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:105)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:126)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:94)
        at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
        at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:584)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:228)
        at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:369)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:151)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:207)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:202)
        at com.sun.enterprise.container.common.impl.EntityManagerWrapper._getDelegate(EntityManagerWrapper.java:197)
        at com.sun.enterprise.container.common.impl.EntityManagerWrapper.createQuery(EntityManagerWrapper.java:424)
        at br.com.devmedia.entity.ejb.BasicSessionBean.createQuery(BasicSessionBean.java:75)
        at br.com.devmedia.entity.ejb.BasicSessionBean.getList(BasicSessionBean.java:35)
        at br.com.devmedia.session.ProductSession.callTheUserProductAvaliable(ProductSession.java:101)
        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:1056)
        at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1128)
        at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5292)
        at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:615)
        at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:797)
        at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:567)
        at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:157)
        at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundTimeout(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:858)
        at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:797)
        at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:367)
        at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5264)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5252)
        at com.sun.ejb.containers.BaseContainer.callEJBTimeout(BaseContainer.java:3965)
        at com.sun.ejb.containers.EJBTimerService.deliverTimeout(EJBTimerService.java:1667)
        at com.sun.ejb.containers.EJBTimerService.access$100(EJBTimerService.java:98)
        at com.sun.ejb.containers.EJBTimerService$TaskExpiredWork.run(EJBTimerService.java:2485)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)

WARNING: RAR5038:Unexpected exception while creating resource for pool mysqlecompool. Exception : javax.resource.ResourceException: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource
WARNING: RAR5117 : Failed to obtain/create connection from connection pool [ mysqlecompool ]. Reason : com.sun.appserv.connectors.internal.api.PoolingException: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource
WARNING: RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource]
SEVERE: Local Exception Stack:
Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource
Error Code: 0
        at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:309)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:138)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:94)
        at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
        at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:584)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:228)
        at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:369)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:151)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:207)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:202)
        at com.sun.enterprise.container.common.impl.EntityManagerWrapper._getDelegate(EntityManagerWrapper.java:197)
        at com.sun.enterprise.container.common.impl.EntityManagerWrapper.createQuery(EntityManagerWrapper.java:424)
        at br.com.devmedia.entity.ejb.BasicSessionBean.createQuery(BasicSessionBean.java:75)
        at br.com.devmedia.entity.ejb.BasicSessionBean.getList(BasicSessionBean.java:35)
        at br.com.devmedia.session.ProductSession.callTheUserProductAvaliable(ProductSession.java:101)
        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:1056)
        at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1128)
        at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5292)
        at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:615)
        at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:797)
        at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:567)
        at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:157)
        at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundTimeout(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:858)
        at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:797)
        at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:367)
        at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5264)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5252)
        at com.sun.ejb.containers.BaseContainer.callEJBTimeout(BaseContainer.java:3965)
        at com.sun.ejb.containers.EJBTimerService.deliverTimeout(EJBTimerService.java:1667)
        at com.sun.ejb.containers.EJBTimerService.access$100(EJBTimerService.java:98)
        at com.sun.ejb.containers.EJBTimerService$TaskExpiredWork.run(EJBTimerService.java:2485)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource
        at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:112)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:126)
        ... 44 more

WARNING: A system exception occurred during an invocation on EJB ProductSession method public void br.com.devmedia.session.ProductSession.callTheUserProductAvaliable()
javax.ejb.EJBException
        at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:5119)
        at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:5017)
        at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4805)
        at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2004)
        at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1955)
        at com.sun.ejb.containers.BaseContainer.callEJBTimeout(BaseContainer.java:3995)
        at com.sun.ejb.containers.EJBTimerService.deliverTimeout(EJBTimerService.java:1667)
        at com.sun.ejb.containers.EJBTimerService.access$100(EJBTimerService.java:98)
        at com.sun.ejb.containers.EJBTimerService$TaskExpiredWork.run(EJBTimerService.java:2485)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)
Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource
Error Code: 0
        at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:397)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:151)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:207)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:202)
        at com.sun.enterprise.container.common.impl.EntityManagerWrapper._getDelegate(EntityManagerWrapper.java:197)
        at com.sun.enterprise.container.common.impl.EntityManagerWrapper.createQuery(EntityManagerWrapper.java:424)
        at br.com.devmedia.entity.ejb.BasicSessionBean.createQuery(BasicSessionBean.java:75)
        at br.com.devmedia.entity.ejb.BasicSessionBean.getList(BasicSessionBean.java:35)
        at br.com.devmedia.session.ProductSession.callTheUserProductAvaliable(ProductSession.java:101)
        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:1056)
        at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1128)
        at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5292)
        at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:615)
        at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:797)
        at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:567)
        at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:157)
        at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundTimeout(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:858)
        at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:797)
        at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:367)
        at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5264)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5252)
        at com.sun.ejb.containers.BaseContainer.callEJBTimeout(BaseContainer.java:3965)
        ... 9 more
Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource
Error Code: 0
        at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:309)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:138)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:94)
        at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
        at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:584)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:228)
        at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:369)
        ... 39 more
Caused by: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource
        at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:112)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:126)
        ... 44 more

INFO: Inicializando Mojarra 2.0.2 (FCS b10) para o contexto '/EcommerceDevmedia'
INFO: Loading application EcommerceDevmedia at /EcommerceDevmedia
INFO: Loading EcommerceDevmedia Application done is 30639 ms
INFO: GlassFish Server Open Source Edition 3.0.1 (22) startup time : Felix(13479ms) startup services(32354ms) total(45833ms)
INFO: Binding RMI port to *:29589
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: JMXStartupService: Started JMXConnector, JMXService URL = service:jmx:rmi://Nilo-PC:29589/jndi/rmi://Nilo-PC:29589/jmxrmi
INFO: Created HTTP listener http-listener-1 on port 29583
INFO: Grizzly Framework 1.9.18-o started in: 62ms listening on port 29583
WARNING: The DatabaseSession has an external transaction controller defined by something other than the ServerPlatform. EclipseLink will permit the override of the external transaction controller, but we recommend you consider the alternative of subclassing org.eclipse.persistence.platform.server.ServerPlatformBase and override getExternalTransactionControllerClass().
INFO: EclipseLink, version: Eclipse Persistence Services - 2.0.1.v20100213-r6600
SEVERE: RAR5099 : Wrong class name or classpath for Datasource Object
java.lang.ClassNotFoundException: com.mysql.jdbc.jdbc2.optional.MysqlDataSource
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:247)
        at com.sun.gjc.common.DataSourceObjectBuilder.getDataSourceObject(DataSourceObjectBuilder.java:279)
        at com.sun.gjc.common.DataSourceObjectBuilder.constructDataSourceObject(DataSourceObjectBuilder.java:108)
        at com.sun.gjc.spi.ManagedConnectionFactory.getDataSource(ManagedConnectionFactory.java:1168)
        at com.sun.gjc.spi.DSManagedConnectionFactory.getDataSource(DSManagedConnectionFactory.java:135)
        at com.sun.gjc.spi.DSManagedConnectionFactory.createManagedConnection(DSManagedConnectionFactory.java:90)
        at com.sun.enterprise.resource.allocator.LocalTxConnectorAllocator.createResource(LocalTxConnectorAllocator.java:73)
        at com.sun.enterprise.resource.pool.ConnectionPool.createSingleResource(ConnectionPool.java:841)
        at com.sun.enterprise.resource.pool.ConnectionPool.createResource(ConnectionPool.java:1110)
        at com.sun.enterprise.resource.pool.datastructure.ListDataStructure.addResource(ListDataStructure.java:121)
        at com.sun.enterprise.resource.pool.ConnectionPool.addResource(ConnectionPool.java:277)
        at com.sun.enterprise.resource.pool.ConnectionPool.createResourceAndAddToPool(ConnectionPool.java:1404)
        at com.sun.enterprise.resource.pool.ConnectionPool.createResources(ConnectionPool.java:869)
        at com.sun.enterprise.resource.pool.ConnectionPool.initPool(ConnectionPool.java:229)
        at com.sun.enterprise.resource.pool.ConnectionPool.internalGetResource(ConnectionPool.java:455)
        at com.sun.enterprise.resource.pool.ConnectionPool.getResource(ConnectionPool.java:369)
        at com.sun.enterprise.resource.pool.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:226)
        at com.sun.enterprise.resource.pool.PoolManagerImpl.getResource(PoolManagerImpl.java:150)
        at com.sun.enterprise.connectors.ConnectionManagerImpl.getResource(ConnectionManagerImpl.java:327)
        at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:290)
        at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:182)
        at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:159)
        at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:154)
        at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:105)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:126)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:94)
        at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
        at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:584)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:228)
        at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:369)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:151)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:207)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:202)
        at com.sun.enterprise.container.common.impl.EntityManagerWrapper._getDelegate(EntityManagerWrapper.java:197)
        at com.sun.enterprise.container.common.impl.EntityManagerWrapper.createQuery(EntityManagerWrapper.java:424)
        at br.com.devmedia.entity.ejb.BasicSessionBean.createQuery(BasicSessionBean.java:75)
        at br.com.devmedia.entity.ejb.BasicSessionBean.getList(BasicSessionBean.java:35)
        at br.com.devmedia.session.ProductSession.callTheUserProductAvaliable(ProductSession.java:101)
        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:1056)
        at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1128)
        at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5292)
        at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:615)
        at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:797)
        at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:567)
        at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:157)
        at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundTimeout(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:858)
        at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:797)
        at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:367)
        at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5264)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5252)
        at com.sun.ejb.containers.BaseContainer.callEJBTimeout(BaseContainer.java:3965)
        at com.sun.ejb.containers.EJBTimerService.deliverTimeout(EJBTimerService.java:1667)
        at com.sun.ejb.containers.EJBTimerService.access$100(EJBTimerService.java:98)
        at com.sun.ejb.containers.EJBTimerService$TaskExpiredWork.run(EJBTimerService.java:2485)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)

WARNING: RAR5038:Unexpected exception while creating resource for pool mysqlecompool. Exception : javax.resource.ResourceException: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource
WARNING: RAR5117 : Failed to obtain/create connection from connection pool [ mysqlecompool ]. Reason : com.sun.appserv.connectors.internal.api.PoolingException: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource
WARNING: RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource]
SEVERE: Local Exception Stack:
Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource
Error Code: 0
        at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:309)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:138)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:94)
        at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
        at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:584)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:228)
        at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:369)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:151)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:207)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:202)
        at com.sun.enterprise.container.common.impl.EntityManagerWrapper._getDelegate(EntityManagerWrapper.java:197)
        at com.sun.enterprise.container.common.impl.EntityManagerWrapper.createQuery(EntityManagerWrapper.java:424)
        at br.com.devmedia.entity.ejb.BasicSessionBean.createQuery(BasicSessionBean.java:75)
        at br.com.devmedia.entity.ejb.BasicSessionBean.getList(BasicSessionBean.java:35)
        at br.com.devmedia.session.ProductSession.callTheUserProductAvaliable(ProductSession.java:101)
        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:1056)
        at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1128)
        at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5292)
        at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:615)
        at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:797)
        at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:567)
        at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:157)
        at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundTimeout(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:858)
        at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:797)
        at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:367)
        at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5264)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5252)
        at com.sun.ejb.containers.BaseContainer.callEJBTimeout(BaseContainer.java:3965)
        at com.sun.ejb.containers.EJBTimerService.deliverTimeout(EJBTimerService.java:1667)
        at com.sun.ejb.containers.EJBTimerService.access$100(EJBTimerService.java:98)
        at com.sun.ejb.containers.EJBTimerService$TaskExpiredWork.run(EJBTimerService.java:2485)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource
        at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:112)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:126)
        ... 44 more

WARNING: A system exception occurred during an invocation on EJB ProductSession method public void br.com.devmedia.session.ProductSession.callTheUserProductAvaliable()
javax.ejb.EJBException
        at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:5119)
        at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:5017)
        at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4805)
        at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2004)
        at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1955)
        at com.sun.ejb.containers.BaseContainer.callEJBTimeout(BaseContainer.java:3995)
        at com.sun.ejb.containers.EJBTimerService.deliverTimeout(EJBTimerService.java:1667)
        at com.sun.ejb.containers.EJBTimerService.access$100(EJBTimerService.java:98)
        at com.sun.ejb.containers.EJBTimerService$TaskExpiredWork.run(EJBTimerService.java:2485)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)
Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource
Error Code: 0
        at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:397)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:151)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:207)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:202)
        at com.sun.enterprise.container.common.impl.EntityManagerWrapper._getDelegate(EntityManagerWrapper.java:197)
        at com.sun.enterprise.container.common.impl.EntityManagerWrapper.createQuery(EntityManagerWrapper.java:424)
        at br.com.devmedia.entity.ejb.BasicSessionBean.createQuery(BasicSessionBean.java:75)
        at br.com.devmedia.entity.ejb.BasicSessionBean.getList(BasicSessionBean.java:35)
        at br.com.devmedia.session.ProductSession.callTheUserProductAvaliable(ProductSession.java:101)
        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:1056)
        at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1128)
        at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5292)
        at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:615)
        at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:797)
        at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:567)
        at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:157)
        at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundTimeout(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:858)
        at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:797)
        at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:367)
        at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5264)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5252)
        at com.sun.ejb.containers.BaseContainer.callEJBTimeout(BaseContainer.java:3965)
        ... 9 more
Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource
Error Code: 0
        at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:309)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:138)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:94)
        at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
        at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:584)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:228)
        at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:369)
        ... 39 more
Caused by: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource
        at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:112)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:126)
        ... 44 more

INFO: EJB5119:Expunging timer ['1@@1295100344477@@server@@domain2' 'TimedObject = ProductSession' 'Application = EcommerceDevmedia' 'BEING_DELIVERED' 'PERIODIC' 'Container ID = 84875674143031296' 'Sun Jan 16 00:30:00 BRST 2011' '0' '0 # 30 # 0 # * # * # * # * # null # null # null # true # callTheUserProductAvaliable # 0' ] after [2] failed deliveries
INFO: Perform lazy SSL initialization for the listener 'http-listener-2'
INFO: Created HTTP listener http-listener-2 on port 29584
INFO: Grizzly Framework 1.9.18-o started in: 62ms listening on port 29584
INFO: [Thread[GlassFish Kernel Main Thread,5,main]] started
WARNING: Cannot drop tables for application EcommerceDevmedia. The expected DDL file EcommerceDevmedia_EcommerceDevmediaPU_dropDDL.jdbc is not available.
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = C:\Program Files (x86)\glassfish-3.0.1\glassfish\modules\autostart, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = C:\Users\Nilo\AppData\Local\Temp\fileinstall-4826369316672023470, felix.fileinstall.filter = null}
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = C:\Program Files (x86)\glassfish-3.0.1\glassfish\domains\domain2\autodeploy\bundles, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = C:\Users\Nilo\AppData\Local\Temp\fileinstall-5320685972869844073, felix.fileinstall.filter = null}
INFO: Started bundle: file:/C:/Program%20Files%20(x86)/glassfish-3.0.1/glassfish/modules/autostart/osgi-web-container.jar
INFO: Updating configuration from org.apache.felix.fileinstall-autodeploy-bundles.cfg
INFO: Installed C:\Program Files (x86)\glassfish-3.0.1\glassfish\modules\autostart\org.apache.felix.fileinstall-autodeploy-bundles.cfg
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = C:\Program Files (x86)\glassfish-3.0.1\glassfish\domains\domain2\autodeploy\bundles, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = C:\Users\Nilo\AppData\Local\Temp\fileinstall-9072389342129497928, felix.fileinstall.filter = null}
INFO: WS00018: Webservice Endpoint deployed
 NewWebService  listening at address at http://localhost:29583/EcommerceDevmedia/NewWebServiceService
WARNING: Element [field sells] within entity class [class br.com.devmedia.entity.CreditCard] uses a collection type [class java.util.LinkedList] when the JPA specification only supports java.util.Collection, java.util.Set, java.util.List, or java.util.Map.  This type is supported with eager loading; using lazy loading with this collection type requires additional configuration and an IndirectContainer implementation that extends [class java.util.LinkedList] or setting the mapping to use basic indirection and the type to be ValueholderInterface.
INFO: Portable JNDI names for EJB ProductSession : [java:global/EcommerceDevmedia/ProductSession!br.com.devmedia.session.ProductSession, java:global/EcommerceDevmedia/ProductSession]
INFO: Portable JNDI names for EJB SellSession : [java:global/EcommerceDevmedia/SellSession!br.com.devmedia.session.SellSession, java:global/EcommerceDevmedia/SellSession]
INFO: Portable JNDI names for EJB UserSession : [java:global/EcommerceDevmedia/UserSession, java:global/EcommerceDevmedia/UserSession!br.com.devmedia.session.UserSession]
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: EclipseLink, version: Eclipse Persistence Services - 2.0.1.v20100213-r6600
SEVERE: RAR5099 : Wrong class name or classpath for Datasource Object
java.lang.ClassNotFoundException: com.mysql.jdbc.jdbc2.optional.MysqlDataSource
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:247)
        at com.sun.gjc.common.DataSourceObjectBuilder.getDataSourceObject(DataSourceObjectBuilder.java:279)
        at com.sun.gjc.common.DataSourceObjectBuilder.constructDataSourceObject(DataSourceObjectBuilder.java:108)
        at com.sun.gjc.spi.ManagedConnectionFactory.getDataSource(ManagedConnectionFactory.java:1168)
        at com.sun.gjc.spi.DSManagedConnectionFactory.getDataSource(DSManagedConnectionFactory.java:135)
        at com.sun.gjc.spi.DSManagedConnectionFactory.createManagedConnection(DSManagedConnectionFactory.java:90)
        at com.sun.enterprise.resource.allocator.LocalTxConnectorAllocator.createResource(LocalTxConnectorAllocator.java:73)
        at com.sun.enterprise.resource.pool.ConnectionPool.createSingleResource(ConnectionPool.java:841)
        at com.sun.enterprise.resource.pool.ConnectionPool.createResource(ConnectionPool.java:1110)
        at com.sun.enterprise.resource.pool.datastructure.ListDataStructure.addResource(ListDataStructure.java:121)
        at com.sun.enterprise.resource.pool.ConnectionPool.addResource(ConnectionPool.java:277)
        at com.sun.enterprise.resource.pool.ConnectionPool.createResourceAndAddToPool(ConnectionPool.java:1404)
        at com.sun.enterprise.resource.pool.ConnectionPool.createResources(ConnectionPool.java:869)
        at com.sun.enterprise.resource.pool.ConnectionPool.initPool(ConnectionPool.java:229)
        at com.sun.enterprise.resource.pool.ConnectionPool.internalGetResource(ConnectionPool.java:455)
        at com.sun.enterprise.resource.pool.ConnectionPool.getResource(ConnectionPool.java:369)
        at com.sun.enterprise.resource.pool.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:226)
        at com.sun.enterprise.resource.pool.PoolManagerImpl.getResource(PoolManagerImpl.java:150)
        at com.sun.enterprise.connectors.ConnectionManagerImpl.getResource(ConnectionManagerImpl.java:327)
        at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:290)
        at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:182)
        at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:159)
        at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:154)
        at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:105)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:126)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:94)
        at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
        at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:584)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:228)
        at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:369)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:151)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:207)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:195)
        at org.glassfish.persistence.jpa.PersistenceUnitLoader.doJava2DB(PersistenceUnitLoader.java:273)
        at org.glassfish.persistence.jpa.JPADeployer.load(JPADeployer.java:155)
        at org.glassfish.persistence.jpa.JPADeployer.load(JPADeployer.java:55)
        at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:175)
        at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:216)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:338)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
        at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:310)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1121)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
        at org.glassfish.deployment.admin.ReDeployCommand.execute(ReDeployCommand.java:96)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
        at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
        at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
        at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
        at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
        at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
        at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
        at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
        at java.lang.Thread.run(Thread.java:619)

WARNING: RAR5038:Unexpected exception while creating resource for pool mysqlecompool. Exception : javax.resource.ResourceException: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource
WARNING: RAR5117 : Failed to obtain/create connection from connection pool [ mysqlecompool ]. Reason : com.sun.appserv.connectors.internal.api.PoolingException: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource
WARNING: RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource]
SEVERE: Local Exception Stack:
Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource
Error Code: 0
        at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:309)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:138)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:94)
        at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
        at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:584)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:228)
        at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:369)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:151)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:207)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:195)
        at org.glassfish.persistence.jpa.PersistenceUnitLoader.doJava2DB(PersistenceUnitLoader.java:273)
        at org.glassfish.persistence.jpa.JPADeployer.load(JPADeployer.java:155)
        at org.glassfish.persistence.jpa.JPADeployer.load(JPADeployer.java:55)
        at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:175)
        at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:216)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:338)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
        at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:310)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1121)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
        at org.glassfish.deployment.admin.ReDeployCommand.execute(ReDeployCommand.java:96)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
        at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
        at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
        at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
        at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
        at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
        at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
        at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource
        at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:112)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:126)
        ... 48 more

WARNING: Can not find resource bundle for this logger.  class name that failed: org.glassfish.persistence.jpa.PersistenceUnitLoader
WARNING: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource
Error Code: 0
javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource
Error Code: 0
        at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:397)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:151)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:207)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:195)
        at org.glassfish.persistence.jpa.PersistenceUnitLoader.doJava2DB(PersistenceUnitLoader.java:273)
        at org.glassfish.persistence.jpa.JPADeployer.load(JPADeployer.java:155)
        at org.glassfish.persistence.jpa.JPADeployer.load(JPADeployer.java:55)
        at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:175)
        at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:216)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:338)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
        at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:310)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1121)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
        at org.glassfish.deployment.admin.ReDeployCommand.execute(ReDeployCommand.java:96)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
        at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
        at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
        at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
        at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
        at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
        at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
        at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
        at java.lang.Thread.run(Thread.java:619)
Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource
Error Code: 0
        at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:309)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:138)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:94)
        at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
        at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:584)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:228)
        at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:369)
        ... 43 more
Caused by: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource
        at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:112)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:126)
        ... 48 more

WARNING: Cannot create tables for application EcommerceDevmedia. The expected DDL file EcommerceDevmedia_EcommerceDevmediaPU_createDDL.jdbc is not available.
WARNING: Can not find resource bundle for this logger.  class name that failed: org.glassfish.persistence.jpa.PersistenceUnitLoader
INFO: Inicializando Mojarra 2.0.2 (FCS b10) para o contexto '/EcommerceDevmedia'
INFO: Loading application EcommerceDevmedia at /EcommerceDevmedia
INFO: EcommerceDevmedia was successfully deployed in 11.403 milliseconds.
INFO: Total number of available updates : 0
0
Olá NSouza

  você setou o driver do mysql no classpath de sua applicação??
  é o que se pode entender no stackTrace postado.
  se vc estiver trocando o banco de dados da aplicação que nem os videos do Dyego verifique o sun-resource.xml.

att
  robson Passarella Teixeira

0
Eu gosto de trabalhar com o postgresql não sou fã do mysql.
nesse caso o que devo fazer?
0
Olá NSouza
 
   Sete o driver do postGres na sua aplicação e segue 1 modelo do sun-resouces.xml para que a sua aplicação acesse o postgres.Pois nunca lembro as classes para colocar no xml.

  <resources>
    <jdbc-connection-pool allow-non-component-callers="false" associate-with-thread="false"
    connection-creation-retry-attempts="0" connection-creation-retry-interval-in-seconds="10"
    connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0"
    connection-validation-method="auto-commit" datasource-classname="org.postgresql.ds.PGSimpleDataSource"
    fail-all-connections="false" idle-timeout-in-seconds="300" is-connection-validation-required="false"
    is-isolation-level-guaranteed="true" lazy-connection-association="false" lazy-connection-enlistment="false"
    match-connections="false" max-connection-usage-count="0" max-pool-size="32" max-wait-time-in-millis="60000"
    name="ecommerce_postgres" non-transactional-connections="false" pool-resize-quantity="2" res-type="javax.sql.DataSource"
    statement-timeout-in-seconds="-1" steady-pool-size="8" validate-atmost-once-period-in-seconds="0" wrap-jdbc-objects="false">
        <property name="serverName" value="localhost"/>
        <property name="portNumber" value="5432"/>
        <property name="databaseName" value="ecommerce"/>
        <property name="User" value="postgres"/>
        <property name="Password" value="postgres"/>
        <property name="URL" value="jdbc:postgresql://localhost:5432/ecommerce"/>
        <property name="driverClass" value="org.postgresql.Driver"/>
    </jdbc-connection-pool>
    <jdbc-resource enabled="true" jndi-name="jdbc/ecommerce" object-type="user"
    pool-name="ecommerce_postgres"/>
</resources>

att

  Robson Passarella Teixeira
0
Caro Robson, tentarei e te darei um retorno!
Bom descanso
Nilo Souza

0
Robson boa noite,
colei o codigo que vc deu de exemplo, o glassfish de o erro abaixo. Me desculpe por colocar esse codigo imenso, mas é que não sei que parte colar  para vc analisar.

A aplicação parece que foi executada com sucesso olhe o codigo abaixo

init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
compile:
compile-jsps:
In-place deployment at /home/nsouza/NetBeansProjects/EcommerceDevmedia/build/web
Initializing...
run-deploy:
Browsing: http://localhost:8080/EcommerceDevmedia/
run-display-browser:
run:
BUILD SUCCESSFUL (total time: 8 seconds)


Erro do glassfish

18/01/2011 21:17:34 com.sun.enterprise.glassfish.bootstrap.ASMain main
INFO: Launching GlassFish on Felix platform
Welcome to Felix
================
INFO: Perform lazy SSL initialization for the listener 'http-listener-2'
INFO: Starting Grizzly Framework 1.9.18-o - Tue Jan 18 21:17:47 BRST 2011
INFO: Starting Grizzly Framework 1.9.18-o - Tue Jan 18 21:17:47 BRST 2011
INFO: Grizzly Framework 1.9.18-o started in: 126ms listening on port 3700
INFO: Grizzly Framework 1.9.18-o started in: 173ms listening on port 4848
INFO: Grizzly Framework 1.9.18-o started in: 228ms listening on port 8080
INFO: Grizzly Framework 1.9.18-o started in: 97ms listening on port 7676
INFO: Grizzly Framework 1.9.18-o started in: 188ms listening on port 8181
INFO: Using com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate as the delegate
INFO: SEC1002: Security Manager is OFF.
INFO: Security startup service called
INFO: SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.
INFO: Realm admin-realm of classtype com.sun.enterprise.security.auth.realm.file.FileRealm successfully created.
INFO: Realm file of classtype com.sun.enterprise.security.auth.realm.file.FileRealm successfully created.
INFO: Realm certificate of classtype com.sun.enterprise.security.auth.realm.certificate.CertificateRealm successfully created.
INFO: Security service(s) started successfully....
INFO: Created HTTP listener http-listener-1 on port 8080
INFO: Created HTTP listener http-listener-2 on port 8181
INFO: Created HTTP listener admin-listener on port 4848
INFO: Created virtual server server
INFO: Created virtual server __asadmin
INFO: Virtual server server loaded system default web module
INFO: WS00018: Webservice Endpoint deployed
 NewWebService  listening at address at http://localhost:8080/EcommerceDevmedia/NewWebServiceService
INFO: Hibernate Validator bean-validator-3.0-JBoss-4.0.2
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
WARNING: Element [field sells] within entity class [class br.com.devmedia.entity.CreditCard] uses a collection type [class java.util.LinkedList] when the JPA specification only supports java.util.Collection, java.util.Set, java.util.List, or java.util.Map.  This type is supported with eager loading; using lazy loading with this collection type requires additional configuration and an IndirectContainer implementation that extends [class java.util.LinkedList] or setting the mapping to use basic indirection and the type to be ValueholderInterface.
INFO: Portable JNDI names for EJB UserSession : [java:global/EcommerceDevmedia/UserSession, java:global/EcommerceDevmedia/UserSession!br.com.devmedia.session.UserSession]
INFO: Portable JNDI names for EJB SellSession : [java:global/EcommerceDevmedia/SellSession!br.com.devmedia.session.SellSession, java:global/EcommerceDevmedia/SellSession]
INFO: Loading EJBTimerService. Please wait.
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: [TimerBeanContainer] Created  TimerBeanContainer: TimerBean
INFO: 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]
INFO: EJB5109:EJB Timer Service started successfully for datasource [jdbc/__TimerPool]
INFO: ==> Restoring Timers ...
INFO: <== ... Timers Restored.
INFO: Loading application ejb-timer-service-app at /ejb-timer-service-app
INFO: Portable JNDI names for EJB ProductSession : [java:global/EcommerceDevmedia/ProductSession!br.com.devmedia.session.ProductSession, java:global/EcommerceDevmedia/ProductSession]
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: EclipseLink, version: Eclipse Persistence Services - 2.0.1.v20100213-r6600
INFO: JTS5014: Recoverable JTS instance, serverId = [100]
INFO: file:/usr/local/glassfish_v3/glassfish/domains/domain1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App login successful
INFO: Rescheduling missed expiration for periodic timer '1@@1295299907608@@server@@domain1' 'TimedObject = ProductSession' 'Application = EcommerceDevmedia' 'CREATED' 'PERIODIC' 'Container ID = 84888763906916352' 'Tue Jan 18 00:30:00 BRST 2011' '0' '0 # 30 # 0 # * # * # * # * # null # null # null # true # callTheUserProductAvaliable # 0' . Timer expirations should  have been delivered starting at Tue Jan 18 00:30:00 BRST 2011
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: EclipseLink, version: Eclipse Persistence Services - 2.0.1.v20100213-r6600
WARNING: RAR5038:Unexpected exception while creating resource for pool mysqlecompool. Exception : javax.resource.ResourceException: Connection object cannot be null
WARNING: RAR5117 : Failed to obtain/create connection from connection pool [ mysqlecompool ]. Reason : com.sun.appserv.connectors.internal.api.PoolingException: Connection object cannot be null
WARNING: RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: Connection object cannot be null]
SEVERE: Local Exception Stack:
Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection object cannot be null
Error Code: 0
        at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:309)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:138)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:94)
        at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
        at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:584)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:228)
        at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:369)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:151)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:207)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:202)
        at com.sun.enterprise.container.common.impl.EntityManagerWrapper._getDelegate(EntityManagerWrapper.java:197)
        at com.sun.enterprise.container.common.impl.EntityManagerWrapper.createQuery(EntityManagerWrapper.java:424)
        at br.com.devmedia.entity.ejb.BasicSessionBean.createQuery(BasicSessionBean.java:75)
        at br.com.devmedia.entity.ejb.BasicSessionBean.getList(BasicSessionBean.java:35)
        at br.com.devmedia.session.ProductSession.callTheUserProductAvaliable(ProductSession.java:101)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1056)
        at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1128)
        at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5292)
        at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:615)
        at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:797)
        at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:567)
        at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:157)
        at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundTimeout(SystemInterceptorProxy.java:144)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:858)
        at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:797)
        at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:367)
        at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5264)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5252)
        at com.sun.ejb.containers.BaseContainer.callEJBTimeout(BaseContainer.java:3965)
        at com.sun.ejb.containers.EJBTimerService.deliverTimeout(EJBTimerService.java:1667)
        at com.sun.ejb.containers.EJBTimerService.access$100(EJBTimerService.java:98)
        at com.sun.ejb.containers.EJBTimerService$TaskExpiredWork.run(EJBTimerService.java:2485)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:636)
Caused by: java.sql.SQLException: Error in allocating a connection. Cause: Connection object cannot be null
        at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:112)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:126)
        ... 44 more

WARNING: A system exception occurred during an invocation on EJB ProductSession method public void br.com.devmedia.session.ProductSession.callTheUserProductAvaliable()
javax.ejb.EJBException
        at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:5119)
        at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:5017)
        at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4805)
        at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2004)
        at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1955)
        at com.sun.ejb.containers.BaseContainer.callEJBTimeout(BaseContainer.java:3995)
        at com.sun.ejb.containers.EJBTimerService.deliverTimeout(EJBTimerService.java:1667)
        at com.sun.ejb.containers.EJBTimerService.access$100(EJBTimerService.java:98)
        at com.sun.ejb.containers.EJBTimerService$TaskExpiredWork.run(EJBTimerService.java:2485)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:636)
Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection object cannot be null
Error Code: 0
        at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:397)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:151)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:207)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:202)
        at com.sun.enterprise.container.common.impl.EntityManagerWrapper._getDelegate(EntityManagerWrapper.java:197)
        at com.sun.enterprise.container.common.impl.EntityManagerWrapper.createQuery(EntityManagerWrapper.java:424)
        at br.com.devmedia.entity.ejb.BasicSessionBean.createQuery(BasicSessionBean.java:75)
        at br.com.devmedia.entity.ejb.BasicSessionBean.getList(BasicSessionBean.java:35)
        at br.com.devmedia.session.ProductSession.callTheUserProductAvaliable(ProductSession.java:101)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1056)
        at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1128)
        at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5292)
        at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:615)
        at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:797)
        at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:567)
        at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:157)
        at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundTimeout(SystemInterceptorProxy.java:144)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:858)
        at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:797)
        at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:367)
        at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5264)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5252)
        at com.sun.ejb.containers.BaseContainer.callEJBTimeout(BaseContainer.java:3965)
        ... 9 more
Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection object cannot be null
Error Code: 0
        at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:309)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:138)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:94)
        at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
        at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:584)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:228)
        at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:369)
        ... 39 more
Caused by: java.sql.SQLException: Error in allocating a connection. Cause: Connection object cannot be null
        at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:112)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:126)
        ... 44 more

INFO: Inicializando Mojarra 2.0.2 (FCS b10) para o contexto '/EcommerceDevmedia'
INFO: Loading application EcommerceDevmedia at /EcommerceDevmedia
INFO: Loading EcommerceDevmedia Application done is 23059 ms
INFO: GlassFish Server Open Source Edition 3.0.1 (22) startup time : Felix(12187ms) startup services(24562ms) total(36749ms)
INFO: Binding RMI port to *:8686
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: JMXStartupService: Started JMXConnector, JMXService URL = service:jmx:rmi://nsouza:8686/jndi/rmi://nsouza:8686/jmxrmi
INFO: Created HTTP listener http-listener-1 on port 8080
INFO: Grizzly Framework 1.9.18-o started in: 14ms listening on port 8080
INFO: [Thread[GlassFish Kernel Main Thread,5,main]] started
INFO: Perform lazy SSL initialization for the listener 'http-listener-2'
INFO: Created HTTP listener http-listener-2 on port 8181
INFO: Grizzly Framework 1.9.18-o started in: 7ms listening on port 8181
WARNING: RAR8056: unable to load Connection Pool [ ecommerce_postgres ], com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: unsupported resource type : null
SEVERE: RAR8060: Unable to lookup pool [ ecommerce_postgres ], javax.naming.NamingException: Lookup failed for '__SYSTEM/pools/ecommerce_postgres' in SerialContext  [Root exception is javax.naming.NameNotFoundException: ecommerce_postgres not found]
SEVERE: RAR6017 : Failed to get connection pool object via JNDI lookup : ecommerce_postgres
SEVERE: com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: rardeployment.jndi_lookup_failed
        at com.sun.enterprise.connectors.service.ConnectorResourceAdminServiceImpl.createConnectorResource(ConnectorResourceAdminServiceImpl.java:132)
        at com.sun.enterprise.connectors.ConnectorRuntime.createConnectorResource(ConnectorRuntime.java:266)
        at com.sun.enterprise.resource.deployer.JdbcResourceDeployer.deployResource(JdbcResourceDeployer.java:107)
        at com.sun.enterprise.resource.deployer.JdbcResourceDeployer.redeployResource(JdbcResourceDeployer.java:152)
        at org.glassfish.javaee.services.ResourceManager$PropertyChangeHandler.handleChangeEvent(ResourceManager.java:287)
        at org.glassfish.javaee.services.ResourceManager$PropertyChangeHandler.changed(ResourceManager.java:264)
        at org.jvnet.hk2.config.ConfigSupport.sortAndDispatch(ConfigSupport.java:314)
        at org.glassfish.javaee.services.ResourceManager.changed(ResourceManager.java:215)
        at org.jvnet.hk2.config.Transactions$ConfigListenerJob.process(Transactions.java:365)
        at org.jvnet.hk2.config.Transactions$ConfigListenerJob.process(Transactions.java:355)
        at org.jvnet.hk2.config.Transactions$ConfigListenerNotifier$1$1.call(Transactions.java:248)
        at org.jvnet.hk2.config.Transactions$ConfigListenerNotifier$1$1.call(Transactions.java:246)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:636)
Caused by: javax.naming.NamingException: Lookup failed for '__SYSTEM/pools/ecommerce_postgres' in SerialContext  [Root exception is javax.naming.NameNotFoundException: ecommerce_postgres not found]
        at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:442)
        at javax.naming.InitialContext.lookup(InitialContext.java:409)
        at com.sun.enterprise.connectors.service.ConnectorResourceAdminServiceImpl.createConnectorResource(ConnectorResourceAdminServiceImpl.java:100)
        ... 16 more
Caused by: javax.naming.NameNotFoundException: ecommerce_postgres not found
        at com.sun.enterprise.naming.impl.TransientContext.doLookup(TransientContext.java:197)
        at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:168)
        at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:172)
        at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:172)
        at com.sun.enterprise.naming.impl.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:58)
        at com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:101)
        at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:430)
        ... 18 more

SEVERE: org.glassfish.javaee.services.ResourceManager : Error while handling change Event
WARNING: Unprocessed event : UnprocessedChangeEvent{PropertyName=pool-name, OldValue = derby_net_ecommerce_ecomPool, NewValue = ecommerce_postgres, Source = GlassFishConfigBean.com.sun.enterprise.config.serverbeans.JdbcResource}, reason = org.glassfish.javaee.services.ResourceManager : Error while handling change Event, when = 1295392692777
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = /usr/local/glassfish_v3/glassfish/modules/autostart, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = /tmp/fileinstall--3522198849328699856, felix.fileinstall.filter = null}
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = /usr/local/glassfish_v3/glassfish/domains/domain1/autodeploy/bundles, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = /tmp/fileinstall-2840787687443376475, felix.fileinstall.filter = null}
INFO: Started bundle: file:/usr/local/glassfish_v3/glassfish/modules/autostart/osgi-web-container.jar
WARNING: Cannot drop tables for application EcommerceDevmedia. The expected DDL file EcommerceDevmedia_EcommerceDevmediaPU_dropDDL.jdbc is not available.
INFO: Updating configuration from org.apache.felix.fileinstall-autodeploy-bundles.cfg
INFO: Installed /usr/local/glassfish_v3/glassfish/modules/autostart/org.apache.felix.fileinstall-autodeploy-bundles.cfg
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = /usr/local/glassfish_v3/glassfish/domains/domain1/autodeploy/bundles, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = /tmp/fileinstall-8266912661573394373, felix.fileinstall.filter = null}
INFO: WS00018: Webservice Endpoint deployed
 NewWebService  listening at address at http://localhost:8080/EcommerceDevmedia/NewWebServiceService
WARNING: Element [field sells] within entity class [class br.com.devmedia.entity.CreditCard] uses a collection type [class java.util.LinkedList] when the JPA specification only supports java.util.Collection, java.util.Set, java.util.List, or java.util.Map.  This type is supported with eager loading; using lazy loading with this collection type requires additional configuration and an IndirectContainer implementation that extends [class java.util.LinkedList] or setting the mapping to use basic indirection and the type to be ValueholderInterface.
INFO: Portable JNDI names for EJB UserSession : [java:global/EcommerceDevmedia/UserSession, java:global/EcommerceDevmedia/UserSession!br.com.devmedia.session.UserSession]
INFO: Portable JNDI names for EJB SellSession : [java:global/EcommerceDevmedia/SellSession!br.com.devmedia.session.SellSession, java:global/EcommerceDevmedia/SellSession]
INFO: Portable JNDI names for EJB ProductSession : [java:global/EcommerceDevmedia/ProductSession!br.com.devmedia.session.ProductSession, java:global/EcommerceDevmedia/ProductSession]
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: EclipseLink, version: Eclipse Persistence Services - 2.0.1.v20100213-r6600
WARNING: RAR5117 : Failed to obtain/create connection from connection pool [ mysqlecompool ]. Reason : com.sun.appserv.connectors.internal.api.PoolingException
WARNING: RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: null]
SEVERE: Local Exception Stack:
Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: null
Error Code: 0
        at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:309)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:138)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:94)
        at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
        at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:584)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:228)
        at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:369)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:151)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:207)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:195)
        at org.glassfish.persistence.jpa.PersistenceUnitLoader.doJava2DB(PersistenceUnitLoader.java:273)
        at org.glassfish.persistence.jpa.JPADeployer.load(JPADeployer.java:155)
        at org.glassfish.persistence.jpa.JPADeployer.load(JPADeployer.java:55)
        at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:175)
        at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:216)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:338)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
        at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:310)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1121)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
        at org.glassfish.deployment.admin.ReDeployCommand.execute(ReDeployCommand.java:96)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
        at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
        at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
        at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
        at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
        at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
        at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
        at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
        at java.lang.Thread.run(Thread.java:636)
Caused by: java.sql.SQLException: Error in allocating a connection. Cause: null
        at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:112)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:126)
        ... 48 more

WARNING: Can not find resource bundle for this logger.  class name that failed: org.glassfish.persistence.jpa.PersistenceUnitLoader
WARNING: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: null
Error Code: 0
javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: null
Error Code: 0
        at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:397)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:151)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:207)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:195)
        at org.glassfish.persistence.jpa.PersistenceUnitLoader.doJava2DB(PersistenceUnitLoader.java:273)
        at org.glassfish.persistence.jpa.JPADeployer.load(JPADeployer.java:155)
        at org.glassfish.persistence.jpa.JPADeployer.load(JPADeployer.java:55)
        at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:175)
        at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:216)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:338)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
        at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:310)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1121)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
        at org.glassfish.deployment.admin.ReDeployCommand.execute(ReDeployCommand.java:96)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
        at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
        at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
        at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
        at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
        at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
        at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
        at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
        at java.lang.Thread.run(Thread.java:636)
Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: null
Error Code: 0
        at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:309)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:138)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:94)
        at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
        at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:584)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:228)
        at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:369)
        ... 43 more
Caused by: java.sql.SQLException: Error in allocating a connection. Cause: null
        at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:112)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:126)
        ... 48 more

WARNING: Can not find resource bundle for this logger.  class name that failed: org.glassfish.persistence.jpa.PersistenceUnitLoader
WARNING: Cannot create tables for application EcommerceDevmedia. The expected DDL file EcommerceDevmedia_EcommerceDevmediaPU_createDDL.jdbc is not available.
INFO: Inicializando Mojarra 2.0.2 (FCS b10) para o contexto '/EcommerceDevmedia'
INFO: Loading application EcommerceDevmedia at /EcommerceDevmedia
INFO: EcommerceDevmedia was successfully deployed in 7.705 milliseconds.
WARNING: Cannot drop tables for application EcommerceDevmedia. The expected DDL file EcommerceDevmedia_EcommerceDevmediaPU_dropDDL.jdbc is not available.
INFO: WS00018: Webservice Endpoint deployed
 NewWebService  listening at address at http://localhost:8080/EcommerceDevmedia/NewWebServiceService
SEVERE: Exception while invoking class org.glassfish.persistence.jpa.JPADeployer prepare method
java.lang.RuntimeException: javax.naming.NamingException: Lookup failed for 'jdbc/ecommerce' in SerialContext  [Root exception is javax.naming.NameNotFoundException: ecommerce not found]
        at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:111)
        at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:130)
        at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:96)
        at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:121)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:644)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:296)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
        at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:310)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1121)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
        at org.glassfish.deployment.admin.ReDeployCommand.execute(ReDeployCommand.java:96)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
        at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
        at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
        at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
        at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
        at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
        at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
        at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
        at java.lang.Thread.run(Thread.java:636)
Caused by: javax.naming.NamingException: Lookup failed for 'jdbc/ecommerce' in SerialContext  [Root exception is javax.naming.NameNotFoundException: ecommerce not found]
        at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:442)
        at javax.naming.InitialContext.lookup(InitialContext.java:409)
        at javax.naming.InitialContext.lookup(InitialContext.java:409)
        at com.sun.enterprise.connectors.service.ConnectorResourceAdminServiceImpl.lookup(ConnectorResourceAdminServiceImpl.java:203)
        at com.sun.enterprise.connectors.ConnectorRuntime.lookupPMResource(ConnectorRuntime.java:429)
        at org.glassfish.persistence.jpa.JPADeployer$ProviderContainerContractInfoImpl.lookupDataSource(JPADeployer.java:228)
        at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:108)
        ... 39 more
Caused by: javax.naming.NameNotFoundException: ecommerce not found
        at com.sun.enterprise.naming.impl.TransientContext.doLookup(TransientContext.java:197)
        at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:168)
        at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:172)
        at com.sun.enterprise.naming.impl.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:58)
        at com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:101)
        at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:430)
        ... 45 more

SEVERE: Exception while preparing the app
java.lang.RuntimeException: javax.naming.NamingException: Lookup failed for 'jdbc/ecommerce' in SerialContext  [Root exception is javax.naming.NameNotFoundException: ecommerce not found]
        at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:111)
        at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:130)
        at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:96)
        at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:121)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:644)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:296)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
        at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:310)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1121)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
        at org.glassfish.deployment.admin.ReDeployCommand.execute(ReDeployCommand.java:96)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
        at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
        at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
        at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
        at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
        at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
        at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
        at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
        at java.lang.Thread.run(Thread.java:636)
Caused by: javax.naming.NamingException: Lookup failed for 'jdbc/ecommerce' in SerialContext  [Root exception is javax.naming.NameNotFoundException: ecommerce not found]
        at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:442)
        at javax.naming.InitialContext.lookup(InitialContext.java:409)
        at javax.naming.InitialContext.lookup(InitialContext.java:409)
        at com.sun.enterprise.connectors.service.ConnectorResourceAdminServiceImpl.lookup(ConnectorResourceAdminServiceImpl.java:203)
        at com.sun.enterprise.connectors.ConnectorRuntime.lookupPMResource(ConnectorRuntime.java:429)
        at org.glassfish.persistence.jpa.JPADeployer$ProviderContainerContractInfoImpl.lookupDataSource(JPADeployer.java:228)
        at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:108)
        ... 39 more
Caused by: javax.naming.NameNotFoundException: ecommerce not found
        at com.sun.enterprise.naming.impl.TransientContext.doLookup(TransientContext.java:197)
        at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:168)
        at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:172)
        at com.sun.enterprise.naming.impl.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:58)
        at com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:101)
        at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:430)
        ... 45 more

INFO: WS00018: Webservice Endpoint deployed
 NewWebService  listening at address at http://localhost:8080/EcommerceDevmedia/NewWebServiceService
SEVERE: Exception while invoking class org.glassfish.persistence.jpa.JPADeployer prepare method
java.lang.RuntimeException: javax.naming.NamingException: Lookup failed for 'jdbc/ecommerce' in SerialContext  [Root exception is javax.naming.NameNotFoundException: ecommerce not found]
        at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:111)
        at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:130)
        at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:96)
        at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:121)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:644)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:296)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
        at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
        at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
        at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
        at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
        at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
        at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
        at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
        at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
        at java.lang.Thread.run(Thread.java:636)
Caused by: javax.naming.NamingException: Lookup failed for 'jdbc/ecommerce' in SerialContext  [Root exception is javax.naming.NameNotFoundException: ecommerce not found]
        at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:442)
        at javax.naming.InitialContext.lookup(InitialContext.java:409)
        at javax.naming.InitialContext.lookup(InitialContext.java:409)
        at com.sun.enterprise.connectors.service.ConnectorResourceAdminServiceImpl.lookup(ConnectorResourceAdminServiceImpl.java:203)
        at com.sun.enterprise.connectors.ConnectorRuntime.lookupPMResource(ConnectorRuntime.java:429)
        at org.glassfish.persistence.jpa.JPADeployer$ProviderContainerContractInfoImpl.lookupDataSource(JPADeployer.java:228)
        at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:108)
        ... 32 more
Caused by: javax.naming.NameNotFoundException: ecommerce not found
        at com.sun.enterprise.naming.impl.TransientContext.doLookup(TransientContext.java:197)
        at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:168)
        at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:172)
        at com.sun.enterprise.naming.impl.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:58)
        at com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:101)
        at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:430)
        ... 38 more

SEVERE: Exception while preparing the app
java.lang.RuntimeException: javax.naming.NamingException: Lookup failed for 'jdbc/ecommerce' in SerialContext  [Root exception is javax.naming.NameNotFoundException: ecommerce not found]
        at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:111)
        at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:130)
        at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:96)
        at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:121)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:644)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:296)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
        at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
        at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
        at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
        at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
        at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
        at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
        at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
        at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
        at java.lang.Thread.run(Thread.java:636)
Caused by: javax.naming.NamingException: Lookup failed for 'jdbc/ecommerce' in SerialContext  [Root exception is javax.naming.NameNotFoundException: ecommerce not found]
        at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:442)
        at javax.naming.InitialContext.lookup(InitialContext.java:409)
        at javax.naming.InitialContext.lookup(InitialContext.java:409)
        at com.sun.enterprise.connectors.service.ConnectorResourceAdminServiceImpl.lookup(ConnectorResourceAdminServiceImpl.java:203)
        at com.sun.enterprise.connectors.ConnectorRuntime.lookupPMResource(ConnectorRuntime.java:429)
        at org.glassfish.persistence.jpa.JPADeployer$ProviderContainerContractInfoImpl.lookupDataSource(JPADeployer.java:228)
        at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:108)
        ... 32 more
Caused by: javax.naming.NameNotFoundException: ecommerce not found
        at com.sun.enterprise.naming.impl.TransientContext.doLookup(TransientContext.java:197)
        at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:168)
        at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:172)
        at com.sun.enterprise.naming.impl.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:58)
        at com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:101)
        at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:430)
        ... 38 more

INFO: WS00018: Webservice Endpoint deployed
 NewWebService  listening at address at http://localhost:8080/EcommerceDevmedia/NewWebServiceService
SEVERE: Exception while invoking class org.glassfish.persistence.jpa.JPADeployer prepare method
java.lang.RuntimeException: javax.naming.NamingException: Lookup failed for 'jdbc/ecommerce' in SerialContext  [Root exception is javax.naming.NameNotFoundException: ecommerce not found]
        at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:111)
        at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:130)
        at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:96)
        at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:121)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:644)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:296)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
        at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
        at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
        at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
        at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
        at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
        at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
        at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
        at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
        at java.lang.Thread.run(Thread.java:636)
Caused by: javax.naming.NamingException: Lookup failed for 'jdbc/ecommerce' in SerialContext  [Root exception is javax.naming.NameNotFoundException: ecommerce not found]
        at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:442)
        at javax.naming.InitialContext.lookup(InitialContext.java:409)
        at javax.naming.InitialContext.lookup(InitialContext.java:409)
        at com.sun.enterprise.connectors.service.ConnectorResourceAdminServiceImpl.lookup(ConnectorResourceAdminServiceImpl.java:203)
        at com.sun.enterprise.connectors.ConnectorRuntime.lookupPMResource(ConnectorRuntime.java:429)
        at org.glassfish.persistence.jpa.JPADeployer$ProviderContainerContractInfoImpl.lookupDataSource(JPADeployer.java:228)
        at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:108)
        ... 32 more
Caused by: javax.naming.NameNotFoundException: ecommerce not found
        at com.sun.enterprise.naming.impl.TransientContext.doLookup(TransientContext.java:197)
        at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:168)
        at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:172)
        at com.sun.enterprise.naming.impl.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:58)
        at com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:101)
        at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:430)
        ... 38 more

SEVERE: Exception while preparing the app
java.lang.RuntimeException: javax.naming.NamingException: Lookup failed for 'jdbc/ecommerce' in SerialContext  [Root exception is javax.naming.NameNotFoundException: ecommerce not found]
        at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:111)
        at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:130)
        at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:96)
        at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:121)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:644)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:296)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
        at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
        at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
        at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
        at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
        at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
        at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
        at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
        at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
        at java.lang.Thread.run(Thread.java:636)
Caused by: javax.naming.NamingException: Lookup failed for 'jdbc/ecommerce' in SerialContext  [Root exception is javax.naming.NameNotFoundException: ecommerce not found]
        at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:442)
        at javax.naming.InitialContext.lookup(InitialContext.java:409)
        at javax.naming.InitialContext.lookup(InitialContext.java:409)
        at com.sun.enterprise.connectors.service.ConnectorResourceAdminServiceImpl.lookup(ConnectorResourceAdminServiceImpl.java:203)
        at com.sun.enterprise.connectors.ConnectorRuntime.lookupPMResource(ConnectorRuntime.java:429)
        at org.glassfish.persistence.jpa.JPADeployer$ProviderContainerContractInfoImpl.lookupDataSource(JPADeployer.java:228)
        at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:108)
        ... 32 more
Caused by: javax.naming.NameNotFoundException: ecommerce not found
        at com.sun.enterprise.naming.impl.TransientContext.doLookup(TransientContext.java:197)
        at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:168)
        at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:172)
        at com.sun.enterprise.naming.impl.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:58)
        at com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:101)
        at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:430)
        ... 38 more

INFO: Server shutdown initiated
INFO: RAR7094: __ds_jdbc_ra shutdown successful.
INFO: RAR7094: __xa_jdbc_ra shutdown successful.
INFO: JMXStartupService: Stopped JMXConnectorServer: service:jmx:rmi://nsouza:8686/jndi/rmi://nsouza:8686/jmxrmi
18/01/2011 21:27:31 com.sun.enterprise.glassfish.bootstrap.ASMain main
INFO: Launching GlassFish on Felix platform
Welcome to Felix
================
INFO: Perform lazy SSL initialization for the listener 'http-listener-2'
INFO: Starting Grizzly Framework 1.9.18-o - Tue Jan 18 21:27:34 BRST 2011
INFO: Grizzly Framework 1.9.18-o started in: 119ms listening on port 8181
INFO: Grizzly Framework 1.9.18-o started in: 93ms listening on port 4848
INFO: Grizzly Framework 1.9.18-o started in: 164ms listening on port 8080
INFO: Starting Grizzly Framework 1.9.18-o - Tue Jan 18 21:27:34 BRST 2011
INFO: Grizzly Framework 1.9.18-o started in: 45ms listening on port 3700
INFO: Grizzly Framework 1.9.18-o started in: 35ms listening on port 7676
INFO: GlassFish Server Open Source Edition 3.0.1 (22) startup time : Felix(2200ms) startup services(909ms) total(3109ms)
INFO: Binding RMI port to *:8686
INFO: Hibernate Validator bean-validator-3.0-JBoss-4.0.2
INFO: JMXStartupService: Started JMXConnector, JMXService URL = service:jmx:rmi://nsouza:8686/jndi/rmi://nsouza:8686/jmxrmi
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: Using com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate as the delegate
INFO: [Thread[GlassFish Kernel Main Thread,5,main]] started
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = /usr/local/glassfish_v3/glassfish/domains/domain1/autodeploy/bundles, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = /tmp/fileinstall-4324111312572642778, felix.fileinstall.filter = null}
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = /usr/local/glassfish_v3/glassfish/modules/autostart, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = /tmp/fileinstall-7383813841515235823, felix.fileinstall.filter = null}
INFO: Grizzly Framework 1.9.18-o started in: 51ms listening on port 8080
INFO: Started bundle: file:/usr/local/glassfish_v3/glassfish/modules/autostart/osgi-web-container.jar
INFO: Perform lazy SSL initialization for the listener 'http-listener-2'
INFO: Grizzly Framework 1.9.18-o started in: 13ms listening on port 8181
INFO: SEC1002: Security Manager is OFF.
INFO: Security startup service called
INFO: SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.
INFO: Realm admin-realm of classtype com.sun.enterprise.security.auth.realm.file.FileRealm successfully created.
INFO: Realm file of classtype com.sun.enterprise.security.auth.realm.file.FileRealm successfully created.
INFO: Realm certificate of classtype com.sun.enterprise.security.auth.realm.certificate.CertificateRealm successfully created.
INFO: Security service(s) started successfully....
INFO: Updating configuration from org.apache.felix.fileinstall-autodeploy-bundles.cfg
INFO: Installed /usr/local/glassfish_v3/glassfish/modules/autostart/org.apache.felix.fileinstall-autodeploy-bundles.cfg
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = /usr/local/glassfish_v3/glassfish/domains/domain1/autodeploy/bundles, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = /tmp/fileinstall--5921631169522010143, felix.fileinstall.filter = null}
INFO: Created HTTP listener http-listener-1 on port 8080
INFO: Created HTTP listener http-listener-2 on port 8181
INFO: Created HTTP listener admin-listener on port 4848
INFO: Created virtual server server
INFO: Created virtual server __asadmin
INFO: Virtual server server loaded system default web module
INFO: WS00018: Webservice Endpoint deployed
 NewWebService  listening at address at http://localhost:8080/EcommerceDevmedia/NewWebServiceService
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
WARNING: Element [field sells] within entity class [class br.com.devmedia.entity.CreditCard] uses a collection type [class java.util.LinkedList] when the JPA specification only supports java.util.Collection, java.util.Set, java.util.List, or java.util.Map.  This type is supported with eager loading; using lazy loading with this collection type requires additional configuration and an IndirectContainer implementation that extends [class java.util.LinkedList] or setting the mapping to use basic indirection and the type to be ValueholderInterface.
INFO: Portable JNDI names for EJB SellSession : [java:global/EcommerceDevmedia/SellSession!br.com.devmedia.session.SellSession, java:global/EcommerceDevmedia/SellSession]
INFO: Portable JNDI names for EJB UserSession : [java:global/EcommerceDevmedia/UserSession, java:global/EcommerceDevmedia/UserSession!br.com.devmedia.session.UserSession]
INFO: Loading EJBTimerService. Please wait.
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: [TimerBeanContainer] Created  TimerBeanContainer: TimerBean
INFO: 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]
INFO: EJB5109:EJB Timer Service started successfully for datasource [jdbc/__TimerPool]
INFO: ==> Restoring Timers ...
INFO: <== ... Timers Restored.
INFO: Loading application ejb-timer-service-app at /ejb-timer-service-app
INFO: Portable JNDI names for EJB ProductSession : [java:global/EcommerceDevmedia/ProductSession!br.com.devmedia.session.ProductSession, java:global/EcommerceDevmedia/ProductSession]
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: EclipseLink, version: Eclipse Persistence Services - 2.0.1.v20100213-r6600
INFO: file:/home/nsouza/NetBeansProjects/EcommerceDevmedia/build/web/WEB-INF/classes/_EcommerceDevmediaPU login successful
WARNING: Got SQLException executing statement "CREATE TABLE users (ID INTEGER NOT NULL, USERNAME VARCHAR(255) NOT NULL, EMAIL VARCHAR(255) NOT NULL, NAME VARCHAR(255) NOT NULL, PASSWORD VARCHAR(32) NOT NULL, PRIMARY KEY (ID))": org.postgresql.util.PSQLException: ERRO: relação "users" já existe
WARNING: Got SQLException executing statement "ALTER TABLE CREDITCARD ADD CONSTRAINT FK_CREDITCARD_USEROF_ID FOREIGN KEY (USEROF_ID) REFERENCES users (id)": org.postgresql.util.PSQLException: ERRO: restrição de chave estrangeira "fk_creditcard_userof_id" não pode ser implementada
  Detalhe: Colunas chave "userof_id" e "id" são de tipos incompatíveis: character varying e integer.
WARNING: Got SQLException executing statement "ALTER TABLE SELL ADD CONSTRAINT FK_SELL_USEROF_ID FOREIGN KEY (USEROF_ID) REFERENCES users (id)": org.postgresql.util.PSQLException: ERRO: restrição de chave estrangeira "fk_sell_userof_id" não pode ser implementada
  Detalhe: Colunas chave "userof_id" e "id" são de tipos incompatíveis: character varying e integer.
WARNING: Got SQLException executing statement "ALTER TABLE SELL ADD CONSTRAINT FK_SELL_ADDRESSTOSEND_ID FOREIGN KEY (ADDRESSTOSEND_ID) REFERENCES ADDRESS (id)": org.postgresql.util.PSQLException: ERRO: restrição de chave estrangeira "fk_sell_addresstosend_id" não pode ser implementada
  Detalhe: Colunas chave "addresstosend_id" e "id" são de tipos incompatíveis: character varying e integer.
WARNING: Got SQLException executing statement "ALTER TABLE SELL ADD CONSTRAINT FK_SELL_CREDITCARD_ID FOREIGN KEY (CREDITCARD_ID) REFERENCES CREDITCARD (id)": org.postgresql.util.PSQLException: ERRO: restrição de chave estrangeira "fk_sell_creditcard_id" não pode ser implementada
  Detalhe: Colunas chave "creditcard_id" e "id" são de tipos incompatíveis: character varying e integer.
WARNING: Got SQLException executing statement "ALTER TABLE ADDRESS ADD CONSTRAINT FK_ADDRESS_userOf FOREIGN KEY (userOf) REFERENCES users (id)": org.postgresql.util.PSQLException: ERRO: restrição de chave estrangeira "fk_address_userof" não pode ser implementada
  Detalhe: Colunas chave "userof" e "id" são de tipos incompatíveis: character varying e integer.
WARNING: Got SQLException executing statement "ALTER TABLE PRODUCT ADD CONSTRAINT FK_PRODUCT_CATEGORY_ID FOREIGN KEY (CATEGORY_ID) REFERENCES CATEGORY (id)": org.postgresql.util.PSQLException: ERRO: restrição de chave estrangeira "fk_product_category_id" não pode ser implementada
  Detalhe: Colunas chave "category_id" e "id" são de tipos incompatíveis: character varying e integer.
WARNING: Got SQLException executing statement "ALTER TABLE SELLITEM ADD CONSTRAINT FK_SELLITEM_PRODUCT_ID FOREIGN KEY (PRODUCT_ID) REFERENCES PRODUCT (id)": org.postgresql.util.PSQLException: ERRO: restrição de chave estrangeira "fk_sellitem_product_id" não pode ser implementada
  Detalhe: Colunas chave "product_id" e "id" são de tipos incompatíveis: character varying e integer.
WARNING: Got SQLException executing statement "ALTER TABLE SELLITEM ADD CONSTRAINT FK_SELLITEM_SELL_ID FOREIGN KEY (SELL_ID) REFERENCES SELL (id)": org.postgresql.util.PSQLException: ERRO: restrição de chave estrangeira "fk_sellitem_sell_id" não pode ser implementada
  Detalhe: Colunas chave "sell_id" e "id" são de tipos incompatíveis: character varying e integer.
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: EclipseLink, version: Eclipse Persistence Services - 2.0.1.v20100213-r6600
INFO: JTS5014: Recoverable JTS instance, serverId = [100]
INFO: file:/usr/local/glassfish_v3/glassfish/domains/domain1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App login successful
INFO: Inicializando Mojarra 2.0.2 (FCS b10) para o contexto '/EcommerceDevmedia'
INFO: Loading application EcommerceDevmedia at /EcommerceDevmedia
INFO: EcommerceDevmedia was successfully deployed in 20.278 milliseconds.
INFO: file:/home/nsouza/NetBeansProjects/EcommerceDevmedia/build/web/WEB-INF/classes/_EcommerceDevmediaPU logout successful
WARNING: Got SQLException executing statement "ALTER TABLE CREDITCARD DROP CONSTRAINT FK_CREDITCARD_USEROF_ID": org.postgresql.util.PSQLException: ERRO: constraint "fk_creditcard_userof_id" of relation "creditcard" does not exist
WARNING: Got SQLException executing statement "ALTER TABLE SELL DROP CONSTRAINT FK_SELL_USEROF_ID": org.postgresql.util.PSQLException: ERRO: constraint "fk_sell_userof_id" of relation "sell" does not exist
WARNING: Got SQLException executing statement "ALTER TABLE SELL DROP CONSTRAINT FK_SELL_ADDRESSTOSEND_ID": org.postgresql.util.PSQLException: ERRO: constraint "fk_sell_addresstosend_id" of relation "sell" does not exist
WARNING: Got SQLException executing statement "ALTER TABLE SELL DROP CONSTRAINT FK_SELL_CREDITCARD_ID": org.postgresql.util.PSQLException: ERRO: constraint "fk_sell_creditcard_id" of relation "sell" does not exist
WARNING: Got SQLException executing statement "ALTER TABLE ADDRESS DROP CONSTRAINT FK_ADDRESS_userOf": org.postgresql.util.PSQLException: ERRO: constraint "fk_address_userof" of relation "address" does not exist
WARNING: Got SQLException executing statement "ALTER TABLE PRODUCT DROP CONSTRAINT FK_PRODUCT_CATEGORY_ID": org.postgresql.util.PSQLException: ERRO: constraint "fk_product_category_id" of relation "product" does not exist
WARNING: Got SQLException executing statement "ALTER TABLE SELLITEM DROP CONSTRAINT FK_SELLITEM_PRODUCT_ID": org.postgresql.util.PSQLException: ERRO: constraint "fk_sellitem_product_id" of relation "sellitem" does not exist
WARNING: Got SQLException executing statement "ALTER TABLE SELLITEM DROP CONSTRAINT FK_SELLITEM_SELL_ID": org.postgresql.util.PSQLException: ERRO: constraint "fk_sellitem_sell_id" of relation "sellitem" does not exist
INFO: WS00018: Webservice Endpoint deployed
 NewWebService  listening at address at http://localhost:8080/EcommerceDevmedia/NewWebServiceService
WARNING: Element [field sells] within entity class [class br.com.devmedia.entity.CreditCard] uses a collection type [class java.util.LinkedList] when the JPA specification only supports java.util.Collection, java.util.Set, java.util.List, or java.util.Map.  This type is supported with eager loading; using lazy loading with this collection type requires additional configuration and an IndirectContainer implementation that extends [class java.util.LinkedList] or setting the mapping to use basic indirection and the type to be ValueholderInterface.
INFO: Portable JNDI names for EJB ProductSession : [java:global/EcommerceDevmedia/ProductSession!br.com.devmedia.session.ProductSession, java:global/EcommerceDevmedia/ProductSession]
INFO: Portable JNDI names for EJB SellSession : [java:global/EcommerceDevmedia/SellSession!br.com.devmedia.session.SellSession, java:global/EcommerceDevmedia/SellSession]
INFO: Portable JNDI names for EJB UserSession : [java:global/EcommerceDevmedia/UserSession, java:global/EcommerceDevmedia/UserSession!br.com.devmedia.session.UserSession]
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: EclipseLink, version: Eclipse Persistence Services - 2.0.1.v20100213-r6600
INFO: file:/home/nsouza/NetBeansProjects/EcommerceDevmedia/build/web/WEB-INF/classes/_EcommerceDevmediaPU login successful
WARNING: Got SQLException executing statement "ALTER TABLE CREDITCARD ADD CONSTRAINT FK_CREDITCARD_USEROF_ID FOREIGN KEY (USEROF_ID) REFERENCES users (id)": org.postgresql.util.PSQLException: ERRO: restrição de chave estrangeira "fk_creditcard_userof_id" não pode ser implementada
  Detalhe: Colunas chave "userof_id" e "id" são de tipos incompatíveis: character varying e integer.
WARNING: Got SQLException executing statement "ALTER TABLE SELL ADD CONSTRAINT FK_SELL_USEROF_ID FOREIGN KEY (USEROF_ID) REFERENCES users (id)": org.postgresql.util.PSQLException: ERRO: restrição de chave estrangeira "fk_sell_userof_id" não pode ser implementada
  Detalhe: Colunas chave "userof_id" e "id" são de tipos incompatíveis: character varying e integer.
WARNING: Got SQLException executing statement "ALTER TABLE SELL ADD CONSTRAINT FK_SELL_ADDRESSTOSEND_ID FOREIGN KEY (ADDRESSTOSEND_ID) REFERENCES ADDRESS (id)": org.postgresql.util.PSQLException: ERRO: restrição de chave estrangeira "fk_sell_addresstosend_id" não pode ser implementada
  Detalhe: Colunas chave "addresstosend_id" e "id" são de tipos incompatíveis: character varying e integer.
WARNING: Got SQLException executing statement "ALTER TABLE SELL ADD CONSTRAINT FK_SELL_CREDITCARD_ID FOREIGN KEY (CREDITCARD_ID) REFERENCES CREDITCARD (id)": org.postgresql.util.PSQLException: ERRO: restrição de chave estrangeira "fk_sell_creditcard_id" não pode ser implementada
  Detalhe: Colunas chave "creditcard_id" e "id" são de tipos incompatíveis: character varying e integer.
WARNING: Got SQLException executing statement "ALTER TABLE ADDRESS ADD CONSTRAINT FK_ADDRESS_userOf FOREIGN KEY (userOf) REFERENCES users (id)": org.postgresql.util.PSQLException: ERRO: restrição de chave estrangeira "fk_address_userof" não pode ser implementada
  Detalhe: Colunas chave "userof" e "id" são de tipos incompatíveis: character varying e integer.
WARNING: Got SQLException executing statement "ALTER TABLE PRODUCT ADD CONSTRAINT FK_PRODUCT_CATEGORY_ID FOREIGN KEY (CATEGORY_ID) REFERENCES CATEGORY (id)": org.postgresql.util.PSQLException: ERRO: restrição de chave estrangeira "fk_product_category_id" não pode ser implementada
  Detalhe: Colunas chave "category_id" e "id" são de tipos incompatíveis: character varying e integer.
WARNING: Got SQLException executing statement "ALTER TABLE SELLITEM ADD CONSTRAINT FK_SELLITEM_PRODUCT_ID FOREIGN KEY (PRODUCT_ID) REFERENCES PRODUCT (id)": org.postgresql.util.PSQLException: ERRO: restrição de chave estrangeira "fk_sellitem_product_id" não pode ser implementada
  Detalhe: Colunas chave "product_id" e "id" são de tipos incompatíveis: character varying e integer.
WARNING: Got SQLException executing statement "ALTER TABLE SELLITEM ADD CONSTRAINT FK_SELLITEM_SELL_ID FOREIGN KEY (SELL_ID) REFERENCES SELL (id)": org.postgresql.util.PSQLException: ERRO: restrição de chave estrangeira "fk_sellitem_sell_id" não pode ser implementada
  Detalhe: Colunas chave "sell_id" e "id" são de tipos incompatíveis: character varying e integer.
WARNING: Got SQLException executing statement "CREATE TABLE SEQUENCE (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT DECIMAL(38), PRIMARY KEY (SEQ_NAME))": org.postgresql.util.PSQLException: ERRO: relação "sequence" já existe
INFO: Inicializando Mojarra 2.0.2 (FCS b10) para o contexto '/EcommerceDevmedia'
INFO: Loading application EcommerceDevmedia at /EcommerceDevmedia
INFO: EcommerceDevmedia was successfully deployed in 7.876 milliseconds.
0
Olá Nilo
  como você copiou o sun-resouce.xml você verificou se o netBeans criou o pool de conexão é o jndi  no glassFish???
  Qualquer coisa compare com o meu e veja as diferenças com o seu sun-resouce.xml que passei e veja o seu, para ver o diferente dei 1 olhada nuns arquivos, meus e vi outra vei as video-aulas do Dyego e vi que trocou o datasource-classname, os property do xml para apontar o banco diferente e mantendo o jndi-name  pool-name teste isso e de o retorno ok!

att
  Robson Passarella Teixeira
0
Como verifico se o netBeans criou o pool de conexão é o jndi  no glassFish???

O que percebi foi que quando copiei e colei seu codigo deu uns erros, mas depois fui verificar no servidor e as tabelas estavam todas criadas no banco de dados postgres, coisa que não fez quando estava fazendo as video aulas no windows  pois agora estou no linux.
0
Oi Nilo

  tem 2 opções para ver isso.
  1º   no NetBeans na aba Serviços você clica em servidores para ver os sevidores que você adicionou no IDE como o JBoss e o glassFish e quando o glassfish estiver iniciado clique no simbolo de '+' do lado do glassfish para mostrar as opções ,clique em recursos onde ele vai mostrar as opções JDBC,Conectores e Sessões JavaMail.Clique na opção JDBC e vai mostrar mais 2 opções a Recursos JDBC (JNDI) e o pool de conexão abrindo elas você ver se existe no glassFish o pool de conexão e o jndi apontados no sun-resources.xml.

  2º Quando o glassFish estiver Iniciado você entra no browser http://localhost:4848 do lado esquerdor você vai ver um menu e verá Recursos e dentro de recursos a opção JDBC e clicando em JDBC o resto vai ser igual da opção acima so vai ter 1 tela bonitinha.XD

e com relação ao fato de ter criando as tabelas no linux e não no windows realmente fiquei na duvida pois era para criado as tabelas nos 2 SO e sem da erros no log isso e estranho vou da 1 pesquisado e fazer uns testes no linux pois fiquei curioso.

Assim que possivel tento dar 1 retorno OK?

e verifique se criou o jndi,pool conexão e se o persistence.xml da aplicação se está apontando para o jndi desejado.

att
  robson Passarella

0
Caro Robson,
criou tudo o que vc disse, inclusive a opção 2 tb mostra a conexão com o postgresql (ecommerce_postgresql).
Tudo esta conforme vc disse.
0
Olá Nilo
 
  Ja que tudo foi criado direitinho e so você ir no persistence.xml de sua aplicação e colocar a tag <jta-data-source>'Nome do JNDI' </jta-data-source>(caso ja exista a tag e so trocar o nome) que os erros vão sumir e sua aplicação vai está sem erros de acesso ao banco de dados cetim??

att
  Robson Passarella Teixeira
0
Robson um detalhe,
entrei no endereço http://localhost:4848, na opção jdbc mostra as conexões, mas na opçao JNDI, Customs resource e external resource esta vazia, isso esta correto?

0
Como observação. O nome que esta na  tag e <jta-data-source>jdbc/ecommerce_postgre</jta-data-source> nome da minha conexão.
0
Caro Robson,
me perdoe por te dar tanto trabalho, mas desde já sou grato pela boa disposição que mostrou, disposição esse que infelizmente não foi mostrada pelo criado das video aulas.
O erro ainda esta no glassfish olha abaixo. Pode me dar uma ajuda?

Welcome to Felix
================
INFO: Perform lazy SSL initialization for the listener 'http-listener-2'
INFO: Starting Grizzly Framework 1.9.18-o - Fri Jan 21 21:43:21 BRST 2011
INFO: Starting Grizzly Framework 1.9.18-o - Fri Jan 21 21:43:21 BRST 2011
INFO: Grizzly Framework 1.9.18-o started in: 115ms listening on port 4848
INFO: Grizzly Framework 1.9.18-o started in: 75ms listening on port 3700
INFO: Grizzly Framework 1.9.18-o started in: 199ms listening on port 8080
INFO: Grizzly Framework 1.9.18-o started in: 152ms listening on port 8181
INFO: Grizzly Framework 1.9.18-o started in: 27ms listening on port 7676
INFO: The Admin Console is already installed, but not yet loaded.
INFO: Using com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate as the delegate
INFO: SEC1002: Security Manager is OFF.
INFO: Security startup service called
INFO: SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.
INFO: Realm admin-realm of classtype com.sun.enterprise.security.auth.realm.file.FileRealm successfully created.
INFO: Realm file of classtype com.sun.enterprise.security.auth.realm.file.FileRealm successfully created.
INFO: Realm certificate of classtype com.sun.enterprise.security.auth.realm.certificate.CertificateRealm successfully created.
INFO: Security service(s) started successfully....
INFO: Created HTTP listener http-listener-1 on port 8080
INFO: Created HTTP listener http-listener-2 on port 8181
INFO: Created HTTP listener admin-listener on port 4848
INFO: Created virtual server server
INFO: Created virtual server __asadmin
INFO: Virtual server server loaded system default web module
INFO: WS00018: Webservice Endpoint deployed
 NewWebService  listening at address at http://localhost:8080/EcommerceDevmedia/NewWebServiceService
INFO: Hibernate Validator bean-validator-3.0-JBoss-4.0.2
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
WARNING: Element [field sells] within entity class [class br.com.devmedia.entity.CreditCard] uses a collection type [class java.util.LinkedList] when the JPA specification only supports java.util.Collection, java.util.Set, java.util.List, or java.util.Map.  This type is supported with eager loading; using lazy loading with this collection type requires additional configuration and an IndirectContainer implementation that extends [class java.util.LinkedList] or setting the mapping to use basic indirection and the type to be ValueholderInterface.
INFO: Portable JNDI names for EJB UserSession : [java:global/EcommerceDevmedia/UserSession, java:global/EcommerceDevmedia/UserSession!br.com.devmedia.session.UserSession]
INFO: Loading EJBTimerService. Please wait.
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: [TimerBeanContainer] Created  TimerBeanContainer: TimerBean
INFO: 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]
INFO: EJB5109:EJB Timer Service started successfully for datasource [jdbc/__TimerPool]
INFO: ==> Restoring Timers ...
INFO: <== ... Timers Restored.
INFO: Loading application ejb-timer-service-app at /ejb-timer-service-app
INFO: Portable JNDI names for EJB ProductSession : [java:global/EcommerceDevmedia/ProductSession!br.com.devmedia.session.ProductSession, java:global/EcommerceDevmedia/ProductSession]
INFO: Portable JNDI names for EJB SellSession : [java:global/EcommerceDevmedia/SellSession!br.com.devmedia.session.SellSession, java:global/EcommerceDevmedia/SellSession]
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: EclipseLink, version: Eclipse Persistence Services - 2.0.1.v20100213-r6600
INFO: JTS5014: Recoverable JTS instance, serverId = [100]
INFO: file:/usr/local/glassfish_v3/glassfish/domains/domain1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App login successful
INFO: Inicializando Mojarra 2.0.2 (FCS b10) para o contexto '/EcommerceDevmedia'
INFO: Loading application EcommerceDevmedia at /EcommerceDevmedia
INFO: Loading EcommerceDevmedia Application done is 22785 ms
INFO: GlassFish Server Open Source Edition 3.0.1 (22) startup time : Felix(2209ms) startup services(23871ms) total(26080ms)
INFO: Binding RMI port to *:8686
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: JMXStartupService: Started JMXConnector, JMXService URL = service:jmx:rmi://nsouza:8686/jndi/rmi://nsouza:8686/jmxrmi
INFO: [Thread[GlassFish Kernel Main Thread,5,main]] started
INFO: Created HTTP listener http-listener-1 on port 8080
INFO: Grizzly Framework 1.9.18-o started in: 32ms listening on port 8080
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = /usr/local/glassfish_v3/glassfish/domains/domain1/autodeploy/bundles, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = /tmp/fileinstall--3630556292912930599, felix.fileinstall.filter = null}
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = /usr/local/glassfish_v3/glassfish/modules/autostart, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = /tmp/fileinstall-740729829884510823, felix.fileinstall.filter = null}
INFO: Started bundle: file:/usr/local/glassfish_v3/glassfish/modules/autostart/osgi-web-container.jar
INFO: Perform lazy SSL initialization for the listener 'http-listener-2'
INFO: Created HTTP listener http-listener-2 on port 8181
INFO: Grizzly Framework 1.9.18-o started in: 3ms listening on port 8181
INFO: Updating configuration from org.apache.felix.fileinstall-autodeploy-bundles.cfg
INFO: Installed /usr/local/glassfish_v3/glassfish/modules/autostart/org.apache.felix.fileinstall-autodeploy-bundles.cfg
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = /usr/local/glassfish_v3/glassfish/domains/domain1/autodeploy/bundles, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = /tmp/fileinstall-4909639977950627899, felix.fileinstall.filter = null}
WARNING: Got SQLException executing statement "ALTER TABLE CREDITCARD DROP CONSTRAINT FK_CREDITCARD_USEROF_ID": org.postgresql.util.PSQLException: ERRO: constraint "fk_creditcard_userof_id" of relation "creditcard" does not exist
WARNING: Got SQLException executing statement "ALTER TABLE sell DROP CONSTRAINT FK_sell_ADDRESSTOSEND_ID": org.postgresql.util.PSQLException: ERRO: constraint "fk_sell_addresstosend_id" of relation "sell" does not exist
WARNING: Got SQLException executing statement "ALTER TABLE sell DROP CONSTRAINT FK_sell_CREDITCARD_ID": org.postgresql.util.PSQLException: ERRO: constraint "fk_sell_creditcard_id" of relation "sell" does not exist
WARNING: Got SQLException executing statement "ALTER TABLE sell DROP CONSTRAINT FK_sell_USEROF_ID": org.postgresql.util.PSQLException: ERRO: constraint "fk_sell_userof_id" of relation "sell" does not exist
WARNING: Got SQLException executing statement "ALTER TABLE ADDRESS DROP CONSTRAINT FK_ADDRESS_userOf": org.postgresql.util.PSQLException: ERRO: constraint "fk_address_userof" of relation "address" does not exist
WARNING: Got SQLException executing statement "ALTER TABLE PRODUCT DROP CONSTRAINT FK_PRODUCT_CATEGORY_ID": org.postgresql.util.PSQLException: ERRO: constraint "fk_product_category_id" of relation "product" does not exist
WARNING: Got SQLException executing statement "ALTER TABLE sellitem DROP CONSTRAINT FK_sellitem_SELL_ID": org.postgresql.util.PSQLException: ERRO: constraint "fk_sellitem_sell_id" of relation "sellitem" does not exist
WARNING: Got SQLException executing statement "ALTER TABLE sellitem DROP CONSTRAINT FK_sellitem_PRODUCT_ID": org.postgresql.util.PSQLException: ERRO: constraint "fk_sellitem_product_id" of relation "sellitem" does not exist
INFO: WS00018: Webservice Endpoint deployed
 NewWebService  listening at address at http://localhost:8080/EcommerceDevmedia/NewWebServiceService
WARNING: Element [field sells] within entity class [class br.com.devmedia.entity.CreditCard] uses a collection type [class java.util.LinkedList] when the JPA specification only supports java.util.Collection, java.util.Set, java.util.List, or java.util.Map.  This type is supported with eager loading; using lazy loading with this collection type requires additional configuration and an IndirectContainer implementation that extends [class java.util.LinkedList] or setting the mapping to use basic indirection and the type to be ValueholderInterface.
INFO: Portable JNDI names for EJB ProductSession : [java:global/EcommerceDevmedia/ProductSession!br.com.devmedia.session.ProductSession, java:global/EcommerceDevmedia/ProductSession]
INFO: Portable JNDI names for EJB UserSession : [java:global/EcommerceDevmedia/UserSession, java:global/EcommerceDevmedia/UserSession!br.com.devmedia.session.UserSession]
INFO: Portable JNDI names for EJB SellSession : [java:global/EcommerceDevmedia/SellSession!br.com.devmedia.session.SellSession, java:global/EcommerceDevmedia/SellSession]
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: EclipseLink, version: Eclipse Persistence Services - 2.0.1.v20100213-r6600
INFO: file:/home/nsouza/NetBeansProjects/EcommerceDevmedia/build/web/WEB-INF/classes/_EcommerceDevmediaPU login successful
WARNING: Got SQLException executing statement "ALTER TABLE CREDITCARD ADD CONSTRAINT FK_CREDITCARD_USEROF_ID FOREIGN KEY (USEROF_ID) REFERENCES users (id)": org.postgresql.util.PSQLException: ERRO: restrição de chave estrangeira "fk_creditcard_userof_id" não pode ser implementada
  Detalhe: Colunas chave "userof_id" e "id" são de tipos incompatíveis: character varying e integer.
WARNING: Got SQLException executing statement "ALTER TABLE sell ADD CONSTRAINT FK_sell_ADDRESSTOSEND_ID FOREIGN KEY (ADDRESSTOSEND_ID) REFERENCES ADDRESS (id)": org.postgresql.util.PSQLException: ERRO: restrição de chave estrangeira "fk_sell_addresstosend_id" não pode ser implementada
  Detalhe: Colunas chave "addresstosend_id" e "id" são de tipos incompatíveis: character varying e integer.
WARNING: Got SQLException executing statement "ALTER TABLE sell ADD CONSTRAINT FK_sell_CREDITCARD_ID FOREIGN KEY (CREDITCARD_ID) REFERENCES CREDITCARD (id)": org.postgresql.util.PSQLException: ERRO: restrição de chave estrangeira "fk_sell_creditcard_id" não pode ser implementada
  Detalhe: Colunas chave "creditcard_id" e "id" são de tipos incompatíveis: character varying e integer.
WARNING: Got SQLException executing statement "ALTER TABLE sell ADD CONSTRAINT FK_sell_USEROF_ID FOREIGN KEY (USEROF_ID) REFERENCES users (id)": org.postgresql.util.PSQLException: ERRO: restrição de chave estrangeira "fk_sell_userof_id" não pode ser implementada
  Detalhe: Colunas chave "userof_id" e "id" são de tipos incompatíveis: character varying e integer.
WARNING: Got SQLException executing statement "ALTER TABLE ADDRESS ADD CONSTRAINT FK_ADDRESS_userOf FOREIGN KEY (userOf) REFERENCES users (id)": org.postgresql.util.PSQLException: ERRO: restrição de chave estrangeira "fk_address_userof" não pode ser implementada
  Detalhe: Colunas chave "userof" e "id" são de tipos incompatíveis: character varying e integer.
WARNING: Got SQLException executing statement "ALTER TABLE PRODUCT ADD CONSTRAINT FK_PRODUCT_CATEGORY_ID FOREIGN KEY (CATEGORY_ID) REFERENCES CATEGORY (id)": org.postgresql.util.PSQLException: ERRO: restrição de chave estrangeira "fk_product_category_id" não pode ser implementada
  Detalhe: Colunas chave "category_id" e "id" são de tipos incompatíveis: character varying e integer.
WARNING: Got SQLException executing statement "ALTER TABLE sellitem ADD CONSTRAINT FK_sellitem_SELL_ID FOREIGN KEY (SELL_ID) REFERENCES sell (id)": org.postgresql.util.PSQLException: ERRO: restrição de chave estrangeira "fk_sellitem_sell_id" não pode ser implementada
  Detalhe: Colunas chave "sell_id" e "id" são de tipos incompatíveis: character varying e integer.
WARNING: Got SQLException executing statement "ALTER TABLE sellitem ADD CONSTRAINT FK_sellitem_PRODUCT_ID FOREIGN KEY (PRODUCT_ID) REFERENCES PRODUCT (id)": org.postgresql.util.PSQLException: ERRO: restrição de chave estrangeira "fk_sellitem_product_id" não pode ser implementada
  Detalhe: Colunas chave "product_id" e "id" são de tipos incompatíveis: character varying e integer.
WARNING: Got SQLException executing statement "CREATE TABLE SEQUENCE (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT DECIMAL(38), PRIMARY KEY (SEQ_NAME))": org.postgresql.util.PSQLException: ERRO: relação "sequence" já existe
INFO: Inicializando Mojarra 2.0.2 (FCS b10) para o contexto '/EcommerceDevmedia'
INFO: Loading application EcommerceDevmedia at /EcommerceDevmedia
INFO: EcommerceDevmedia was successfully deployed in 11.546 milliseconds.

0
Robson, depois de tantos erros e acertos, consegui chegar nesse nível e obter este erro. Na verdade um aviso.


Welcome to Felix
================
INFO: Perform lazy SSL initialization for the listener 'http-listener-2'
INFO: Starting Grizzly Framework 1.9.18-o - Fri Jan 21 22:24:03 BRST 2011
INFO: Starting Grizzly Framework 1.9.18-o - Fri Jan 21 22:24:03 BRST 2011
INFO: Grizzly Framework 1.9.18-o started in: 123ms listening on port 3700
INFO: Grizzly Framework 1.9.18-o started in: 184ms listening on port 8181
INFO: Grizzly Framework 1.9.18-o started in: 234ms listening on port 8080
INFO: Grizzly Framework 1.9.18-o started in: 156ms listening on port 4848
INFO: Grizzly Framework 1.9.18-o started in: 96ms listening on port 7676
INFO: The Admin Console is already installed, but not yet loaded.
INFO: GlassFish Server Open Source Edition 3.0.1 (22) startup time : Felix(2889ms) startup services(1264ms) total(4153ms)
INFO: Binding RMI port to *:8686
INFO: Hibernate Validator bean-validator-3.0-JBoss-4.0.2
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: JMXStartupService: Started JMXConnector, JMXService URL = service:jmx:rmi://nsouza:8686/jndi/rmi://nsouza:8686/jmxrmi
INFO: Grizzly Framework 1.9.18-o started in: 11ms listening on port 8080
INFO: Using com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate as the delegate
INFO: [Thread[GlassFish Kernel Main Thread,5,main]] started
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = /usr/local/glassfish_v3/glassfish/domains/domain1/autodeploy/bundles, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = /tmp/fileinstall-3656278082908741571, felix.fileinstall.filter = null}
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = /usr/local/glassfish_v3/glassfish/modules/autostart, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = /tmp/fileinstall--1329898622529538461, felix.fileinstall.filter = null}
INFO: Started bundle: file:/usr/local/glassfish_v3/glassfish/modules/autostart/osgi-web-container.jar
INFO: Perform lazy SSL initialization for the listener 'http-listener-2'
INFO: Grizzly Framework 1.9.18-o started in: 16ms listening on port 8181
INFO: SEC1002: Security Manager is OFF.
INFO: Security startup service called
INFO: SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.
INFO: Realm admin-realm of classtype com.sun.enterprise.security.auth.realm.file.FileRealm successfully created.
INFO: Realm file of classtype com.sun.enterprise.security.auth.realm.file.FileRealm successfully created.
INFO: Realm certificate of classtype com.sun.enterprise.security.auth.realm.certificate.CertificateRealm successfully created.
INFO: Security service(s) started successfully....
INFO: Updating configuration from org.apache.felix.fileinstall-autodeploy-bundles.cfg
INFO: Installed /usr/local/glassfish_v3/glassfish/modules/autostart/org.apache.felix.fileinstall-autodeploy-bundles.cfg
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = /usr/local/glassfish_v3/glassfish/domains/domain1/autodeploy/bundles, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = /tmp/fileinstall--6775077704633029795, felix.fileinstall.filter = null}
INFO: Created HTTP listener http-listener-1 on port 8080
INFO: Created HTTP listener http-listener-2 on port 8181
INFO: Created HTTP listener admin-listener on port 4848
INFO: Created virtual server server
INFO: Created virtual server __asadmin
INFO: Virtual server server loaded system default web module
INFO: WS00018: Webservice Endpoint deployed
 NewWebService  listening at address at http://localhost:8080/EcommerceDevmedia/NewWebServiceService
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
WARNING: Element [field sell] within entity class [class br.com.devmedia.entity.CreditCard] uses a collection type [class java.util.LinkedList] when the JPA specification only supports java.util.Collection, java.util.Set, java.util.List, or java.util.Map.  This type is supported with eager loading; using lazy loading with this collection type requires additional configuration and an IndirectContainer implementation that extends [class java.util.LinkedList] or setting the mapping to use basic indirection and the type to be ValueholderInterface.
INFO: Loading EJBTimerService. Please wait.
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: [TimerBeanContainer] Created  TimerBeanContainer: TimerBean
INFO: 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]
INFO: EJB5109:EJB Timer Service started successfully for datasource [jdbc/__TimerPool]
INFO: ==> Restoring Timers ...
INFO: <== ... Timers Restored.
INFO: Loading application ejb-timer-service-app at /ejb-timer-service-app
INFO: Portable JNDI names for EJB ProductSession : [java:global/EcommerceDevmedia/ProductSession!br.com.devmedia.session.ProductSession, java:global/EcommerceDevmedia/ProductSession]
INFO: Portable JNDI names for EJB SellSession : [java:global/EcommerceDevmedia/SellSession!br.com.devmedia.session.SellSession, java:global/EcommerceDevmedia/SellSession]
INFO: Portable JNDI names for EJB UserSession : [java:global/EcommerceDevmedia/UserSession, java:global/EcommerceDevmedia/UserSession!br.com.devmedia.session.UserSession]
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: EclipseLink, version: Eclipse Persistence Services - 2.0.1.v20100213-r6600
INFO: JTS5014: Recoverable JTS instance, serverId = [100]
INFO: file:/usr/local/glassfish_v3/glassfish/domains/domain1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App login successful
INFO: Inicializando Mojarra 2.0.2 (FCS b10) para o contexto '/EcommerceDevmedia'
INFO: Loading application EcommerceDevmedia at /EcommerceDevmedia
INFO: EcommerceDevmedia was successfully deployed in 20.630 milliseconds.


CLASSE CREDIT CAR:


0
Olá Nilo

  Sua aplicação está ok pois conforme os stacktraces postados não ha erros se a sua duvida e com relação ao warning destacado em vermelho e por que a especificação do JPA diz para trabalhar com colleções mas sem dizer a coleção especifica note como na linha abaixo.
 
 when the JPA specification only supports java.util.Collection, java.util.Set, java.util.List, or   java.util.Map

a especificação consegue trabalhar com o LinkedList mas o proveito e melhor com o que a especificação diz usando a Collection, Set, List e Map

então nas suas entidades como a do curso do Loja virtual use sempre a List pois e a interface que todas as Listas existentes no java implementão.

 OK??

Att
  Robson Passarella Teixeira
0
Caro Robson,
entendi e tentei fazer, mas alguns erros e não consegui acertar. Entendi que mesmo com aquela mensagem eu posso continuar o curso pois não afetaria correto?
Mas como ficaria minha classe usando o util.list conforme a mensagem de aviso?
Abaixo a classe do meu sistema.
Um abraço!

#Código

package br.com.devmedia.entity;

import br.com.devmedia.entity.Types.FlagType;
import java.io.Serializable;
import java.util.Date;
import java.util.LinkedList;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.validation.Valid;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.NotEmpty;

/**
 *
 * @author Nilo
 */
@Entity
@Table
public class CreditCard implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column
    @Basic(optional=false)
    private Integer id;
    
    @NotEmpty
    @NotNull
    @Column(nullable=false)
    private String number;
         
    @Temporal(javax.persistence.TemporalType.DATE)
    @Column(nullable=false)
    @NotNull
    private Date dateOfValidation;
    
    @Column(nullable=false)
    @NotNull
    @NotEmpty
    private String nameOfCard;
    
    @Column(nullable=false)
    @Enumerated(EnumType.STRING)
    private FlagType flag;

    @Column(nullable=false)
    @Min(1)
    private int times;

    @JoinColumn(referencedColumnName="id")
    @ManyToOne(optional=false)
    @Valid
    private User userOf;

   @OneToMany(cascade=CascadeType.ALL,mappedBy="creditCard")    private LinkedList<Sell> sell = new LinkedList<Sell>();

    public int getTimes() {
        return times;
    }

    public void setTimes(int times) {
        this.times = times;
    }
    
    
    
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Date getDateOfValidation() {
        return dateOfValidation;
    }

    public void setDateOfValidation(Date dateOfValidation) {
        this.dateOfValidation = dateOfValidation;
    }

    public FlagType getFlag() {
        return flag;
    }

    public void setFlag(FlagType flag) {
        this.flag = flag;
    }

    public String getNameOfCard() {
        return nameOfCard;
    }

    public void setNameOfCard(String nameOfCard) {
        this.nameOfCard = nameOfCard;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public User getUserOf() {
        return userOf;
    }

    public void setUserOf(User userOf) {
        this.userOf = userOf;
    }

    public LinkedList<Sell> getSells() {
        return sell;
    }

    public void setSells(LinkedList<Sell> sells) {
        this.sell = sells;
    }


    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CreditCard)) {
            return false;
        }
        CreditCard other = (CreditCard) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "br.com.devmedia.entity.CreditCard[id=" + id + "]";
    }

} 

0
Olá Nilo

  Simples veja

   @OneToMany(cascade=CascadeType.ALL,mappedBy="creditCard")
    private List<Sell> sell = new LinkedList<Sell>();

isso fará o warnig sumir no log pois polimorficamente o JPA trata como os tipos mencionados na outra mensagem.
0
Olá Nilo

  Simples veja

   @OneToMany(cascade=CascadeType.ALL,mappedBy="creditCard")
    private List<Sell> sell = new LinkedList<Sell>();

isso fará o warnig sumir no log pois polimorficamente o JPA trata como os tipos mencionados na outra mensagem.

Att
  robson Passarella Teixeira
0
Resolvido ? Se sim , favor fechar o post :)