Results 1 to 7 of 7

Thread: Weblogic SimpleStatelessSessionProxyFactoryBean broken in 2.0m3

  1. #1

    Default Weblogic SimpleStatelessSessionProxyFactoryBean broken in 2.0m3

    Hi All,

    Using Spring 2.0m3 my simple client (shown below) fails on WLS8.1 SP5. However, regressing back to Spring 1.2.5 it works just fine.


    Client
    Code:
    public class EJBTestClient {
    	
    	private XmlBeanFactory factory;
    	
    	public EJBTestClient() {
    		factory = new XmlBeanFactory(new FileSystemResource("applicationContext.xml"));
    	}
    	
    	public static void main(String [] args) {
    		
    		EJBTestClient tc = new EJBTestClient();
    		
    		ServiceSelection ss = (ServiceSelection)tc.factory.getBean("serviceSelectionBean");
    		try {
    			System.out.println("result = " + ss.isValidCityOption("München"));
    		}catch(Exception e) {
    			e.printStackTrace();
    		}
    	}
    
    }

    applicationContext.xml
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
    
    <beans>
    	<bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate" abstract="false" singleton="true" lazy-init="default" autowire="default" dependency-check="default">
    		<property name="environment">
    			<props>
    				<prop key="java.naming.factory.initial">weblogic.jndi.WLInitialContextFactory</prop> 
    				<prop key="java.naming.provider.url">t3://localhost:8820</prop> 
    			</props>
    		</property>
    	</bean>
    
    	<bean id="serviceSelectionBean" class="org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean">
    		<property name="jndiName"><value>eSelfCare.ServiceSelectionHome</value></property>
    		<property name="jndiTemplate"><ref local="jndiTemplate"/></property>		
    		<property name="resourceRef"><value>false</value></property>
    		<property name="businessInterface"><value>de.viaginterkom.ca.ecrm.eselfcare.ejbserver.beans.ServiceSelection</value></property>
    		<property name="lookupHomeOnStartup"><value>false</value></property>		
            <property name="refreshHomeOnConnectFailure" value="true"/>
    	</bean>
    </beans>
    Failed output from 2.0m3
    Code:
    log4j:WARN Please initialize the log4j system properly.
    org.springframework.remoting.RemoteLookupFailureException: Failed to locate remote EJB [eSelfCare.ServiceSelectionHome]; nested exception is javax.naming.CommunicationException: null
    javax.naming.CommunicationException [Root exception is java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: 
    	java.io.StreamCorruptedException]
    	at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:83)
    	at weblogic.jndi.internal.WLContextImpl.translateException(WLContextImpl.java:390)
    	at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:346)
    	at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:336)
    	at javax.naming.InitialContext.lookup(InitialContext.java:347)
    	at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:123)
    	at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:85)
    	at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:121)
    	at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:146)
    	at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:86)
    	at org.springframework.jndi.JndiObjectLocator.lookup(JndiObjectLocator.java:104)
    	at org.springframework.ejb.access.AbstractRemoteSlsbInvokerInterceptor.lookup(AbstractRemoteSlsbInvokerInterceptor.java:93)
    	at org.springframework.ejb.access.AbstractSlsbInvokerInterceptor.getHome(AbstractSlsbInvokerInterceptor.java:144)
    	at org.springframework.ejb.access.AbstractSlsbInvokerInterceptor.create(AbstractSlsbInvokerInterceptor.java:168)
    	at org.springframework.ejb.access.AbstractRemoteSlsbInvokerInterceptor.newSessionBeanInstance(AbstractRemoteSlsbInvokerInterceptor.java:202)
    	at org.springframework.ejb.access.SimpleRemoteSlsbInvokerInterceptor.getSessionBeanInstance(SimpleRemoteSlsbInvokerInterceptor.java:108)
    	at org.springframework.ejb.access.SimpleRemoteSlsbInvokerInterceptor.doInvoke(SimpleRemoteSlsbInvokerInterceptor.java:74)
    	at org.springframework.ejb.access.AbstractRemoteSlsbInvokerInterceptor.invoke(AbstractRemoteSlsbInvokerInterceptor.java:114)
    	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
    	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
    	at $Proxy0.isValidCityOption(Unknown Source)
    	at EJBTestClient.main(EJBTestClient.java:33)
    Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: 
    	java.io.StreamCorruptedException
    	at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108)
    	at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:284)
    	at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:244)
    	at weblogic.jndi.internal.ServerNamingNode_812_WLStub.lookup(Unknown Source)
    	at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:343)
    	... 19 more
    Caused by: java.io.StreamCorruptedException
    	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1506)
    	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
    	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626)
    	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
    	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
    	at weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:119)
    	at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:112)
    	at weblogic.jndi.internal.RootNamingNode_WLSkel.invoke(Unknown Source)
    	at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
    	at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
    	at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
    	at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:353)
    	at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
    	at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
    	at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
    	at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    	at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    Good output from 1.2.5
    Code:
    log4j:WARN No appenders could be found for logger (org.springframework.beans.factory.xml.XmlBeanDefinitionReader).
    log4j:WARN Please initialize the log4j system properly.
    result = true
    I have not found a similar issue here so I am assuming that not many people are currently using 2.0m3.

    Regards

    Steve

  2. #2
    Join Date
    Aug 2004
    Posts
    2,715

    Default

    Not sure, but maybe there is a connection to this problem.

    Regards,
    Andreas

  3. #3

    Default

    I don't think this is the same problem as I do not get class not found error information anywere.


    All my test cases using deployed EJB's fail with the same error.

    Code:
    org.springframework.remoting.RemoteLookupFailureException: Failed to locate remote EJB [eSelfCare.ServiceSelectionHome]; nested exception is javax.naming.CommunicationException: null
    javax.naming.CommunicationException [Root exception is java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: 
    	java.io.StreamCorruptedException]
    	at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:83)
    	at weblogic.jndi.internal.WLContextImpl.translateException(WLContextImpl.java:390)
    If this was a classloader error I would get a different problem reported.

    Regards

    Steve

  4. #4
    Join Date
    Aug 2004
    Posts
    2,715

    Default

    Yes, the error would be different. It's just the circumstances that seem similar. Does this problem occur only with M3 or also with M1/M2?

    Besides that: The serialization of arguments seems to be the problem. Does the error occur also for methods without arguments (and without return value)?

    Regards,
    Andreas

  5. #5

    Default

    Hi Andreas,

    Sorry its taken so long to get back to you but I have been on vacation for the last week or so.

    Anyway, the same problem exists with M2 but I don't know about M1 as I never downloded that version. All seem fine with 1.2.5 & 1.2.6 (didn't download 1.2.7 either).

    I will try it with the latest RC1 and see if the problem still exists thren repost here. If this is a problem with the 2.0 framework maybe it only affects WLS.

    Regards

    Steve

  6. #6

    Default

    OK,

    So I just downloaded the M4 latest build and this works fine. It only seems that M2 & M3 are broken (possibly M1) in this respect.

    Steve

  7. #7
    Join Date
    Aug 2004
    Posts
    2,715

    Default

    I remember there has been an issue in Jira with ManagedProperties which should be fixed im M4. Maybe it has something to do with your problem.

    Anyway, good that it works now

    Regards,
    Andreas

Posting Permissions

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