Problemas ao dar deploy de arquivo .war
22/10/2014 17:34
0
No projeto que estou desenvolvendo sempre utilizei o tomcat nativo do grails e só usava o app-run para testar a aplicação, porém agora que preciso fazer o deploy o arquivo war esta dando erro.

No tomcat ele carrega o war mais nao consigo dar start na aplicação e o glassfish esta me retornando o seguinte erro:

Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'grailsApplication' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: gneellaan/Ecf. Please see server.log for more details.


esse gneellaan/Ecf e o package e uma das minhas classes de dominio porem pelo run-app tudo funciona normalmente não estou conseguindo identificar o problema
Tags: grails, tomcat, glassfish, deploy, war


0
Ao tentar dar deploy com o run-war acontece o mesmo erro segue o log:

|Loading Grails 2.4.2
|Configuring classpath
.
|Environment set to development
..................................
|Packaging Grails application
.....................................
|Compiling 58 GSP files for package [gneellaan]
..
|Compiling 4 GSP files for package [databaseMigration]
..
|Building WAR file
................................................................
|Precompiling Assets!
|Processing File 1 of 56 - apple-touch-icon-retina.png
|Processing File 2 of 56 - apple-touch-icon.png
|Processing File 3 of 56 - check.jpg
|Processing File 4 of 56 - deleteico.png
|Processing File 5 of 56 - dropico.png
|Processing File 6 of 56 - editico.png
|Processing File 7 of 56 - error.jpg
|Processing File 8 of 56 - exitico.png
|Processing File 9 of 56 - favicon.ico
|Processing File 10 of 56 - grails_logo.png
|Processing File 11 of 56 - logo.png
|Processing File 12 of 56 - newico.png
|Processing File 13 of 56 - profileico.png
|Processing File 14 of 56 - profilepic.jpg
|Processing File 15 of 56 - search.jpg
|Processing File 16 of 56 - skin\database_add.png
|Processing File 17 of 56 - skin\database_delete.png
|Processing File 18 of 56 - skin\database_edit.png
|Processing File 19 of 56 - skin\database_save.png
|Processing File 20 of 56 - skin\database_table.png
|Processing File 21 of 56 - skin\exclamation.png
|Processing File 22 of 56 - skin\house.png
|Processing File 23 of 56 - skin\information.png
|Processing File 24 of 56 - skin\shadow.jpg
|Processing File 25 of 56 - skin\sorted_asc.gif
|Processing File 26 of 56 - skin\sorted_desc.gif
|Processing File 27 of 56 - spinner.gif
|Processing File 28 of 56 - springsource.png
|Processing File 29 of 56 - sublogo.png
|Processing File 30 of 56 - updateico.png
|Processing File 31 of 56 - ajaxhandler.js
|Uglifying File 31 of 56 - ajaxhandler
|Compressing File 31 of 56 - ajaxhandler
|Processing File 32 of 56 - application.js
|Uglifying File 32 of 56 - application
|Compressing File 32 of 56 - application
|Processing File 33 of 56 - bootstrap.js
|Processing File 34 of 56 - cliente.js
|Processing File 35 of 56 - contador.js
|Uglifying File 35 of 56 - contador
|Compressing File 35 of 56 - contador
|Processing File 36 of 56 - empresa.js
|Uglifying File 36 of 56 - empresa
|Compressing File 36 of 56 - empresa
|Processing File 37 of 56 - grailsdate.js
|Uglifying File 37 of 56 - grailsdate
|Compressing File 37 of 56 - grailsdate
|Processing File 38 of 56 - jquery-1.11.1.min.js
|Processing File 39 of 56 - jquery.maskedinput.js
|Processing File 40 of 56 - search.js
|Processing File 41 of 56 - util.js
|Uglifying File 41 of 56 - util
|Compressing File 41 of 56 - util
|Processing File 42 of 56 - application.css
|Processing File 43 of 56 - bootstrap-theme.css
|Processing File 44 of 56 - bootstrap-theme.css.map
|Processing File 45 of 56 - bootstrap-theme.min.css
|Processing File 46 of 56 - bootstrap.css
|Processing File 47 of 56 - bootstrap.css.map
|Processing File 48 of 56 - bootstrap.min.css
|Processing File 49 of 56 - errors.css
|Processing File 50 of 56 - main.css
|Processing File 51 of 56 - mobile.css
|Processing File 52 of 56 - searchForm.css
|Processing File 53 of 56 - jquery.js
|Processing File 54 of 56 - jquery\jquery-1.11.1.js
|Processing File 55 of 56 - jquery\jquery-1.11.1.min.js
|Processing File 56 of 56 - jquery\jquery-1.11.1.min.map
|Compressing File 56 of 56 - jquery\jquery-1.11.1.min
|Finished Precompiling Assets
...
|Done creating WAR target\gneellaan-0.1.war
|Running Grails application
Error |
SLF4J: Class path contains multiple SLF4J bindings.
Error |
SLF4J: Found binding in [jar:file:/C:/grails-2.4.2/dist/grails-plugin-log4j-2.4.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
Error |
SLF4J: Found binding in [jar:file:/C:/Grails/gneellaan/target/work/tomcat/webapps/gneellaan/WEB-INF/lib/grails-plugin-log4j-2.4.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
Error |
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
Error |
SLF4J: Actual binding is of type [org.slf4j.impl.GrailsSlf4jLoggerFactory]
2014-10-23 13:45:42,887 [localhost-startStop-1] ERROR context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'grailsApplication' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: gneellaan/Ecf
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoClassDefFoundError: gneellaan/Ecf
at java.lang.Class.forName(Class.java:340)
... 4 more
Caused by: java.lang.ClassNotFoundException: gneellaan.Ecf
... 5 more
2014-10-23 13:45:42,890 [localhost-startStop-1] ERROR context.GrailsContextLoaderListener - Error initializing the application: Error creating bean with name 'grailsApplication' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: gneellaan/Ecf
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'grailsApplication' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: gneellaan/Ecf
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoClassDefFoundError: gneellaan/Ecf
at java.lang.Class.forName(Class.java:340)
... 4 more
Caused by: java.lang.ClassNotFoundException: gneellaan.Ecf
... 5 more
2014-10-23 13:45:42,891 [localhost-startStop-1] ERROR context.GrailsContextLoaderListener - Error initializing Grails: Error creating bean with name 'grailsApplication' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: gneellaan/Ecf
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'grailsApplication' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: gneellaan/Ecf
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoClassDefFoundError: gneellaan/Ecf
at java.lang.Class.forName(Class.java:340)
... 4 more
Caused by: java.lang.ClassNotFoundException: gneellaan.Ecf
... 5 more
Exception sending context initialized event to listener instance of class org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'grailsApplication' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: gneellaan/Ecf
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoClassDefFoundError: gneellaan/Ecf
at java.lang.Class.forName(Class.java:340)
... 4 more
Caused by: java.lang.ClassNotFoundException: gneellaan.Ecf
... 5 more
Error listenerStart
Context [/gneellaan] startup failed due to previous errors
The web application [/gneellaan] registered the JDBC driver [org.h2.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
The web application [/gneellaan] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
The web application [/gneellaan] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak.
|Server running. Browse to http://localhost:9091/gneellaan
|Server running. Browse to http://localhost:9091/gneellaan



ao acessar o endereço a pagina fica em branco


0
Após tentar varias soluções mirabolantes um simples grails clean resolveu o problema ;s



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