openejb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <david.blev...@visi.com>
Subject Re: error on running tests on windows
Date Mon, 14 Apr 2008 20:56:52 GMT

On Apr 13, 2008, at 1:38 PM, Manu George wrote:

> Hi David,
>
> After chatting with you regarding this I spent some time to debug what
> is happening here.
>
> What I see is that once the writeExternal method starts writing to the
> outputstream then the readExternal also reads from the inputStream for
> that socket once some data is available. Sometimes the readExternal
> runs faster than the writeExternal and so gets an EOFException  when
> reading primitive types. So I tried buffering the socketInputstream
> with a 4K buffer and I am not getting the errors now.
>
>       I also tried replicating this problem in linux but it never
> occurs and the builds pass sucessfully. However i have not yet
> inspected how the streams are behaving in linux.
>
> Another thing i notice is that we do not seem to be using the custom
> org.apache.openejb.util.io.ObjectOutputStream here.

We don't use that code anymore.  I wrote that back in JDK 1.2 and it  
was faster then, but ended up slower in 1.3 set of vm optimizations.

> Maybe we will need to make the buffer size also a configurable
> parameter if buffering is an acceptable solution and both this and the
> server socket backlog will need to be configured appropriately. I
> would like your comments.

The buffer option sounds fine to me.  We might not want it on for some  
of the other protocols (like telnet) so there are pros and cons to  
putting it as an option for all protocols or just for the ejbd.

-David

>
> On Fri, Apr 11, 2008 at 1:10 AM, David Blevins  
> <david.blevins@visi.com> wrote:
>> Is there anything in the openejb.log file relating to the failure?
>>
>> -David
>>
>>
>>
>> On Apr 10, 2008, at 12:20 PM, Manu George wrote:
>>
>>
>>> Hi,
>>>   I am getting an error while I run the tests on windows. The  
>>> stacktrace
>> is
>>>
>>> javax.naming.NamingException: Cannot lookup
>> '/client/tests/entity/bmp/EncBean'.
>>> [Root exception is java.rmi.RemoteException: Cannot read the  
>>> response from
>> the
>>> erver (OEJP/3.0) : null; nested exception is:
>>>      java.io.EOFException]
>>>      at
>> org.apache.openejb.client.JNDIContext.lookup(JNDIContext.java:240)
>>>      at javax.naming.InitialContext.lookup(InitialContext.java:363)
>>>      at
>> org.apache.openejb.test.entity.bmp.BmpJndiEncTests.setUp(BmpJndiEncT
>>> sts.java:38)
>>>      at
>> org.apache.openejb.test.NumberedTestCase.run(NumberedTestCase.java:9
>>> )
>>>      at org.apache.openejb.test.TestSuite.run(TestSuite.java:49)
>>>      at org.apache.openejb.test.TestSuite.run(TestSuite.java:49)
>>>      at
>> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner
>>> java:81)
>>>      at
>> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet
>>> java:62)
>>>      at
>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTe
>>> tSet(AbstractDirectoryTestSuite.java:140)
>>>      at
>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(A
>>> stractDirectoryTestSuite.java:165)
>>>      at org.apache.maven.surefire.Surefire.run(Surefire.java:107)
>>>      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>      at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl
>>> java:64)
>>>      at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
>>> sorImpl.java:43)
>>>      at java.lang.reflect.Method.invoke(Method.java:615)
>>>      at
>> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(S
>>> refireBooter.java:285)
>>>      at
>> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.
>>> ava:976)
>>> Caused by: java.rmi.RemoteException: Cannot read the response from  
>>> the
>> server (
>>> EJP/3.0) : null; nested exception is:
>>>      java.io.EOFException
>>>      at  
>>> org.apache.openejb.client.Client.processRequest(Client.java:172)
>>>      at org.apache.openejb.client.Client.request(Client.java:42)
>>>      at
>> org.apache.openejb.client.JNDIContext.request(JNDIContext.java:87)
>>>      at
>> org.apache.openejb.client.JNDIContext.lookup(JNDIContext.java:234)
>>>      ... 16 more
>>> Caused by: java.io.EOFException
>>>      at
>> java.io.ObjectInputStream$BlockDataInputStream.readByte(ObjectInputS
>>> ream.java:2685)
>>>      at java.io.ObjectInputStream.readByte(ObjectInputStream.java: 
>>> 889)
>>>      at
>> org.apache.openejb.client.EJBMetaDataImpl.readExternal(EJBMetaDataIm
>>> l.java:172)
>>>      at
>> org.apache.openejb.client.JNDIResponse.readExternal(JNDIResponse.jav
>>> :86)
>>>      at  
>>> org.apache.openejb.client.Client.processRequest(Client.java:167)
>>>      ... 19 more
>>>
>>> The error ocuurs intermittently leading me to believe its a
>>> synchronisation issue. For the past few days I am unable to figure  
>>> out
>>> the cause. Some advice/help will be appreciated.
>>> Looks like Ashish and Jacek are hitting the same issue as well.
>>>
>>>
>>> Regards
>>> Manu
>>>
>>>
>>
>>
>


Mime
View raw message