0

问题改变了

我在 Glassfish 3.1 中有一个连接池来连接到 SqlServer 2008 Express,这个池工作正常,但是当 Glassfish 重新启动时,连接池无法 ping 并停止工作。要再次工作,我转到池配置-> 附加属性并更改主机名(例如 localhost 为 127.0.0.1),如您在此屏幕中所见。附加属性

我注意到这个问题只是在服务器重新启动之前部署我的应用程序时发生......如果我的应用程序没有部署并且我重新启动服务器,那么当我尝试 ping 池时不会出现问题。查看日志文件,我可以在部署时看到这些警告:

[#|2012-06-22T17:24:48.979-0300|WARNING|null|null|_ThreadID=1;_ThreadName=Thread-2;|Record begin marker is not a proper value so using default.|#]
[#|2012-06-22T17:24:48.979-0300|WARNING|null|null|_ThreadID=1;_ThreadName=Thread-2;|Record end marker is not a proper value so using default.|#]
[#|2012-06-22T17:24:48.979-0300|WARNING|null|null|_ThreadID=1;_ThreadName=Thread-2;|Log Format field separator is not a character so using default.|#]
[#|2012-06-22T17:25:20.080-0300|WARNING|glassfish3.1.1|org.eclipse.persistence.session.file:/home/hudson/projetos/ERP-HM/modulos-web/erp-web/target/erp-web-0.1.0/WEB-INF/lib/persistencia-erp-0.1.0.jar_erpPU.ejb_or_metadata|_ThreadID=17;_ThreadName=Thread-2;|You have specified multiple ids for the entity class [com.hrgi.persistencia.erp.entidades.Composicao] without specifying an @IdClass. By doing this you may lose the ability to find by identity, distributed cache support etc. Note: You may however use entity manager find operations by passing a list of primary key fields. Else, you will have to use JPQL queries to read your entities. For other id options see @PrimaryKey.|#]
[#|2012-06-22T17:25:41.769-0300|WARNING|glassfish3.1.1|org.springframework.beans.GenericTypeAwarePropertyDescriptor|_ThreadID=17;_ThreadName=Thread-2;|Invalid JavaBean property 'armazenador' being accessed! Ambiguous write methods found next to actually used [public void com.hrgi.persistencia.nfe.controladores.ControladorArmazenamentoEmitenteNFe.setArmazenador(com.hrgi.persistencia.nfe.dao.interfaces.IEmitenteDao)]: [public void com.hrgi.persistencia.controladores.ControladorArmazenamento.setArmazenador(com.hrgi.persistencia.dao.IArmazenadorDao)]|#]
[#|2012-06-22T17:25:49.734-0300|WARNING|glassfish3.1.1|org.eclipse.persistence.session.file:/home/hudson/projetos/ERP-HM/modulos-web/erp-web/target/erp-web-0.1.0/WEB-INF/lib/persistencia-erp-0.1.0.jar_erpPU.server|_ThreadID=17;_ThreadName=Thread-2;|Multiple [2] JMX MBeanServer instances exist, we will use the server at index [0] : [com.sun.enterprise.v3.admin.DynamicInterceptor@2ed0005e].|#]
[#|2012-06-22T17:25:49.737-0300|WARNING|glassfish3.1.1|org.eclipse.persistence.session.file:/home/hudson/projetos/ERP-HM/modulos-web/erp-web/target/erp-web-0.1.0/WEB-INF/lib/persistencia-erp-0.1.0.jar_erpPU.server|_ThreadID=17;_ThreadName=Thread-2;|JMX MBeanServer in use: [com.sun.enterprise.v3.admin.DynamicInterceptor@2ed0005e] from index [0] |#]
[#|2012-06-22T17:25:49.740-0300|WARNING|glassfish3.1.1|org.eclipse.persistence.session.file:/home/hudson/projetos/ERP-HM/modulos-web/erp-web/target/erp-web-0.1.0/WEB-INF/lib/persistencia-erp-0.1.0.jar_erpPU.server|_ThreadID=17;_ThreadName=Thread-2;|JMX MBeanServer in use: [com.sun.jmx.mbeanserver.JmxMBeanServer@e40e825] from index [1] |#]
[#|2012-06-22T17:25:52.457-0300|INFO|glassfish3.1.1|org.apache.myfaces.webapp.WebConfigParamsLogger|_ThreadID=17;_ThreadName=Thread-2;|No context init parameter 'org.apache.myfaces.ERROR_HANDLER' found.|#]
[#|2012-06-22T17:25:52.474-0300|INFO|glassfish3.1.1|org.apache.myfaces.webapp.WebConfigParamsLogger|_ThreadID=17;_ThreadName=Thread-2;|No context init parameter 'org.apache.myfaces.ERROR_TEMPLATE_RESOURCE' found, using default value 'META-INF/rsc/myfaces-dev-error.xml'.|#]

我抑制了一个 javax.mail.MessagingException,因为它发生在没有设置密码来连接到邮件服务器时......

我的应用程序中是否有问题导致此问题?

4

2 回答 2

1

嗯,那是多余的……

我会先检查 C:\Windows\System32\drivers\etc\hosts

确保 localhost 的映射没有损坏...

127.0.0.1       localhost
::1             localhost

无论哪种方式,这似乎都是名称解析的问题,无论是主机文件还是 DNS 服务器。

如果有更多可用信息,您能否检查一下并提供更多信息?

于 2012-06-19T21:20:18.457 回答
0

解决了,问题出在jndi dataSource中...我只是删除了jndi dataSource并在应用程序中使用了本地数据源。

于 2012-07-09T17:48:24.600 回答