Announcement Announcement Module
Collapse
No announcement yet.
org.springframework.jndi.TypeMismatchNamingExcepti on in Weblogic 9.1 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • org.springframework.jndi.TypeMismatchNamingExcepti on in Weblogic 9.1

    Hi All,
    I have the following ejb context xml:
    <beans>
    <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
    <property name="environment">
    <props>
    <prop key="java.naming.factory.initial">weblogic.jndi.WL InitialContextFactory</prop>
    <prop key="java.naming.provider.url">t3://ip : port</prop>
    </props>
    </property>
    </bean>
    <bean id="someInterface" class="org.springframework.ejb.access.SimpleRemote StatelessSessionProxyFactoryBean">
    <property name="jndiName"><value>com.ejb.TestResults</value></property>
    <property name="businessInterface"><value>com.ejb.TestResult s</value></property>
    <property name="expectedType"><value>com.ejb.TestResultsHome </value></property>
    <property name="jndiTemplate">
    <ref bean="jndiTemplate" />
    </property>
    </bean>
    </beans>

    I use the following piece of code to get the bean:

    public static final String CLIENT_CONTEXT_CONFIG_LOCATION = "file:/wls_domain/wpgtbb11/ejbClientContext.xml";

    beanFactory = new FileSystemXmlApplicationContext(CLIENT_CONTEXT_CON FIG_LOCATION);

    TestResults testResults = (TestResults) beanFactory.getBean(
    "someInterface");

    I get the following exception, which is odd :

    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'someInterface' defined in URL [file:/wls_domain/wpgtbb11/ejbClientContext.xml]: Invocation of init method failed; nested exception is org.springframework.jndi.TypeMismatchNamingExcepti on: Object [IOR:0000000000000047524d493a636f6d2e62742e6f73732e 6173736f63696174652e656a622e4173736f63696174655465 7374526573756c7473486f6d653a3030303030303030303030 30303030300000000000010000000000000424000102000000 000e31302e3138382e35372e31353000271200000090004245 41080103000000000f6774636a6d615f6d616e616765640000 0000000000000047524d493a636f6d2e62742e6f73732e6173 736f63696174652e656a622e4173736f636961746554657374 526573756c7473486f6d653a30303030303030303030303030 30303000000000000433313400000000014245412900000010 0000000000000000091e32f570f76ff4000000060000000100 00002c00000000000100200000000300010020000100010501 00010001010000000003000101000001010905010001000000 19000000500000000000000048687474703a2f2f31302e3138 382e35372e3135303a31303030322f6265615f776c735f696e 7465726e616c2f636c61737365732f4d616e61676564204173 736f6369617465402f000000001f0000000400000003000000 20000000040000000100000021000000580000000000000001 00000000000000220000000000400000000000080606678102 0101010000001f0401000806066781020101010000000f7765 626c6f67696344454641554c54000000000000000000000000 00000000004245410300000268000000000000000c726f756e 642d726f62696e00010000000000002e636f6d2e62742e6f73 732e6173736f63696174652e656a622e4173736f6369617465 54657374526573756c74730000000000000100000047524d49 3a636f6d2e62742e6f73732e6173736f63696174652e656a62 2e4173736f636961746554657374526573756c7473486f6d65 3a303030303030303030303030303030300000000000010000 0000000001b4000102000000000e31302e3138382e35372e31 35300027120000009000424541080103000000000f6774636a 6d615f6d616e6167656400000000000000000047524d493a63 6f6d2e62742e6f73732e6173736f63696174652e656a622e41 73736f636961746554657374526573756c7473486f6d653a30 30303030303030303030303030303000000000000433313400 0000000142454129000000100000000000000000091e32f570 f76ff400000005000000010000002c00000000000100200000 00030001002000010001050100010001010000000003000101 00000101090501000100000019000000500000000000000048 687474703a2f2f31302e3138382e35372e3135303a31303030 322f6265615f776c735f696e7465726e616c2f636c61737365 732f4d616e61676564204173736f6369617465402f00000000 1f000000040000000300000020000000040000000100000021 00000058000000000000000100000000000000220000000000 4000000000000806066781020101010000001f040100080606 6781020101010000000f7765626c6f67696344454641554c54 00000000000000000000000000000000000000000000000000 70f76ff4] available at JNDI location [com.ejb.TestResults] is not assignable to [com.ejb.TestResults]
    Please help me regarding this.
    TIA.
Working...
X