tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: web.xml data-source definition
Date Mon, 29 Jan 2018 22:21:36 GMT
Did you set properties properly?

Le 29 janv. 2018 22:03, "gilbertoca" <gilbertoca@gmail.com> a écrit :

> Using an simple[1] data-source definition I got this exception:
>
> > TomEE embedded started on localhost:8080
> > 17:58 [http-nio-8080-exec-1] INFO
> > o.a.s.s.m.AbstractValidatingSessionManager.enableSessionValidation 233
> -
> > Enabling session validation scheduler...
> > jan 29, 2018 5:58:23 PM org.postgresql.Driver connect
> > GRAVE: Connection error:
> > org.postgresql.util.PSQLException: FATAL: autenticação do tipo password
> > falhou para usuário "gilberto.andrade"
> >       at
> > org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(
> ConnectionFactoryImpl.java:438)
> >       at
> > org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(
> ConnectionFactoryImpl.java:222)
> >       at
> > org.postgresql.core.ConnectionFactory.openConnection(
> ConnectionFactory.java:49)
> >       at org.postgresql.jdbc.PgConnection.
> > <init>
> > (PgConnection.java:194)
> >       at org.postgresql.Driver.makeConnection(Driver.java:450)
> >       at org.postgresql.Driver.connect(Driver.java:252)
> >       at java.sql.DriverManager.getConnection(DriverManager.java:664)
> >       at java.sql.DriverManager.getConnection(DriverManager.java:247)
> >       at
> > org.postgresql.ds.common.BaseDataSource.getConnection(
> BaseDataSource.java:94)
> >       at
> > org.postgresql.ds.common.BaseDataSource.getConnection(
> BaseDataSource.java:79)
> >       at
> > org.eclipse.persistence.sessions.JNDIConnector.
> connect(JNDIConnector.java:135)
> >       at
> > org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(
> DatasourceLogin.java:162)
> >       at
> > org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.
> connectInternal(DatasourceAccessor.java:346)
> >       at
> > org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.
> connectInternal(DatabaseAccessor.java:309)
> >       at
> > org.eclipse.persistence.internal.databaseaccess.
> DatasourceAccessor.connect(DatasourceAccessor.java:434)
> >       at
> > org.eclipse.persistence.sessions.server.ConnectionPool.buildConnection(
> ConnectionPool.java:217)
> >       at
> > org.eclipse.persistence.sessions.server.ExternalConnectionPool.startUp(
> ExternalConnectionPool.java:146)
> >       at
> > org.eclipse.persistence.sessions.server.ServerSession.
> connect(ServerSession.java:488)
> >       at
> > org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(
> DatabaseSessionImpl.java:774)
> >       at
> > org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(
> EntityManagerFactoryProvider.java:267)
> >       at
> > org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(
> EntityManagerSetupImpl.java:731)
> >       at
> > org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.
> getAbstractSession(EntityManagerFactoryDelegate.java:205)
> >       at
> > org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.
> createEntityManagerImpl(EntityManagerFactoryDelegate.java:305)
> >       at
> > org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.
> createEntityManagerImpl(EntityManagerFactoryImpl.java:337)
> >       at
> > org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.
> createEntityManager(EntityManagerFactoryImpl.java:318)
> >       at
> > org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory
> .createEntityManager(ReloadableEntityManagerFactory.java:208)
> >       at
> > org.apache.openejb.persistence.JtaEntityManagerRegistry.
> getEntityManager(JtaEntityManagerRegistry.java:125)
> >       at
> > org.apache.openejb.persistence.JtaEntityManager.getEntityManager(
> JtaEntityManager.java:145)
> >       at
> > org.apache.openejb.persistence.JtaEntityManager.
> proxyIfNoTx(JtaEntityManager.java:375)
> >       at
> > org.apache.openejb.persistence.JtaEntityManager.
> createQuery(JtaEntityManager.java:329)
> >       at
> > org.apache.deltaspike.data.impl.builder.MethodQueryBuilder.
> createJpaQuery(MethodQueryBuilder.java:49)
> >       at
> > org.apache.deltaspike.data.impl.builder.MethodQueryBuilder.execute(
> MethodQueryBuilder.java:38)
> >       at
> > org.apache.deltaspike.data.impl.builder.QueryBuilder.
> executeQuery(QueryBuilder.java:59)
> >       at
> > org.apache.deltaspike.data.impl.builder.MethodQueryBuilder$$
> OwbNormalScopeProxy0.executeQuery(org/apache/deltaspike/data/impl/builder/
> MethodQueryBuilder.java)
> >       at
> > org.apache.deltaspike.data.impl.tx.TransactionalQueryRunner.
> executeNonTransactional(TransactionalQueryRunner.java:66)
> >       at
> > org.apache.deltaspike.data.impl.tx.TransactionalQueryRunner.
> executeQuery(TransactionalQueryRunner.java:61)
> >       at
> > org.apache.deltaspike.data.impl.tx.TransactionalQueryRunner$$
> OwbNormalScopeProxy0.executeQuery(org/apache/deltaspike/data/impl/tx/
> TransactionalQueryRunner.java)
> >       at
> > org.apache.deltaspike.data.impl.handler.QueryHandler.
> process(QueryHandler.java:147)
> >       at
> > org.apache.deltaspike.data.impl.handler.QueryHandler.
> invoke(QueryHandler.java:129)
> >       at
> > org.apache.deltaspike.data.impl.handler.QueryHandler$$
> OwbNormalScopeProxy0.invoke(org/apache/deltaspike/data/
> impl/handler/QueryHandler.java)
> >       at
> > org.apache.deltaspike.proxy.impl.invocation.
> DelegateManualInvocationHandler.proceedOriginal(
> DelegateManualInvocationHandler.java:47)
> >       at
> > org.apache.deltaspike.proxy.impl.invocation.
> AbstractManualInvocationHandler.invoke(AbstractManualInvocationHandle
> r.java:59)
> >       at
> > org.apache.deltaspike.proxy.impl.invocation.
> DelegateManualInvocationHandler$$OwbNormalScopeProxy0.
> invoke(org/apache/deltaspike/proxy/impl/invocation/
> DelegateManualInvocationHandler.java)
> >       at
> > org.apache.deltaspike.proxy.impl.invocation.
> DelegateManualInvocationHandler.staticInvoke(
> DelegateManualInvocationHandler.java:40)
> >       at
> > br.gov.to.bem.gace.repository.UsuarioRepository$$DSPartialBeanProxy.
> findByUsernameEqual(Unknown
> > Source)
> >       at
> > br.gov.to.bem.gace.service.UsuarioService.findByUsernameEqual(
> UsuarioService.java:64)
> >       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >       at
> > sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:62)
> >       at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
> >       at java.lang.reflect.Method.invoke(Method.java:498)
> >       at
> > org.apache.openejb.core.interceptor.ReflectionInvocationContext$
> Invocation.invoke(ReflectionInvocationContext.java:205)
> >       at
> > org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(
> ReflectionInvocationContext.java:186)
> >       at
> > org.apache.openejb.monitoring.StatsInterceptor.record(
> StatsInterceptor.java:181)
> >       at
> > org.apache.openejb.monitoring.StatsInterceptor.invoke(
> StatsInterceptor.java:100)
> >       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >       at
> > sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:62)
> >       at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
> >       at java.lang.reflect.Method.invoke(Method.java:498)
> >       at
> > org.apache.openejb.core.interceptor.ReflectionInvocationContext$
> Invocation.invoke(ReflectionInvocationContext.java:205)
> >       at
> > org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(
> ReflectionInvocationContext.java:186)
> >       at
> > org.apache.openejb.core.interceptor.InterceptorStack.
> invoke(InterceptorStack.java:85)
> >       at
> > org.apache.openejb.core.stateless.StatelessContainer._
> invoke(StatelessContainer.java:252)
> >       at
> > org.apache.openejb.core.stateless.StatelessContainer.
> invoke(StatelessContainer.java:212)
> >       at
> > org.apache.openejb.core.ivm.EjbObjectProxyHandler.
> synchronizedBusinessMethod(EjbObjectProxyHandler.java:265)
> >       at
> > org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(
> EjbObjectProxyHandler.java:260)
> >       at
> > org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(
> EjbObjectProxyHandler.java:89)
> >       at
> > org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(
> BaseEjbProxyHandler.java:347)
> >       at
> > br.gov.to.bem.gace.service.UsuarioService$$LocalBeanProxy.
> findByUsernameEqual(br/gov/to/bem/gace/service/UsuarioService.java)
> >       at
> > br.gov.to.bem.security.view.SecurityRealm.doGetAuthenticationInfo(
> SecurityRealm.java:79)
> >       at
> > org.apache.shiro.realm.AuthenticatingRealm.getAuthenticationInfo(
> AuthenticatingRealm.java:571)
> >       at
> > org.apache.shiro.authc.pam.ModularRealmAuthenticator.
> doSingleRealmAuthentication(ModularRealmAuthenticator.java:180)
> >       at
> > org.apache.shiro.authc.pam.ModularRealmAuthenticator.doAuthenticate(
> ModularRealmAuthenticator.java:267)
> >       at
> > org.apache.shiro.authc.AbstractAuthenticator.authenticate(
> AbstractAuthenticator.java:198)
> >       at
> > org.apache.shiro.mgt.AuthenticatingSecurityManager.authenticate(
> AuthenticatingSecurityManager.java:106)
> >       at
> > org.apache.shiro.mgt.DefaultSecurityManager.login(
> DefaultSecurityManager.java:274)
> >       at
> > org.apache.shiro.subject.support.DelegatingSubject.
> login(DelegatingSubject.java:260)
> >       at br.gov.to.bem.security.view.LoginBean.doLogin(LoginBean.
> java:68)
> >       at
> > br.gov.to.bem.security.view.LoginBean$$OwbNormalScopeProxy0.doLogin(
> br/gov/to/bem/security/view/LoginBean.java)
> >       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >       at
> > sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:62)
> >       at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
> >       at java.lang.reflect.Method.invoke(Method.java:498)
> >       at org.apache.el.parser.AstValue.invoke(AstValue.java:247)
> >       at
> > org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:267)
> >       at
> > org.apache.webbeans.el22.WrappedMethodExpression.invoke(
> WrappedMethodExpression.java:52)
> >       at
> > com.sun.faces.facelets.el.TagMethodExpression.invoke(
> TagMethodExpression.java:105)
> >       at
> > javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(
> MethodBindingMethodExpressionAdapter.java:87)
> >       at
> > com.sun.faces.application.ActionListenerImpl.processAction(
> ActionListenerImpl.java:102)
> >       at javax.faces.component.UICommand.broadcast(UICommand.java:315)
> >       at javax.faces.component.UIViewRoot.broadcastEvents(
> UIViewRoot.java:790)
> >       at
> > javax.faces.component.UIViewRoot.processApplication(
> UIViewRoot.java:1282)
> >       at
> > com.sun.faces.lifecycle.InvokeApplicationPhase.execute(
> InvokeApplicationPhase.java:81)
> >       at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
> >       at com.sun.faces.lifecycle.LifecycleImpl.execute(
> LifecycleImpl.java:198)
> >       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:658)
> >       at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> ApplicationFilterChain.java:231)
> >       at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:166)
> >       at org.apache.tomcat.websocket.server.WsFilter.doFilter(
> WsFilter.java:52)
> >       at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> ApplicationFilterChain.java:193)
> >       at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:166)
> >       at org.apache.openejb.server.httpd.EEFilter.doFilter(
> EEFilter.java:65)
> >       at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> ApplicationFilterChain.java:193)
> >       at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:166)
> >       at
> > org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(
> ProxiedFilterChain.java:61)
> >       at
> > org.apache.shiro.web.servlet.AdviceFilter.executeChain(
> AdviceFilter.java:108)
> >       at
> > org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(
> AdviceFilter.java:137)
> >       at
> > org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(
> OncePerRequestFilter.java:125)
> >       at
> > org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(
> ProxiedFilterChain.java:66)
> >       at
> > org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(
> AbstractShiroFilter.java:449)
> >       at
> > org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(
> AbstractShiroFilter.java:365)
> >       at
> > org.apache.shiro.subject.support.SubjectCallable.
> doCall(SubjectCallable.java:90)
> >       at
> > org.apache.shiro.subject.support.SubjectCallable.call(
> SubjectCallable.java:83)
> >       at
> > org.apache.shiro.subject.support.DelegatingSubject.
> execute(DelegatingSubject.java:387)
> >       at
> > org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(
> AbstractShiroFilter.java:362)
> >       at
> > org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(
> OncePerRequestFilter.java:125)
> >       at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> ApplicationFilterChain.java:193)
> >       at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:166)
> >       at
> > org.apache.catalina.core.StandardWrapperValve.invoke(
> StandardWrapperValve.java:198)
> >       at
> > org.apache.catalina.core.StandardContextValve.invoke(
> StandardContextValve.java:96)
> >       at org.apache.tomee.catalina.OpenEJBValve.invoke(
> OpenEJBValve.java:44)
> >       at
> > org.apache.catalina.authenticator.AuthenticatorBase.invoke(
> AuthenticatorBase.java:478)
> >       at
> > org.apache.catalina.core.StandardHostValve.invoke(
> StandardHostValve.java:140)
> >       at
> > org.apache.tomee.catalina.OpenEJBSecurityListener$
> RequestCapturer.invoke(OpenEJBSecurityListener.java:97)
> >       at
> > org.apache.catalina.valves.ErrorReportValve.invoke(
> ErrorReportValve.java:80)
> >       at
> > org.apache.catalina.core.StandardEngineValve.invoke(
> StandardEngineValve.java:87)
> >       at
> > org.apache.catalina.connector.CoyoteAdapter.service(
> CoyoteAdapter.java:342)
> >       at
> > org.apache.coyote.http11.Http11Processor.service(
> Http11Processor.java:799)
> >       at
> > org.apache.coyote.AbstractProcessorLight.process(
> AbstractProcessorLight.java:66)
> >       at
> > org.apache.coyote.AbstractProtocol$ConnectionHandler.process(
> AbstractProtocol.java:868)
> >       at
> > org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.
> doRun(NioEndpoint.java:1457)
> >       at
> > org.apache.tomcat.util.net.SocketProcessorBase.run(
> SocketProcessorBase.java:49)
> >       at
> > java.util.concurrent.ThreadPoolExecutor.runWorker(
> ThreadPoolExecutor.java:1149)
> >       at
> > java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:624)
> >       at
> > org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(
> TaskThread.java:61)
> >       at java.lang.Thread.run(Thread.java:748)
> >
> > jan 29, 2018 5:58:23 PM org.postgresql.ds.common.BaseDataSource
> > getConnection
> > GRAVE: Failed to create a Non-Pooling DataSource from PostgreSQL JDBC
> > Driver 42.1.4 for null at jdbc:postgresql://srv-banco-dev:5433/teste:
> > org.postgresql.util.PSQLException: FATAL: autenticação do tipo password
> > falhou para usuário "gilberto.andrade"
> > EjbTransactionUtil.handleSystemException: Exception [EclipseLink-4002]
> > (Eclipse Persistence Services - 2.6.4.v20160829-44060b6):
> > org.eclipse.persistence.exceptions.DatabaseException
> > Internal Exception: org.postgresql.util.PSQLException: FATAL:
> autenticação
> > do tipo password falhou para usuário "gilberto.andrade"
> > Error Code: 0
> > javax.persistence.PersistenceException: Exception [EclipseLink-4002]
> > (Eclipse Persistence Services - 2.6.4.v20160829-44060b6):
> > org.eclipse.persistence.exceptions.DatabaseException
> > Internal Exception: org.postgresql.util.PSQLException: FATAL:
> autenticação
> > do tipo password falhou para usuário "gilberto.andrade"
> > Error Code: 0
>
> It uses a database user not defined.
>
> [1]https://jdbc.postgresql.org/documentation/publicapi/org/postgresql/ds/
> PGSimpleDataSource.html
>
>
>
> --
> Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-
> f979441.html
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message