Re: Configure OpenEJB Container to use external activemq.xml file

2008-08-07 Thread rde8026

I gave that a go and here is the error message:

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

Seems this doesn't want to work!  I've attached my activemq.xml file here. 
Thanks for your help so far - its much appreciated...

http://www.nabble.com/file/p18884422/activemq.xml activemq.xml .

Thx,
RE


David Blevins wrote:
> 
> 
> On Aug 7, 2008, at 6:48 AM, rde8026 wrote:
> 
>>
>> Hi David,
>>
>> Thanks for the reply.  I've tried using the fully qualified path and  
>> I get
>> the same exception -
>>
>> Failed to startup an embedded broker:
>> openejb:xbean:(D:/opt/openejb-3.0/lib/activemq.xml)? 
>> persistent=false, due
>> to: org.springframework.beans.factory.BeanDefinitionStoreException:  
>> Could
>> not resolve bean definition resource pattern
>> [(D:/opt/openejb-3.0/lib/activemq.xml)?persistent=false]; nested  
>> exception
>> is java.io.FileNotFoundException: class path resource
>> [(D:/opt/openejb-3.0/lib/] cannot be resolved to URL because it does  
>> not
>> exist
>>
>> I'm curious do you know if anyone has successfully gotten this to  
>> work or is
>> it a bug?  Any ideas would be much appreciated.
> 
> I think I've tried this before, but I could be imagining things.   
> Looking at the exception though, it seems that we might need to make  
> the path a valid URL.  Try this one:
> 
>file:///D:/opt/openejb-3.0/lib/activemq.xml
> 
> If that doesn't work, post your activemq.xml (or some version of it)  
> and I'll give it a try.
> 
> If that *does* work, then we can add examples as well as wrap this  
> activemq functionality with something that tries harder to make things  
> work and gives a better error message when they can't.
> 
> -David
> 
> 
>> David Blevins wrote:
>>>
>>>
>>> On Aug 6, 2008, at 12:47 PM, rde8026 wrote:
>>>

 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
>>>
>>> Hmmm...  Try using an absolute path to the activemq.xml file and see
>>> if that doesn't make activemq happier.
>>>
>>> Not sure if that will work, but worth a try.
>>>
>>> -David
>>>
>>>
>>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/Configure-OpenEJB-Container-to-use-external-activemq.xml-file-tp18858260p18870919.html
>> Sent from the OpenEJB User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Configure-OpenEJB-Container-to-use-external-activemq.xml-file-tp18858260p18884422.html
Sent from the OpenEJB User mailing list archive at Nabble.com.



Re: Propblem with OpenEJB + Toplink unit tests

2008-08-07 Thread David Blevins
Marcin, thanks for this post!  This is great information and it's nice  
to see them back to back like this.


I threw it up in our documentation here:

http://cwiki.apache.org/OPENEJBx30/common-persistenceprovider-properties.html

-David

On Aug 5, 2008, at 12:01 AM, Marcin Kwapisz wrote:



  
  
  


[Marcin Kwapisz]
Hi David,

Properties in main persistence.xml (for toplink) are almost the  
same. I have set generation.output-mode to both to verify ddl  
statements. Database platform is detected automatically (check the  
log) so you can skip that property.
The following properties are for toplink, openjpa and hibernate  
respectively. As you can see, Hibernate was the less demanding from  
"unexperienced" user like me.


   
 
   value="buildSchema(foreignKeys=true,schemaAction='dropDB,add')"/>
   
   value="native(foreignKeys=true)" />

   
   value="ForeignKeyDeleteAction=restrict,  
JoinForeignKeyDeleteAction=restrict"/>
   value="DefaultLevel=TRACE,SQL=TRACE" />

   

   
   

   
value="org.apache.openejb.hibernate.TransactionManagerLookup"/>

   

Regards
--
Marcin Kwapisz
Division of Computer Networks
Technical Univeristy of Lodz, Poland








OT: Facebook group if you're interested

2008-08-07 Thread David Blevins
Totally off-topic and non-critical, but there's a facebook group if  
you'd like to join up:


  http://www.new.facebook.com/group.php?gid=2658865898

-David



Re: Problem between OpenEJB embedded threading model and Swing Threading model

2008-08-07 Thread David Blevins

We can certainly hack up something in this regard.

Quick question, what kind of security tracking would be good for you?   
I.e. are we talking concurrent users or one user at a time?


We've got some code in the openejb-client package that's pretty useful  
for switching to different modes of tracking the user and I was just  
thinking just the other day that it wouldn't be a bad idea to port it  
to the "server side" as well for embedded scenarios.


Also, I assume this is sort of wrapped up in the other two security  
related posts.  If not, let me now if there's something more specific  
I should be looking at there.


-David

On Aug 7, 2008, at 10:24 AM, Sami Jaber wrote:


Hello all (once more :-)),

After the deployments.ear property and the custom ObjectInputStream,  
I have
found another issue which is IMHO more annoying, maybe a structural  
design

problem that David will resolve for sure ;-).
I have a pretty big Swing Application that relies on OpenEJB over a  
remote

mode (integration platform) and local mode (dev platform).
After digging into the openejb source code (I find them really well  
coded

btw), it appear that over LocalInitialContextFactory, the user context
(security, tx, ...) is hold on the ThreadLocal. Not sure but it  
seems to be

done in the ClientSecurity.java class thru this code :

public static void login(String username, String password, boolean
threadScoped) throws FailedLoginException {
   Object clientIdentity = directAuthentication(username,  
password,

server);
   if (threadScoped) {
   threadClientIdentity.set(clientIdentity);
   } else {
   staticClientIdentity = clientIdentity;
   }
   identityResolver = new SimpleIdentityResolver();
   }

The problem is that with Swing Application (or any multi-threaded
front-end), you cannot assume that the thread that initiates the new
InitialContext() is the one that will be used to lookup. In my case  
I have
implemented (as every smart boy ;-)) a smart proxy pattern which  
consist in
keeping the context in a singleton and reusing it between calls. The  
issue

is that the lookup is made inside a Swing Action, the Event Thread
Dispatcher raises a new Thread and all credential information are  
lost.
That's why in my previous message, I told you that I get randomly  
"guest" as

the getCallerPrincipal().

The fix would have been to instantiate a new InitialContext for every
lookup, but not only it kills the performance but you get also an  
error

message saying that you cannot assign twice the ThreadLocal.

The last solution that works for me is to write that code for each  
lookup,

this is ugly but it does the job :

 public static void setInitialContext()
   {
   try
   {
   context = new InitialContext(env);
   }
   catch (Exception e)
   {
   // if TLS exists Ignore the exception, otherwise, it will set  
a new

one in the current thread
   }
  }

David ?

Sami




Re: Custom Resource Factory

2008-08-07 Thread David Blevins


On Aug 7, 2008, at 8:32 AM, lupu.slobodu wrote:



I dont know if the custom injection is flexible enough.I need to be  
able to

load multiple xml configuration files.Is it possible with the custom
injection mechanism? If I use the openejb embedded in tomcat,  you  
think it
is possible to plugin the  ObjectFactory in the tomcat jndi and look  
it up

from a openejb session bean?


We've coded up the tomcat integration to be able to support that.  So  
if you add an ObjectFactory to Tomcat, OpenEJB will pick it up and add  
it like it was an  declaration in the openejb.xml file.


So if you had a META-INF/context.xml file in your webbapp for Tomcat  
like the following:



  


You should be able to have it injected like so:

  @Resource ResourceBean byBean;

Let us know if that does or doesn't work.  We need more examples of  
this.


As a side question, are you currently doing something like this in  
Tomcat now or are you looking for a more general purpose "define  
objects in xml and inject them" solution?  We've had some ideas in  
this area.



-David





David Blevins wrote:



On Aug 6, 2008, at 7:54 AM, lupu.slobodu wrote:

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.


We don't have anything for pluging in an
javax.naming.spi.ObjectFactory, but we do have the ability for you to
plug in your own java.beans.PropertyEditor and have custom resources
injected that way.

See this example for details:
http://openejb.apache.org/3.0/custom-injection.html

-David





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






Re: Configure OpenEJB Container to use external activemq.xml file

2008-08-07 Thread David Blevins


On Aug 7, 2008, at 6:48 AM, rde8026 wrote:



Hi David,

Thanks for the reply.  I've tried using the fully qualified path and  
I get

the same exception -

Failed to startup an embedded broker:
openejb:xbean:(D:/opt/openejb-3.0/lib/activemq.xml)? 
persistent=false, due
to: org.springframework.beans.factory.BeanDefinitionStoreException:  
Could

not resolve bean definition resource pattern
[(D:/opt/openejb-3.0/lib/activemq.xml)?persistent=false]; nested  
exception

is java.io.FileNotFoundException: class path resource
[(D:/opt/openejb-3.0/lib/] cannot be resolved to URL because it does  
not

exist

I'm curious do you know if anyone has successfully gotten this to  
work or is

it a bug?  Any ideas would be much appreciated.


I think I've tried this before, but I could be imagining things.   
Looking at the exception though, it seems that we might need to make  
the path a valid URL.  Try this one:


  file:///D:/opt/openejb-3.0/lib/activemq.xml

If that doesn't work, post your activemq.xml (or some version of it)  
and I'll give it a try.


If that *does* work, then we can add examples as well as wrap this  
activemq functionality with something that tries harder to make things  
work and gives a better error message when they can't.


-David



David Blevins wrote:



On Aug 6, 2008, at 12:47 PM, rde8026 wrote:



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


Hmmm...  Try using an absolute path to the activemq.xml file and see
if that doesn't make activemq happier.

Not sure if that will work, but worth a try.

-David





--
View this message in context: 
http://www.nabble.com/Configure-OpenEJB-Container-to-use-external-activemq.xml-file-tp18858260p18870919.html
Sent from the OpenEJB User mailing list archive at Nabble.com.






Re: WebServices too long result

2008-08-07 Thread David Blevins


On Aug 7, 2008, at 5:34 AM, Karan Malhi wrote:

You are not doing anything wrong (I was able to reproduce this  
scenario ).

This is a bug which does not handle the situation when the web service
returns back large results. Adding Jetty to the classpath would fix  
the
issue, however if you do not want to add Jetty to the classpath,  
then you

would need to wait a bit before this bug is fixed.


I'd strongly recommend adding the jetty library.  Our impl is really  
for simple testing, anything heavy-duty should use the jetty  
transport.  If you just add the jetty jars to the classpath (or an  
openejb/lib/ dir) we will automatically detect jetty and hook  
everything up for you automagically.


-David

On Tue, Aug 5, 2008 at 5:30 PM, hofmanndavid  
<[EMAIL PROTECTED]> 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).
  

Re: Lazy fields issue with Hibernate/OpenEJB

2008-08-07 Thread Sami Jaber
You are right David. I repeated the process and your zip are ok. I guess my
browser picked up the previously zip I got in my DownThemUp cache (I was
downloading also the 3.0 final).

Sami

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

>
> On Aug 7, 2008, at 3:16 AM, Sami Jaber wrote:
>
>  Thanks, in fact I have decompiled, patched and updated my
>> openejb-client.jar
>> with the content of the current trunk, it worked.
>> That's better to have the whole thing instead of hacking out the bits.
>>
>
> That's the crazy thing, both zips where of unmodified trunk.  I suspected
> something else might be the issue, so I downloaded both of the zips I put
> up, extracted the lib/openejb-client-3.1-SNAPSHOT.jar files in each and both
> had the required if/primitive/return blocks in there.
>
> I've repeated the process in my home dir on people.apache.org against the
> zips there so that you can check them out again.  Here's the bash command I
> ran:
>
>  for n in openejb-3.1-r683*.zip; do
>unzip $n
>(cd ${n/.zip/}/lib && unzip openejb-client-3.1-SNAPSHOT.jar)
>  done
>
> Here are the resulting files:
>
>
> http://people.apache.org/~dblevins/openejb-3.1-r683137/lib/org/apache/openejb/client/EjbObjectInputStream.class
>
> http://people.apache.org/~dblevins/openejb-3.1-r683569/lib/org/apache/openejb/client/EjbObjectInputStream.class
>
> It definitely seems that your environment got corrupted somehow.  There
> seems a strong chance that the 3.0 jars are still in your classpath
> somewhere or for some reason the new jars are not getting picked up.  We
> should definitely find the root of the issue or I suspect you'll keep
> running into mysterious errors.
>
> -David
>
>


Re: Lazy fields issue with Hibernate/OpenEJB

2008-08-07 Thread David Blevins


On Aug 7, 2008, at 3:16 AM, Sami Jaber wrote:

Thanks, in fact I have decompiled, patched and updated my openejb- 
client.jar

with the content of the current trunk, it worked.
That's better to have the whole thing instead of hacking out the bits.


That's the crazy thing, both zips where of unmodified trunk.  I  
suspected something else might be the issue, so I downloaded both of  
the zips I put up, extracted the lib/openejb-client-3.1-SNAPSHOT.jar  
files in each and both had the required if/primitive/return blocks in  
there.


I've repeated the process in my home dir on people.apache.org against  
the zips there so that you can check them out again.  Here's the bash  
command I ran:


 for n in openejb-3.1-r683*.zip; do
unzip $n
(cd ${n/.zip/}/lib && unzip openejb-client-3.1-SNAPSHOT.jar)
 done

Here are the resulting files:

http://people.apache.org/~dblevins/openejb-3.1-r683137/lib/org/apache/openejb/client/EjbObjectInputStream.class
http://people.apache.org/~dblevins/openejb-3.1-r683569/lib/org/apache/openejb/client/EjbObjectInputStream.class

It definitely seems that your environment got corrupted somehow.   
There seems a strong chance that the 3.0 jars are still in your  
classpath somewhere or for some reason the new jars are not getting  
picked up.  We should definitely find the root of the issue or I  
suspect you'll keep running into mysterious errors.


-David



Problem between OpenEJB embedded threading model and Swing Threading model

2008-08-07 Thread Sami Jaber
Hello all (once more :-)),

After the deployments.ear property and the custom ObjectInputStream, I have
found another issue which is IMHO more annoying, maybe a structural design
problem that David will resolve for sure ;-).
I have a pretty big Swing Application that relies on OpenEJB over a remote
mode (integration platform) and local mode (dev platform).
After digging into the openejb source code (I find them really well coded
btw), it appear that over LocalInitialContextFactory, the user context
(security, tx, ...) is hold on the ThreadLocal. Not sure but it seems to be
done in the ClientSecurity.java class thru this code :

 public static void login(String username, String password, boolean
threadScoped) throws FailedLoginException {
Object clientIdentity = directAuthentication(username, password,
server);
if (threadScoped) {
threadClientIdentity.set(clientIdentity);
} else {
staticClientIdentity = clientIdentity;
}
identityResolver = new SimpleIdentityResolver();
}

The problem is that with Swing Application (or any multi-threaded
front-end), you cannot assume that the thread that initiates the new
InitialContext() is the one that will be used to lookup. In my case I have
implemented (as every smart boy ;-)) a smart proxy pattern which consist in
keeping the context in a singleton and reusing it between calls. The issue
is that the lookup is made inside a Swing Action, the Event Thread
Dispatcher raises a new Thread and all credential information are lost.
That's why in my previous message, I told you that I get randomly "guest" as
the getCallerPrincipal().

The fix would have been to instantiate a new InitialContext for every
lookup, but not only it kills the performance but you get also an error
message saying that you cannot assign twice the ThreadLocal.

The last solution that works for me is to write that code for each lookup,
this is ugly but it does the job :

  public static void setInitialContext()
{
try
{
context = new InitialContext(env);
}
catch (Exception e)
{
// if TLS exists Ignore the exception, otherwise, it will set a new
one in the current thread
}
   }

David ?

Sami


Re: Custom Resource Factory

2008-08-07 Thread lupu.slobodu

I dont know if the custom injection is flexible enough.I need to be able to
load multiple xml configuration files.Is it possible with the custom
injection mechanism? If I use the openejb embedded in tomcat,  you think it
is possible to plugin the  ObjectFactory in the tomcat jndi and look it up
from a openejb session bean?

David Blevins wrote:
> 
> 
> On Aug 6, 2008, at 7:54 AM, lupu.slobodu wrote:
> 
>> 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.
> 
> We don't have anything for pluging in an  
> javax.naming.spi.ObjectFactory, but we do have the ability for you to  
> plug in your own java.beans.PropertyEditor and have custom resources  
> injected that way.
> 
> See this example for details:
> http://openejb.apache.org/3.0/custom-injection.html
> 
> -David
> 
> 
> 

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



Re: Configure OpenEJB Container to use external activemq.xml file

2008-08-07 Thread rde8026

Hi David,

Thanks for the reply.  I've tried using the fully qualified path and I get
the same exception - 

Failed to startup an embedded broker:
openejb:xbean:(D:/opt/openejb-3.0/lib/activemq.xml)?persistent=false, due
to: org.springframework.beans.factory.BeanDefinitionStoreException: Could
not resolve bean definition resource pattern
[(D:/opt/openejb-3.0/lib/activemq.xml)?persistent=false]; nested exception
is java.io.FileNotFoundException: class path resource
[(D:/opt/openejb-3.0/lib/] cannot be resolved to URL because it does not
exist

I'm curious do you know if anyone has successfully gotten this to work or is
it a bug?  Any ideas would be much appreciated.

Thx,
RE


David Blevins wrote:
> 
> 
> On Aug 6, 2008, at 12:47 PM, rde8026 wrote:
> 
>>
>> 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
> 
> Hmmm...  Try using an absolute path to the activemq.xml file and see  
> if that doesn't make activemq happier.
> 
> Not sure if that will work, but worth a try.
> 
> -David
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Configure-OpenEJB-Container-to-use-external-activemq.xml-file-tp18858260p18870919.html
Sent from the OpenEJB User mailing list archive at Nabble.com.



Re: WebServices too long result

2008-08-07 Thread Karan Malhi
You are not doing anything wrong (I was able to reproduce this scenario ).
This is a bug which does not handle the situation when the web service
returns back large results. Adding Jetty to the classpath would fix the
issue, however if you do not want to add Jetty to the classpath, then you
would need to wait a bit before this bug is fixed.

Thanks for notifying us about this issue.

On Tue, Aug 5, 2008 at 5:30 PM, hofmanndavid <[EMAIL PROTECTED]> 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(MainTest.java:25)
> Caused by:

Security and GroupPrincipal

2008-08-07 Thread Sami Jaber
hi all,
This will be my last question for this week (hope so ;-))
I still have a problem to propagate a principal/credential to the server.
The idea is to use the default authentication ->
org.apache.openejb.core.security.jaas.PropertiesLoginModule with a
users.properties and group.properties
and simply retrieve the Principal thru the SessionContext :

public void myMethod() {
Principal p = sessionContext.getCallerPrincipal()
}
and client side
p.setProperty(Context.SECURITY_PRINCIPAL, "user");
p.setProperty(Context.SECURITY_CREDENTIALS,"pass");


The stack returns always p as a reference to GroupPrincipal and I'd want to
get the UserPrincipal (username) ? Is there any "standard" way to get the
username ?
Previously, I have used JBoss Embedded (with JndiLoginInitialContextFactory)
and the getCallerPrincipal retrieved the right principal. Did you already
faced differences like this between appservers ?
As I want to use OpenEJB in dev mode and GlassFish or JBoss in integration,
the standard way is important for me.
thanks all

Sami


Re: Lazy fields issue with Hibernate/OpenEJB

2008-08-07 Thread Sami Jaber
Thanks, in fact I have decompiled, patched and updated my openejb-client.jar
with the content of the current trunk, it worked.
That's better to have the whole thing instead of hacking out the bits.

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

> Ok.  Whipped up another build.
>
>  
> http://people.apache.org/~dblevins/openejb-3.1-r683569.zip
>
> Let's see if we don't have better luck with this one.
>
> -David
>
>
>
> On Aug 7, 2008, at 1:08 AM, Sami Jaber wrote:
>
>  I have checked out the last revision of EjbOutputStream and resolveClass
>> method :
>>
>> http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/EjbObjectInputStream.java?view=markup&pathrev=672430
>> This bug should not occurs if I have the right version of
>> openejbclient.jar
>>
>>  catch (ClassNotFoundException e) {
>>   String n = classDesc.getName();
>>   if (n.equals("boolean")) return boolean.class;
>>   if (n.equals("byte")) return byte.class;
>>   if (n.equals("char")) return char.class;
>>   if (n.equals("short")) return short.class;
>>   if (n.equals("int")) return int.class;
>>   if (n.equals("long")) return long.class;
>>   if (n.equals("float")) return float.class;
>>   if (n.equals("double")) return double.class;
>>
>> I have decompiled the jar you sent me David, here the result :
>>
>> // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
>> // Jad home page: http://www.kpdus.com/jad.html
>> // Decompiler options: packimports(3)
>> // Source File Name:   EjbObjectInputStream.java
>>
>> package org.apache.openejb.client;
>>
>> import java.io.*;
>> import java.lang.reflect.Proxy;
>>
>> public class EjbObjectInputStream extends ObjectInputStream
>> {
>>   public EjbObjectInputStream(InputStream in)
>>   throws IOException
>>   {
>>   super(in);
>>   }
>>
>>   protected Class resolveClass(ObjectStreamClass classDesc)
>>   throws IOException, ClassNotFoundException
>>   {
>>   return Class.forName(classDesc.getName(), false, getClassloader());
>>   }
>>
>>   protected Class resolveProxyClass(String interfaces[])
>>   throws IOException, ClassNotFoundException
>>   {
>>   Class cinterfaces[] = new Class[interfaces.length];
>>   for(int i = 0; i < interfaces.length; i++)
>>   cinterfaces[i] = getClassloader().loadClass(interfaces[i]);
>>   try
>>   {
>>   return Proxy.getProxyClass(getClassloader(), cinterfaces);
>>   }
>>   catch(IllegalArgumentException e)
>>   {
>>   throw new ClassNotFoundException(null, e);
>>   }
>>   }
>>
>>   ClassLoader getClassloader()
>>   {
>>   return Thread.currentThread().getContextClassLoader();
>>   }
>> }
>>
>> We got it. If you can send a working jar of openejb-ejb I will be grateful
>>
>>
>> Sami
>>
>> 2008/8/7 Sami Jaber <[EMAIL PROTECTED]>
>>
>>  Damned, here is my stacktrace
>>>
>>> Starting Main ...
>>> Debug of initialContext
>>>
>>> {java.naming.factory.initial=org.apache.openejb.client.RemoteInitialContextFactory,
>>> java.naming.security.principal=USERNAME,
>>> openejb.home=W:\dev_tools\openejb-3.0,
>>> openejb.embedded.remotable=true, local-copy=false,
>>> openejb.server.debug=true, openejb.deployments.classpath.ear=true,
>>> openejb.configuration=W:\dev_tools\openejb-3.0\conf\openejb.xml,
>>> openejb.loader=embed, java.naming.security.credentials=PASS}
>>>
>>> javax.ejb.EJBException: Container has suffered a SystemException
>>>   at
>>>
>>> org.apache.openejb.client.EJBObjectHandler._invoke(EJBObjectHandler.java:173)
>>>   at
>>>
>>> org.apache.openejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:117)
>>>   at
>>>
>>> org.apache.openejb.client.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:52)
>>>   at $Proxy0.call(Unknown Source)
>>>   at fr.aeag.redevances.presentation.Main.main(Main.java:45)
>>> Caused by: java.rmi.RemoteException: The server has encountered a fatal
>>> error: Error caught during request processing
>>> java.lang.ClassNotFoundException: boolean; nested exception is:
>>>   java.lang.ClassNotFoundException: boolean
>>>   at
>>>
>>> org.apache.openejb.server.ejbd.EjbRequestHandler.replyWithFatalError(EjbRequestHandler.java:425)
>>>   at
>>>
>>> org.apache.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java:103)
>>>   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$Work

Re: Lazy fields issue with Hibernate/OpenEJB

2008-08-07 Thread David Blevins

Ok.  Whipped up another build.

  http://people.apache.org/~dblevins/openejb-3.1-r683569.zip

Let's see if we don't have better luck with this one.

-David


On Aug 7, 2008, at 1:08 AM, Sami Jaber wrote:

I have checked out the last revision of EjbOutputStream and  
resolveClass

method :
http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/EjbObjectInputStream.java?view=markup&pathrev=672430
This bug should not occurs if I have the right version of  
openejbclient.jar


 catch (ClassNotFoundException e) {
   String n = classDesc.getName();
   if (n.equals("boolean")) return boolean.class;
   if (n.equals("byte")) return byte.class;
   if (n.equals("char")) return char.class;
   if (n.equals("short")) return short.class;
   if (n.equals("int")) return int.class;
   if (n.equals("long")) return long.class;
   if (n.equals("float")) return float.class;
   if (n.equals("double")) return double.class;

I have decompiled the jar you sent me David, here the result :

// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
// Source File Name:   EjbObjectInputStream.java

package org.apache.openejb.client;

import java.io.*;
import java.lang.reflect.Proxy;

public class EjbObjectInputStream extends ObjectInputStream
{
   public EjbObjectInputStream(InputStream in)
   throws IOException
   {
   super(in);
   }

   protected Class resolveClass(ObjectStreamClass classDesc)
   throws IOException, ClassNotFoundException
   {
   return Class.forName(classDesc.getName(), false,  
getClassloader());

   }

   protected Class resolveProxyClass(String interfaces[])
   throws IOException, ClassNotFoundException
   {
   Class cinterfaces[] = new Class[interfaces.length];
   for(int i = 0; i < interfaces.length; i++)
   cinterfaces[i] = getClassloader().loadClass(interfaces[i]);
   try
   {
   return Proxy.getProxyClass(getClassloader(), cinterfaces);
   }
   catch(IllegalArgumentException e)
   {
   throw new ClassNotFoundException(null, e);
   }
   }

   ClassLoader getClassloader()
   {
   return Thread.currentThread().getContextClassLoader();
   }
}

We got it. If you can send a working jar of openejb-ejb I will be  
grateful



Sami

2008/8/7 Sami Jaber <[EMAIL PROTECTED]>


Damned, here is my stacktrace

Starting Main ...
Debug of initialContext
{java 
.naming 
.factory 
.initial=org.apache.openejb.client.RemoteInitialContextFactory,

java.naming.security.principal=USERNAME,
openejb.home=W:\dev_tools\openejb-3.0,
openejb.embedded.remotable=true, local-copy=false,
openejb.server.debug=true, openejb.deployments.classpath.ear=true,
openejb.configuration=W:\dev_tools\openejb-3.0\conf\openejb.xml,
openejb.loader=embed, java.naming.security.credentials=PASS}

javax.ejb.EJBException: Container has suffered a SystemException
   at
org 
.apache 
.openejb.client.EJBObjectHandler._invoke(EJBObjectHandler.java:173)

   at
org 
.apache 
.openejb 
.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:117)

   at
org 
.apache 
.openejb 
.client 
.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:52)

   at $Proxy0.call(Unknown Source)
   at fr.aeag.redevances.presentation.Main.main(Main.java:45)
Caused by: java.rmi.RemoteException: The server has encountered a  
fatal

error: Error caught during request processing
java.lang.ClassNotFoundException: boolean; nested exception is:
   java.lang.ClassNotFoundException: boolean
   at
org 
.apache 
.openejb 
.server 
.ejbd.EjbRequestHandler.replyWithFatalError(EjbRequestHandler.java: 
425)

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

   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)
Caused by: java.lang.ClassNotFoundException: boolean
   at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
   at java.lang.ClassLoader.loadClassIn

Re: Configure OpenEJB Container to use external activemq.xml file

2008-08-07 Thread David Blevins


On Aug 6, 2008, at 12:47 PM, rde8026 wrote:



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


Hmmm...  Try using an absolute path to the activemq.xml file and see  
if that doesn't make activemq happier.


Not sure if that will work, but worth a try.

-David



Re: Custom Resource Factory

2008-08-07 Thread David Blevins


On Aug 6, 2008, at 7:54 AM, lupu.slobodu wrote:


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.


We don't have anything for pluging in an  
javax.naming.spi.ObjectFactory, but we do have the ability for you to  
plug in your own java.beans.PropertyEditor and have custom resources  
injected that way.


See this example for details:
http://openejb.apache.org/3.0/custom-injection.html

-David



Re: Lazy fields issue with Hibernate/OpenEJB

2008-08-07 Thread Sami Jaber
I have checked out the last revision of EjbOutputStream and resolveClass
method :
http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/EjbObjectInputStream.java?view=markup&pathrev=672430
This bug should not occurs if I have the right version of openejbclient.jar

  catch (ClassNotFoundException e) {
String n = classDesc.getName();
if (n.equals("boolean")) return boolean.class;
if (n.equals("byte")) return byte.class;
if (n.equals("char")) return char.class;
if (n.equals("short")) return short.class;
if (n.equals("int")) return int.class;
if (n.equals("long")) return long.class;
if (n.equals("float")) return float.class;
if (n.equals("double")) return double.class;

I have decompiled the jar you sent me David, here the result :

// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
// Source File Name:   EjbObjectInputStream.java

package org.apache.openejb.client;

import java.io.*;
import java.lang.reflect.Proxy;

public class EjbObjectInputStream extends ObjectInputStream
{
public EjbObjectInputStream(InputStream in)
throws IOException
{
super(in);
}

protected Class resolveClass(ObjectStreamClass classDesc)
throws IOException, ClassNotFoundException
{
return Class.forName(classDesc.getName(), false, getClassloader());
}

protected Class resolveProxyClass(String interfaces[])
throws IOException, ClassNotFoundException
{
Class cinterfaces[] = new Class[interfaces.length];
for(int i = 0; i < interfaces.length; i++)
cinterfaces[i] = getClassloader().loadClass(interfaces[i]);
try
{
return Proxy.getProxyClass(getClassloader(), cinterfaces);
}
catch(IllegalArgumentException e)
{
throw new ClassNotFoundException(null, e);
}
}

ClassLoader getClassloader()
{
return Thread.currentThread().getContextClassLoader();
}
}

We got it. If you can send a working jar of openejb-ejb I will be grateful


Sami

2008/8/7 Sami Jaber <[EMAIL PROTECTED]>

> Damned, here is my stacktrace
>
> Starting Main ...
> Debug of initialContext
> {java.naming.factory.initial=org.apache.openejb.client.RemoteInitialContextFactory,
> java.naming.security.principal=USERNAME,
> openejb.home=W:\dev_tools\openejb-3.0,
> openejb.embedded.remotable=true, local-copy=false,
> openejb.server.debug=true, openejb.deployments.classpath.ear=true,
> openejb.configuration=W:\dev_tools\openejb-3.0\conf\openejb.xml,
> openejb.loader=embed, java.naming.security.credentials=PASS}
>
> javax.ejb.EJBException: Container has suffered a SystemException
> at
> org.apache.openejb.client.EJBObjectHandler._invoke(EJBObjectHandler.java:173)
> at
> org.apache.openejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:117)
> at
> org.apache.openejb.client.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:52)
> at $Proxy0.call(Unknown Source)
> at fr.aeag.redevances.presentation.Main.main(Main.java:45)
> Caused by: java.rmi.RemoteException: The server has encountered a fatal
> error: Error caught during request processing
> java.lang.ClassNotFoundException: boolean; nested exception is:
> java.lang.ClassNotFoundException: boolean
> at
> org.apache.openejb.server.ejbd.EjbRequestHandler.replyWithFatalError(EjbRequestHandler.java:425)
> at
> org.apache.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java:103)
> 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)
> Caused by: java.lang.ClassNotFoundException: boolean
> at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:247)
> at

Re: Lazy fields issue with Hibernate/OpenEJB

2008-08-07 Thread Sami Jaber
Damned, here is my stacktrace

Starting Main ...
Debug of initialContext
{java.naming.factory.initial=org.apache.openejb.client.RemoteInitialContextFactory,
java.naming.security.principal=USERNAME,
openejb.home=W:\dev_tools\openejb-3.0,
openejb.embedded.remotable=true, local-copy=false,
openejb.server.debug=true, openejb.deployments.classpath.ear=true,
openejb.configuration=W:\dev_tools\openejb-3.0\conf\openejb.xml,
openejb.loader=embed, java.naming.security.credentials=PASS}

javax.ejb.EJBException: Container has suffered a SystemException
at
org.apache.openejb.client.EJBObjectHandler._invoke(EJBObjectHandler.java:173)
at
org.apache.openejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:117)
at
org.apache.openejb.client.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:52)
at $Proxy0.call(Unknown Source)
at fr.aeag.redevances.presentation.Main.main(Main.java:45)
Caused by: java.rmi.RemoteException: The server has encountered a fatal
error: Error caught during request processing
java.lang.ClassNotFoundException: boolean; nested exception is:
java.lang.ClassNotFoundException: boolean
at
org.apache.openejb.server.ejbd.EjbRequestHandler.replyWithFatalError(EjbRequestHandler.java:425)
at
org.apache.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java:103)
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)
Caused by: java.lang.ClassNotFoundException: boolean
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at
org.apache.openejb.client.EjbObjectInputStream.resolveClass(EjbObjectInputStream.java:35)
at
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
at java.io.ObjectInputStream.readClass(ObjectInputStream.java:1462)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1312)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at
org.apache.openejb.client.EJBRequest$Body.readMethodParameters(EJBRequest.java:386)
at
org.apache.openejb.client.EJBRequest$Body.readExternal(EJBRequest.java:200)
at
org.apache.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java:101)
... 9 more

Your test case works obviously over LocalInitialContext.
Does it mean it is a regression ?


Sami


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

>
> 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 require