Skip to content

Instantly share code, notes, and snippets.

View pferraro's full-sized avatar

Paul Ferraro pferraro

  • Red Hat
  • Edinburgh, UK
  • 11:36 (UTC)
View GitHub Profile
<testcase time="0.001" classname="org.jboss.as.clustering.infinispan.subsystem.InfinispanSubsystemTransformerTestCase" name="testTransformer713">
<failure message="cache-container/maximal/distributed-cache/dist/ key=statistics
with child1
true
has child2 not defined
node2 is:
{
&quot;async-marshalling&quot; =&gt; true,
&quot;batching&quot; =&gt; true,
&quot;indexing&quot; =&gt; &quot;ALL&quot;,
14:37:07,934 ERROR [org.jgroups.blocks.RequestCorrelator] (OOB-20,shared=udp) failed unmarshalling buffer into return value: java.lang.NullPointerException
at org.infinispan.marshall.core.JBossMarshaller$ExternalizerTableProxy.readObject(JBossMarshaller.java:150)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:355)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:213)
at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:45) [jboss-marshalling-1.4.2.Final.jar:1.4.2.Final]
at org.infinispan.commons.marshall.jboss.AbstractJBossMarshaller.objectFromObjectStream(AbstractJBossMarshaller.java:140)
at org.infinispan.marshall.core.VersionAwareMarshaller.objectFromByteBuffer(VersionAwareMarshaller.java:96)
at org.infinispan.commons.marshall.AbstractDelegatingMarshaller.objectFromByteBuffer(AbstractDelegatingMarshaller.java:80)
at org.infinispan.remoting.transport.jgroups.MarshallerAdapter.objectFromBuffer(Marsha
@pferraro
pferraro / gist:7761491
Created December 3, 2013 00:07
SFSB w/injected DataSource serialization error
15:28:55,568 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (default task-11) ISPN000136: Execution error: org.infinispan.commons.CacheException: java.lang.RuntimeException: Failure to marshal argument(s)
at org.infinispan.commons.util.Util.rewrapAsCacheException(Util.java:557)
at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.invokeRemoteCommands(CommandAwareRpcDispatcher.java:141)
at org.infinispan.remoting.transport.jgroups.JGroupsTransport.invokeRemotely(JGroupsTransport.java:508)
at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:281)
at org.infinispan.interceptors.distribution.TxDistributionInterceptor.prepareOnAffectedNodes(TxDistributionInterceptor.java:214)
at org.infinispan.interceptors.distribution.TxDistributionInterceptor.visitPrepareCommand(TxDistributionInterceptor.java:198)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:125)
at org
public interface ThreadSetupActionFactory<C> {
ThreadSetupAction createThreadSetupAction(C context);
}
public class LazyThreadSetupAction<C> implements ThreadSetupAction {
private static final Handle EMPTY_HANDLE = new Handle() {
@Override
public void tearDown() {
14:21:50,419 INFO [org.jboss.as.test.clustering.cluster.sso.ClusteredSingleSignOnTestCase] (main) +++ testFormAuthSingleSignOn
&amp#27;[31m14:21:50,886 ERROR [io.undertow.request] (default task-2) UT005023: Exception handling request to /war1/j_security_check: java.lang.IllegalStateException: UT000012: Session manager was not attached to the request. Make sure that the SessionAttachmentHander is installed in the handler chain
at io.undertow.util.Sessions.getOrCreateSession(Sessions.java:39) [undertow-core-1.0.0.CR3.jar:1.0.0.CR3]
at io.undertow.security.impl.SingleSignOnAuthenticationMechanism.getSession(SingleSignOnAuthenticationMechanism.java:94) [undertow-core-1.0.0.CR3.jar:1.0.0.CR3]
at io.undertow.security.impl.SingleSignOnAuthenticationMechanism.registerSessionIfRequired(SingleSignOnAuthenticationMechanism.java:73) [undertow-core-1.0.0.CR3.jar:1.0.0.CR3]
at io.undertow.security.impl.SingleSignOnAuthenticationMechanism.access$100(SingleSignOnAuthenticationMechanism.java:28) [undertow-core-1.0.0.CR3.
@pferraro
pferraro / gist:b760f8cb3ab06405f550
Created June 11, 2014 13:56
batching transformer
/**
* Registers cache transformations for model changes introduced in 3.0.0
*/
private static void registerCacheTransformations200(final ResourceTransformationDescriptionBuilder cacheBuilder, CacheMode mode) {
AttributeConverter transactionModeConverter = new AttributeConverter() {
@Override
public void convertOperationParameter(PathAddress address, String attributeName, ModelNode attributeValue, ModelNode operation, TransformationContext context) {
convert(attributeValue, operation);
}
/*
* JBoss, Home of Professional Open Source.
* Copyright 2012, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
/*
* JBoss, Home of Professional Open Source.
* Copyright 2012, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
public class InfinispanSubsystemXMLReader implements XMLElementReader<List<ModelNode>> {
private final Namespace namespace;
InfinispanSubsystemXMLReader(Namespace namespace) {
this.namespace = namespace;
}
@Override
public void readElement(XMLExtendedStreamReader reader, List<ModelNode> operationList) throws XMLStreamException {
@pferraro
pferraro / gist:8cb65102365ed7452cb0
Created June 30, 2014 20:37
CacheResourceDefinition.buildTransformation(...)
if (InfinispanModel.VERSION_3_0_0.requiresTransformation(version)) {
AttributeConverter batchingConverter = new AttributeConverter() {
@Override
public void convertOperationParameter(PathAddress address, String name, ModelNode value, ModelNode operation, TransformationContext context) {
}
@Override
public void convertResourceAttribute(PathAddress address, String name, ModelNode value, TransformationContext context) {
ModelNode cache = context.readResourceFromRoot(address).getModel();
if (cache.hasDefined(TransactionResourceDefinition.PATH.getKey())) {