|
|
Error on Tomcat5.5 when creating Marshaller bean
I get this stack trace when Tomcat tries to instantiate the beans defined in my app:
Code:
org..beans.factory.BeanCreationException: Error creating bean with name '/policySearch.htm' defined in ServletContext resource [/WEB-INF/MobileAflac-servlet.xml]: Cannot resolve reference to bean 'webServiceTemplate' while setting bean property 'webServiceTemplate'; nested exception is org..beans.factory.BeanCreationException: Error creating bean with name 'webServiceTemplate' defined in ServletContext resource [/WEB-INF/MobileAflac-servlet.xml]: Cannot resolve reference to bean 'marshaller' while setting bean property 'marshaller'; nested exception is org..beans.factory.BeanCreationException: Error creating bean with name 'marshaller' defined in ServletContext resource [/WEB-INF/MobileAflac-servlet.xml]: Invocation of init method failed; nested exception is java.security.AccessControlException: access denied (java.util.PropertyPermission javax.xml.bind.JAXBContext read)
It looks like I have a security violation, but I don't know how to fix it. The relevant pieces of my dispatch-servlet.xml follow:
Code:
lt;bean name=quot;/policySearch.htmquot; class=quot;com.my.path.PolicySearchControllerquot;gt;
lt;property name=quot;webServiceTemplatequot; ref=quot;webServiceTemplatequot;/gt;
lt;property name=quot;validatorquot;gt;
lt;bean class=quot;com.my.path.PolicyNumberValidatorquot;/gt;
lt;/propertygt;
lt;/beangt;
lt;bean id=quot;webServiceTemplatequot; class=quot;org..ws.client.core.WebServiceTemplatequot; scope=quot;singletonquot;gt;
lt;property name=quot;defaultUriquot; value=quot;WebServicequot;/gt;
lt;property name=quot;messageFactoryquot;gt;
lt;bean class=quot;org..ws.soap.saaj.SaajSoapMessageFactoryquot;/gt;
lt;/propertygt;
lt;property name=quot;messageSenderquot;gt;
lt;bean class=quot;org..ws.transport.from.fromuclConnectionMessageSenderquot;/gt;
lt;/propertygt;
lt;property name=quot;marshallerquot; ref=quot;marshallerquot;/gt;
lt;property name=quot;unmarshallerquot; ref=quot;marshallerquot;/gt;
lt;/beangt;
lt;bean id=quot;marshallerquot; class=quot;org..oxm.jaxb.Jaxb2Marshallerquot;gt; lt;property name=quot;classesToBeBoundquot;gt;lt;listgt;{lt;snipped-list-of-classesgt;}lt;/listgt; lt;/propertygt; lt;/beangt;
Anyone out there have any ideas on how to fix this error?
It looks like you have security enabled on your app server, which disallows reading of properties. The solution would be to relax security somewhat, see cgi-bin...nterestamp =3471
Thanks for the reply... I'm surprised I haven't seen more posts about the need to do this. This is on a dev machine with a default Java 1.6 install and a default Tomcat 5.5 install - are the default security settings really to strict for the JAXB2 Marshaller?
I don't have Java 1.6, but I don't think the default security is that restrictive. Otherwise, a lot of people would have complained on this forum.
How do you change the security settings? I am getting a similar error.
Have you been able to find a solution to this problem? I am having similar issues with permissions and am not sure how to modify them to make my app work. |
|