I know this issue does not quite belong here, but since it is a flex-related 
issue, I thought I'd post to see if anyone has experience this.
We developed a webapp that used Flex 1.5 for the presentation tier, and Spring 
1.2.8 for the business tier. Such app was to be deployed on Weblogic 9.2. 
Everything worked fine until we started migrating our Spring config to version 
2.0.1. The effort was pretty much straight-forward, and all Spring xml config 
files were left untouched, save for the schema declaration on all files, and 
some AOP namespaces.

Note first that, due to its nature, webapps built on Flex 1.5 and deployed in 
any version of Weblogic have to be deployed in expanded wars.

Once the migration was complete, we tried to deploy the webapp to the very same 
environment we previously had it up and running, and this exception was thrown:
Code:
org.springframework.beans.factory.BeanDefinitionStoreException: Line 7 in XML do
cument from URL [zip:C:/bea/weblogic92/samples/domains/wl_server/./servers/examp
lesServer/tmp/_WL_user/seguridad-webapp-1/fpleo0/war/WEB-INF/lib/seguridad-core-
1.3-SNAPSHOT.jar!/dataSourceApplicationContext.xml] is invalid; nested exception
 is org.xml.sax.SAXParseException: Document root element "beans", must match DOC
TYPE root "null".
org.xml.sax.SAXParseException: Document root element "beans", must match DOCTYPE
 root "null".
        at org.apache.xerces.parsers.DOMParser.parse(Lorg.xml.sax.InputSource;)V
(Unknown Source)
        at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Lorg.xml.sax.InputSo
urce;)Lorg.w3c.dom.Document;(Unknown Source)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadB
eanDefinitions(XmlBeanDefinitionReader.java:222)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea
nDefinitions(XmlBeanDefinitionReader.java:173)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea
nDefinitions(XmlBeanDefinitionReader.java:148)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReade
r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:128)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReade
r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:144)
        at org.springframework.web.context.support.XmlWebApplicationContext.load
BeanDefinitions(XmlWebApplicationContext.java:126)
        at org.springframework.web.context.support.XmlWebApplicationContext.load
BeanDefinitions(XmlWebApplicationContext.java:94)
        at org.springframework.context.support.AbstractRefreshableApplicationCon
text.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
        at org.springframework.context.support.AbstractApplicationContext.refres
h(AbstractApplicationContext.java:262)
        at org.springframework.web.context.support.AbstractRefreshableWebApplica
tionContext.refresh(AbstractRefreshableWebApplicationContext.java:139)
        at org.springframework.web.context.ContextLoader.createWebApplicationCon
text(ContextLoader.java:246)
        at org.springframework.web.context.ContextLoader.initWebApplicationConte
xt(ContextLoader.java:184)
        at org.springframework.web.context.ContextLoaderListener.contextInitiali
zed(ContextLoaderListener.java:49)
        at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run
(EventsManager.java:375)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
121)
        at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(Eve
ntsManager.java:83)
        at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAp
pServletContext.java:1591)
        at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletCon
text.java:2734)
        at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.jav
a:892)
        at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:336)
        at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleSta
teDriver.java:204)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD
river.java:26)
        at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStat
eDriver.java:60)
        at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedMod
uleDriver.java:200)
        at weblogic.application.internal.flow.ModuleListenerInvoker.start(Module
ListenerInvoker.java:117)
        at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleSta
teDriver.java:204)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD
river.java:26)
        at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStat
eDriver.java:60)
        at weblogic.application.internal.flow.StartModulesFlow.activate(StartMod
ulesFlow.java:26)
We tried to deploy the very same app but in a compressed WAR, and the WebAppCtx 
configured for the webapp was successfully created, even though no Flex 
functionality was available.

As you can see, the exception reports an error on line 7 of 
dataSourceApplicationContext.xml, which I paste below:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd";>

<beans>
    <description>
        AplicationContext de configuracion de data source para la aplicaciĆ³n 
publicada en WL8.1SP5
    </description>
   
    <bean id="dataSource" 
class="org.springframework.jndi.JndiObjectFactoryBean">
        <description>Represents SeguridadDataSource on this application 
context. Bean is created from JNDI object</description>
      <property name="jndiName">
        <value>/jdbc/SeguridadDataSource</value>
      </property>
    </bean>
   
    <bean id="hibernateProperties" class="java.util.Properties">
        <description>Propiedades de hibernate para las 
aplicaciones</description>
        <constructor-arg>
            <props>
                <prop 
key="hibernate.dialect">org.hibernate.dialect.OracleDialect</prop>
                <prop key="hibernate.max_fetch_depth">1</prop>
                <prop key="hibernate.use_outer_join">true</prop>
                <prop key="hibernate.show_sql">true</prop>
                <prop key="hibernate.jdbc.use_streams_for_binary">true</prop>   
            
                <prop key="hibernate.jdbc.batch_size">0</prop>
                <prop key="hibernate.transaction.manager_lookup">
                    org.hibernate.transaction.WeblogicTransactionManagerLookup
                </prop>
                <prop key="hibernate.cglib.use_reflection_optimizer">true</prop>
                <prop key="hibernate.cache.provider_class">
                    net.sf.hibernate.cache.EhCacheProvider
                </prop>
            </props>
        </constructor-arg>
    </bean>
</beans>
We have other applications (EARs and compressed WARs not using Flex 1.5) that 
deploy flawlessly and use the very same xml config Spring files, so I'm 
guessing there's some kind of classpath problem with the jars containing the 
parsers for both the Spring and Flex files.

Could anyone help us out with this issue? Perhaps suggesting some kind of 
override to Weblogic's classpath?

Thanks in advance.

J.


.

Reply via email to