SOA 11g - System.getProperties().put() With Byte Array Value Generates java.lang.ClassCastException Error (Doc ID 1184683.1)

Last updated on JULY 03, 2017

Applies to:

Oracle SOA Platform - Version 11.1.1.3.0 and later
Information in this document applies to any platform.
***Checked for relevance on 26-Jun-2013***

Symptoms

You have an application that assigns a value to a system property using the java.util.Properties class, http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html 

If the application assigns a value that is not a String, for example, System.getProperties().put("xyz", new byte[123]);, the SOA server does not start and the following error occurs:

[2010-06-02T11:28:56.649-04:00] [AdminServer] [ERROR] [] [org.springframework.web.context.ContextLoader] [tid: [ACTIVE].ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: 0000IZtH3Jx6mJ85zj9DiW1C1bVS000000,0] [APP: soa-infra] Context initialization failed[[
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'SensorManager' defined in ServletContext resource [/WEB-INF/fabric-config-core.xml]: Cannot resolve reference to bean 'FabricMesh' while setting bean property 'fabricMesh'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'FabricMesh': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'FabricMeshTarget' defined in ServletContext resource [/WEB-INF/fabric-config.xml]: Cannot resolve reference to bean 'WSServiceBC' while setting bean property 'bindingComponents' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'WSServiceBC' defined in ServletContext resource [/WEB-INF/fabric-config-core.xml]: Cannot resolve reference to bean 'InstanceManager' while setting bean property 'instanceManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'InstanceManager' defined in ServletContext resource [/WEB-INF/fabric-config-core.xml]: Cannot resolve reference to bean 'DOStoreFactory' while setting bean property 'DOStoreFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'DOStoreFactory' defined in ServletContext resource [/WEB-INF/fabric-config-core.xml]: Cannot resolve reference to bean 'FabricConfigManager' while setting bean property 'fabricConfigManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'FabricConfigManager' defined in ServletContext resource [/WEB-INF/fabric-config.xml]: Cannot resolve reference to bean 'MediatorServiceEngine' while setting bean property 'configurables' with key [2]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'MediatorServiceEngine' defined in ServletContext resource [/WEB-INF/fabric-config-mediator.xml]: Invocation of init method failed; nested exception is java.lang.ExceptionInInitializerError
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:308)
at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:947)
at org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:701)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:377)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:46)
at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:481)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:181)
...
Caused by: java.lang.ExceptionInInitializerError
at oracle.soa.common.util.guid.GUIDGenerator.nextGuidInBytes(GUIDGenerator.java:119)
at oracle.soa.common.util.guid.GUIDGenerator.nextGUID(GUIDGenerator.java:107)
at oracle.tip.mediator.common.MediatorUtil.getGuid(MediatorUtil.java:191)
at oracle.tip.mediator.dispatch.db.DBContainerIdManager.<init>(DBContainerIdManager.java:94)
at oracle.tip.mediator.serviceEngine.MediatorServiceEngine.init(MediatorServiceEngine.java:1457)
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:597)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1414)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1375)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
... 137 more
Caused by: java.lang.ClassCastException: [B
at oracle.soa.common.util.guid.GUIDParamGenerator.computeNodeHash(GUIDParamGenerator.java:98)
at oracle.soa.common.util.guid.GUIDParamGenerator.generateNodeID(GUIDParamGenerator.java:71)
at oracle.soa.common.util.guid.GUIDStateManager.initializeGUIDParameters(GUIDStateManager.java:81)
at oracle.soa.common.util.guid.GUIDStateManager.<init>(GUIDStateManager.java:56)
at oracle.soa.common.util.guid.GUIDStateManager.<clinit>(GUIDStateManager.java:50)
at oracle.soa.common.util.guid.GUIDGenerator.nextGuidInBytes(GUIDGenerator.java:119)
at oracle.soa.common.util.guid.GUIDGenerator.nextGUID(GUIDGenerator.java:107)

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms