Results 1 to 4 of 4

Thread: factory-method annoyance

  1. #1
    Join Date
    Aug 2004
    Location
    NY, NY
    Posts
    3

    Default factory-method annoyance

    Hi,

    I'm using Spring to connect to an old CORBA server, and I want to use the ORB.init method (the static factory method for obtaining the ORB) from XML.
    The following XML snippet works fine:
    Code:
    		<bean id="theORB" class="org.omg.CORBA.ORB" factory-method="init">
    		<constructor-arg>
    			<list>
    				<!--value>this is junk</value-->
    			</list>
    		</constructor-arg>
    		<constructor-arg>
    			<props>
    				<prop key="org.omg.CORBA.ORBClass">etc</prop>
    				<prop key="org.omg.CORBA.ORBSingletonClass">etc</prop>
    			</props>
    		</constructor-arg>
    	</bean>
    	
    	<bean id="dealServerRef" class="CorbaClientFactory">
    		<property name="orb">
    			<ref bean="theORB"/>
    		</property>
    		<property name="targetClass">
    			<value>CorbalServer</value>
    		</property>
    		<property name="corbaName">
    			<value>CorbaServerName</value>
    		</property>
    	</bean>
    this works fine but, the xml line with the factrory-method is always tagged with this error:
    Attribute "factory-method" must be declared for element type "bean"
    which prevents the "bean graph" panel from coming up :cry:

    I've tried different DOCTYPE headers, all to no avail.

    --
    Lou Rayman

    lrayman ---at--- lehman ---dot--- com

  2. #2
    Join Date
    Aug 2004
    Location
    Amsterdam, Netherlands
    Posts
    450

    Default

    From http://www.springframework.org/dtd/spring-beans.dtd:

    Code:
    <!ATTLIST bean factory-method CDATA #IMPLIED>
    Maybe your IDEs cache is out-of-date, the DTD does declare the attribute.
    Alef Arendsen
    SpringSource
    http://www.springsource.com

  3. #3
    Join Date
    Aug 2004
    Location
    NY, NY
    Posts
    3

    Default

    i see - the copy of spring-core.dtd buried in the plugins directory is out of date. is there a safe way to upgrade it?

  4. #4
    Join Date
    Aug 2004
    Location
    Frankfurt/Main, Germany
    Posts
    253

    Default

    Lou,

    if you are using XmlBuddy then please refer to Assaf's workaround described in thread http://forum.springframework.org/showthread.php?t=10957 .

    Cheers,
    Torsten
    Last edited by robyn; May 14th, 2006 at 05:12 PM.

Similar Threads

  1. Order of Bean definitions matters?
    By cfuser in forum Container
    Replies: 2
    Last Post: Oct 21st, 2005, 10:29 AM
  2. Spring container fails with no exception
    By naor in forum Container
    Replies: 9
    Last Post: Oct 1st, 2005, 03:39 PM
  3. EHCaching Hibernate
    By dencamel in forum Data
    Replies: 3
    Last Post: Sep 6th, 2005, 09:03 PM
  4. Replies: 1
    Last Post: Jul 28th, 2005, 05:08 PM
  5. Stack Overflow
    By rayho222 in forum Container
    Replies: 6
    Last Post: May 17th, 2005, 03:42 AM

Posting Permissions

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