|
From: <jue...@we...> - 2003-05-08 19:01:22
|
I've recently discovered something in jboss-service.xml:
<!-- Preload all custom editors for VMs that don't use the thread
context class loader when searching for PropertyEditors. =
Uncomment
if your JDK 1.3.0 VM fails to find JBoss PropertyEditors.
<mbean code=3D"org.jboss.varia.property.PropertyEditorManagerService"
name=3D"jboss:type=3DService,name=3DBootstrapEditors">
<attribute name=3D"BootstrapEditors">
=
java.math.BigDecimal=3Dorg.jboss.util.propertyeditor.BigDecimalEditor
java.lang.Boolean=3Dorg.jboss.util.propertyeditor.BooleanEditor
java.lang.Class=3Dorg.jboss.util.propertyeditor.ClassEditor
java.util.Date=3Dorg.jboss.util.propertyeditor.DateEditor
java.io.File=3Dorg.jboss.util.propertyeditor.FileEditor
=
java.net.InetAddress=3Dorg.jboss.util.propertyeditor.InetAddressEditor
java.lang.Integer=3Dorg.jboss.util.propertyeditor.IntegerEditor
=
javax.management.ObjectName=3Dorg.jboss.util.propertyeditor.ObjectNameEdi=
tor
=
java.util.Properties=3Dorg.jboss.util.propertyeditor.PropertiesEditor
=
[Ljava.lang.String;=3Dorg.jboss.util.propertyeditor.StringArrayEditor
java.net.URL=3Dorg.jboss.util.propertyeditor.URLEditor
</attribute>
</mbean>
-->
Looks like certain VMs don't use the thread context call loader for =
PropertyEditor lookup, and thus can't find our Spring ones. We should =
probably register our default ones explicitly instead of relying on the =
package-level lookup, to avoid any standard issues on such VMs.
Juergen
-----Original Message-----
From: Bruno THOMAS [mailto:bt...@al...]
Sent: Thursday, April 10, 2003 4:35 PM
To: sri...@co...
Cc: j=FCrgen h=F6ller [werk3AT]
Subject: Re: [Springframework-developer] Properties editor in
BeanWrapperImpl
Hello=20
> This problem might occur depending on the security policy setting on =
the
> JVM on which your app server is running. If you making the =
appropriate
> JVM setting this problem will be solved.
> Hope this helps
Thanks a lot for your answers. I don't want to waste you time, But I =
really=20
don't have a clue about the PropertiesEditor...
I've seen the bug of request-id 718794, and the warning about security =
in the=20
API doc for setEditorSearchPath. But the security policy is very low in =
my=20
jre, and I haven't a java.security.AccessControlException of whaterver =
about=20
security. The thing is that it could not find a PropertiesEditor. In the =
logs=20
we can see that :
218043 DEBUG [HttpProcessor[8180][2]] beans.BeanWrapperImpl - Convert: =
string=20
to class java.util.Properties
218044 DEBUG [HttpProcessor[8180][2]] beans.BeanWrapperImpl - Using =
property=20
editor [null]
> Well, PropertiesEditor isn't in sun.beans.editors but in=20
> com.interface21.beans.propertyeditors, so the rt.jar contents are =
fine.=20
Yes, if I had read entirely the setEditorSearchPath line, I should have=20
noticed the com.interface21.beans.propertyeditors package. It was a dumb =
remark, hope I'm doing better today...
> I don't understand why=20
> com.interface21.beans.propertyeditors.PropertiesEditor=20
> doesn't get registered automatically in your case... It definitely =
does on=20
> my installation (with a current Spring version).
Neither do I. I've got the current CVS Spring version, the =20
com.interface21.beans.propertyeditors.PropertiesEditor.class is in the=20
spring-full-0.8.jar, and the jar in the WEB-INF/lib. I dont think it's a =
problem of classpath. My env isn't that baroque :
- tomcat 4.0.3
- IBM J2RE 1.3.0=20
- apache 1.3.26 (well I dont think is has to do something..)
And voila, I'm gonna have a further look on it and if I can't find, I =
will=20
let the=20
PropertyEditorManager.registerEditor(Properties.class,PropertiesEditor.cl=
ass)
Regards
Bruno
|