[jboss-dev-forums] [Design the new POJO MicroContainer] - NumberFormatExceptions when mixing annotations and number fo
kabir.khan@jboss.com
do-not-reply at jboss.com
Fri Sep 21 13:56:31 EDT 2007
Some of the aop-mc-int tests are failing. Why are they not being run in cruisecontrol?
They all seem to be doing something like the following (taken from MetaDataTestCase):
| <bean name="Bean1" class="org.jboss.test.microcontainer.support.PropertyBean">
| <property name="intProperty">10
| <annotation>@org.jboss.test.microcontainer.support.Test</annotation>
| </property>
| <property name="stringProperty">Bean1</property>
| </bean>
|
This used to work, but now gives the following error:
| *** DEPLOYMENTS IN ERROR: Name -> Error
| Bean1 -> java.lang.NumberFormatException: For input string: "10
|
| "
|
| at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.internalValidate(AbstractKernelDeployer.java:260)
| at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.validate(AbstractKernelDeployer.java:174)
| at org.jboss.test.kernel.junit.MicrocontainerTestDelegate.validate(MicrocontainerTestDelegate.java:223)
| at org.jboss.test.kernel.junit.MicrocontainerTest.setUp(MicrocontainerTest.java:68)
| 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 junit.framework.TestSuite.runTest(TestSuite.java:208)
| at junit.framework.TestSuite.run(TestSuite.java:203)
| at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
| at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
| at junit.framework.TestResult.runProtected(TestResult.java:124)
| at junit.extensions.TestSetup.run(TestSetup.java:23)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)
| at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
| at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:163)
| at org.apache.maven.surefire.Surefire.run(Surefire.java:84)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:244)
| at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:814)
|
| testPropertyMetaData(org.jboss.test.microcontainer.test.MetaDataTestCase) Time elapsed: 0 sec <<< ERROR!
| java.lang.IllegalStateException: Incompletely deployed:
|
If I get rid of all line breaks in the property it works, i.e.
| <bean name="Bean1" class="org.jboss.test.microcontainer.support.PropertyBean">
| <property name="intProperty">10<annotation>@org.jboss.test.microcontainer.support.Test</annotation></property>
| <property name="stringProperty">Bean1</property>
| </bean>
|
But this would make it less readable in case of multiple annotations.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4087370#4087370
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4087370
More information about the jboss-dev-forums
mailing list