Jakarta ee 玻璃鱼连接池don';重新启动服务器后无法工作

Jakarta ee 玻璃鱼连接池don';重新启动服务器后无法工作,jakarta-ee,jpa-2.0,eclipselink,glassfish-3,connection-pooling,Jakarta Ee,Jpa 2.0,Eclipselink,Glassfish 3,Connection Pooling,问题变了 我在Glassfish 3.1中有一个连接池,可以连接到SQLServer2008Express,这个连接池工作正常,但是当Glassfish重新启动时,连接池无法ping并停止工作。要再次工作,我转到pool configuration->aditional properties并更改主机名(例如localhost为127.0.0.1),如您在该屏幕中所看到的 我注意到这个问题只发生在服务器重新启动之前部署应用程序时。。。如果我的应用程序没有部署,并且我重新启动了服务器,那么在我尝试

问题变了

我在Glassfish 3.1中有一个连接池,可以连接到SQLServer2008Express,这个连接池工作正常,但是当Glassfish重新启动时,连接池无法ping并停止工作。要再次工作,我转到pool configuration->aditional properties并更改主机名(例如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.MessagineException,因为它发生在没有设置连接到邮件服务器的密码的情况下

我的应用程序中是否存在导致此问题的错误???

Mmhh这是多余的

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

确保本地主机的映射未损坏

127.0.0.1       localhost
::1             localhost
无论哪种方式,这似乎都是一个名称解析问题,无论是主机文件还是DNS服务器


如果有更多可用信息,请检查这些信息并提供更多信息???

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

主机文件与您提到的相同,dns服务器配置正确。可能是glassfish的问题……我是否正确理解了您的问题:池配置在服务器重新启动期间发生更改,从127.0.0.1更改为localhost?否。重新启动后配置没有更改,池根本无法与主机一起工作。所以我习惯性地将池配置从127.0.0.1更改为localhost,它可以工作…抱歉,我不明白;-)为什么不使用localhost呢?如何配置连接池?它是与应用程序一起部署的还是您手动配置的?池是手动配置的,如图所示。我看你不明白。。。所以这样想,连接运行得非常好,出于某种原因,我需要重新启动glassfish服务器。重新启动后,连接池不工作。在服务器重新启动之前,所有配置都相同。。。因此,我进入池配置,只需从localhost更改为127.0.0.1,或从127.0.0.1更改为localhost,然后再次工作。如果服务器再次重新启动,我需要再次更改主机…您应该检查domain.xml并比较重新启动前后的连接池设置。有什么不同吗?