Skip to content

Instantly share code, notes, and snippets.

View nyilmaz's full-sized avatar

Nurettin Yılmaz nyilmaz

View GitHub Profile
@nyilmaz
nyilmaz / InMemoryAdvice.java
Created June 19, 2013 13:40
InMemoryAspect
package pipe.plug.inmemory;
import com.google.common.base.CaseFormat;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.reflect.MethodSignature;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
@nyilmaz
nyilmaz / gist:7786787
Created December 4, 2013 12:35
arkadaslik exception1
WARN [2013-12-04 14:10:06,343] org.eclipse.jetty.servlet.ServletHandler: /aktivite/mesajlar-ajax/gonder
! java.lang.IllegalArgumentException: null
! at org.eclipse.jetty.server.Response.sendRedirect(Response.java:470) ~[match-composite-act-sho-web-1.0-SNAPSHOT-V2013-11-21_10-40-58.jar:na]
! at org.springframework.web.servlet.view.RedirectView.sendRedirect(RedirectView.java:546) ~[match-composite-act-sho-web-1.0-SNAPSHOT-V2013-11-21_10-40-58.jar:na]
! at org.springframework.web.servlet.view.RedirectView.renderMergedOutputModel(RedirectView.java:277) ~[match-composite-act-sho-web-1.0-SNAPSHOT-V2013-11-21_10-40-58.jar:na]
! at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:263) ~[match-composite-act-sho-web-1.0-SNAPSHOT-V2013-11-21_10-40-58.jar:na]
! at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1208) ~[match-composite-act-sho-web-1.0-SNAPSHOT-V2013-11-21_10-40-58.jar:na]
! at org.springframework.web.servlet.DispatcherServlet.processDispatchResult
private PermitAll getPermitAll(HandlerMethod value) {
PermitAll annotation = value.getMethodAnnotation(PermitAll.class);
if(annotation == null){
annotation = value.getBean().getClass().getAnnotation(PermitAll.class);
}
return annotation;
}
@nyilmaz
nyilmaz / gist:8144277
Created December 27, 2013 08:44
pattern hatasi
Caused by: ! java.lang.IllegalArgumentException: Pattern cannot be null or empty
! at org.springframework.util.Assert.hasText(Assert.java:162) ~[match-composite-act-sho-web-1.0-SNAPSHOT-V2013-12-27_10-36-55.jar:na]
! at org.springframework.security.web.util.matcher.AntPathRequestMatcher.<init>(AntPathRequestMatcher.java:94) ~[match-composite-act-sho-web-1.0-SNAPSHOT-V2013-12-27_10-36-55.jar:na]
! at org.springframework.security.web.util.matcher.AntPathRequestMatcher.<init>(AntPathRequestMatcher.java:78) ~[match-composite-act-sho-web-1.0-SNAPSHOT-V2013-12-27_10-36-55.jar:na]
! at org.springframework.security.config.annotation.web.AbstractRequestMatcherRegistry$RequestMatchers.antMatchers(AbstractRequestMatcherRegistry.java:148) ~[match-composite-act-sho-web-1.0-SNAPSHOT-V2013-12-27_10-36-55.jar:na]
! at org.springframework.security.config.annotation.web.AbstractRequestMatcherRegistry$RequestMatchers.antMatchers(AbstractRequestMatcherRegistry.java:161) ~[match-composite-act-sho-web-1.0-SNAPSHOT-V2013-12-27_10-3
WARN [2014-01-03 16:18:09,611] org.eclipse.jetty.servlet.ServletHandler: /
! java.lang.NullPointerException: null
! at match.plug.principal.filter.PrincipalModifiedFilter.doFilterInternal(PrincipalModifiedFilter.java:41) ~[match-composite-act-sho-web-1.0-SNAPSHOT-V2014-01-03_16-11-11.jar:na]
! at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[match-composite-act-sho-web-1.0-SNAPSHOT-V2014-01-03_16-11-11.jar:na]
! at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) ~[match-composite-act-sho-web-1.0-SNAPSHOT-V2014-01-03_16-11-11.jar:na]
! at match.web.commonspring.security.principal.PrincipalFromAuthenticationFilter.doFilterInternal(PrincipalFromAuthenticationFilter.java:36) ~[match-composite-act-sho-web-1.0-SNAPSHOT-V2014-01-03_16-11-11.jar:na]
! at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[match-composite-act-sho-web-1.0-SNAPSHOT-V2014-01-03_16-11-11.jar:n
@nyilmaz
nyilmaz / gist:8575738
Created January 23, 2014 09:44
replacer kullanimi
<profiles>
<profile>
<id>liveDeployment2</id>
<properties>
<deploy.skip>true</deploy.skip>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Caused by: ! java.lang.RuntimeException: Cannot load SchemaTypeSystem. Unable to load class with name schemaorg_apache_xmlbeans.system.sA2DAC568E9630E557BA98F5BDA55B699.TypeSystemHolder. Make sure the generated binary files are on the classpath.
! at org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans.java:783) ~[xmlbeans-2.6.0.jar:2.6.0-r1364789]
! at noNamespace.GVPSRequestDocument.<clinit>(GVPSRequestDocument.java:19) ~[magnet-garanti-api-1.9.12.jar:na]
package magnet.support.spring.captchaextension.annotation;
import com.google.common.base.CaseFormat;
import magnet.support.spring.captchaextension.RequestMappingInfoAppendableHandlerMapping;
import magnet.support.spring.captchaextension.service.CaptchaService;
import magnet.support.spring.captchaextension.service.impl.CaptchaServiceImpl;
import org.apache.commons.lang3.RandomStringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeansException;
Object dayObj = FieldUtils.readField(value, birthdayFieldName, true);
Object monthObj = FieldUtils.readField(value, birthmonthFieldName, true);
Object yearObj = FieldUtils.readField(value, birthyearFieldName, true);
Boolean allNull = dayObj == null && monthObj == null && yearObj == null;
Boolean anyNull = dayObj == null || monthObj == null || yearObj == null;
if(required) {
if(anyNull) {
return false;
package magnet.support.common.validation.validator;
import magnet.support.common.validation.annotation.IsBirthdateValid;
import org.apache.commons.lang3.reflect.FieldUtils;
import org.joda.time.DateTime;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;