This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>br.edu.curso.teste</groupId> | |
<artifactId>basico</artifactId> | |
<version>0.1-SNAPSHOT</version> | |
<name>basico</name> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empório da Cerveja - Cervejas de outras latitudes MEU CARRINHOMEUS PEDIDOSLOGIN CADASTROFAQ | |
CERVEJAS | |
TAÇAS E COPOS | |
KITS | |
ACESSÓRIOS | |
MARCAS | |
ÚLTIMAS OFERTAS | |
FALE CONOSCO | |
COMPRAS CORPORATIVAS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Grails Runtime Exception | |
Error Details | |
Error 500: No signature of method: com.ideais.commerce.admin.Store.find() is applicable for argument types: (java.lang.String, java.util.LinkedHashMap, java.util.LinkedHashMap) values: [from Store where id = :storeId, [storeId:181], [cache:true]] Possible solutions: find(java.lang.String, java.util.Map, java.util.Map), find(java.lang.String, java.util.Map), find(java.lang.String), find(java.lang.String, java.util.Collection), find(java.lang.String, [Ljava.lang.Object;), find(java.lang.Object) | |
Servlet: grails | |
URI: /grails/cart/show.dispatch | |
Exception Message: No signature of method: com.ideais.commerce.admin.Store.find() is applicable for argument types: (java.lang.String, java.util.LinkedHashMap, java.util.LinkedHashMap) values: [from Store where id = :storeId, [storeId:181], [cache:true]] Possible solutions: find(java.lang.String, java.util.Map, java.util.Map), find(java.lang.String, java.util.Map), find(java.lang.String), find(java.lang.String, java.util.Collection), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28/03/2014 11:04:21 com.googlecode.flyway.core.util.logging.apachecommons.ApacheCommonsLog info | |
INFO: Cleaned database schema 'PUBLIC' (execution time 00:00.007s) | |
28/03/2014 11:04:21 com.googlecode.flyway.core.util.logging.apachecommons.ApacheCommonsLog info | |
INFO: Creating Metadata table: "PUBLIC"."schema_version" | |
28/03/2014 11:04:21 com.googlecode.flyway.core.util.logging.apachecommons.ApacheCommonsLog info | |
INFO: Current schema version: null | |
28/03/2014 11:04:21 com.googlecode.flyway.core.util.logging.apachecommons.ApacheCommonsLog info | |
INFO: Migrating to version 1 | |
28/03/2014 11:04:21 com.googlecode.flyway.core.util.logging.apachecommons.ApacheCommonsLog info | |
INFO: Migrating to version 1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# java - version | |
``` | |
java version "1.7.0_25" | |
Java(TM) SE Runtime Environment (build 1.7.0_25-b15) | |
Java HotSpot(TM) Server VM (build 23.25-b01, mixed mode) | |
``` | |
# javaws - version | |
``` | |
Java(TM) Web Start 10.25.2.15-fcs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#sbt | |
``` | |
Getting net.java.dev.jna jna 3.2.3 ... | |
:: problems summary :: | |
:::: WARNINGS | |
module not found: net.java.dev.jna#jna;3.2.3 | |
==== local: tried |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Caused by: weblogic.transaction.internal.AppSetRollbackOnlyException: setRollbackOnly called on transaction | |
at weblogic.transaction.internal.TransactionImpl.setRollbackOnly(TransactionImpl.java:555) | |
at weblogic.transaction.internal.TransactionManagerImpl.setRollbackOnly(TransactionManagerImpl.java:340) | |
at weblogic.transaction.internal.TransactionManagerImpl.setRollbackOnly(TransactionManagerImpl.java:333) | |
at org.eclipse.persistence.transaction.JTATransactionController.markTransactionForRollback_impl(JTATransactionController.java:145) | |
at org.eclipse.persistence.transaction.AbstractTransactionController.markTransactionForRollback(AbstractTransactionController.java:196) | |
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.rollbackTransaction(UnitOfWorkImpl.java:4486) | |
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1351) | |
at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitToDatabase(RepeatableWriteUnitOfWork.java:468) | |
at org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Imagine uma tela de busca de produtos por faixa de preço através da consulta a um serviço REST | |
Deseja-se que o cliente possa formatar a mensagem e enviar para o usuário | |
Digamos que a chamada getProdutos na linha 10 retorne http status code 422 e no body a mensagem | |
{ "token":"1N1H2TT014102023424","errors":["FAIXA_PRECO_INVALIDA","NAO_PERMITIDO_VALOR_NEGATIVO"] } | |
Entenda que usualmente o http status code 422 indica que houve um problema semântico na entidade | |
Um ClientException significa que algum problema ocorreu no request, seja de infra ou de negócio | |
A idéia é que o cliente informe um properties que inclua a sua própria mensagem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
- aquela velha história: | |
"quero iterar uma lista, pegar apenas os itens válidos, | |
transformá-los então em um novo tipo e depois entregar o resultado" | |
*/ | |
enum ParameterTal { | |
nome; // imagine exemplo real com quase 20 parametros | |
public String getValue(Entity entity) { // a medida que mais parametros existem este método cresce |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static Iterable<String> filter(Iterable<String> strings) { | |
if ( Iterables.isEmpty(strings) ) return null; | |
return FluentIterable | |
.from( strings ) | |
.filter( new Predicate<String>() { | |
@Override public boolean apply(String value) { | |
return !isEmpty( strip(value) ); | |
} | |
}); | |
} |
OlderNewer