Skip to content

Instantly share code, notes, and snippets.

Avatar

Rodrigo Turini Turini

View GitHub Profile
@Turini
Turini / gist:788c6c9084e7ecf31c1d
Created Mar 13, 2015
classe ebook cap 5 do livro de oo
View gist:788c6c9084e7ecf31c1d
public class Ebook extends Livro {
private String waterMark;
public Ebook(Autor autor) {
super(autor);
}
public String getWaterMark() {
return waterMark;
View gist:2e9ddc52b6eb49f1eeec
03:17:38,525 ERROR [io.undertow.request] (default task-1) UT005023: Exception handling request to /console/WEB-INF/jsp/principal/index.jsp: javax.servlet.ServletException: /WEB-INF/jsp/principal/index.jsp raised an exception
at br.com.caelum.vraptor.VRaptor.doFilter(VRaptor.java:127) [vraptor-4.1.4.jar:]
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.1.0.Final
@Turini
Turini / gist:aa75738dd97115321513
Created Jul 31, 2014
org.openqa.selenium.firefox.NotConnectedException with FF30
View gist:aa75738dd97115321513
org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:98)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:148)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:85)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:127)
at br.com.caelum.caelumweb2.integracao2.webdriver.SeleniumWebDriverTestCase.beforeStartup(SeleniumWebDriverTestCase.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
View gist:11228703
package br.com.caelum.vraptor.dialect;
import org.hibernate.dialect.HSQLDialect;
public class BugDialect extends HSQLDialect {
@Override
public String getQuerySequencesString() {
return null;
}
View gist:11199258
java.lang.IllegalArgumentException: Parameters paths are invalid: [abc.y] for method public void br.com.caelum.vraptor.http.route.RouteBuilderTest$Generic.gee(java.lang.Object)
at br.com.caelum.vraptor.http.route.DefaultTypeFinder.getParameterTypes(DefaultTypeFinder.java:66)
at br.com.caelum.vraptor.http.route.DefaultRouteBuilder.addParametersInfo(DefaultRouteBuilder.java:196)
at br.com.caelum.vraptor.http.route.DefaultRouteBuilder.is(DefaultRouteBuilder.java:185)
at br.com.caelum.vraptor.http.route.RouteBuilderTest.shouldUseGenericParameters(RouteBuilderTest.java:232)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
@Turini
Turini / gist:11019009
Created Apr 18, 2014
wildfly startup exception (vraptor 4)
View gist:11019009
21:34:15,894 INFO [org.hibernate.tool.hbm2ddl.SchemaUpdate] (ServerService Thread Pool -- 19) HHH000228: Running hbm2ddl schema update
21:34:15,895 INFO [org.hibernate.tool.hbm2ddl.SchemaUpdate] (ServerService Thread Pool -- 19) HHH000102: Fetching database metadata
21:34:15,900 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] (ServerService Thread Pool -- 19) HHH000299: Could not complete schema update: java.lang.NullPointerException
at org.hibernate.tool.hbm2ddl.DatabaseMetadata.initSequences(DatabaseMetadata.java:183) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
at org.hibernate.tool.hbm2ddl.DatabaseMetadata.<init>(DatabaseMetadata.java:92) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
at org.hibernate.tool.hbm2ddl.DatabaseMetadata.<init>(DatabaseMetadata.java:84) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:196) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:178) [hi
View gist:8316547
Generating /home/Rodrigo/workspace/vraptor4/vraptor-core/target/apidocs/br/com/caelum/vraptor/deserialization/class-use/Deserializer.html...
Generating /home/Rodrigo/workspace/vraptor4/vraptor-core/target/apidocs/br/com/caelum/vraptor/deserialization/class-use/Deserializes.html...
Generating /home/Rodrigo/workspace/vraptor4/vraptor-core/target/apidocs/br/com/caelum/vraptor/deserialization/class-use/DefaultDeserializers.html...
Generating /home/Rodrigo/workspace/vraptor4/vraptor-core/target/apidocs/br/com/caelum/vraptor/deserialization/xstream/class-use/XStreamXMLDeserializer.html...
Generating /home/Rodrigo/workspace/vraptor4/vraptor-core/target/apidocs/br/com/caelum/vraptor/deserialization/gson/class-use/GsonDeserialization.html...
Generating /home/Rodrigo/workspace/vraptor4/vraptor-core/target/apidocs/br/com/caelum/vraptor/deserialization/gson/class-use/CalendarDeserializer.html...
Generating /home/Rodrigo/workspace/vraptor4/vraptor-core/target/apidocs/br/com/caelum/vraptor/observer/
@Turini
Turini / gist:7949807
Last active Dec 31, 2015
Erro cadastro e listagem de música (teste do jmeter)
View gist:7949807

Cadastro de musica

<html><head><title>Apache Tomcat/7.0.42 - Error report</title>
</head><body><h1>HTTP Status 500 - Exception when trying to instantiate Target(name=music, type=class br.com.caelum.vraptor.musicjungle.model.Music)</h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u>Exception when trying to instantiate Target(name=music, type=class br.com.caelum.vraptor.musicjungle.model.Music)</u></p><p><b>description</b> <u>The server encountered an internal error that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>br.com.caelum.vraptor.http.InvalidParameterException: Exception when trying to instantiate Target(name=music, type=class br.com.caelum.vraptor.musicjungle.model.Music)
	br.com.caelum.vraptor.http.iogi.VRaptorInstantiator.handleException(VRaptorInstantiator.java:114)
	br.com.caelum.vraptor.http.iogi.VRaptorInstantiator.handleException(VRaptorInstantiator.java:116)
	br.com.caelum.vraptor.http.iogi.VRaptorInstantiator.instan
@Turini
Turini / gist:7335438
Created Nov 6, 2013
ÌncludeParameters (Interceptor x Evento)
View gist:7335438

Antes, usando Interceptor

This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient)
Completed 100 requests
Completed 200 requests
@Turini
Turini / gist:7237074
Created Oct 30, 2013
Erro do brutal vraptor4-beta-3
View gist:7237074
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/Rodrigo/.m2/repository/org/jboss/weld/servlet/weld-servlet/2.0.2.Final/weld-servlet-2.0.2.Final.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/Rodrigo/.m2/repository/org/slf4j/slf4j-log4j12/1.6.0/slf4j-log4j12-1.6.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.JDK14LoggerFactory]
Oct 30, 2013 3:51:41 PM org.eclipse.jetty.server.Server doStart
INFO: jetty-8.1.0.v20120127
Oct 30, 2013 3:51:44 PM org.jboss.weld.bootstrap.WeldBootstrap <clinit>
INFO: WELD-000900 2.0.2 (Final)
Oct 30, 2013 3:51:44 PM org.eclipse.jetty.server.handler.ContextHandler callContextInitialized