[Design the new POJO MicroContainer] - JBoss with spaces in the directory name
by adrian@jboss.org
https://jira.jboss.org/jira/browse/JBAS-5796
The initial problem is in the main class,
which needs the file converting to a URI before creating the URL
for jboss.home.url
otherwise it doesn't encode the URL properly
| [ejort@warjort main]$ svn diff
| Index: src/main/org/jboss/Main.java
| ===================================================================
| --- src/main/org/jboss/Main.java (revision 76000)
| +++ src/main/org/jboss/Main.java (working copy)
| @@ -138,7 +138,7 @@
| if (homeURL == null)
| {
| File file = new File(homeDir);
| - homeURL = file.toURL().toString();
| + homeURL = file.toURI().toURL().toString();
| props.setProperty(ServerConfig.HOME_URL, homeURL);
| }
|
The next problem is that the property editors aren't handling encoded
URLs/URIs properly:
https://jira.jboss.org/jira/browse/JBCOMMON-60
After that there some problem in the VFS:
| Caused by: org.jboss.mx.util.JBossNotCompliantMBeanException: Error parsing the XML file, from XMLMetaData:
| at org.jboss.mx.metadata.XMLMetaData.build(XMLMetaData.java:292)
| at org.jboss.mx.modelmbean.XMBean.<init>(XMBean.java:253)
| at org.jboss.mx.modelmbean.XMBean.<init>(XMBean.java:282)
| at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
| at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
| at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
| at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
| at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:1242)
| at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:286)
| at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:344)
| at org.jboss.system.ServiceCreator.installExternalXMBean(ServiceCreator.java:286)
| at org.jboss.system.ServiceCreator.install(ServiceCreator.java:122)
| ... 38 more
| Caused by: org.dom4j.DocumentException: Child not found jboss-5.0.0.CR2%20test/server/default/conf/xmdesc/AttributePersistenceService-xmbean.xml for FileHandler@166961
| 1[path= context=file:/home/ejort/jboss-head/build/output/ real=file:/home/ejort/jboss-head/build/output/] Nested exception: Child not found jboss-5.0.0.CR2%20test/serv
| er/default/conf/xmdesc/AttributePersistenceService-xmbean.xml for FileHandler@1669611[path= context=file:/home/ejort/jboss-head/build/output/ real=file:/home/ejort/jbo
| ss-head/build/output/]
| at org.dom4j.io.SAXReader.read(SAXReader.java:484)
| at org.dom4j.io.SAXReader.read(SAXReader.java:291)
| at org.jboss.mx.metadata.XMLMetaData.build(XMLMetaData.java:255)
| ... 49 more
|
Probably because the FileHandler is looking for a directory called?
boss-5.0.0.CR2%20test
I'm fixing the first two problems. Ales, I'll let you look at the VFS issue. ;-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4166220#4166220
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4166220
17 years, 8 months
[Design of AOP on JBoss (Aspects/JBoss)] - Re: AOPConstructorJoinpoint and methodHasSubInstanceMetaData
by kabir.khan@jboss.com
I'll hazard a guess
The original MethodInfo comes from AOPConstructorJoinPoint
| private boolean rootHasMethodWithSubInstanceMetaData(MetaData metaData)
| {
| ....
| MethodInfo[] methods = info.getDeclaredMethods();
| if (methods != null)
| {
| for (MethodInfo mi : methods)
| {
| if (methodHasSubInstanceMetaData(metaData, mi))
| {
| return true;
| }
| }
| }
| ---
| }
|
Are the semantics of MethodInfo.getDeclaredMethods() the same as of Class.getDeclaredMethods()? In that case it would return private and protected methods, so these would get passed in to AnnotatedElementMetaDataLoader. getComponentMetaDataRetrieval() which in turn calls Class.getMethod(), which will fail on anything non-public.
| public MetaDataRetrieval getComponentMetaDataRetrieval(Signature signature)
| {
| ...
| else if (signature instanceof MethodSignature)
| {
| try
| {
| Method method = clazz.getMethod(signature.getName(), signature.getParametersTypes(clazz));
| return new AnnotatedElementMetaDataLoader(method);
| }
| catch (NoSuchMethodException e)
| {
| return null;
| }
| }
| }
| }
|
Changing that to use class.getDeclaredMethod() might fix this
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4166192#4166192
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4166192
17 years, 8 months