Erro ao publicar no servidor
29/02/2012 19:45
0
Olá pessoal,
estou com o seguinte problema quando vou publicar no apache meu war (que funciona perfeitamente no netbeans e no apache local) ele não "starta" o serviço, aparece a pagina com o erro 404 e dá a sevinte mensagem:
"Feb 29, 2012 4:42:17 PM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.22.
Feb 29, 2012 4:42:17 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [false], sendfile [true], accept filters [false], r
andom [true].
Feb 29, 2012 4:42:17 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-apr-8888"]
Feb 29, 2012 4:42:17 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-apr-8009"]
Feb 29, 2012 4:42:17 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 786 ms
Feb 29, 2012 4:42:17 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Feb 29, 2012 4:42:17 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.26
Feb 29, 2012 4:42:17 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive C:\Program Files\apache-tomcat-7.0.26\we
bapps\probe.war
Feb 29, 2012 4:42:17 PM org.apache.tomcat.util.digester.Digester endElement
WARNING: No rules found matching 'Context/Logger'.
Feb 29, 2012 4:42:22 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive C:\Program Files\apache-tomcat-7.0.26\we
bapps\seniorweb.war
Feb 29, 2012 4:42:22 PM org.apache.catalina.loader.WebappClassLoader validateJar
File
INFO: validateJarFile(C:\Program Files\apache-tomcat-7.0.26\webapps\seniorweb\WE
B-INF\lib\servlet-api-2.3.jar) - jar not loaded. See Servlet Spec 2.3, section 9
.7.2. Offending class: javax/servlet/Servlet.class
2012-02-29 16:42:36,359 [pool-2-thread-1] ERROR context.ContextLoader - Context
initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean wit
h name 'messageSource': Initialization of bean failed; nested exception is org.s
pringframework.beans.factory.BeanCreationException: Error creating bean with nam
e 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while
setting bean property 'sessionFactory'; nested exception is org.springframework.
beans.factory.BeanCreationException: Error creating bean with name 'sessionFacto
ry': Cannot resolve reference to bean 'hibernateProperties' while setting bean p
roperty 'hibernateProperties'; nested exception is org.springframework.beans.fac
tory.BeanCreationException: Error creating bean with name 'hibernateProperties':
Cannot resolve reference to bean 'dialectDetector' while setting bean property
'properties' with key [hibernate.dialect]; nested exception is org.springframewo
rk.beans.factory.BeanCreationException: Error creating bean with name 'dialectDe
tector': Invocation of init method failed; nested exception is org.springframewo
rk.jdbc.support.MetaDataAccessException: Error while extracting DatabaseMetaData
; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory (Communications link failure

The last packet successfully received from the server was 1,330,544,556,296 mill
iseconds ago. The last packet sent successfully to the server was 0 millisecond
s ago.)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source
)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creati
ng bean with name 'transactionManager': Cannot resolve reference to bean 'sessio
nFactory' while setting bean property 'sessionFactory'; nested exception is org.
springframework.beans.factory.BeanCreationException: Error creating bean with na
me 'sessionFactory': Cannot resolve reference to bean 'hibernateProperties' whil
e setting bean property 'hibernateProperties'; nested exception is org.springfra
mework.beans.factory.BeanCreationException: Error creating bean with name 'hiber
nateProperties': Cannot resolve reference to bean 'dialectDetector' while settin
g bean property 'properties' with key [hibernate.dialect]; nested exception is o
rg.springframework.beans.factory.BeanCreationException: Error creating bean with
name 'dialectDetector': Invocation of init method failed; nested exception is o
rg.springframework.jdbc.support.MetaDataAccessException: Error while extracting
DatabaseMetaData; nested exception is org.apache.commons.dbcp.SQLNestedException
: Cannot create PoolableConnectionFactory (Communications link failure

The last packet successfully received from the server was 1,330,544,556,296 mill
iseconds ago. The last packet sent successfully to the server was 0 millisecond
s ago.)
... 6 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creati
ng bean with name 'sessionFactory': Cannot resolve reference to bean 'hibernateP
roperties' while setting bean property 'hibernateProperties'; nested exception i
s org.springframework.beans.factory.BeanCreationException: Error creating bean w
ith name 'hibernateProperties': Cannot resolve reference to bean 'dialectDetecto
r' while setting bean property 'properties' with key [hibernate.dialect]; nested
exception is org.springframework.beans.factory.BeanCreationException: Error cre
ating bean with name 'dialectDetector': Invocation of init method failed; nested
exception is org.springframework.jdbc.support.MetaDataAccessException: Error wh
ile extracting DatabaseMetaData; nested exception is org.apache.commons.dbcp.SQL
NestedException: Cannot create PoolableConnectionFactory (Communications link fa
ilure

The last packet successfully received from the server was 1,330,544,556,296 mill
iseconds ago. The last packet sent successfully to the server was 0 millisecond
s ago.)
... 6 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creati
ng bean with name 'hibernateProperties': Cannot resolve reference to bean 'diale
ctDetector' while setting bean property 'properties' with key [hibernate.dialect
]; nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'dialectDetector': Invocation of init method faile
d; nested exception is org.springframework.jdbc.support.MetaDataAccessException:
Error while extracting DatabaseMetaData; nested exception is org.apache.commons
.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communication
s link failure

The last packet successfully received from the server was 1,330,544,556,296 mill
iseconds ago. The last packet sent successfully to the server was 0 millisecond
s ago.)
... 6 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creati
ng bean with name 'dialectDetector': Invocation of init method failed; nested ex
ception is org.springframework.jdbc.support.MetaDataAccessException: Error while
extracting DatabaseMetaData; nested exception is org.apache.commons.dbcp.SQLNes
tedException: Cannot create PoolableConnectionFactory (Communications link failu
re

The last packet successfully received from the server was 1,330,544,556,296 mill
iseconds ago. The last packet sent successfully to the server was 0 millisecond
s ago.)
... 6 more
Caused by: org.springframework.jdbc.support.MetaDataAccessException: Error while
extracting DatabaseMetaData; nested exception is org.apache.commons.dbcp.SQLNes
tedException: Cannot create PoolableConnectionFactory (Communications link failu
re

The last packet successfully received from the server was 1,330,544,556,296 mill
iseconds ago. The last packet sent successfully to the server was 0 millisecond
s ago.)
... 6 more
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableCon
nectionFactory (Communications link failure

The last packet successfully received from the server was 1,330,544,556,296 mill
iseconds ago. The last packet sent successfully to the server was 0 millisecond
s ago.)
at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFacto
ry(BasicDataSource.java:1549)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou
rce.java:1388)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource
.java:1044)
at $Proxy6.getMetaData(Unknown Source)
... 6 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communicatio
ns link failure

The last packet successfully received from the server was 1,330,544,556,296 mill
iseconds ago. The last packet sent successfully to the server was 0 millisecond
s ago.
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1
074)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2214)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:773)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:352)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java
:282)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(Driv
erConnectionFactory.java:38)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(Poolable
ConnectionFactory.java:582)
at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(Bas
icDataSource.java:1556)
at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFacto
ry(BasicDataSource.java:1545)
... 9 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communicatio
ns link failure

The last packet successfully received from the server was 1,330,544,556,296 mill
iseconds ago. The last packet sent successfully to the server was 0 millisecond
s ago.
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1
074)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:341)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2137)
... 18 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.ja
va:253)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:290)
... 19 more
Feb 29, 2012 4:42:36 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Feb 29, 2012 4:42:36 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/seniorweb] startup failed due to previous errors
Feb 29, 2012 4:42:36 PM org.apache.catalina.loader.WebappClassLoader clearRefere
ncesThreads
SEVERE: The web application [/seniorweb] appears to have started a thread named
[MySQL Statement Cancellation Timer] but has failed to stop it. This is very lik
ely to create a memory leak.
Feb 29, 2012 4:42:36 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Program Files\apache-tomcat-7.0.26\
webapps\host-manager
Feb 29, 2012 4:42:36 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Program Files\apache-tomcat-7.0.26\
webapps\manager
Feb 29, 2012 4:42:36 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Program Files\apache-tomcat-7.0.26\
webapps\ROOT
Feb 29, 2012 4:42:36 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-apr-8888"]
Feb 29, 2012 4:42:36 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-apr-8009"]
Feb 29, 2012 4:42:36 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 18754 ms
"
Alguém sabe o que devo fazer?
Obrigado pela ajudar.
Tags: 404, erro


0
Stravos, a primeira coisa que você deve olhar é se do computador aonde está fazendo deploy, você tem acesso ao MySQL, pois o erro final é justamente este: o servidor não conseguindo acessar o MySQL.

Outro ponto importante: vocÊ definiu um dialect no seu arquivo DataSource.groovy? Se sim, verifique se preencheu com o valor correto, pois esta é a outra mensagem que está sendo acusada no seu stacktrace.


0
O problema foi a localização o mySql que era em outro computador e não no local, mas a resposta era como vc falou kiko, valeu pela ajuda.
Tópico encerrado.
Valeu.
05/03/2012 17:32



Ainda não faz parte da comunidade???

Para se registrar, clique aqui.


Aprenda Groovy e Grails com a Formação itexto!

Newsletter Semana Groovy

Assinar

Envie seu link!


Livro de Grails


/dev/All

Os melhores blogs de TI (e em português) em um único lugar!

 
Creative Commons
RSS Grails Brasil é mantido por itexto Consultoria.
Em caso de problemas contacte Henrique Lobo Weissmann (Kico) por e-mail: kico@itexto.com.br
Todo o conteúdo presente neste site adota o Creative Commons como licença padrão.
Ver: 4.14.0
itexto