[jboss-user] [JBossCache] - Re: how to use with EJB3Standalone container inside eclipse

kagey do-not-reply at jboss.com
Thu Dec 7 13:17:31 EST 2006


ok, here is my deployment descriptor:

  | <?xml version="1.0" encoding="UTF-8" ?>
  | <deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  | 	xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd"
  | 	xmlns="urn:jboss:bean-deployer:2.0">
  | 
  | 	<bean name="jboss.cache:service=TestTreeCache"
  | 		class="org.jboss.cache.TreeCache">
  | 		<!--depends>jboss:service=Naming</depends>
  | 		<depends>jboss:service=TransactionManager</depends-->
  | 
  | 		<create method="createService" />
  | 		<start method="startService" />
  | 		<stop method="stopService" />
  | 		<destroy method="destroyService" />
  | 		<property name="transactionManagerLookupClass">
  | 			org.jboss.cache.DummyTransactionManagerLookup
  | 		</property>
  | 		<property name="nodeLockingScheme">PESSIMISTIC</property>
  | 		<property name="isolationLevel">REPEATABLE_READ</property>
  | 		<property name="cacheMode">LOCAL</property>
  | 		<property name="initialStateRetrievalTimeout">5000</property>
  | 		<property name="syncReplTimeout">10000</property>
  | 		<property name="lockAcquisitionTimeout">15000</property>
  | 
  | 		<property name="evictionPolicyClass">
  | 			org.jboss.cache.eviction.LRUPolicy
  | 		</property>
  | 
  | 		<property name="evictionPolicyConfig">
  | 			<!--config>
  | 				<attribute name="wakeUpIntervalSeconds">2</attribute>
  | 				<region name="/_default_">
  | 					<attribute name="maxNodes">0</attribute>
  | 					<attribute name="timeToLiveSeconds">0</attribute>
  | 					<attribute name="maxAgeSeconds">0</attribute>
  | 				</region>
  | 			</config-->
  | 
  | 		</property>
  | 
  | 	</bean>
  | </deployment>
  | 

As you can see, the depends and eviction policy < config> are commented out as they cause other problems. here is the error i get using the above:

  | RROR 07-12 10:46:29,171 (AbstractController.java:incrementState:350)  -Error installing to Configured: name=jboss.cache:service=TestTreeCache state=Instantiated
  | java.lang.IllegalArgumentException: Null value metadata
  | 	at org.jboss.kernel.plugins.config.Configurator.getPropertySetterJoinPoint(Configurator.java:496)
  | 	at org.jboss.kernel.plugins.config.Configurator.getPropertySetterJoinPoint(Configurator.java:443)
  | 	at org.jboss.kernel.plugins.config.Configurator.getPropertySetterJoinPoints(Configurator.java:407)
  | 	at org.jboss.kernel.plugins.config.AbstractKernelConfigurator.getPropertySetterJoinPoints(AbstractKernelConfigurator.java:120)
  | 	at org.jboss.kernel.plugins.dependency.KernelControllerContextActions$ConfigureAction.installAction(KernelControllerContextActions.java:443)
  | 	at org.jboss.kernel.plugins.dependency.KernelControllerContextActions$KernelControllerContextAction.install(KernelControllerContextActions.java:175)
  | 	at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
  | 	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:226)
  | 	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:593)
  | 	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:346)
  | 	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:438)
  | 	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:379)
  | 	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:225)
  | 	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:151)
  | 	at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBean(AbstractKernelDeployer.java:291)
  | 	at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBeans(AbstractKernelDeployer.java:261)
  | 	at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deploy(AbstractKernelDeployer.java:117)
  | 	at org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer.deploy(BeanXMLDeployer.java:95)
  | 	at org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.deployXmlResource(EJB3StandaloneBootstrap.java:88)
  | 	at com.mpi.tvaar.BaseTestCase.startupEmbeddedContainer(BaseTestCase.java:78)
  | 	at com.###.BaseTestCase.setUp(BaseTestCase.java:62)
  | 	at com.###.AggregateFetcherTest.setUp(AggregateFetcherTest.java:30)
  | 	at junit.framework.TestCase.runBare(TestCase.java:125)
  | 	at junit.framework.TestResult$1.protect(TestResult.java:106)
  | 	at junit.framework.TestResult.runProtected(TestResult.java:124)
  | 	at junit.framework.TestResult.run(TestResult.java:109)
  | 	at junit.framework.TestCase.run(TestCase.java:118)
  | 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
  | 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
  | 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
  | 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
  | 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
  | 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
  | DEBUG 07-12 10:46:29,265 (BeanXMLDeployer.java:deploy:98)  -Deploying file:/C:/.../test-treecache-test.xml took 265 milliseconds
  | 

and from the junit window:

  | java.lang.RuntimeException: java.lang.IllegalStateException: Incompletely deployed:
  | 
  | *** DEPLOYMENTS IN ERROR: Name -> Error
  | jboss.cache:service=TestTreeCache -> java.lang.IllegalArgumentException: Null value metadata
  | 
  | 	at org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.deployXmlResource(EJB3StandaloneBootstrap.java:95)
  | 	at com.###.BaseTestCase.startupEmbeddedContainer(BaseTestCase.java:78)
  | 	at com.###.BaseTestCase.setUp(BaseTestCase.java:62)
  | 	at com.###.cache.AggregateFetcherTest.setUp(AggregateFetcherTest.java:30)
  | 	at junit.framework.TestCase.runBare(TestCase.java:125)
  | 	at junit.framework.TestResult$1.protect(TestResult.java:106)
  | 	at junit.framework.TestResult.runProtected(TestResult.java:124)
  | 	at junit.framework.TestResult.run(TestResult.java:109)
  | 	at junit.framework.TestCase.run(TestCase.java:118)
  | 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
  | 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
  | 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
  | 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
  | 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
  | 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
  | Caused by: java.lang.IllegalStateException: Incompletely deployed:
  | 
  | *** DEPLOYMENTS IN ERROR: Name -> Error
  | jboss.cache:service=TestTreeCache -> java.lang.IllegalArgumentException: Null value metadata
  | 
  | 	at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.internalValidate(AbstractKernelDeployer.java:241)
  | 	at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.validate(AbstractKernelDeployer.java:161)
  | 	at org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.deployXmlResource(EJB3StandaloneBootstrap.java:90)
  | 	... 14 more
  | 
  | 

So first of all, this null metadata thing is confusing me, I don't know what it means.

Second of all, if i leave in the < config> element for the eviction policy, it gives me:

  | 
  | java.lang.RuntimeException: org.jboss.xb.binding.JBossXBException: Failed to parse source: file:/C:/.../test-treecache-test.xml at 30,12
  | 	at org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.deployXmlResource(EJB3StandaloneBootstrap.java:95)
  | 	at com.###.BaseTestCase.startupEmbeddedContainer(BaseTestCase.java:78)
  | 	at com.###.BaseTestCase.setUp(BaseTestCase.java:62)
  | 	at com.###.AggregateFetcherTest.setUp(AggregateFetcherTest.java:30)
  | 	at junit.framework.TestCase.runBare(TestCase.java:125)
  | 	at junit.framework.TestResult$1.protect(TestResult.java:106)
  | 	at junit.framework.TestResult.runProtected(TestResult.java:124)
  | 	at junit.framework.TestResult.run(TestResult.java:109)
  | 	at junit.framework.TestCase.run(TestCase.java:118)
  | 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
  | 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
  | 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
  | 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
  | 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
  | 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
  | Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: file:/C:/.../test-treecache-test.xml at 30,12
  | 	at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:128)
  | 	at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:132)
  | 	at org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer.deploy(BeanXMLDeployer.java:85)
  | 	at org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.deployXmlResource(EJB3StandaloneBootstrap.java:88)
  | 	... 14 more
  | Caused by: org.jboss.xb.binding.JBossXBRuntimeException: {urn:jboss:bean-deployer:2.0}config not found as a child of {urn:jboss:bean-deployer:2.0}property
  | 	at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startElement(SundayContentHandler.java:195)
  | 	at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.startElement(SaxJBossXBParser.java:299)
  | 	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
  | 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
  | 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
  | 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
  | 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
  | 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
  | 	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
  | 	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
  | 	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
  | 	at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:124)
  | 	... 17 more
  | 

It doesnt seem to be picking up the element. i tried putting CDATA around the < config> ... < /config> part, but that just made the config = null, as if it wasnt present. 

Anyways, that is where I'm at now.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992027#3992027

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992027



More information about the jboss-user mailing list