Re: Lazy fields issue with Hibernate/OpenEJB

2008-08-06 Thread David Blevins


On Aug 6, 2008, at 2:33 PM, Sami Jaber wrote:

Well David, I have the bits you sent me (kindly) yesterday by mail  
when I

asked you for a "patched" version of 3.0 supporting
deployments.classpath.ear.
(http://people.apache.org/~dblevins/openejb-3.1-r683137.tar.gz)
Do you think that I could get a patched version of the patched  
version that

correct this bug ?
I pay you a beer to thank you ;-)


It should contain that bug fix.  Hmmm...

Give a bean like this a try over the RemoteInitialContextFactory, if  
it works, then the explanation given in https://jira.jboss.org/jira/browse/EJBTHREE-440 
 cannot be accurate.


@Stateless
public class TesterBean implements Tester {
public Object call(Object object) {
return object;
}
}

public interface Tester {
public Object call(Object object);
}

Then in your client code make these calls:

  tester.call(boolean.class);
  tester.call(byte.class);
  tester.call(char.class);
  tester.call(short.class);
  tester.call(int.class);
  tester.call(long.class);
  tester.call(float.class);
  tester.call(double.class);

-David





2008/8/6 David Blevins <[EMAIL PROTECTED]>


On Aug 6, 2008, at 10:28 AM, Dain Sundstrom wrote:

I believe this this the JIRA for the issue:


 https://jira.jboss.org/jira/browse/EJBTHREE-440

It appears that Hibernate requires a custom ObjectInputStream to  
work

properly.  They claim the root cause is this VM bug:

 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4171142

It seems strange that is could be the cause of the bug.

David, what do you think?



We did have that bug in 3.0 final.  It's since been fixed:

http://issues.apache.org/jira/browse/OPENEJB-832
http://svn.apache.org/viewvc?view=rev&revision=672429  (the fix)
http://svn.apache.org/viewvc?view=rev&revision=672444  (the tests)

Sami, what version of the openejb-client.jar are you using?

-David



On Aug 6, 2008, at 9:53 AM, Sami Jaber wrote:


Hi all,


I try to get the couple JPA(Hibernate) and OpenEJB works with an
application
that uses lazy fields in Pojo.
My application is pretty simple, I have an inheritance and some  
lazy

fields
are declared FetchMode.LAZY.

When I run a client remotely, i get the same error before any  
call :



javax.ejb.EJBException: Unknown Container Exception:
java.rmi.RemoteException: Error reading response from server  
(OEJP/3.0) :

cannot assign instance of
org.hibernate.proxy.pojo.javassist.SerializableProxy to field
mypackage.Pojo.controleur of type mypackage.domain.user.User in  
instance

of
mypackage.OtherPojo; nested exception is:
java.lang.ClassCastException: cannot assign instance of
org.hibernate.proxy.pojo.javassist.SerializableProxy to field
mypackage.Pojo.controleur of type mypackage.domain.user.User in  
instance

of
mypackage.OtherPojo

OtherPojo inherits from Pojo. With all kind of combination
(remotable=true,
local-copy/true or false, ), switching to cglib<- 
>javaassist,  I get
desperately the same exception. Note that with  
LocalInitialContext, all

works perfectly. As soon as I run cross JVM calls thru
RemoteInitialContext,
it hangs.

My problem is very close to this issue :

http://www.jboss.com/index.html?module=bb&op=viewtopic&t=76737&postdays=0&postorder=asc&start=0

any clue? this is very frustrating ...

Or, if anybody can provide me with a test case that makes OpenEJB  
and

Hibernate work with lazy fields, i would really appreciate


Sami

ps : here is my server stacktrace when the error raises

2008-08-06 18:39:02,975 - FATAL - Couldn't write EjbResponse to  
output

stream
java.net.SocketException: Software caused connection abort:  
socket write

error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java: 
136)

at

java.io.ObjectOutputStream 
$BlockDataOutputStream.drain(ObjectOutputStream.java:1838)

at

java.io.ObjectOutputStream 
$BlockDataOutputStream.setBlockDataMode(ObjectOutputStream.java: 
1747)

at

java 
.io.ObjectOutputStream.writeNonProxyDesc(ObjectOutputStream.java: 
1249)

at
java.io.ObjectOutputStream.writeClassDesc(ObjectOutputStream.java: 
1203)

at

java 
.io 
.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java: 
1387)

at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java: 
1150)

at

java 
.io 
.ObjectOutputStream.writeFatalException(ObjectOutputStream.java: 
1538)

at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:329)
at
org 
.apache.openejb.client.EJBResponse.writeExternal(EJBResponse.java: 
133)

at

org 
.apache 
.openejb 
.server 
.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java:215)

at

org 
.apache 
.openejb.server.ejbd.EjbDaemon.processEjbRequest(EjbDaemon.java: 
164)

at
org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java: 
122)

at
org.apache.openejb.ser

Re: Lazy fields issue with Hibernate/OpenEJB

2008-08-06 Thread Sami Jaber
Well David, I have the bits you sent me (kindly) yesterday by mail when I
asked you for a "patched" version of 3.0 supporting
deployments.classpath.ear.
(http://people.apache.org/~dblevins/openejb-3.1-r683137.tar.gz)
Do you think that I could get a patched version of the patched version that
correct this bug ?
I pay you a beer to thank you ;-)

2008/8/6 David Blevins <[EMAIL PROTECTED]>

> On Aug 6, 2008, at 10:28 AM, Dain Sundstrom wrote:
>
>  I believe this this the JIRA for the issue:
>>
>>   https://jira.jboss.org/jira/browse/EJBTHREE-440
>>
>> It appears that Hibernate requires a custom ObjectInputStream to work
>> properly.  They claim the root cause is this VM bug:
>>
>>   http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4171142
>>
>> It seems strange that is could be the cause of the bug.
>>
>> David, what do you think?
>>
>
> We did have that bug in 3.0 final.  It's since been fixed:
>
>  http://issues.apache.org/jira/browse/OPENEJB-832
>  http://svn.apache.org/viewvc?view=rev&revision=672429  (the fix)
>  http://svn.apache.org/viewvc?view=rev&revision=672444  (the tests)
>
> Sami, what version of the openejb-client.jar are you using?
>
> -David
>
>
>
>  On Aug 6, 2008, at 9:53 AM, Sami Jaber wrote:
>>
>>  Hi all,
>>>
>>> I try to get the couple JPA(Hibernate) and OpenEJB works with an
>>> application
>>> that uses lazy fields in Pojo.
>>> My application is pretty simple, I have an inheritance and some lazy
>>> fields
>>> are declared FetchMode.LAZY.
>>>
>>> When I run a client remotely, i get the same error before any call :
>>>
>>>
>>> javax.ejb.EJBException: Unknown Container Exception:
>>> java.rmi.RemoteException: Error reading response from server (OEJP/3.0) :
>>> cannot assign instance of
>>> org.hibernate.proxy.pojo.javassist.SerializableProxy to field
>>> mypackage.Pojo.controleur of type mypackage.domain.user.User in instance
>>> of
>>> mypackage.OtherPojo; nested exception is:
>>>  java.lang.ClassCastException: cannot assign instance of
>>> org.hibernate.proxy.pojo.javassist.SerializableProxy to field
>>> mypackage.Pojo.controleur of type mypackage.domain.user.User in instance
>>> of
>>> mypackage.OtherPojo
>>>
>>> OtherPojo inherits from Pojo. With all kind of combination
>>> (remotable=true,
>>> local-copy/true or false, ), switching to cglib<->javaassist,  I get
>>> desperately the same exception. Note that with LocalInitialContext, all
>>> works perfectly. As soon as I run cross JVM calls thru
>>> RemoteInitialContext,
>>> it hangs.
>>>
>>> My problem is very close to this issue :
>>>
>>> http://www.jboss.com/index.html?module=bb&op=viewtopic&t=76737&postdays=0&postorder=asc&start=0
>>>
>>> any clue? this is very frustrating ...
>>>
>>> Or, if anybody can provide me with a test case that makes OpenEJB and
>>> Hibernate work with lazy fields, i would really appreciate
>>>
>>>
>>> Sami
>>>
>>> ps : here is my server stacktrace when the error raises
>>>
>>> 2008-08-06 18:39:02,975 - FATAL - Couldn't write EjbResponse to output
>>> stream
>>> java.net.SocketException: Software caused connection abort: socket write
>>> error
>>>  at java.net.SocketOutputStream.socketWrite0(Native Method)
>>>  at
>>> java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
>>>  at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
>>>  at
>>>
>>> java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1838)
>>>  at
>>>
>>> java.io.ObjectOutputStream$BlockDataOutputStream.setBlockDataMode(ObjectOutputStream.java:1747)
>>>  at
>>>
>>> java.io.ObjectOutputStream.writeNonProxyDesc(ObjectOutputStream.java:1249)
>>>  at
>>> java.io.ObjectOutputStream.writeClassDesc(ObjectOutputStream.java:1203)
>>>  at
>>>
>>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1387)
>>>  at
>>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
>>>  at
>>>
>>> java.io.ObjectOutputStream.writeFatalException(ObjectOutputStream.java:1538)
>>>  at
>>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:329)
>>>  at
>>> org.apache.openejb.client.EJBResponse.writeExternal(EJBResponse.java:133)
>>>  at
>>>
>>> org.apache.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java:215)
>>>  at
>>>
>>> org.apache.openejb.server.ejbd.EjbDaemon.processEjbRequest(EjbDaemon.java:164)
>>>  at
>>> org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:122)
>>>  at
>>> org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:84)
>>>  at
>>> org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java:60)
>>>  at org.apache.openejb.server.ServicePool$2.run(ServicePool.java:78)
>>>  at org.apache.openejb.server.ServicePool$3.run(ServicePool.java:101)
>>>  at
>>>
>>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
>>>  at
>>>
>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExec

Configure OpenEJB Container to use external activemq.xml file

2008-08-06 Thread rde8026

I've been trying to get the openEJB container to allow me to use an external
activemq.xml file for a while now and have been unsuccessful.  Below is my
resource config


  # Broker configuration URI as defined by ActiveMQ
  # see http://activemq.apache.org/broker-configuration-uri.html

  #BrokerXmlConfig broker:(tcp://localhost:61616)?useJmx=false
  BrokerXmlConfig xbean:activemq.xml

  # Broker address

  #ServerUrl vm://localhost?async=true
  ServerUrl tcp://localhost:61616

  # DataSource for persistence messages

  DataSource MessageDataStore


With the activemq.xml file placed in the lib directory

I'm getting the following exception:
org.apache.openejb.OpenEJBException:
javax.resource.spi.ResourceAdapterInternalException: Failed to startup an
embedded broker: openejb:xbean:(activemq.xml)?persistent=false, due to:
org.springframework.beans.factory.BeanDefinitionStoreException: Could not
resolve bean definition resource pattern [(activemq.xml)?persistent=false];
nested exception is java.io.FileNotFoundException: class path resource []
cannot be resolved to URL because it does not exist: Failed to startup an
embedded broker: openejb:xbean:(activemq.xml)?persistent=false, due to:
org.springframework.beans.factory.BeanDefinitionStoreException: Could not
resolve bean definition resource pattern [(activemq.xml)?persistent=false];
nested exception is java.io.FileNotFoundException: class path resource []
cannot be resolved to URL because it does not exist

I've not been able to find any info on this anywhere; I may just be looking
in the wrong places but if anyone has successfully gotten this to work any
info would be awesome.  Thanks a ton in advance.

BTW - I put the spring-2.5.1.jar & xbean-spring-3.1.jar in my lib dir as
well.  I can post my activemq.xml if that will help.
-- 
View this message in context: 
http://www.nabble.com/Configure-OpenEJB-Container-to-use-external-activemq.xml-file-tp18858260p18858260.html
Sent from the OpenEJB User mailing list archive at Nabble.com.



Re: Lazy fields issue with Hibernate/OpenEJB

2008-08-06 Thread David Blevins

On Aug 6, 2008, at 10:28 AM, Dain Sundstrom wrote:


I believe this this the JIRA for the issue:

   https://jira.jboss.org/jira/browse/EJBTHREE-440

It appears that Hibernate requires a custom ObjectInputStream to  
work properly.  They claim the root cause is this VM bug:


   http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4171142

It seems strange that is could be the cause of the bug.

David, what do you think?


We did have that bug in 3.0 final.  It's since been fixed:

  http://issues.apache.org/jira/browse/OPENEJB-832
  http://svn.apache.org/viewvc?view=rev&revision=672429  (the fix)
  http://svn.apache.org/viewvc?view=rev&revision=672444  (the tests)

Sami, what version of the openejb-client.jar are you using?

-David



On Aug 6, 2008, at 9:53 AM, Sami Jaber wrote:


Hi all,

I try to get the couple JPA(Hibernate) and OpenEJB works with an  
application

that uses lazy fields in Pojo.
My application is pretty simple, I have an inheritance and some  
lazy fields

are declared FetchMode.LAZY.

When I run a client remotely, i get the same error before any call :


javax.ejb.EJBException: Unknown Container Exception:
java.rmi.RemoteException: Error reading response from server (OEJP/ 
3.0) :

cannot assign instance of
org.hibernate.proxy.pojo.javassist.SerializableProxy to field
mypackage.Pojo.controleur of type mypackage.domain.user.User in  
instance of

mypackage.OtherPojo; nested exception is:
  java.lang.ClassCastException: cannot assign instance of
org.hibernate.proxy.pojo.javassist.SerializableProxy to field
mypackage.Pojo.controleur of type mypackage.domain.user.User in  
instance of

mypackage.OtherPojo

OtherPojo inherits from Pojo. With all kind of combination  
(remotable=true,
local-copy/true or false, ), switching to cglib<->javaassist,   
I get
desperately the same exception. Note that with LocalInitialContext,  
all
works perfectly. As soon as I run cross JVM calls thru  
RemoteInitialContext,

it hangs.

My problem is very close to this issue :
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=76737&postdays=0&postorder=asc&start=0

any clue? this is very frustrating ...

Or, if anybody can provide me with a test case that makes OpenEJB and
Hibernate work with lazy fields, i would really appreciate


Sami

ps : here is my server stacktrace when the error raises

2008-08-06 18:39:02,975 - FATAL - Couldn't write EjbResponse to  
output

stream
java.net.SocketException: Software caused connection abort: socket  
write

error
  at java.net.SocketOutputStream.socketWrite0(Native Method)
  at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
  at java.net.SocketOutputStream.write(SocketOutputStream.java: 
136)

  at
java.io.ObjectOutputStream 
$BlockDataOutputStream.drain(ObjectOutputStream.java:1838)

  at
java.io.ObjectOutputStream 
$BlockDataOutputStream.setBlockDataMode(ObjectOutputStream.java:1747)

  at
java 
.io.ObjectOutputStream.writeNonProxyDesc(ObjectOutputStream.java: 
1249)

  at
java.io.ObjectOutputStream.writeClassDesc(ObjectOutputStream.java: 
1203)

  at
java 
.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java: 
1387)

  at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
  at
java 
.io.ObjectOutputStream.writeFatalException(ObjectOutputStream.java: 
1538)

  at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:329)
  at
org 
.apache.openejb.client.EJBResponse.writeExternal(EJBResponse.java: 
133)

  at
org 
.apache 
.openejb 
.server 
.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java:215)

  at
org 
.apache 
.openejb.server.ejbd.EjbDaemon.processEjbRequest(EjbDaemon.java:164)

  at
org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:122)
  at
org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:84)
  at
org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java:60)
  at org.apache.openejb.server.ServicePool 
$2.run(ServicePool.java:78)
  at org.apache.openejb.server.ServicePool 
$3.run(ServicePool.java:101)

  at
java.util.concurrent.ThreadPoolExecutor 
$Worker.runTask(ThreadPoolExecutor.java:885)

  at
java.util.concurrent.ThreadPoolExecutor 
$Worker.run(ThreadPoolExecutor.java:907)

  at java.lang.Thread.run(Thread.java:619)







Re: WebServices too long result

2008-08-06 Thread Karan Malhi
Yes,

That was my guess too. I took a page from your troubleshooting strategy and
wanted to see the data on the wire first :)

On Wed, Aug 6, 2008 at 1:04 PM, Dain Sundstrom <[EMAIL PROTECTED]> wrote:

> Karan,
>
> I'd guess that this is the chunking issue again.  Chunks are typically 4k
> so you will only see problems from large results.
>
> -dain
>
>
> On Aug 6, 2008, at 7:20 AM, Karan Malhi wrote:
>
>  Not sure, but looks like the connection on the client is closing earlier
>> than required. It would be nice if we could somehow see the actual traffic
>> on the wire. Have you used TcpMon before? Could you setup TcpMon and send
>> us
>> the back and forth traffic between the client and server.
>>
>> On Tue, Aug 5, 2008 at 5:31 PM, hofmanndavid <[EMAIL PROTECTED]>
>> wrote:
>>
>>
>>> Sorry I forgot to tell that the exception is indeed in the client, no the
>>> in
>>> the server
>>>
>>>
>>> hofmanndavid wrote:
>>>

 I have a webservice exposed in a embedded openejb, from another computer

>>> I
>>>
 am calling that webservice

 the scenario is this:
 I am calling a method signature like this
 String myMethod(String arg)

 if the answer of myMethod is too long it shows the next exception, if it
 is not too long, it just works, the exception does not come from the
 implementation of the method of the webservice, it raised in the cilent
 I
 think.

 I am not sure if I am doing something wrong, the code I use is based in
 the simple-webservice pattern, no new things where added

 I will greatly appreciate an answer :)

 05/08/2008 04:53:28 PM
 org.apache.cxf.service.factory.ReflectionServiceFactoryBean
 buildServiceFromWSDL
 INFO: Creating Service {http://10.129.6.137/wsdl}GemConnectWSService<
 http://10.129.6.137/wsdl%7DGemConnectWSService>from

 WSDL: http://10.129.6.137:4204/GemConnectWSImpl?wsdl
 05/08/2008 04:53:29 PM org.apache.cxf.phase.PhaseInterceptorChain
 doIntercept
 INFO: Interceptor has thrown exception, unwinding now
 org.apache.cxf.interceptor.Fault: Could not create
 XMLStreamReader(encoding UTF-8).
 at

 org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:67)
>>>
 at

 org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
>>>
 at

>>> org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:429)
>>>
 at

 org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1955)
>>>
 at

 org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1791)
>>>
 at
 org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
 at

>>> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:575)
>>>
 at

 org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>>>
 at

 org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
>>>
 at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
 at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
 at

>>> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>>>
 at
 org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
 at $Proxy16.listAvailableServices(Unknown Source)
 at

 py.com.personal.webvas.gcsmclient.ws.test.MainTest.main(MainTest.java:25)
 Caused by: com.ctc.wstx.exc.WstxIOException: Connection reset
 at
 com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:548)
 at

>>> com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:604)
>>>
 at

>>> com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:629)
>>>
 at

 com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java:324)
>>>
 at

 org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:65)
>>>
 ... 14 more
 Caused by: java.net.SocketException: Connection reset
 at java.net.SocketInputStream.read(Unknown Source)
 at java.io.BufferedInputStream.fill(Unknown Source)
 at java.io.BufferedInputStream.read1(Unknown Source)
 at java.io.BufferedInputStream.read(Unknown Source)
 at sun.net.www.MeteredStream.read(Unknown Source)
 at java.io.FilterInputStream.read(Unknown Source)
 at
 sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(Unknown
 Source)
 at
 sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(Unknown
 Source)
 at com.ctc.wstx.io.UTF8Reader.loadMore(UTF8Reader.java:362)
 at com.ctc.wstx.io.UTF8Read

Re: Lazy fields issue with Hibernate/OpenEJB

2008-08-06 Thread Dain Sundstrom

I believe this this the JIRA for the issue:

https://jira.jboss.org/jira/browse/EJBTHREE-440

It appears that Hibernate requires a custom ObjectInputStream to work  
properly.  They claim the root cause is this VM bug:


http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4171142

It seems strange that is could be the cause of the bug.

David, what do you think?


-dain



BTW, you can find the code for SerializableProxy here:

http://www.krugle.org/kse/files?query=SerializableProxy#3


On Aug 6, 2008, at 9:53 AM, Sami Jaber wrote:


Hi all,

I try to get the couple JPA(Hibernate) and OpenEJB works with an  
application

that uses lazy fields in Pojo.
My application is pretty simple, I have an inheritance and some lazy  
fields

are declared FetchMode.LAZY.

When I run a client remotely, i get the same error before any call :


javax.ejb.EJBException: Unknown Container Exception:
java.rmi.RemoteException: Error reading response from server (OEJP/ 
3.0) :

cannot assign instance of
org.hibernate.proxy.pojo.javassist.SerializableProxy to field
mypackage.Pojo.controleur of type mypackage.domain.user.User in  
instance of

mypackage.OtherPojo; nested exception is:
   java.lang.ClassCastException: cannot assign instance of
org.hibernate.proxy.pojo.javassist.SerializableProxy to field
mypackage.Pojo.controleur of type mypackage.domain.user.User in  
instance of

mypackage.OtherPojo

OtherPojo inherits from Pojo. With all kind of combination  
(remotable=true,
local-copy/true or false, ), switching to cglib<->javaassist,  I  
get
desperately the same exception. Note that with LocalInitialContext,  
all
works perfectly. As soon as I run cross JVM calls thru  
RemoteInitialContext,

it hangs.

My problem is very close to this issue :
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=76737&postdays=0&postorder=asc&start=0

any clue? this is very frustrating ...

Or, if anybody can provide me with a test case that makes OpenEJB and
Hibernate work with lazy fields, i would really appreciate


Sami

ps : here is my server stacktrace when the error raises

2008-08-06 18:39:02,975 - FATAL - Couldn't write EjbResponse to output
stream
java.net.SocketException: Software caused connection abort: socket  
write

error
   at java.net.SocketOutputStream.socketWrite0(Native Method)
   at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
   at java.net.SocketOutputStream.write(SocketOutputStream.java: 
136)

   at
java.io.ObjectOutputStream 
$BlockDataOutputStream.drain(ObjectOutputStream.java:1838)

   at
java.io.ObjectOutputStream 
$BlockDataOutputStream.setBlockDataMode(ObjectOutputStream.java:1747)

   at
java.io.ObjectOutputStream.writeNonProxyDesc(ObjectOutputStream.java: 
1249)

   at
java.io.ObjectOutputStream.writeClassDesc(ObjectOutputStream.java: 
1203)

   at
java 
.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java: 
1387)

   at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
   at
java 
.io.ObjectOutputStream.writeFatalException(ObjectOutputStream.java: 
1538)

   at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:329)
   at
org.apache.openejb.client.EJBResponse.writeExternal(EJBResponse.java: 
133)

   at
org 
.apache 
.openejb 
.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java: 
215)

   at
org 
.apache 
.openejb.server.ejbd.EjbDaemon.processEjbRequest(EjbDaemon.java:164)

   at
org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:122)
   at
org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:84)
   at
org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java:60)
   at org.apache.openejb.server.ServicePool 
$2.run(ServicePool.java:78)
   at org.apache.openejb.server.ServicePool 
$3.run(ServicePool.java:101)

   at
java.util.concurrent.ThreadPoolExecutor 
$Worker.runTask(ThreadPoolExecutor.java:885)

   at
java.util.concurrent.ThreadPoolExecutor 
$Worker.run(ThreadPoolExecutor.java:907)

   at java.lang.Thread.run(Thread.java:619)




Re: WebServices too long result

2008-08-06 Thread Dain Sundstrom

Karan,

I'd guess that this is the chunking issue again.  Chunks are typically  
4k so you will only see problems from large results.


-dain

On Aug 6, 2008, at 7:20 AM, Karan Malhi wrote:

Not sure, but looks like the connection on the client is closing  
earlier
than required. It would be nice if we could somehow see the actual  
traffic
on the wire. Have you used TcpMon before? Could you setup TcpMon and  
send us

the back and forth traffic between the client and server.

On Tue, Aug 5, 2008 at 5:31 PM, hofmanndavid  
<[EMAIL PROTECTED]> wrote:




Sorry I forgot to tell that the exception is indeed in the client,  
no the

in
the server


hofmanndavid wrote:


I have a webservice exposed in a embedded openejb, from another  
computer

I

am calling that webservice

the scenario is this:
I am calling a method signature like this
String myMethod(String arg)

if the answer of myMethod is too long it shows the next exception,  
if it

is not too long, it just works, the exception does not come from the
implementation of the method of the webservice, it raised in the  
cilent I

think.

I am not sure if I am doing something wrong, the code I use is  
based in

the simple-webservice pattern, no new things where added

I will greatly appreciate an answer :)

05/08/2008 04:53:28 PM
org.apache.cxf.service.factory.ReflectionServiceFactoryBean
buildServiceFromWSDL
INFO: Creating Service {http://10.129.6.137/ 
wsdl}GemConnectWSServicefrom

WSDL: http://10.129.6.137:4204/GemConnectWSImpl?wsdl
05/08/2008 04:53:29 PM org.apache.cxf.phase.PhaseInterceptorChain
doIntercept
INFO: Interceptor has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Could not create
XMLStreamReader(encoding UTF-8).
 at

org 
.apache 
.cxf 
.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java: 
67)

 at

org 
.apache 
.cxf 
.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java: 
208)

 at

org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:429)

 at

org.apache.cxf.transport.http.HTTPConduit 
$WrappedOutputStream.handleResponse(HTTPConduit.java:1955)

 at

org.apache.cxf.transport.http.HTTPConduit 
$WrappedOutputStream.close(HTTPConduit.java:1791)

 at
org 
.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)

 at

org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:575)

 at

org.apache.cxf.interceptor.MessageSenderInterceptor 
$ 
MessageSenderEndingInterceptor 
.handleMessage(MessageSenderInterceptor.java:62)

 at

org 
.apache 
.cxf 
.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java: 
208)
 at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java: 
276)
 at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java: 
222)

 at

org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)

 at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java: 
135)

 at $Proxy16.listAvailableServices(Unknown Source)
 at
py 
.com 
.personal.webvas.gcsmclient.ws.test.MainTest.main(MainTest.java:25)

Caused by: com.ctc.wstx.exc.WstxIOException: Connection reset
 at
com 
.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java: 
548)

 at
com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java: 
604)

 at
com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java: 
629)

 at

com 
.ctc 
.wstx 
.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java: 
324)

 at

org 
.apache 
.cxf 
.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java: 
65)

 ... 14 more
Caused by: java.net.SocketException: Connection reset
 at java.net.SocketInputStream.read(Unknown Source)
 at java.io.BufferedInputStream.fill(Unknown Source)
 at java.io.BufferedInputStream.read1(Unknown Source)
 at java.io.BufferedInputStream.read(Unknown Source)
 at sun.net.www.MeteredStream.read(Unknown Source)
 at java.io.FilterInputStream.read(Unknown Source)
 at
sun.net.www.protocol.http.HttpURLConnection 
$HttpInputStream.read(Unknown

Source)
 at
sun.net.www.protocol.http.HttpURLConnection 
$HttpInputStream.read(Unknown

Source)
 at com.ctc.wstx.io.UTF8Reader.loadMore(UTF8Reader.java:362)
 at com.ctc.wstx.io.UTF8Reader.read(UTF8Reader.java:110)
 at

com 
.ctc.wstx.io.ReaderBootstrapper.initialLoad(ReaderBootstrapper.java: 
245)

 at

com 
.ctc 
.wstx.io.ReaderBootstrapper.bootstrapInput(ReaderBootstrapper.java: 
132)

 at
com 
.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java: 
543)

 ... 18 more
Exception in thread "main" javax.xml.ws.soap.SOAPFaultException:  
Could

not

create XMLStreamReader(encoding UTF-8).
 at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java: 
175)

 at $Proxy16.listAvailableServices(Unknown Source)
 at
py 
.com 
.personal.webvas.gcsmclient.ws.test.MainTest.main(MainTes

Lazy fields issue with Hibernate/OpenEJB

2008-08-06 Thread Sami Jaber
Hi all,

I try to get the couple JPA(Hibernate) and OpenEJB works with an application
that uses lazy fields in Pojo.
My application is pretty simple, I have an inheritance and some lazy fields
are declared FetchMode.LAZY.

When I run a client remotely, i get the same error before any call :


javax.ejb.EJBException: Unknown Container Exception:
java.rmi.RemoteException: Error reading response from server (OEJP/3.0) :
cannot assign instance of
org.hibernate.proxy.pojo.javassist.SerializableProxy to field
mypackage.Pojo.controleur of type mypackage.domain.user.User in instance of
mypackage.OtherPojo; nested exception is:
java.lang.ClassCastException: cannot assign instance of
org.hibernate.proxy.pojo.javassist.SerializableProxy to field
mypackage.Pojo.controleur of type mypackage.domain.user.User in instance of
mypackage.OtherPojo

OtherPojo inherits from Pojo. With all kind of combination (remotable=true,
local-copy/true or false, ), switching to cglib<->javaassist,  I get
desperately the same exception. Note that with LocalInitialContext, all
works perfectly. As soon as I run cross JVM calls thru RemoteInitialContext,
it hangs.

My problem is very close to this issue :
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=76737&postdays=0&postorder=asc&start=0

any clue? this is very frustrating ...

Or, if anybody can provide me with a test case that makes OpenEJB and
Hibernate work with lazy fields, i would really appreciate


Sami

ps : here is my server stacktrace when the error raises

2008-08-06 18:39:02,975 - FATAL - Couldn't write EjbResponse to output
stream
java.net.SocketException: Software caused connection abort: socket write
error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at
java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1838)
at
java.io.ObjectOutputStream$BlockDataOutputStream.setBlockDataMode(ObjectOutputStream.java:1747)
at
java.io.ObjectOutputStream.writeNonProxyDesc(ObjectOutputStream.java:1249)
at
java.io.ObjectOutputStream.writeClassDesc(ObjectOutputStream.java:1203)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1387)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at
java.io.ObjectOutputStream.writeFatalException(ObjectOutputStream.java:1538)
at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:329)
at
org.apache.openejb.client.EJBResponse.writeExternal(EJBResponse.java:133)
at
org.apache.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java:215)
at
org.apache.openejb.server.ejbd.EjbDaemon.processEjbRequest(EjbDaemon.java:164)
at
org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:122)
at
org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:84)
at
org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java:60)
at org.apache.openejb.server.ServicePool$2.run(ServicePool.java:78)
at org.apache.openejb.server.ServicePool$3.run(ServicePool.java:101)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)


Custom Resource Factory

2008-08-06 Thread lupu.slobodu

How can one configure a custom resource factory(implementation of the
javax.naming.spi.ObjectFactory interface). The custom resource factory
should be injectable into a stateless.


-- 
View this message in context: 
http://www.nabble.com/Custom-Resource-Factory-tp18852971p18852971.html
Sent from the OpenEJB User mailing list archive at Nabble.com.



Re: WebServices too long result

2008-08-06 Thread Karan Malhi
Not sure, but looks like the connection on the client is closing earlier
than required. It would be nice if we could somehow see the actual traffic
on the wire. Have you used TcpMon before? Could you setup TcpMon and send us
the back and forth traffic between the client and server.

On Tue, Aug 5, 2008 at 5:31 PM, hofmanndavid <[EMAIL PROTECTED]> wrote:

>
> Sorry I forgot to tell that the exception is indeed in the client, no the
> in
> the server
>
>
> hofmanndavid wrote:
> >
> > I have a webservice exposed in a embedded openejb, from another computer
> I
> > am calling that webservice
> >
> > the scenario is this:
> > I am calling a method signature like this
> > String myMethod(String arg)
> >
> > if the answer of myMethod is too long it shows the next exception, if it
> > is not too long, it just works, the exception does not come from the
> > implementation of the method of the webservice, it raised in the cilent I
> > think.
> >
> > I am not sure if I am doing something wrong, the code I use is based in
> > the simple-webservice pattern, no new things where added
> >
> > I will greatly appreciate an answer :)
> >
> > 05/08/2008 04:53:28 PM
> > org.apache.cxf.service.factory.ReflectionServiceFactoryBean
> > buildServiceFromWSDL
> > INFO: Creating Service 
> > {http://10.129.6.137/wsdl}GemConnectWSServicefrom
> > WSDL: http://10.129.6.137:4204/GemConnectWSImpl?wsdl
> > 05/08/2008 04:53:29 PM org.apache.cxf.phase.PhaseInterceptorChain
> > doIntercept
> > INFO: Interceptor has thrown exception, unwinding now
> > org.apache.cxf.interceptor.Fault: Could not create
> > XMLStreamReader(encoding UTF-8).
> >   at
> >
> org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:67)
> >   at
> >
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
> >   at
> org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:429)
> >   at
> >
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1955)
> >   at
> >
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1791)
> >   at
> > org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
> >   at
> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:575)
> >   at
> >
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
> >   at
> >
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
> >   at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
> >   at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
> >   at
> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> >   at
> > org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
> >   at $Proxy16.listAvailableServices(Unknown Source)
> >   at
> > py.com.personal.webvas.gcsmclient.ws.test.MainTest.main(MainTest.java:25)
> > Caused by: com.ctc.wstx.exc.WstxIOException: Connection reset
> >   at
> > com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:548)
> >   at
> com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:604)
> >   at
> com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:629)
> >   at
> >
> com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java:324)
> >   at
> >
> org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:65)
> >   ... 14 more
> > Caused by: java.net.SocketException: Connection reset
> >   at java.net.SocketInputStream.read(Unknown Source)
> >   at java.io.BufferedInputStream.fill(Unknown Source)
> >   at java.io.BufferedInputStream.read1(Unknown Source)
> >   at java.io.BufferedInputStream.read(Unknown Source)
> >   at sun.net.www.MeteredStream.read(Unknown Source)
> >   at java.io.FilterInputStream.read(Unknown Source)
> >   at
> > sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(Unknown
> > Source)
> >   at
> > sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(Unknown
> > Source)
> >   at com.ctc.wstx.io.UTF8Reader.loadMore(UTF8Reader.java:362)
> >   at com.ctc.wstx.io.UTF8Reader.read(UTF8Reader.java:110)
> >   at
> >
> com.ctc.wstx.io.ReaderBootstrapper.initialLoad(ReaderBootstrapper.java:245)
> >   at
> >
> com.ctc.wstx.io.ReaderBootstrapper.bootstrapInput(ReaderBootstrapper.java:132)
> >   at
> > com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:543)
> >   ... 18 more
> > Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Could
> not
> > create XMLStreamReader(encoding UTF-8).
> >   at
> > org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:175)
> >   at $Proxy16.listAvailableServices(Unknown S