[jbosscache-issues] [JBoss JIRA] Commented: (JBCACHE-1487) Node count fails when Cache.toString() called between @Inject and @Start methods.
Galder Zamarreno (JIRA)
jira-events at lists.jboss.org
Tue Mar 3 19:17:22 EST 2009
[ https://jira.jboss.org/jira/browse/JBCACHE-1487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12455304#action_12455304 ]
Galder Zamarreno commented on JBCACHE-1487:
-------------------------------------------
To replicate, do (no need to have Gradle installed!):
git clone git://github.com/galderz/victoria.git
cd victoria
sh gradlew testCompile
Now, open build.gradle with any text editor and modify the following line so that it points
to a log4j.xml with TRACE enabled on org.jboss.kernel. See attached for example:
options.fork(forkMode: ForkMode.PER_TEST, jvmArgs: ["-Dlog4j.configuration=file:/home/galder/jboss/others/logging/log4j/log4j-jboss.xml"])
Finally, call:
sh gradlew test
The output should be something like this:
:init
:resources
:compile
:testResources
:testCompile
:test
[ant:junit] Test org.victoria.InterClusterBridgeTest FAILED
[ant:junitreport] the file /home/galder/jboss/jira/jbcache816/victoria/build/test-results/TESTS-TestSuites.xml is not a valid testsuite XML document
Build failed with an exception.
Run with -s or -d option to get more details. Run with -f option to get the full (very verbose) stacktrace.
Build file '/home/galder/jboss/jira/jbcache816/victoria/build.gradle'
Execution failed for task :test.
Cause: There were failing tests. See the report at /home/galder/jboss/jira/jbcache816/victoria/build/reports/tests.
BUILD FAILED
Total time: 7.534 secs
Now, check victoria/build/test-results/TEST-org.victoria.InterClusterBridgeTest.xml which should show the following error:
DEPLOYMENTS IN ERROR:
Deployment "CacheClusterA1" is in error due to: java.lang.UnsupportedOperationException: Not supported in UnversionedNode
at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.internalValidate(AbstractKernelDeployer.java:278)
at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.validate(AbstractKernelDeployer.java:174)
at org.jboss.test.kernel.junit.MicrocontainerTestDelegate.validate(MicrocontainerTestDelegate.java:262)
at org.jboss.test.kernel.junit.MicrocontainerTest.afterSetUp(MicrocontainerTest.java:117)
at org.jboss.test.kernel.junit.MicrocontainerTest.setUp(MicrocontainerTest.java:91)
Finally, you can also run the test from IntelliJ passing -Dlog4j.configuration=file:/home/me/my-log4j.xml
as long as you've modified victoria.iml as per README archive.
> Node count fails when Cache.toString() called between @Inject and @Start methods.
> ---------------------------------------------------------------------------------
>
> Key: JBCACHE-1487
> URL: https://jira.jboss.org/jira/browse/JBCACHE-1487
> Project: JBoss Cache
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 3.0.3.GA
> Reporter: Galder Zamarreno
> Assignee: Manik Surtani
> Fix For: 3.1.0.GA
>
>
> Node count fails when Cache bean is deployed via MC and TRACE is enabled on org.jboss.kernel:
> 2009-03-03 21:40:51,505 ERROR [AbstractKernelController] (main) Error installing to Instantiated: name=CacheClusterA1 state=Described
> java.lang.UnsupportedOperationException: Not supported in UnversionedNode
> at org.jboss.cache.AbstractNode.getChildrenDirect(AbstractNode.java:277)
> at org.jboss.cache.mvcc.NodeReference.getChildrenDirect(NodeReference.java:272)
> at org.jboss.cache.invocation.NodeInvocationDelegate.getChildrenDirect(NodeInvocationDelegate.java:163)
> at org.jboss.cache.DataContainerImpl.numNodes(DataContainerImpl.java:461)
> at org.jboss.cache.DataContainerImpl.getNumberOfNodes(DataContainerImpl.java:438)
> at org.jboss.cache.DataContainerImpl.toString(DataContainerImpl.java:394)
> at org.jboss.cache.DataContainerImpl.toString(DataContainerImpl.java:372)
> at org.jboss.cache.invocation.CacheInvocationDelegate.toString(CacheInvocationDelegate.java:144)
> at java.lang.String.valueOf(String.java:2615)
> at org.jboss.util.JBossStringBuilder.append(JBossStringBuilder.java:114)
> at org.jboss.dependency.plugins.AbstractControllerContext.toString(AbstractControllerContext.java:362)
> MC is printing the cache content in between the two calls to DataContainerImpl.createRootNode(). First
> call happens during the @Inject phase and at that point, DataContainerImpl's config has not been set yet
> so, getting node numbers is called with usingMvcc=false. This leads to getChildrenDirect() being called
> on the root node and this call fails.
> See attached logs to compare deployment when TRACE is enabled versus deployment when DEBUG is enabled.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jbosscache-issues
mailing list