[Seasar-user:3141] 定数アノテーションと勘違いされます

岡田 務 okadatom_tom
2006年 2月 3日 (金) 18:51:35 JST


すずきと申します。

クラスにて下記のプロパティ名を定義すると
定数アノテーションと勘違いされてしまい、例外が発生してし
まいます。

対処法などありませんでしょうか?

=========
component
aspect
init_method
=========
以下、スタックトレースです。

Exception occured at /components[1]/component[2]
org.seasar.framework.exception.IllegalAccessRuntimeException:
[ESSR0042]Form
で不正なアクセスがありました。理由はjava.lang.IllegalAccessException:
Class org.seasar.framework.util.FieldUtil can not access a
member of class Form with modifiers "private"
	at
org.seasar.framework.util.FieldUtil.get(FieldUtil.java:37)
	at
org.seasar.framework.beans.impl.BeanDescImpl.getFieldValue(BeanDescImpl.java:143)
	at
org.seasar.framework.container.factory.ConstantAnnotationHandler.appendInitMethod(ConstantAnnotationHandler.java:156)
	at
org.seasar.framework.container.factory.TigerAnnotationHandler.appendInitMethod(TigerAnnotationHandler.java:117)
	at
org.seasar.framework.container.factory.ComponentTagHandler.end(ComponentTagHandler.java:79)
	at
org.seasar.framework.xml.SaxHandler.end(SaxHandler.java:164)
	at
org.seasar.framework.xml.SaxHandler.end(SaxHandler.java:158)
	at
org.seasar.framework.xml.SaxHandler.endElement(SaxHandler.java:68)
	at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:633)
	at
com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.endNamespaceScope(XMLDTDValidator.java:2108)
	at
com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidator.java:2059)
	at
com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.java:932)
	at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1241)
	at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1685)
	at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
	at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
	at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
	at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
	at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
	at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
	at
org.seasar.framework.util.SAXParserUtil.parse(SAXParserUtil.java:43)
	at
org.seasar.framework.xml.SaxHandlerParser.parse(SaxHandlerParser.java:58)
	at
org.seasar.framework.xml.SaxHandlerParser.parse(SaxHandlerParser.java:54)
	at
org.seasar.framework.container.factory.XmlS2ContainerBuilder.parse(XmlS2ContainerBuilder.java:66)
	at
org.seasar.framework.container.factory.XmlS2ContainerBuilder.build(XmlS2ContainerBuilder.java:53)
	at
org.seasar.framework.container.factory.S2ContainerFactory$DefaultProvider.create(S2ContainerFactory.java:158)
	at
org.seasar.framework.container.factory.S2ContainerFactory.create(S2ContainerFactory.java:53)
	at FormTest.setUp(MerchandiseFormTest.java:31)
	at
org.seasar.framework.unit.S2FrameworkTestCase.runBare(S2FrameworkTestCase.java:132)
	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.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.lang.IllegalAccessException: Class
org.seasar.framework.util.FieldUtil can not access a
member of class Form with modifiers "private"
	at
sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
	at
java.lang.reflect.Field.doSecurityCheck(Field.java:954)
	at
java.lang.reflect.Field.getFieldAccessor(Field.java:895)
	at java.lang.reflect.Field.get(Field.java:357)
	at
org.seasar.framework.util.FieldUtil.get(FieldUtil.java:35)
	... 35 more


--------------------------------------
GANBARE! NIPPON!
Yahoo! JAPAN JOC OFFICIAL INTERNET PORTAL SITE PARTNER
http://pr.mail.yahoo.co.jp/ganbare-nippon/



Seasar-user メーリングリストの案内