RE: [JBoss-user] problem with stateful session bean

2002-04-11 Thread Joost v.d. Wijgerd

Leo,

Maybe your bean is invalidated because you get a Runtime exception somewhere in your 
code but you keep using the instance?

cheer,

Joost :-)

-Original Message-
From: Leonard Wolters 
Sent: Thursday, April 11, 2002 4:39 PM
To: [EMAIL PROTECTED]
Subject: [JBoss-user] problem with stateful session bean



Hello,

I have a problem with stateful session beans.
After successfully deploying this bean, I'm able
to access this bean and call any method. However,
when calling a second method, I receive a '
NoSuchObjectException' (see below). 

[j2eejunit] RemoteException occurred in server thread; nested exception is:
[j2eejunit] java.rmi.NoSuchObjectException: Could not activate; nested exception 
is:
[j2eejunit] java.io.FileNotFoundException: 
D:\development\java\rkm\JBoss-Tomcat\jboss\db\sessions\smarthaven.doccompare.DocumentComparat
or\101852411.ser (The system cannot find the file specified)


As one can see, JBoss is trying to 'activate' my session bean
(or something else ?) This however is quite strange since my 
session bean has not been passivated yet ! BTW: both methods 
are called directly after each other, i.e. within milliseconds.

Most probably, i'm forgetting something in the deployment descriptor.
It seems that for any method call a new session bean is created ?

Does anyone has any suggestions what the problem can be ?

T.i.a.,

Leonard Wolters

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] Strange problem

2002-04-08 Thread Joost v.d. Wijgerd

Hi,

This could be due to the fact that you are trying to store and read 
all in one transaction, if the transaction isn't committed, the row
is not yet inserted in the database.

Joost.

-Original Message-
From: Mahesh Agarwal [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 08, 2002 6:55 AM
To: [EMAIL PROTECTED]
Subject: [JBoss-user] Strange problem


Hi Everybody

I am facing a very strange problem in my application which is running in
Jboss. 
I am creating a Request in my application  and saving that Request in
the database(MySql), that mean, I inserted a new row in a table.
When I come to my application again to see that Request , the application
says that unable to find the request. Strange!!

But when I tried for next time, the application shows the Request without
any exception. This problem is not repeatable but occurs very frequently.

Please give me some suggestion regarding this error.

Thanks a lot in advance
Mahesh

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] JBossMQ selector question

2002-03-19 Thread Joost v.d. Wijgerd



Hi,I have 
a QueueBrowser that is polling a queue. I display this queue in a Swing client. 
When the user takes an action I want to get the message from the queue, so I 
make a selector based on the JMSMessageID. Unfortunately this doesn't seem to 
work.. can somebody tell me what I'm doing wrong? Below is a code 
snippet..thanx,JoostsnippetString selector = 
"JMSMessageID='" + msg.getJMSMessageID() + "'";// fetch it from the 
queueQueueReceiver receiver = session.createReceiver(queue,selector);msg 
= receiver.receiveNoWait();if(msg != null) {// ok .. we have it put it 
in some other listSystem.out.println("Got Message");} else {// 
@todo: show dialogSystem.out.println("Message not available 
anymore");}// close the 
receiverreceiver.close();/snippet


RE: [JBoss-user] EJB in ear referencing EJB outside of ear

2001-11-16 Thread Joost v.d. Wijgerd

Hi,

If you deploy a bean outside an ear file (e.g. as a bean-jar not
as another ear file) you can reference the bean only with it's JNDI
name.
You can't user java:comp/env/ejb namespace bacause that can only be
used within one enterprise archive. So if the jndi name of your bean is
MyBean then just call InitialContext.lookup(MyBean) and you'll be 
alright. (at least I am when I do this). If the problem persists, maybe
you can provide a stacktrace for the CommunicationException..

cheers,


JOost.

-Original Message-
From: Richard Doust [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 16, 2001 4:51 AM
To: [EMAIL PROTECTED]
Subject: [JBoss-user] EJB in ear referencing EJB outside of ear


Hi.
I'm confused by the J2EE Spec. I know it's possible for an EJB packaged
in a
jar and deployed inside of an ear to reference an EJB that does not
exist
inside the ear.
I have gone from packaging all EJBs inside the ear to deploying one
externally, (on my way to deplolying most of them externally), so that a
different application deployed in the same container can access the EJBs
without having to have the EJBs packaged inside two different ears. I've
modified my deployment descriptors according to the specification, and
when
I run JBoss, the JNDIView shows me that all of the namespaces are
established as I would expect. Yet, when I try to access the externally
deployed EJB from an EJB inside the ear (doing a lookup on its Home
using
InitialContext), I get a CommunicationException. From the description,
it
seems like a weird exception to have. If anyone is interested in trying
to
help me figure this out, I could provide more details.
Thanks.


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] Select COUNT????? in Entity

2001-10-16 Thread Joost v.d. Wijgerd

Hi,

You're doing a BMP bean, so you work with jdbc already, why don't you
just define a method count() on the bean and call SELECT COUNT * FROM
blabla on the datasource

In my opinion you don't have to use only findBYXXX methods...

Joost.

-Original Message-
From: John LYC [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 16, 2001 5:08 AM
To: Jboss Mailing List
Subject: [JBoss-user] Select COUNT? in Entity


Hi all,
I'm using Bean-managed Entity Beans..
and i wanna do a sql select count..
the thing is the finder methods in entity can only return the beans
remote
type or a collection of it.
meaning i cannot select count .

How do i do a sql count?

one way to do work around i guess is to do a sql select as per normal
,
return collection. and do a collection .size.
but this seems redundant.
i just wan a figure. instead i'm selecting a collection of beans

help
thanks
john



___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] cmp primary key

2001-10-16 Thread Joost v.d. Wijgerd

Frank,

I have found that it is the easiest to use a UUID that combines
the time with some random number in a java Long object. These values are
so ridiculously big that it is almost impossible to get a duplicate key,
but of course you have to make arrangements in your code to catch the
DuplicateKeyException and generate a new key, but I can assure you that
this will not happen often...

Joost.

-Original Message-
From: Frank Morton [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 15, 2001 7:40 PM
To: [EMAIL PROTECTED]
Subject: [JBoss-user] cmp primary key


I'm a newbie for sure, but I've been surfing around for
a solution to assigning unique primary key values with
CMPs. I have seen lots of vague descriptions of how
to do it and some specific ones that are all followed by
other comments from people why that solution doesn't
work.

Does anyone have a specific solution and the complete
code to do this they can share? This seems like it must
be a very common problem that ought to have a standard
solution.

Help. I'm really getting frustrated.

Frank



___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] jboss - castor class loading problem

2001-10-10 Thread Joost v.d. Wijgerd
Title: jboss - castor class loading problem






Hi,


I'm currently testing with jboss and castor to do the object-relational mapping,

but I get the following exception:


[Default] org.exolab.castor.mapping.MappingException: Could not find the class com.smarthaven.component.profiler.Profile

[Default] at org.exolab.castor.mapping.loader.MappingLoader.createDescriptor(MappingLoader.java:300)

[Default] at org.exolab.castor.jdo.engine.JDOMappingLoader.createDescriptor(JDOMappingLoader.java:147)

[Default] at org.exolab.castor.mapping.loader.MappingLoader.loadMapping(MappingLoader.java:211)

[Default] at org.exolab.castor.jdo.engine.JDOMappingLoader.loadMapping(JDOMappingLoader.java:294)

[Default] at org.exolab.castor.mapping.Mapping.getResolver(Mapping.java:278)

[Default] at org.exolab.castor.jdo.engine.DatabaseRegistry.loadDatabase(DatabaseRegistry.java:317)

[Default] at org.exolab.castor.jdo.JDO.getDatabase(JDO.java:465)

[Default] at com.smarthaven.component.profiler.ProfileManagerBean.createGroup(ProfileManagerBean.java:57)

[Default] at java.lang.reflect.Method.invoke(Native Method)

[Default] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:54

3)

[Default] at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:276)

[Default] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.

java:87)

[Default] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:128)

[Default] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)

[Default] at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:286)

[Default] at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:395)

[Default] at java.lang.reflect.Method.invoke(Native Method)

[Default] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:242)

[Default] at sun.rmi.transport.Transport$1.run(Transport.java:155)

[Default] at java.security.AccessController.doPrivileged(Native Method)

[Default] at sun.rmi.transport.Transport.serviceCall(Transport.java:152)

[Default] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:462)

[Default] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:662)

[Default] at java.lang.Thread.run(Thread.java:498)


The profile class is part of je beans.jar. I suspect it is a class-loading problem, has anybody seen this

before?


thanx,


Joost.





RE: [JBoss-user] stateless session bean pooling seems to have disappeared in jboss2.4?????

2001-10-09 Thread Joost v.d. Wijgerd

Hi,

Update to 2.4.3, it will solve your problem. Somebody removed the
instance caching of stateless beans in 2.4.1, instead a new instance is
made each time.

cheers,

Joost.

-Original Message-
From: Noels Jeroen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 09, 2001 2:56 PM
To: '[EMAIL PROTECTED]'
Subject: [JBoss-user] stateless session bean pooling seems to have
disappeared in jboss2.4?


hi,

We have been using jboss 2.2.1 for about half a year, and I think this a
great product. Recently we upgraded to jboss 2.4.1, without any problems
whatsoever. However, it appears to me that jboss 2.2.1 and jboss 2.4.1
behave very differently in dealing with the pooling of stateless session
beans: I deployed exactly the same beans in both jboss versions, with
the
same (in fact: the default) container configurations and investigated
jboss-logging and some customized logging in our beans about their
life-cycle events. 
In 2.2.1, this kind of logging convinces me that stateless session beans
are
indeed pooled and reused. However it seems that in 2.4.1 this is no
longer
the case: no-arg-constructors, setSessionContext() and ejbCreate()
methods
are called over and over again, even when I reduce the pool-size to say
2
instances! please help!!!  

Jeroen Noels

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] Stateless Session remove() question

2001-10-09 Thread Joost v.d. Wijgerd

No,

actually, after each remote method call the instance is placed back into
the pool, you can never be sure that the next call on the same remote
object will use the dame instance..

Joost.

-Original Message-
From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 09, 2001 4:52 PM
To: David Ward
Cc: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] Stateless Session remove() question


afaik the server will only let one thread in a SLSB at a time, so I
assume
that the container will hold the instance as busy until you call
remove.  

not based on any knowledge of the internals...

cheers
dim

On Tue, 9 Oct 2001, David Ward wrote:

 Is there any benefit / penalty for calling or not calling remove() on 
 the remote interface of my stateless session bean?  According to the 
 ejb1.1 spec diagrams, it looks like ejbRemove will only get called on
a 
 stateFUL session bean.  Should I or should I not be calling remove() 
 when I'm done?
 
 
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
 


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] Passivating EJBs

2001-09-28 Thread Joost v.d. Wijgerd

Hi,

You have a reference to a connection in your Stateful session bean. When
the been is passivated it is basically serialized to a persistent store
(e.g. disk). Obviously it tries to serialize all you fields. What you
should do is drop the reference to the connection (or make the field
trainsient) and reinitialize when ejbActivate is called (or in
setEntityContext() ).

cheers,

Joost.

-Original Message-
From: Jarecsni Janos [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 28, 2001 11:47 AM
To: JBoss-List
Subject: [JBoss-user] Passivating EJBs



Hi,

thanks for your answers to my previous question (Performance...). I
got a
bit more confident that this project will finally succeed - thanks to
JBoss
:)

Now we got a little problem, which I'm sure is a consequence of our
misunderstanding of some basic rules... When JBoss tries to passivate
some
EJBs, we get the following exception:

[Container factory] java.rmi.ServerException: Could not passivate;
nested
exception is:
[Container factory] java.io.NotSerializableException:
org.jboss.pool.jdbc.xa.XAPoolDataSource
[Container factory] java.io.NotSerializableException:
org.jboss.pool.jdbc.xa.XAPoolDataSource
[Container factory] at
java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1148)
[Container factory] at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
[Container factory] at
java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:182
7)
[Container factory] at
java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:48
0)
[Container factory] at
java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1214)
[Container factory] at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
[Container factory] at
org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passivateSes
sion
(StatefulSessionFilePersistenceManager.java:285)
[Container factory] at
org.jboss.ejb.plugins.StatefulSessionInstanceCache.passivate(StatefulSes
sion
InstanceCache.java:67)
[Container factory] at
org.jboss.ejb.plugins.AbstractInstanceCache$1.execute(AbstractInstanceCa
che.
java:709)
[Container factory] at
org.jboss.util.WorkerQueue$QueueLoop.run(WorkerQueue.java:199)
[Container factory] at java.lang.Thread.run(Thread.java:484)

We - following the Petstore example - have a member variable of a
javax.sql.DataSource in each of our beans that will want to access the
database. In each method we ask for a connection from this datasource.
Now
it's obvious that this object is not serializable. My question is how to
work this problem around? I mean if I ask for a DataSource in each
method
(so that no such member variable exist) won't it slow down these methods
a
lot (JNDI lookups...). Or is there any other ways to do it?

Thanks very much in advance.

Cheers,

Janos
Budapest, Hungary.


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] JNDIMapMBean - ClassCastException

2001-09-28 Thread Joost v.d. Wijgerd

Owen,

Are you sure that you are binding a HashMap object under the jndi name?
It looks as though it is a entirely different object. I looked up the
javadoc for javax.naming.Reference (the object you're actually getting)
and it reads:

Reference provides a way of recording address information about objects
which themselves are not directly bound to the naming/directory system.

so it seems that you didn't bind the object properly. Another thought
that springs to mind is that a HashMap is not a remote object, and since
you appear to be using RMI-IIOP it cannot be directly bound. SO you
should either create a RemoteObject that wraps the hashmap, or try to
see whether you can get to the data throught the Reference object. e.g.
reference.getRefAddr(0).getObject();
(I haven't tried this but it would be the first thing I would try)

Good luck,

Joost.


-Original Message-
From: Sitepark [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 28, 2001 2:34 PM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] JNDIMapMBean - ClassCastException


Hi,

thanks for reply.

But now I get this exception:

Exception in thread main java.lang.ClassCastException
at
com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(Portable
RemoteObject.java:296)
at
javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)

Holger

On Fri, 28 Sep 2001 13:37:43 +0200
Joost v.d. Wijgerd [EMAIL PROTECTED] wrote:

 Hi,
 
 You always want to narrow your objects:
 
 Object ref = ctx.lookup(inmemory/maps/MapTest);
 
 HashMap map = (HashMap)
 PortableRemoteObject.narrow(ref, HashMap.class);
 
 This is because implementations of corba are not required to give you
 the object reference directly.
 
 Hope this helps,
 
 Joost.
 
 -Original Message-
 From: Sitepark [mailto:[EMAIL PROTECTED]]
 Sent: Friday, September 28, 2001 1:02 PM
 To: [EMAIL PROTECTED]
 Subject: [JBoss-user] JNDIMapMBean - ClassCastException
 
 
 Hi,
 
 I follow the HOWTO to integrate a Custom Service via MBeans.
 It work's
 
 But my Client dont't work.
 
 I get this exception:
 Exception in thread main java.lang.ClassCastException:
 javax.naming.Reference
 
 I use this:
 InitialContext ctx = new InitialContext();
 HashMap map = (HashMap) ctx.lookup(inmemory/maps/MapTest);
 
 Can anyone help?
 
 Many thanks
 
 Holger
 
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
 
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
 

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] JNDIMapMBean - ClassCastException

2001-09-28 Thread Joost v.d. Wijgerd

oops,

correction: Owen=Holger and 
reference.getRefAddr(0).getObject() =
reference.getRefAddr(0).getContent();

Joost.

-Original Message-
From: Joost v.d. Wijgerd 
Sent: Friday, September 28, 2001 3:28 PM
To: [EMAIL PROTECTED]
Subject: RE: [JBoss-user] JNDIMapMBean - ClassCastException


Owen,

Are you sure that you are binding a HashMap object under the jndi name?
It looks as though it is a entirely different object. I looked up the
javadoc for javax.naming.Reference (the object you're actually getting)
and it reads:

Reference provides a way of recording address information about objects
which themselves are not directly bound to the naming/directory system.

so it seems that you didn't bind the object properly. Another thought
that springs to mind is that a HashMap is not a remote object, and since
you appear to be using RMI-IIOP it cannot be directly bound. SO you
should either create a RemoteObject that wraps the hashmap, or try to
see whether you can get to the data throught the Reference object. e.g.
reference.getRefAddr(0).getObject();
(I haven't tried this but it would be the first thing I would try)

Good luck,

Joost.


-Original Message-
From: Sitepark [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 28, 2001 2:34 PM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] JNDIMapMBean - ClassCastException


Hi,

thanks for reply.

But now I get this exception:

Exception in thread main java.lang.ClassCastException
at
com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(Portable
RemoteObject.java:296)
at
javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)

Holger

On Fri, 28 Sep 2001 13:37:43 +0200
Joost v.d. Wijgerd [EMAIL PROTECTED] wrote:

 Hi,
 
 You always want to narrow your objects:
 
 Object ref = ctx.lookup(inmemory/maps/MapTest);
 
 HashMap map = (HashMap)
 PortableRemoteObject.narrow(ref, HashMap.class);
 
 This is because implementations of corba are not required to give you
 the object reference directly.
 
 Hope this helps,
 
 Joost.
 
 -Original Message-
 From: Sitepark [mailto:[EMAIL PROTECTED]]
 Sent: Friday, September 28, 2001 1:02 PM
 To: [EMAIL PROTECTED]
 Subject: [JBoss-user] JNDIMapMBean - ClassCastException
 
 
 Hi,
 
 I follow the HOWTO to integrate a Custom Service via MBeans.
 It work's
 
 But my Client dont't work.
 
 I get this exception:
 Exception in thread main java.lang.ClassCastException:
 javax.naming.Reference
 
 I use this:
 InitialContext ctx = new InitialContext();
 HashMap map = (HashMap) ctx.lookup(inmemory/maps/MapTest);
 
 Can anyone help?
 
 Many thanks
 
 Holger
 
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
 
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
 

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] Problem with deploying a CMP2.0 EJB on Jboss3.0

2001-09-24 Thread Joost v.d. Wijgerd

Sorry, you are totally right, my mistake..
I'm still working with 1.1 and have had not time
to educate myself on 2.0

Joost.

-Original Message-
From: Hunter Hillegas [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 21, 2001 5:18 PM
To: JBoss 2
Subject: Re: [JBoss-user] Problem with deploying a CMP2.0 EJB on
Jboss3.0


Are you sure about this?

Everything I've read about EJB2.0 is that bean classes now ARE defined
as
abstract.

Hunter

 From: Joost v.d. Wijgerd [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 Date: Fri, 21 Sep 2001 13:38:29 +0200
 To: [EMAIL PROTECTED]
 Subject: RE: [JBoss-user] Problem with deploying a CMP2.0 EJB on
Jboss3.0
 
 your bean class should not be abstract, you either extend
 this abstract class, in which you implement ejbCreate and
 put in your deployment descriptor as the bean class, or you
 make it a normal class, and implement ejbCreate()... and all
 your getters and setters
 
 Joost.


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] CommunicationException from lookup()

2001-09-21 Thread Joost v.d. Wijgerd

make sure you have jboss-client.jar, jnp-client.jar and jbosssx.jar in
your client classpath

-Original Message-
From: G.L. Grobe [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 21, 2001 5:12 AM
To: [EMAIL PROTECTED]
Subject: [JBoss-user] CommunicationException from lookup()


Anyone have anyideas what causes this error.
javax.naming.CommunicationException: Can't find SerialContextProvider

It occurs when doing a TopicConnectionFactory lookup(). 

try {
ctx = new InitialContext();
}
catch (Exception e) {
...
}

try {
topicConnectionFactory = (TopicConnectionFactory)
ctx.lookup(TopicConnectionFactory);
...
}
...

In my ~/conf/tomcat/jndi.properties file I have:
---
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=localhost:1099
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
# Do NOT uncomment this line as it causes in VM calls to go over
# RMI!
#java.naming.provider.url=localhost


Any help much appreciated!


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] problem Jboss and Tomcat

2001-09-21 Thread Joost v.d. Wijgerd

Hi,

sounds like you are trying to cast a home or a remote interface
to something else.. you should use

PortableRemoteObject.narrow to obtain the home interface, and then
the create or findByPrimaryKey methods to obtain the remote interface
to your entity bean.

Joost

-Original Message-
From: Jaime Gomez [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 21, 2001 2:42 AM
To: [EMAIL PROTECTED]; '[EMAIL PROTECTED]'
Subject: [JBoss-user] problem Jboss and Tomcat


I have the follow problem

Error Query : java.lang.ClassCastException: $Proxy1

when invoque one enitity bean , since one aplication client 

i don't understand the message

jaime


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] Error in 2.4.1

2001-09-21 Thread Joost v.d. Wijgerd



This 
is not a bug in Jboss, you should close your connections
for 
them to be released back into in the pool. The javadoc for 
java.sql.Connection.close()
says: 
"Releases a Connection's database and JDBC resources immediately instead of 
waiting for them to be automatically released". automatic release will happen 
when the object is garbage collected...

In 
general, you should always be careful with your 
resources

Joost.

  -Original Message-From: Edson Carlos Ericksson 
  Richter [mailto:[EMAIL PROTECTED]]Sent: Friday, September 
  21, 2001 2:57 PMTo: 
  [EMAIL PROTECTED]Subject: Re: [JBoss-user] Error in 
  2.4.1
  Hi! I've discovered the problem. At some point of 
  view, is a JBoss bug too.
  
  What I'm doing wrong is that I never close 
  ResultSet, Statement and Connection. At other side, after reaching limits from 
  my Sybase SQL Server (25 connections), JBoss just freeze in responding any 
  client (neihter Stateless, Statefull nor Entities)...
  
  Thanks,
  
  
  Edson Carlos Ericksson 
  Richter
  Gerente de 
  Projetos
  ECONET Soluções 
  Web
  Distrito Federal - 
  Brasil
  
  
  
- Original Message - 
From: 
Edson Carlos Ericksson Richter 
To: [EMAIL PROTECTED] 

Sent: Wednesday, September 19, 2001 
9:25 PM
Subject: [JBoss-user] Error in 
2.4.1

I'm using JBoss 2.4.1 with Tomcat 3.2.3. I've a 
simple StatefullSession bean that, in some places acts as stateless 
(offering to my pages some services).

I'm using only a method- List 
getCustomersByName( String name ) - that returns an ArrayList of javabens 
containing some data from my customers. The sequence is Search Page - 
submit - getCustomersByName - Results Page. If I go back to Search 
Page and repeat process 20 or more times, JBoss giveme following 
error:

java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: 
	javax.transaction.TransactionRolledbackException: Application Error: tried to enter Stateful bean with different transaction context; nested exception is: 
	java.rmi.RemoteException: Application Error: tried to enter Stateful bean with different transaction context
javax.transaction.TransactionRolledbackException: Application Error: tried to enter Stateful bean with different transaction context; nested exception is: 
	java.rmi.RemoteException: Application Error: tried to enter Stateful bean with different transaction context
java.rmi.RemoteException: Application Error: tried to enter Stateful bean with different transaction context
	at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245)
	at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
	at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
	at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.invoke(Unknown Source)
	at org.jboss.ejb.plugins.jrmp.interfaces.GenericProxy.invokeContainer(GenericProxy.java:357)
	at org.jboss.ejb.plugins.jrmp.interfaces.StatefulSessionProxy.invoke(StatefulSessionProxy.java:136)
	at $Proxy3.getPacientesByCodigo(Unknown Source)
	at cadastroPaciente._0002fcadastroPaciente_0002fLocalizarPaciente_0005f_00030_00032_0002ejspLocalizarPaciente_0005f02_jsp_8._jspService(_0002fcadastroPaciente_0002fLocalizarPaciente_0005f_00030_00032_0002ejspLocalizarPaciente_0005f02_jsp_8.java:153)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.java:130)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:282)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
	at org.apache.tomcat.core.Handler.service(Handler.java:287)
	at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
	at org.apache.tomcat.facade.RequestDispatcherImpl.doForward(RequestDispatcherImpl.java:222)
	at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:162)
	at br.com.econet.ms.portalHIV.cadastroPaciente.controller.LocalizarPaciente_01WebController.action(LocalizarPaciente_01WebController.java:56)
	at br.com.econet.common.controller.WebController.service(WebController.java:80)
	at cadastroPaciente._0002fcadastroPaciente_0002fLocalizarPaciente_0005f_00030_00031_0002ejspLocalizarPaciente_0005f01_jsp_7._jspService(_0002fcadastroPaciente_0002fLocalizarPaciente_0005f_00030_00031_0002ejspLocalizarPaciente_0005f01_jsp_7.java:160)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
	at 

RE: [JBoss-user] How can i see JNDI tree?

2001-09-19 Thread Joost v.d. Wijgerd
Title: RE: [JBoss-user] How can i see JNDI tree?



the 
InitialContext class has functionality to iteratate over the objects 
bound

Joost.

  -Original Message-From: pyliu8621 
  [mailto:[EMAIL PROTECTED]]Sent: Wednesday, September 19, 2001 1:01 
  PMTo: [EMAIL PROTECTED]Subject: Re: 
  [JBoss-user] How can i see JNDI tree?
  I had 
  put all thejar files of $JBOSS/client into classpath, then it is 
  OK.
  
  perhaps 
  some jar file that seem to be not important 
  isindeednecessary.
  
  
  I use 
  jboss2.2.2
  
  In 
  linux, I cannot get http://localhost:1099, 
  the error is that target page cannot be found.
  
  but In 
  windows, I can truly get http://localhost:1099, the result is a page 
  filled with 
  
  disordered characters.
  
  thanks 
  for you all.
  
  
  pylio.
  
  
  =
  Original Message
  
Here is a script that runs on unix to connect the client to 
a JBoss(2.2.2) container. Xerces is used by the test client and is not 
required.
JBOSS=/opt/jboss JBOSS_CLIENT=$JBOSS/client 
java \ -classpath \ 
$CLASSPATH:$JBOSS_CLIENT/jboss-client.jar:$JBOSS_CLIENT/jbosssx-client.jar:$JBOSS_CLIENT/jnp-client.jar:/opt/xerces/xerces.jar 
\
-Djava.naming.provider.url=sundev3.pdsi-software.com:1099 
\ -Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory 
\ -Djava.naming.factory.url.pkgs=org.jboss.naming \ 
$* 
-Original Message- From: 
ALex Loubyansky [mailto:[EMAIL PROTECTED]] Sent: Friday, September 14, 2001 5:49 AM To: 
[EMAIL PROTECTED] Subject: RE: 
[JBoss-user] How can i see JNDI tree? 
 I think, as that 
was mentioned, it would be sufficiently to add to classpath jndi.jar and jnp-client.jar from JBOSS_HOME/client. 

jalex  This is my best 
life 
-Original Message- From: 
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On 
Behalf Of pyliu8621 Sent: Friday, September 14, 2001 
1:02 PM To: [EMAIL PROTECTED] 
Subject: Re: [JBoss-user] How can i see JNDI tree? 

also to Alex: 
I had done, but it doesn't work... when I see http://localhost:1099 this page can not be found 

Does it hint that jndi provider does not work? 

thanks 
 the error is :  
 " Cannot instantiate class: 
org.jnp.interfaces.NamingContextFactory"  

You need to set the class path to jnp-client.jar in 
jboss/client directory 
-- Victor Hadianto Nuix Pty. Ltd. (02) 9283 9010 

___ 
JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-userÿ 
ÿÿÉ,þë®f¢-)à-+-$,³û¬z¿åËlþÊ.Ç¢¸þwÛi³ÿÿ-+-³û(º·~à{ùÞ· 
ùb²Û?-+-wèþ6è²Ïî 
___ 
JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user 



RE: [JBoss-user] EJB Entity design question: Can ejbRemove() be used to modify a row in the DB?

2001-09-19 Thread Joost v.d. Wijgerd

Hi,

If you are using BMP this is perfectly valid, then in the
ejbFindByPrimaryKey
you throw an ObjectNotFoundException when the obsolete_indicator
column says Y

Joost.

-Original Message-
From: Adam Lipscombe [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 18, 2001 1:45 PM
To: JBoss User Mailing List
Subject: [JBoss-user] EJB Entity design question: Can ejbRemove() be
used to modify a row in the DB?


Folks,


I have several entity EJB's that model database tables.
Rows in the tables are never physically deleted, but rather they are
logically deleted by setting a obsolete_indicator column Y.

Can I use ejbRemove() to simply modify the row (setting this flag to
Y) or
will this break application server caching? Are there any other reasons
why
I should not use ejbRemove()?


Thanks in advance


Adam


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] NPE: org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl - Oracle8i and JBoss2.4.0

2001-09-19 Thread Joost v.d. Wijgerd
Title: 



Paul,

I've 
seen this error before, it usually indicates that the connection to the 
databasecannot be made for one
reason, so check your database setup and you 
password/username - configuration looks
alright.

Joost.

  -Original Message-From: Paul McLachlan 
  [mailto:[EMAIL PROTECTED]]Sent: Wednesday, September 19, 2001 2:08 
  AMTo: [EMAIL PROTECTED]Subject: 
  [JBoss-user] NPE: org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl - Oracle8i 
  and JBoss2.4.0
  Thanks Dragos, I wish that were enough .
  
  My setup 
  is currently:
  
   
  mbean code="org.jboss.jdbc.JdbcProvider" 
  name="DefaultDomain:service=JdbcProvider" 
  attribute 
  name="Drivers"oracle.jdbc.driver.OracleDriver/attribute 
  /mbean
  
   
  mbean code="org.jboss.jdbc.XADataSourceLoader" 
  name="DefaultDomain:service=XADataSource,name=OracleDS" 
  attribute 
  name="PoolName"OracleDS/attribute 
  attribute 
  name="DataSourceClass"org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl/attribute 
  attribute 
  name="URL"jdbc:oracle:thin:@localhost:1521:jbossb/attribute 
  attribute name="JDBCUser"xxx/attribute 
  attribute name="Password"yyy/attribute 
  /mbean
  I have 
  the drivers in classes12.zip in lib/ext
  
  I still 
  get an NPE at 
  
  
  [XADataSourceLoader] 
  Stoppedjava.lang.NullPointerException 
  at 
  org.jboss.pool.jdbc.xa.XAPoolDataSource.getConnection(XAPoolDataSource.java:178)
  
  I 
  cannot afford to spend anymore time on this, I never thought at this stage of 
  the project I would run into an issue like this. Unbelievable. Luckily I have 
  convinced my boss that HypersonicDB will suffice for now until a future 
  release.
  
  Paul.
  
-Original Message-From: Dragos Haiduc 
[mailto:[EMAIL PROTECTED]]Sent: Monday, 17 September 2001 
6:14 PMTo: [EMAIL PROTECTED]Subject: 
AW: [JBoss-user] Class Not Found Exception: 
org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl
I 
am using JBoss2.4.0_Jetty-3.1RC8-1, but as DB i'm using Postgre, not 
Oracle8.

This is my jboss.jcml entry for my DB connection 
pool:


!--PostgreSQL connection pool --
mbean code="org.jboss.jdbc.XADataSourceLoader" name="DefaultDomain:service=XADataSource,name=PostgreSQLDS"
attribute name="PoolName"PostgreSQLDS/attribute
attribute name="DataSourceClass"org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl/attribute
attribute name="URL"jdbc:postgresql://localhost:5432/play_with_ejbs/attribute
attribute name="JDBCUser"tog/attribute
attribute name="Password"secret/attribute
/mbean

  -Ursprüngliche Nachricht-Von: 
  [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED]]Im Auftrag von Paul 
  McLachlanGesendet: Montag, 17. September 2001 
  09:10An: [EMAIL PROTECTED]Betreff: 
  RE: [JBoss-user] Class Not Found Exception: 
  org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl
  Yes, it is.
  
  What version of JBoss are you using. I am using 
  2.4.0
  
  Paul.
  
-Original Message-From: Dragos Haiduc 
[mailto:[EMAIL PROTECTED]]Sent: Monday, 17 September 
2001 4:41 PMTo: 
[EMAIL PROTECTED]Subject: [JBoss-user] Class 
Not Found Exception: 
org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl
Paul, i was getting this NPE when trying to connect from JBoss to 
a stopped DB system(Postgre).
Is ur Oracle up and running?


  -Ursprüngliche Nachricht-Von: 
  [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED]]Im Auftrag von 
  Paul McLachlanGesendet: Montag, 17. September 2001 
  01:17An: 
  [EMAIL PROTECTED]Betreff: RE: [JBoss-user] 
  Class Not Found Exception: 
  org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl
  Thanks Dragos, this answer looked promising 
  butI get a NPE!
  
  
  [XADataSourceLoader] 
  Stoppedjava.lang.NullPointerException 
  at 
  org.jboss.pool.jdbc.xa.XAPoolDataSource.getConnection(XAPoolDataSource.java:178)
  
  Surely someone out there must know how to use 
  JBoss 2.4 and Oracle8!
  
  
This is the class you should use in the jboss.jcml 
file in JBoss 2.4 for DataSource creation , not the one mentioned by 
you:org.jboss.pool.jdbc.xa.wrapper.XADataSourceImplBest,
Dragos