Skip to content

Instantly share code, notes, and snippets.

@Meta
@Component(value="local")
static class Simple {
}
@Component(value="meta")
@Retention(RetentionPolicy.RUNTIME)
@interface Meta {
}
@Test
public void simple() throws IOException {
@cbeams
cbeams / FlexiblePolymorphicMethodChaining.java
Created May 16, 2011 13:17
Flexible Polymorphic Method Chaining
/**
* Demonstrates a pattern for generic signatures in abstract base classes
* allowing for a method chaining API that is not dependent on order of method
* invocation: the concrete type (C in the case below) is always returned from
* every method that returns the generic parameter T.
*
* While the generic signatures are complex, using the concrete type C remains
* very simple. This tradeoff allows for the design of easy-to-use 'builder
* style' APIs.
*
/*
* Copyright 2002-2011 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'container-execution' defined in class path resource [org/springframework/beans/factory/support/security/callbacks.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.beans.factory.support.security.support.ConstructorBean]: Constructor threw exception; nested exception is org.gradle.listener.ListenerNotificationException: Failed to notify test result processor.
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:288)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1028)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:932)
at org.springframework.beans.factory.support.Abstrac
description = 'Spring ASM'
configurations { jj }
dependencies { jj 'com.googlecode.jarjar:jarjar:1.1' }
configurations { asm }
dependencies { asm 'asm:asm:2.2.3@jar', 'asm:asm-commons:2.2.3@jar' }
jar << {
project.ant {
taskdef name: "jarjar", classname: "com.tonicsystems.jarjar.JarJarTask", classpath: configurations.jj.asPath
org.springframework.remoting.RemoteAccessException: Could not access remote service at [null]; nested exception is javax.xml.ws.WebServiceException: java.net.SocketException: Unexpected end of file from server
at org.springframework.remoting.jaxws.JaxWsPortClientInterceptor.doInvoke(JaxWsPortClientInterceptor.java:504)
at org.springframework.remoting.jaxws.JaxWsPortClientInterceptor.invoke(JaxWsPortClientInterceptor.java:481)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy69.getOrder(Unknown Source)
at org.springframework.remoting.jaxws.JaxWsSupportTests.doTestJaxWsPortAccess(JaxWsSupportTests.java:109)
at org.springframework.remoting.jaxws.JaxWsSupportTests.testJaxWsPortAccess(JaxWsSupportTests.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
junit.framework.AssertionFailedError: Class org.springframework.test.context.junit38.RepeatedJUnit38SpringContextTests$RepeatedTestCase is not public
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.TestSuite$1.runTest(TestSuite.java:97)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:243)
at junit.framework.TestSuite.run(TestSuite.java:238)
junit.framework.AssertionFailedError: Class org.springframework.test.annotation.ProfileValueAnnotationAwareTransactionalTests$DefaultProfileValueSourceTestCase is not public
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.TestSuite$1.runTest(TestSuite.java:97)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:243)
at junit.framework.TestSuite.run(TestSuite.java:238)
junit.framework.AssertionFailedError: Class org.springframework.test.annotation.ProfileValueAnnotationAwareTransactionalTests$HardCodedProfileValueSourceTestCase has no public constructor TestCase(String name) or TestCase()
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.TestSuite$1.runTest(TestSuite.java:97)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:243)
at junit.framework.TestSuite.run(TestSuite.java:238)
Unable to access binding information for class org.springframework.oxm.jibx.Flights
Make sure the binding has been compiled
java.lang.NoSuchFieldException: JiBX_bindingList
at java.lang.Class.getDeclaredField(Class.java:1882)
at org.jibx.runtime.BindingDirectory.getBindingList(BindingDirectory.java:70)
at org.jibx.runtime.BindingDirectory.getFactory(BindingDirectory.java:207)
at org.springframework.oxm.jibx.JibxMarshaller.afterPropertiesSet(JibxMarshaller.java:215)
at org.springframework.oxm.jibx.JibxUnmarshallerTests.createUnmarshaller(JibxUnmarshallerTests.java:35)
at org.springframework.oxm.AbstractUnmarshallerTests.setUp(AbstractUnmarshallerTests.java:58)
at sun.reflect.GeneratedMethodAccessor22.invoke(Unknown Source)