Results 1 to 6 of 6

Thread: Issues with Spring 2.0 + Weblogic 9.2 + Adobe Flex 1.5

  1. #1
    Join Date
    Jun 2005
    Location
    México City
    Posts
    47

    Angry Issues with Spring 2.0 + Weblogic 9.2 + Adobe Flex 1.5

    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 the Spring config files.

    Could anyone help us out with this issue? Perhaps suggesting some kind of override to Weblogic's classpath? We wouldn't want to switch back to Spring 1.2.x...

    Thanks in advance.

    J.
    This is a block of text that can be added to posts you make. There is a 255 character limit.

  2. #2
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,425

    Default

    I'm sure this has come up quite a few times before. Try searching the forums for: Document root element "beans".

  3. #3
    Join Date
    Jun 2005
    Location
    México City
    Posts
    47

    Default It has...

    It has been dealt with several times in several posts, but all of them talk about Spring 1.2.x and Spring 2.0.x jars being mixed up in the same app or classpath. None of them relate to the nature of the issue I'm posting.


    Any other comments?
    This is a block of text that can be added to posts you make. There is a 255 character limit.

  4. #4
    Join Date
    Jun 2005
    Location
    México City
    Posts
    47

    Default Issue comes up when deploying Spring 2.0.1 webapps in Weblogic 9.2

    Seems I have found how to reproduce the issue. It comes up when deploying any EXPANDED Spring 2.0.1 webapps in Weblogic 9.2. Any idea of a work-around? Perhaps overriding Weblogic's classpath to include some specific jars for schema-parsing?

    Please, please help!

    J.
    This is a block of text that can be added to posts you make. There is a 255 character limit.

  5. #5
    Join Date
    Jun 2005
    Location
    México City
    Posts
    47

    Default Errata - Issues with Spring 2.0.1 and WL 9.2

    Quote Originally Posted by JSRamos View Post
    Seems I have found how to reproduce the issue. It comes up when deploying any EXPANDED Spring 2.0.1 webapps in Weblogic 9.2. Any idea of a work-around? Perhaps overriding Weblogic's classpath to include some specific jars for schema-parsing?

    Please, please help!

    J.
    I was mistaken. I stated the above when tried to deploy all my applications, but then tried to deploy the petclinic, petstore and the rest of the samples that came along with Spring's source code, and it worked perfectly both expanded and in WAR modes.

    I'm posting the contents of my WEB-INF/lib dir so you guys can help me detecting if some jar is causing the deployment to fail.

    Code:
    12/01/2007  12:45 p.m.           444,689 antlr-2.7.6rc1.jar
    12/01/2007  12:45 p.m.             4,467 aopalliance-1.0.jar
    12/01/2007  12:45 p.m.            26,361 asm-1.5.3.jar
    12/01/2007  12:45 p.m.            16,757 asm-attrs-1.5.3.jar
    12/01/2007  12:45 p.m.           115,002 aspectjrt-1.5.2a.jar
    12/01/2007  12:45 p.m.         1,896,338 aspectjweaver-1.5.2a.jar
    12/01/2007  12:45 p.m.           434,186 authagent-5.0.3.jar
    12/01/2007  12:45 p.m.            63,966 avalon-framework-4.1.3.jar
    12/01/2007  12:45 p.m.            13,374 base-core-2.0.1.jar
    12/01/2007  12:45 p.m.           912,523 bcprov-jdk14-124.jar
    12/01/2007  12:45 p.m.            82,003 beanlib-3.2.1.jar
    12/01/2007  12:45 p.m.           282,338 cglib-2.1_3.jar
    12/01/2007  12:45 p.m.            46,725 commons-codec-1.3.jar
    12/01/2007  12:45 p.m.           175,426 commons-collections-2.1.1.jar
    12/01/2007  12:45 p.m.           207,723 commons-lang-2.1.jar
    12/01/2007  12:45 p.m.            52,915 commons-logging-1.1.jar
    12/01/2007  12:45 p.m.            26,202 commons-logging-api-1.0.4.jar
    12/01/2007  12:45 p.m.           313,898 dom4j-1.6.1.jar
    12/01/2007  12:45 p.m.            47,531 ehcache-1.1.jar
    12/01/2007  12:45 p.m.         1,971,632 hibernate-3.1.3.jar
    12/01/2007  12:45 p.m.           308,641 jcaptcha-all-1.0-RC-2.0.1.jar
    12/01/2007  12:45 p.m.            20,682 jstl-1.1.2.jar
    12/01/2007  12:45 p.m.             8,812 jta-1.0.1B.jar
    12/01/2007  12:45 p.m.           121,070 junit-3.8.1.jar
    12/01/2007  12:45 p.m.           352,291 log4j-1.2.9.jar
    12/01/2007  12:45 p.m.            72,150 logkit-1.0.1.jar
    12/01/2007  12:45 p.m.            11,178 seguridad-api-1.3-SNAPSHOT.jar
    12/01/2007  12:45 p.m.           138,402 seguridad-core-1.3-SNAPSHOT.jar
    12/01/2007  12:45 p.m.            11,537 seguridad-ejb-1.3-SNAPSHOT.jar
    12/01/2007  12:45 p.m.            92,161 seguridad-modelo-1.3-SNAPSHOT.jar
    12/01/2007  12:45 p.m.            77,977 servlet-api-2.3.jar
    12/01/2007  12:45 p.m.         2,568,189 spring-2.0.1.jar
    12/01/2007  12:45 p.m.            75,421 spring-ldap-1.1.jar
    12/01/2007  12:45 p.m.           393,259 standard-1.1.2.jar
    12/01/2007  12:45 p.m.             7,243 utils-3.5.0.jar
    12/01/2007  12:45 p.m.           261,710 xstream-1.1.3.jar
    Please help, this is a production issue, and we definitely will not go back to Spring 1.2.x!!!

    J.
    This is a block of text that can be added to posts you make. There is a 255 character limit.

  6. #6
    Join Date
    Jun 2005
    Location
    México City
    Posts
    47

    Exclamation Problem finally solved

    It's been a while since I posted this issue, but I'll close it with a final piece of info for anyone who runs into this same problem.

    When deploying Spring 2.x apps in Weblogic, make sure you don't deploy them in any of the sample domains (medrec, wl_server, etc.). They have JARs in their classpath that conflict with those required by Spring. Instead, create a new domain...that should to the trick.

    Sorry to all experts for being such a nuisance.

    Best regards.
    This is a block of text that can be added to posts you make. There is a 255 character limit.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •