Re: [JBoss-user] Blind Lookup

2001-05-15 Thread Lucian Bargaoanu


Well, just to test i've written a simple client which does

  try {
System.setSecurityManager(new
java.rmi.RMISecurityManager());
  }
  catch (java.rmi.RMISecurityException exc) {
  System.err.println("Security violation " + exc.toString());
  }
 Context ctx = getInitialContext();//standard stuff
 Object refEJB=ctx.lookup("FirstBean");

I need this client to be ignorant about FirstBeanHome. It works just as it
is on the host with JBoss ( first JBoss ).
It doesn't work on another host: java.lang.ClassNotFoundException:
FirstBeanPackage.FirstBeanHome.
On this other host I need to have JBoss installed ( second JBoss ). Probably
from within a service of this other
JBoss instance I will eventually do the loookup ( an alternative would be to
do it from an mobile agent (IBM aglet)
which arrives at this second host, so still a remote client ). But not yet.
I've read about the bug in JBoss (reported as item #424287) some time ago
and I thought that it might be the cause.
But I was troubled by the fact that it didn't work even when I've set
java.rmi.server.codebase to the path
of the jar with the bean on the first JBoss. A file:// path which is in the
local network so it is reachable from the second JBoss.

If you're not bored yet, the bigger picture.
A client makes a request for a bean to a JBoss instance ( through a custom
JNDI ). This one sends a mobile agent to
a few JBoss fellows to ask them about this name. The agent returns with a
list of servers wich have the name and
server load information. The first JBoss chooses a server based on the load
information and does a lookup to
return the reference to the client ( through the custom JNDI ). I cannot
have one JBoss instance knowing about
all the home interfaces of all its JBoss fellows.

- Original Message -
From: "Alexander Kogan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 16, 2001 12:53 AM
Subject: Re: [JBoss-user] Blind Lookup


>
>
>
> Lucian Bargaoanu wrote:
> >
> > Thanks, actually this is more than I need. I just need to return the
result
> > of  lookup.
> > I've succeeded to do that locally, but from another host it doesn't
work.
> > I did set a security manager.
>
> If by "from another host" you meant "from another jboss instance", that
> is
> a bug. I experienced it a few month ago and recently it was discovered
> and
> filed as "the bug" at sourceforge.
>
> From other side, if you were talking about a "client" on another host, it
> should
> work. At least for me.
>
> Tell us, what are you exactly doing.
>
>
>
> >
> > //Lucian,
> > //
> > //it's not legal, according to spec, but it works in jboss:
> >
> > //try
> > //{
> > //Object home = context.lookup(componentName);
> > //Method createMethod = home.getClass().getMethod("create",
> > //null);
> >
> > //Object component = createMethod.invoke(home, null);
> > //}
> > //catch (NamingException ne) {}
> >
> > //and don't forget to set a SecurityManager.
> >
> > //good luck.
> >
> > //Lucian Bargaoanu wrote:
> > >
> > > I need to look up a bean without knowing about it's home interface.
> > > Can i do that? I tried and it tells me that it cannot find the home
> > > interface.
> > > Can't i download somehow that .class file from the server?
> > > Maybe with the RMI classloader.
> > >
> > > Sorry if this is a silly question.
> > >
> > > ___
> > > JBoss-user mailing list
> > > [EMAIL PROTECTED]
> > > http://lists.sourceforge.net/lists/listinfo/jboss-user
> >
> > --
> > __
> > Alexander Kogan  PTC   www.ptc.com
> > [EMAIL PROTECTED]140 Kendrick St. Needham MA 02494



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



RE: [JBoss-user] java.lang.Illegal.Argument Exception : object is not instance of the class

2001-05-15 Thread Vincent Harcq

I am pretty sure there is a problem in the instances pool somewhere, I also
receive something similar to that.
The trick is tio call any dummy remote method before calling remove.
Please help me figure out what happen :
Do you play with 2 session beans in 2 different ejb jar here ?
Thanks.

> -Message d'origine-
> De : [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]De la part de Russell
> Envoye : mercredi 16 mai 2001 7:02
> A : [EMAIL PROTECTED]
> Objet : Re: [JBoss-user] java.lang.Illegal.Argument Exception : object
> is not instance of the class
>
>
> Hi Toby ,  Thanks
>
>   The complete exception is below :
>
>  java.rmi.ServerException: RemoteException occurred in server thread;
> nested exception is:
>   javax.transaction.TransactionRolledbackException: Load
> failed; nested
> exception is:
>   java.lang.IllegalArgumentException: object is not an instance of
> declaring class; nested exception is:
>   java.rmi.ServerException: Load failed; nested exception is:
>   java.lang.IllegalArgumentException: object is not an instance of
> declaring class; nested exception is:
>   javax.transaction.TransactionRolledbackException: Load
> failed; nested
> exception is:
>   java.lang.IllegalArgumentException: object is not an instance of
> declaring class; nested exception is:
>   java.rmi.ServerException: Load failed; nested exception is:
>   java.lang.IllegalArgumentException: object is not an instance of
> declaring class
> javax.transaction.TransactionRolledbackException: Load failed; nested
> exception is:
>   java.lang.IllegalArgumentException: object is not an instance of
> declaring class; nested exception is:
>   java.rmi.ServerException: Load failed; nested exception is:
>   java.lang.IllegalArgumentException: object is not an instance of
> declaring class; nested exception is:
>   javax.transaction.TransactionRolledbackException: Load
> failed; nested
> exception is:
>   java.lang.IllegalArgumentException: object is not an instance of
> declaring class; nested exception is:
>   java.rmi.ServerException: Load failed; nested exception is:
>   java.lang.IllegalArgumentException: object is not an instance of
> declaring class
> javax.transaction.TransactionRolledbackException: Load failed; nested
> exception is:
>   java.lang.IllegalArgumentException: object is not an instance of
> declaring class; nested exception is:
>   java.rmi.ServerException: Load failed; nested exception is:
>   java.lang.IllegalArgumentException: object is not an instance of
> declaring class
> java.rmi.ServerException: Load failed; nested exception is:
>   java.lang.IllegalArgumentException: object is not an instance of
> declaring class
> java.lang.IllegalArgumentException: object is not an instance of
> declaring class
>   at
> sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Str
> eamRemoteCall.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.StatelessSessionProxy.invoke
> (StatelessSessionProxy.java:188)
>   at $Proxy1.adminDeleteCompany(Unknown Source)
>   at
> com.cesma.ecommerce.pmg.pmgprocess.Untitled1.main(Untitled1.java:38)
>
>
>
>
> Toby Allsopp wrote:
> >
> > On Wed, May 16, 2001 at 11:21:57AM +0800, Russell wrote:
> > >
> > >  Hi all ,
> > >
> > >I am using jBoss2.1 , jdk1.3 and Tomcat3.2.1.
> > >
> > >When i tried to remove entity , i have the error below :
> > >
> > > java.lang.Illegal.Argument Exception : object is not
> instance of the
> > > class...
> >
> > Please, when reporting exceptions, use copy and paste and include THE
> > ENTIRE STACKTRACE.  Sorry for shouting, but this really gets on ones
> > nerves after a while.
> >
> > >And the code is :
> > >
> > >   Remote r = home.findByPrimaryKey(new HomePK(3));
> > >   r.remove() --> error here.
> >
> > That looks reasonable to me.  The complete stacktrace might shed some
> > more light on the matter.
> >
> > Toby.
> >
> > >   Anybody have any idea why like that ?? Is this a bug in jboss ??
> >
> > ___
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/jboss-user
>
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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



Re: [JBoss-user] Velocity & JBoss

2001-05-15 Thread leigh

Dear Toby,

Thank you for your reply.

Here is my content from velocity.properties

-
resource.loader = classpath
classpath.resource.loader.class = 
org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
file.resource.loader.path = .

-
I made a template.jar under WEB-INF/lib.

But it still does not work.

Any special path need to reference in getTemplate?

I look forward to hearing from you.

Best Regards
Leigh





-Original Message-
From: "toby cabot" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Date: Tue, 15 May 2001 17:26:52 -0400 (EDT)
Subject: Re: [JBoss-user] Velocity & JBoss

> > I use Velocity as my web interface and JBoss as J2EE.
> 
> > Where is the root directory relative to servelet running by JBoss &
> > Tomcat?
> 
> I believe that it's the directory where you are when you run jboss.
> 
> > Anyone knows how to solve it?
> 
> I use Velocity's classpath resource loader.  Jar up your templates,
> drop
> the jar into the lib directory of your war file, and add:
> 
> resource.loader = classpath
> classpath.resource.loader.class =
> org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
> 
> to WEB-INF/conf/velocity.properties.
> 
> HTH,
> Toby
> 
> 
> 
> 
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
> 



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



Re: [JBoss-user] java.lang.Illegal.Argument Exception : object is not instance of the class

2001-05-15 Thread Russell

Hi Toby ,  Thanks
   
  The complete exception is below :  

 java.rmi.ServerException: RemoteException occurred in server thread;
nested exception is: 
javax.transaction.TransactionRolledbackException: Load failed; nested
exception is: 
java.lang.IllegalArgumentException: object is not an instance of
declaring class; nested exception is: 
java.rmi.ServerException: Load failed; nested exception is: 
java.lang.IllegalArgumentException: object is not an instance of
declaring class; nested exception is: 
javax.transaction.TransactionRolledbackException: Load failed; nested
exception is: 
java.lang.IllegalArgumentException: object is not an instance of
declaring class; nested exception is: 
java.rmi.ServerException: Load failed; nested exception is: 
java.lang.IllegalArgumentException: object is not an instance of
declaring class
javax.transaction.TransactionRolledbackException: Load failed; nested
exception is: 
java.lang.IllegalArgumentException: object is not an instance of
declaring class; nested exception is: 
java.rmi.ServerException: Load failed; nested exception is: 
java.lang.IllegalArgumentException: object is not an instance of
declaring class; nested exception is: 
javax.transaction.TransactionRolledbackException: Load failed; nested
exception is: 
java.lang.IllegalArgumentException: object is not an instance of
declaring class; nested exception is: 
java.rmi.ServerException: Load failed; nested exception is: 
java.lang.IllegalArgumentException: object is not an instance of
declaring class
javax.transaction.TransactionRolledbackException: Load failed; nested
exception is: 
java.lang.IllegalArgumentException: object is not an instance of
declaring class; nested exception is: 
java.rmi.ServerException: Load failed; nested exception is: 
java.lang.IllegalArgumentException: object is not an instance of
declaring class
java.rmi.ServerException: Load failed; nested exception is: 
java.lang.IllegalArgumentException: object is not an instance of
declaring class
java.lang.IllegalArgumentException: object is not an instance of
declaring class
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.StatelessSessionProxy.invoke(StatelessSessionProxy.java:188)
at $Proxy1.adminDeleteCompany(Unknown Source)
at com.cesma.ecommerce.pmg.pmgprocess.Untitled1.main(Untitled1.java:38)




Toby Allsopp wrote:
> 
> On Wed, May 16, 2001 at 11:21:57AM +0800, Russell wrote:
> >
> >  Hi all ,
> >
> >I am using jBoss2.1 , jdk1.3 and Tomcat3.2.1.
> >
> >When i tried to remove entity , i have the error below :
> >
> > java.lang.Illegal.Argument Exception : object is not instance of the
> > class...
> 
> Please, when reporting exceptions, use copy and paste and include THE
> ENTIRE STACKTRACE.  Sorry for shouting, but this really gets on ones
> nerves after a while.
> 
> >And the code is :
> >
> >   Remote r = home.findByPrimaryKey(new HomePK(3));
> >   r.remove() --> error here.
> 
> That looks reasonable to me.  The complete stacktrace might shed some
> more light on the matter.
> 
> Toby.
> 
> >   Anybody have any idea why like that ?? Is this a bug in jboss ??
> 
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user

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



Re: [JBoss-user] java.lang.Illegal.Argument Exception : object is not instance of the class

2001-05-15 Thread Toby Allsopp

On Wed, May 16, 2001 at 11:21:57AM +0800, Russell wrote:
> 
>  Hi all , 
> 
>I am using jBoss2.1 , jdk1.3 and Tomcat3.2.1.
> 
>When i tried to remove entity , i have the error below :
> 
> java.lang.Illegal.Argument Exception : object is not instance of the
> class...

Please, when reporting exceptions, use copy and paste and include THE
ENTIRE STACKTRACE.  Sorry for shouting, but this really gets on ones
nerves after a while.

>And the code is :
> 
>   Remote r = home.findByPrimaryKey(new HomePK(3));
>   r.remove() --> error here.

That looks reasonable to me.  The complete stacktrace might shed some
more light on the matter.

Toby.

>   Anybody have any idea why like that ?? Is this a bug in jboss ?? 

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



[JBoss-user] java.lang.Illegal.Argument Exception : object is not instance of theclass

2001-05-15 Thread Russell


 Hi all , 

   I am using jBoss2.1 , jdk1.3 and Tomcat3.2.1.

   When i tried to remove entity , i have the error below :

java.lang.Illegal.Argument Exception : object is not instance of the
class...

   And the code is :

  Remote r = home.findByPrimaryKey(new HomePK(3));
  r.remove() --> error here.

  Anybody have any idea why like that ?? Is this a bug in jboss ?? 


 Thanks

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



[JBoss-user] JBoss/Jetty/JAAS Woes!

2001-05-15 Thread Han-Shen Yuan
Title: JBoss/Jetty/JAAS Woes!





I've seen this question posted, but alas no answers.


Per the instructions at http://www.jboss.org/documentation/HTML/ch11s78.html, I have been able to secure my Jboss beans using a stand-alone java program.

However, copying the exact same code into a servlet hosted by my jboss-jetty configuration (a stock configuration distributed on the Jboss site), it fails to work!   The behavior that I'm noticing is that the "ClientLoginModule" is called as in the case with the stand-alone class, _but_the_server_side_LoginModule_is_NEVER_ called when run in this combination.

I have tried the following:


1) Running bean and servlet in the same ear file
2) Running bean and servlet in separate ear files
3) Setting servlet java.security.auth.login.config to point to the SERVER auth file instead of the client (In this case, the server side login module is called, but the principal and roles are not passed to the bean).

If any of you have any ideas as to what might be happening, I would appreciate it greatly.  We really would like to run JBoss/Jetty in a production environment, but this problem is hampering that initiative.

Thanks in advance!


Han Yuan





Re: [JBoss-user] XADataSourceLoader

2001-05-15 Thread David Jencks

Hi,
I found this problem back in early march and submitted a patch by email. 
Apparently in the move to sourceforge it got lost.  I've resubmitted it to
the sourceforge patch page. Patch # is 424399. Christian, you might add the
bug # to the patch if you submit a bug.  This patch is against 2.3 cvs but
the same modifications worked with 2.1.

My theory is that if you stop a XADatasource, you want a new copy when you
restart it.  At least the pools don't seem to be amenable to
reconfiguration.  So my fix frees the old source when the mbean is stopped,
and a new one is created when the mbean is restarted. Also, if the
connection can't be established when the pool is initialized, it's freed so
you can change the configuration and try again without restarting the
server. 

Thanks
david jencks

On 2001.05.15 15:39:16 -0400 Toby Allsopp wrote:
> On Tue, May 15, 2001 at 01:35:22PM +0200, Christian Biasuzzi wrote:
> > Hi,
> >  I'm playing with the latest jboss CVS snapshot
> > and I found yesterday that I'm not able to restart a XADataSource
> > MBean (the DefaultDS, for example) after having stopped it
> > 
> >  here follows my log:
> > 
> > [DefaultDS] java.lang.NullPointerException
> > [DefaultDS] at
> > org.jboss.pool.jdbc.xa.XAPoolDataSource.setPoolName(XAPoolDataSource.java:96)
> > 
> > [DefaultDS] at
> > org.jboss.jdbc.XADataSourceLoader.startService(XADataSourceLoader.java:267)
> > 
> > [DefaultDS] at
> > org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:101)
> > [DefaultDS] at java.lang.reflect.Method.invoke(Native Method)
> > [DefaultDS] at
> > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
> > 
> >.
> > 
> >   If  I put a
> > 
> >  source = null;
> > 
> >  at the end of stopService() in XADataSourceLoader class
> >   (actually forcing the creation of a new XADataSource) everything runs
> > fine, but I'm not sure this is the
> >   right thing to do
> 
> Please log this as a bug on SourceForge.  I'll have a look at it at some
> point
> if no one else does.
> 
> Thanks,
> 
> Toby.
> 
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
> 


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



Re: [JBoss-user] Blind Lookup

2001-05-15 Thread Alexander Kogan

Hi,

Toby Allsopp wrote:
> 
> Yes, in the more dynamic case, where you are discovering the other beans
> at runtime, this won't apply.  I can't personally think of a good reason
> for doing this off the top of my head, but there's no reason not to just
> use plain JNDI names in that case, IMO.

FYEO (For your eyes only) I'll give you an example - it's the
simplification
of our project.

Pretend that you have a "distributed workflow framework" where each
activity 
is a session bean (maybe from another server) with only one "business"
method run(). 
This method receives String as an input and returns String as a result.
And all activities have to implement this pretty simple RunInterface.

Now to the point. The framework allows users to add/remove/rent/whatever 
their own activities at run-time. By add/remove I mean "deploy/undeploy"
in our case.
For each client, this framework produced statefull session bean
"WorkFlowRunner".
The runner received a workflow descriptor and has to look up all
activities (from that descriptor) 
and run a given workflow. It doesn't have a clue what kind of activities
the user
wants and can use.

Sorry, if I didn't make myself clear. English is not my major.

> 
> I don't know if it will work either.  If you need to make these decisions
> at runtime rather than at deployment time then the deployment descriptor
> is probably not the best mechanism and the spec be damned.

Perhaps it's not. I'm about to slightly change the architecture and have
the activities either as plain java classes (to be wrapped in JMX
service)
or as JMX services itself. The container task will be run them and 
correctly keep results, user/account information and some other DB/TX
crap.

-- 
__
Alexander Kogan  PTC   www.ptc.com
[EMAIL PROTECTED]140 Kendrick St. Needham MA 02494

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



Re: [JBoss-user] Adding JDBC-driver

2001-05-15 Thread Ivan

I am assuming that you actually put the class for your driver not
[MyDriverClass]

also you dont want 2 tags like below just 1 that lists all your drivers.  I
am assuming you adding to or edited the existing tag and did not create a
second one

  
 org.gjt.mm.mysql.Driver,org.hsql.jdbcDriver,org.enhydra.insta
ntdb.jdbc.idbDriver
  

Ivan
- Original Message -
From: "Bas Cancrinus" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 15, 2001 1:05 PM
Subject: Re: [JBoss-user] Adding JDBC-driver


> Dovan Nguyen wrote:
>
> >I believe you need to add your jdbc driver class in the mbean entry
attribute
> >name="Drivers" in the jboss.jcml
> >
> >dovan
> >
> I added
>
> 
>  [MyDriverClass]
> 
>
> just like in the manual. Any suggestions?
>
>
> Bas
>
> --
> Bas E. Cancrinus <[EMAIL PROTECTED]>
> Product Manager RepTrack (TM) 
> Developer Cancrinus Search 
>
>
>
>
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user


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



Re: [JBoss-user] RE: Error 'closing' a pooled connection (addendum)

2001-05-15 Thread Toby Allsopp

On Tue, May 15, 2001 at 04:11:27PM -0700,  wrote:
> > > 4) *** RMI ServerException Stack Trace ( this is thrown and the
> connection
> > > is NOT returned to the pool )
> > > This is thrown when I try to call DatabaseUtility.closeConnection(
> > > connection ); (notice I catch _everything_ in that method) and is _not_
> > > thrown in the DatabaseUtility, but seems like it is thrown on the
> attempt to
> > > call the method.
> > > java.rmi.ServerException: Transaction rolled
> > > back:com/bebee/recommender/utility/DatabaseUtility
> > > at
> org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:300)
> >
> > Ok, you're missing out some details.  Are you calling an EJB from a
> servlet?
> >
> > You haven't mentioned anything about what this EJB is doing.  What are you
> > doing with transactions?  Are you getting the connection in the servlet
> > and trying to close it from the EJB or something?
> 
> 
> A servlet calls the bean it only passes primitive types (int, float, etc)
> into the bean, the bean gets its own connections from the pool and closes
> everything itself - the servlet simply determines which bean to call and
> gets form parameters to pass into the bean, the results are returned from
> the bean and are formatted into HTML to display them. The results may be Map
> objects, or primitive types

Ok, that should be fine.

> This is, in fact not a transactional bean. All it does is retrieves data
> from the database and shoves it into a Map to return. It is a session bean
> because some of the lookups are a little complex (do not map directly to a
> table)  -- and some of them require multiple row lookups - which you cannot
> do with entity beans.

Looking at the TxInterceptorBMT code, I suspect that you are getting a
NoClassDefFoundError for the DatabaseUtility class.  Do you have that class
in your ejb-jar?

Try catching Throwable around the call to DatabaseUtility and printing the
stacktrace.

Toby.

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



Re: [JBoss-user] Various DB problems (with CMP)

2001-05-15 Thread Damon Hart-Davis

Peter Fagerlund wrote:
> 
> > 3) Even if I keep records shorter than 32kBytes, if I undeploy and
> > redeploy the same (unchanged) EAR, on trying to read some entity beans
> > back into memory, they are reported as corrupt, `not containing
> > serializable data' in some ByteArray deserialisation routine inside
> > Hypersonic itself I think.  This means I usually have to reload lots of
> > data each time I make even the most minor change to my EAR, which is
> > very sad.  All data is loaded through Java with no access by anyone
> > else.
> 
> 3) If I understand - U might want to have a separate instance of hypersonic
> running alongside - and use that - the separate instance for storing and the
> embedded jboss instance for smaller "indexes" (of indexes - perhaps) - just
> a thought ...

Hi,

I'd like to to use the built-in Hypersonic if at all possible.

If not, I'll put everything in an external database.

Regards,

Damon
-- 
Work: [EMAIL PROTECTED]http://www.jWorkers.com/
Idle: [EMAIL PROTECTED] http://d.hd.org/
Tel: +44 20 8296 5566 / 5577 (fax 5578)

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



Re: [JBoss-user] RE: Error 'closing' a pooled connection (addendum)

2001-05-15 Thread

> Don't reference Minerva classes in your code.  Just use
javax.sql.DataSource.
> Also, you should use java:comp/env/ lookups, but that's not relevent here.


ok. good point.


>
> > 4) *** RMI ServerException Stack Trace ( this is thrown and the
connection
> > is NOT returned to the pool )
> > This is thrown when I try to call DatabaseUtility.closeConnection(
> > connection ); (notice I catch _everything_ in that method) and is _not_
> > thrown in the DatabaseUtility, but seems like it is thrown on the
attempt to
> > call the method.
> > java.rmi.ServerException: Transaction rolled
> > back:com/bebee/recommender/utility/DatabaseUtility
> > at
org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:300)
>
> Ok, you're missing out some details.  Are you calling an EJB from a
servlet?
>
> You haven't mentioned anything about what this EJB is doing.  What are you
> doing with transactions?  Are you getting the connection in the servlet
> and trying to close it from the EJB or something?
>


A servlet calls the bean it only passes primitive types (int, float, etc)
into the bean, the bean gets its own connections from the pool and closes
everything itself - the servlet simply determines which bean to call and
gets form parameters to pass into the bean, the results are returned from
the bean and are formatted into HTML to display them. The results may be Map
objects, or primitive types

This is, in fact not a transactional bean. All it does is retrieves data
from the database and shoves it into a Map to return. It is a session bean
because some of the lookups are a little complex (do not map directly to a
table)  -- and some of them require multiple row lookups - which you cannot
do with entity beans.

my ejb-jar.xml reads as follows: basically straight from the interest
example:

...cut out ...

  AVR
  com.bebee.recommender.client.ejb.interfaces.AVRHome

com.bebee.recommender.client.ejb.interfaces.AVRInterface

com.bebee.recommender.client.ejb.bean.xaction.AVRBean
Stateless
Bean// my understanding is
that this mean I will handle transactions, if any

... cut out ...


> > 5) *** NullPointerException stack trace (sorry for the log format) this
is
> > thrown on the preparedStatement.close() call inside the bean at the end
of
> > the transaction (which is directly after the call to
connection.close() --
> > when I change the order of the calls, i.e. first close the prepared
> > statement then close the connection it works fine)
>
> This is a bug.  I'll look at this kind of fragility at some point.
>
> Toby.


Thanks Toby!
scott


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


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



Re: [JBoss-user] RE: Error 'closing' a pooled connection (addendum)

2001-05-15 Thread Toby Allsopp

On Tue, May 15, 2001 at 03:53:22PM -0700, Dovan Nguyen wrote:
> > > 2) *** CONNECTION CREATION
> > >InitialContext jndiContext = new InitialContext();
> > >XAPoolDataSource ds = (XAPoolDataSource)
> > > jndiContext.lookup("java:/OracleDS");
> > >Connection conn = ds.getConnection();
> >
> > Don't reference Minerva classes in your code.  Just use javax.sql.DataSource.
> 
> If you don't reference to Minerva class, could you tell us what is the alternative to
> cast the objref in PortableRemoteObject.narrow( objref, ? ) method ?

Cast it to whatever you expect.  If you're looking up a DataSource, use
javax.sql.DataSource because that's the interface you want.

Toby.

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



Re: [JBoss-user] RE: Error 'closing' a pooled connection (addendum)

2001-05-15 Thread

I think I had ClassCastExceptions back when I first started with these pools
and datasource lookups and the first fix I found was to use the Minerva
specific class, but I just changed my code to this and it works fine:

public class UPRBean implements SessionBean
{
 transient DataSource ds = null;

public void aMethod()
{
 InitialContext jndiContext = new InitialContext();
 ds = (DataSource) jndiContext.lookup("java:/OracleDS");
}
}

of course, as Toby said:

> Also, you should use java:comp/env/ lookups

- Original Message -
From: "Dovan Nguyen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 15, 2001 3:53 PM
Subject: Re: [JBoss-user] RE: Error 'closing' a pooled connection (addendum)


> > > 2) *** CONNECTION CREATION
> > >InitialContext jndiContext = new InitialContext();
> > >XAPoolDataSource ds = (XAPoolDataSource)
> > > jndiContext.lookup("java:/OracleDS");
> > >Connection conn = ds.getConnection();
> >
> > Don't reference Minerva classes in your code.  Just use
javax.sql.DataSource.
>
> If you don't reference to Minerva class, could you tell us what is the
alternative to
> cast the objref in PortableRemoteObject.narrow( objref, ? ) method ?
>
> dovan
>
>
> >
> >
> > Also, you should use java:comp/env/ lookups, but that's not relevent
here.
> >
> > > 3) *** static methods for closing rs/conn/stmt  ( I will place the
entire
> > > class here -- sorry if the readability is a little bad, tried to
crunch it
> > > all in )
> > > import java.sql.*;
> > > public class DatabaseUtility {
> >
> > Looks fine.
> >
> > > 4) *** RMI ServerException Stack Trace ( this is thrown and the
connection
> > > is NOT returned to the pool )
> > > This is thrown when I try to call DatabaseUtility.closeConnection(
> > > connection ); (notice I catch _everything_ in that method) and is
_not_
> > > thrown in the DatabaseUtility, but seems like it is thrown on the
attempt to
> > > call the method.
> > > java.rmi.ServerException: Transaction rolled
> > > back:com/bebee/recommender/utility/DatabaseUtility
> > >   at
org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:300)
> >
> > Ok, you're missing out some details.  Are you calling an EJB from a
servlet?
> >
> > You haven't mentioned anything about what this EJB is doing.  What are
you
> > doing with transactions?  Are you getting the connection in the servlet
> > and trying to close it from the EJB or something?
> >
> > > 5) *** NullPointerException stack trace (sorry for the log format)
this is
> > > thrown on the preparedStatement.close() call inside the bean at the
end of
> > > the transaction (which is directly after the call to
connection.close() --
> > > when I change the order of the calls, i.e. first close the prepared
> > > statement then close the connection it works fine)
> >
> > This is a bug.  I'll look at this kind of fragility at some point.
> >
> > Toby.
> >
> > ___
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/jboss-user
>
>
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user


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



Re: [JBoss-user] RE: Error 'closing' a pooled connection (addendum)

2001-05-15 Thread Dovan Nguyen

> > 2) *** CONNECTION CREATION
> >InitialContext jndiContext = new InitialContext();
> >XAPoolDataSource ds = (XAPoolDataSource)
> > jndiContext.lookup("java:/OracleDS");
> >Connection conn = ds.getConnection();
>
> Don't reference Minerva classes in your code.  Just use javax.sql.DataSource.

If you don't reference to Minerva class, could you tell us what is the alternative to
cast the objref in PortableRemoteObject.narrow( objref, ? ) method ?

dovan


>
>
> Also, you should use java:comp/env/ lookups, but that's not relevent here.
>
> > 3) *** static methods for closing rs/conn/stmt  ( I will place the entire
> > class here -- sorry if the readability is a little bad, tried to crunch it
> > all in )
> > import java.sql.*;
> > public class DatabaseUtility {
>
> Looks fine.
>
> > 4) *** RMI ServerException Stack Trace ( this is thrown and the connection
> > is NOT returned to the pool )
> > This is thrown when I try to call DatabaseUtility.closeConnection(
> > connection ); (notice I catch _everything_ in that method) and is _not_
> > thrown in the DatabaseUtility, but seems like it is thrown on the attempt to
> > call the method.
> > java.rmi.ServerException: Transaction rolled
> > back:com/bebee/recommender/utility/DatabaseUtility
> >   at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:300)
>
> Ok, you're missing out some details.  Are you calling an EJB from a servlet?
>
> You haven't mentioned anything about what this EJB is doing.  What are you
> doing with transactions?  Are you getting the connection in the servlet
> and trying to close it from the EJB or something?
>
> > 5) *** NullPointerException stack trace (sorry for the log format) this is
> > thrown on the preparedStatement.close() call inside the bean at the end of
> > the transaction (which is directly after the call to connection.close() --
> > when I change the order of the calls, i.e. first close the prepared
> > statement then close the connection it works fine)
>
> This is a bug.  I'll look at this kind of fragility at some point.
>
> Toby.
>
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user


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



RE: [JBoss-user] Minerva and ResultSet MetaData Bug?

2001-05-15 Thread Rick Gibbs

Bummer, that means it might be my driver.  I'm using PostgreSQL.

Thanks!

| -Original Message-
| From: [EMAIL PROTECTED]
| [mailto:[EMAIL PROTECTED]]On Behalf Of 
| Sent: Tuesday, May 15, 2001 6:26 PM
| To: [EMAIL PROTECTED]
| Subject: Re: [JBoss-user] Minerva and ResultSet MetaData Bug?
|
|
| I just did the following and it worked fine with Minerva Pools and Oracle
|
|
|Connection conn = datasource.getConnection();
|conn.setAutoCommit( true );
|PreparedStatement pstmt = conn.prepareStatement( query );
|ResultSet rs = pstmt.executeQuery();
|
|boolean anyresults = false;
|System.out.println( rs.getClass() );
|ResultSetMetaData md = rs.getMetaData();
|System.out.println( "COL COUNT=" + md.getColumnCount() );
|... blah...
|
| and get:
|
| [AVR] class org.opentools.minerva.jdbc.ResultSetInPool
| [AVR] COL COUNT=2
|
|
| not sure what might cause that problem (one of the few I have not run into
| ;)
|
| sorry
| scott
|
|
| - Original Message -
| From: "Rick Gibbs" <[EMAIL PROTECTED]>
| To: <[EMAIL PROTECTED]>
| Sent: Tuesday, May 15, 2001 3:00 PM
| Subject: [JBoss-user] Minerva and ResultSet MetaData Bug?
|
|
| >
| > We are getting the following exception when we try to access the
| ResultSet's
| > metadata:
| >
| > ResultSetMetaData md = rs.getMetaData();
| > int columnCount = md.getColumnCount();
| >
| > Stack Trace: java.sql.SQLException: ResultSet has been closed!
| >   at
| >
| org.opentools.minerva.jdbc.ResultSetInPool.getMetaData(ResultSetIn
| Pool.java:
| > 542)
| >   at
| >
| com.earthcars.core.dao.BaseDAO.constructResultFromResultSet(BaseDA
| O.java:131
| > )
| >   at com.earthcars.core.dao.BaseDAO.execute(BaseDAO.java:113)
| >
| > We aren't closing the ResultSet until after this piece of code but it
| seems
| > that Minerva is doing that before we get a chance to get the metadata.
| Has
| > anyone else seen this or expirenced problems with Minerva and metadata?
| >
| > Thanks,
| >
| >
| > Rick
| >
| >
| > ___
| > JBoss-user mailing list
| > [EMAIL PROTECTED]
| > http://lists.sourceforge.net/lists/listinfo/jboss-user
|
|
| ___
| JBoss-user mailing list
| [EMAIL PROTECTED]
| http://lists.sourceforge.net/lists/listinfo/jboss-user
|


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



Re: [JBoss-user] RE: Error 'closing' a pooled connection (addendum)

2001-05-15 Thread Toby Allsopp

On Tue, May 15, 2001 at 03:06:42PM -0700,  wrote:
> OK. You asked for it.
> 
> I will try to make this as clean and readable as possible:
> 
> 1) jboss.jcml entries
> 2) connection creation
> 3) static methods for closing Connections/Statements and Results Sets
> 4) Stack Trace of rmi Error when calling the static methods
> 5) Stack Trace of NullPointerException on closing of PreparedStatement
> 
> 1) *** JBOSS.JCML:

Looks fine.

> 2) *** CONNECTION CREATION
>InitialContext jndiContext = new InitialContext();
>XAPoolDataSource ds = (XAPoolDataSource)
> jndiContext.lookup("java:/OracleDS");
>Connection conn = ds.getConnection();

Don't reference Minerva classes in your code.  Just use javax.sql.DataSource.

Also, you should use java:comp/env/ lookups, but that's not relevent here.

> 3) *** static methods for closing rs/conn/stmt  ( I will place the entire
> class here -- sorry if the readability is a little bad, tried to crunch it
> all in )
> import java.sql.*;
> public class DatabaseUtility {

Looks fine.

> 4) *** RMI ServerException Stack Trace ( this is thrown and the connection
> is NOT returned to the pool )
> This is thrown when I try to call DatabaseUtility.closeConnection(
> connection ); (notice I catch _everything_ in that method) and is _not_
> thrown in the DatabaseUtility, but seems like it is thrown on the attempt to
> call the method.
> java.rmi.ServerException: Transaction rolled
> back:com/bebee/recommender/utility/DatabaseUtility
>   at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:300)

Ok, you're missing out some details.  Are you calling an EJB from a servlet?

You haven't mentioned anything about what this EJB is doing.  What are you
doing with transactions?  Are you getting the connection in the servlet
and trying to close it from the EJB or something?

> 5) *** NullPointerException stack trace (sorry for the log format) this is
> thrown on the preparedStatement.close() call inside the bean at the end of
> the transaction (which is directly after the call to connection.close() --
> when I change the order of the calls, i.e. first close the prepared
> statement then close the connection it works fine)

This is a bug.  I'll look at this kind of fragility at some point.

Toby.

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



Re: [JBoss-user] Blind Lookup

2001-05-15 Thread Toby Allsopp

On Tue, May 15, 2001 at 06:13:18PM -0400, Alexander Kogan wrote:
> Hi,
> 
> Toby Allsopp wrote:
> > 
> > I didn't realise that the situation was calling from an EJB; I thought we
> > were talking about application clients.  Come to think of it, the same
> > probably applies to J2EE Application Clients.
> 
> I think so. Even web-apps (servlets, JSPs) are supposed to use java:env
> namespace and have "deployment" descriptors.
> 
> > Why not declare this as an ejb-ref in the deployment descriptor?  Something
> > like:
> > 
> > 
> >   ejb/Foo
> >   Session
> >   javax.ejb.EJBHome
> >   com.foo.FooBaseInterface
> > 
> 
> Ok, two things here. First, what if I have to look for
> several "hot-deployed" beans. I mean "several" and I
> don't know exactly how many. Second, their jndi-names.
> jndi-names are runtime parameters in my case.

Yes, in the more dynamic case, where you are discovering the other beans
at runtime, this won't apply.  I can't personally think of a good reason
for doing this off the top of my head, but there's no reason not to just
use plain JNDI names in that case, IMO.

> BTW, your idea is very interesting, especially
> in case of predefined names. I'm not sure that
> it works, but... At least, I'll think about that.

I don't know if it will work either.  If you need to make these decisions
at runtime rather than at deployment time then the deployment descriptor
is probably not the best mechanism and the spec be damned.

Toby.

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



Re: [JBoss-user] Minerva and ResultSet MetaData Bug?

2001-05-15 Thread

I just did the following and it worked fine with Minerva Pools and Oracle


   Connection conn = datasource.getConnection();
   conn.setAutoCommit( true );
   PreparedStatement pstmt = conn.prepareStatement( query );
   ResultSet rs = pstmt.executeQuery();

   boolean anyresults = false;
   System.out.println( rs.getClass() );
   ResultSetMetaData md = rs.getMetaData();
   System.out.println( "COL COUNT=" + md.getColumnCount() );
   ... blah...

and get:

[AVR] class org.opentools.minerva.jdbc.ResultSetInPool
[AVR] COL COUNT=2


not sure what might cause that problem (one of the few I have not run into
;)

sorry
scott


- Original Message -
From: "Rick Gibbs" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 15, 2001 3:00 PM
Subject: [JBoss-user] Minerva and ResultSet MetaData Bug?


>
> We are getting the following exception when we try to access the
ResultSet's
> metadata:
>
> ResultSetMetaData md = rs.getMetaData();
> int columnCount = md.getColumnCount();
>
> Stack Trace: java.sql.SQLException: ResultSet has been closed!
>   at
>
org.opentools.minerva.jdbc.ResultSetInPool.getMetaData(ResultSetInPool.java:
> 542)
>   at
>
com.earthcars.core.dao.BaseDAO.constructResultFromResultSet(BaseDAO.java:131
> )
>   at com.earthcars.core.dao.BaseDAO.execute(BaseDAO.java:113)
>
> We aren't closing the ResultSet until after this piece of code but it
seems
> that Minerva is doing that before we get a chance to get the metadata.
Has
> anyone else seen this or expirenced problems with Minerva and metadata?
>
> Thanks,
>
>
> Rick
>
>
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user


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



Re: [JBoss-user] Minerva and ResultSet MetaData Bug?

2001-05-15 Thread Toby Allsopp

On Tue, May 15, 2001 at 06:00:42PM -0400, Rick Gibbs wrote:
> 
> We are getting the following exception when we try to access the ResultSet's
> metadata:
> 
>   ResultSetMetaData md = rs.getMetaData();
>   int columnCount = md.getColumnCount();
> 
> Stack Trace: java.sql.SQLException: ResultSet has been closed!
>   at
> org.opentools.minerva.jdbc.ResultSetInPool.getMetaData(ResultSetInPool.java:
> 542)
>   at
> com.earthcars.core.dao.BaseDAO.constructResultFromResultSet(BaseDAO.java:131
> )
>   at com.earthcars.core.dao.BaseDAO.execute(BaseDAO.java:113)
> 
> We aren't closing the ResultSet until after this piece of code but it seems
> that Minerva is doing that before we get a chance to get the metadata.  Has
> anyone else seen this or expirenced problems with Minerva and metadata?

Sounds like yet another Minerva bug.  As this is now JBossPool, I guess
we should fix these.  Please log this as a bug at SourceForge and include
a complete test case, if at all possible.

Thanks,
Toby.

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



Re: [JBoss-user] Blind Lookup

2001-05-15 Thread Alexander Kogan

Hi,

Toby Allsopp wrote:
> 
> I didn't realise that the situation was calling from an EJB; I thought we
> were talking about application clients.  Come to think of it, the same
> probably applies to J2EE Application Clients.

I think so. Even web-apps (servlets, JSPs) are supposed to use java:env
namespace and have "deployment" descriptors.

> Why not declare this as an ejb-ref in the deployment descriptor?  Something
> like:
> 
> 
>   ejb/Foo
>   Session
>   javax.ejb.EJBHome
>   com.foo.FooBaseInterface
> 

Ok, two things here. First, what if I have to look for
several "hot-deployed" beans. I mean "several" and I
don't know exactly how many. Second, their jndi-names.
jndi-names are runtime parameters in my case.

BTW, your idea is very interesting, especially
in case of predefined names. I'm not sure that
it works, but... At least, I'll think about that.

regards,

Alex.

-- 
__
Alexander Kogan  PTC   www.ptc.com
[EMAIL PROTECTED]140 Kendrick St. Needham MA 02494

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



Re: [JBoss-user] where can i find the minerva source

2001-05-15 Thread Tbone

Hi again

The reason why i want to pool almost everthing is more a general house
keeping rule
than a real application need.

don't make a new chair every time you wanna site, no
just pick a empty one.

A system is not a bottomless pit

Greetz-Tbone

PS: KEEP UP THE GOOD WORK !!!


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



Re: [JBoss-user] Various DB problems (with CMP)

2001-05-15 Thread Peter Fagerlund

> 3) Even if I keep records shorter than 32kBytes, if I undeploy and
> redeploy the same (unchanged) EAR, on trying to read some entity beans
> back into memory, they are reported as corrupt, `not containing
> serializable data' in some ByteArray deserialisation routine inside
> Hypersonic itself I think.  This means I usually have to reload lots of
> data each time I make even the most minor change to my EAR, which is
> very sad.  All data is loaded through Java with no access by anyone
> else.


3) If I understand - U might want to have a separate instance of hypersonic
running alongside - and use that - the separate instance for storing and the
embedded jboss instance for smaller "indexes" (of indexes - perhaps) - just
a thought ...

/peter


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



Re: [JBoss-user] RE: Error 'closing' a pooled connection (addendum)

2001-05-15 Thread

OK. You asked for it.

I will try to make this as clean and readable as possible:

1) jboss.jcml entries
2) connection creation
3) static methods for closing Connections/Statements and Results Sets
4) Stack Trace of rmi Error when calling the static methods
5) Stack Trace of NullPointerException on closing of PreparedStatement

1) *** JBOSS.JCML:

   
 oracle.jdbc.driver.OracleDriver
   

  
OracleDS
org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImp
l
jdbc:oracle:thin:@superman:1521:beedev2
RV10
RV10
false
false
true
 false
12
120
12
true
true
1
10
0
 
  

2) *** CONNECTION CREATION
   InitialContext jndiContext = new InitialContext();
   XAPoolDataSource ds = (XAPoolDataSource)
jndiContext.lookup("java:/OracleDS");
   Connection conn = ds.getConnection();

3) *** static methods for closing rs/conn/stmt  ( I will place the entire
class here -- sorry if the readability is a little bad, tried to crunch it
all in )
import java.sql.*;
public class DatabaseUtility {

public DatabaseUtility() { }
public static void closeConnection(Connection connection) {
try {
if(connection == null)
return;
try {
connection.close();
}catch(Exception exception) {
try {
if( !connection.isClosed() ); // no need to throw
}catch(Exception exception1) {  }
}
}catch(Exception exception) { /* catches everything */ }
}// end closeConnection

public static void closeStatement(Statement statement) {
try {
if(statement == null)
return;
try {
statement.close();
}catch(Exception exception) { }
}catch(Exception exception) { }
} // end closeStatement

public static void closeResultSet(ResultSet resultset) {
try {
if(resultset == null)
return;
try {
resultset.close();
}catch(Exception exception) { }
}catch(Exception exception) { }
} // end closeResultSet
}// end class

4) *** RMI ServerException Stack Trace ( this is thrown and the connection
is NOT returned to the pool )
This is thrown when I try to call DatabaseUtility.closeConnection(
connection ); (notice I catch _everything_ in that method) and is _not_
thrown in the DatabaseUtility, but seems like it is thrown on the attempt to
call the method.
java.rmi.ServerException: Transaction rolled
back:com/bebee/recommender/utility/DatabaseUtility
at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:300)
at
org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSe
ssionInstanceInterceptor.java:87)
at
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:19
0)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)
at
org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.jav
a:271)
at
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerI
nvoker.java:482)
at
org.jboss.ejb.plugins.jrmp.interfaces.StatelessSessionProxy.invoke(Stateless
SessionProxy.java:152)
at $Proxy5.exportUserAttributeValueRating(Unknown Source)
at
com.bebee.recommender.client.web.servlet.XAServlet.executeAVRExport(XAServle
t.java:263) // call to the bean
at
com.bebee.recommender.client.web.servlet.XAServlet.executeAVRXA(XAServlet.ja
va:163) // call to method to call bean
at
com.bebee.recommender.client.web.servlet.XAServlet.doPost(XAServlet.java:91)
// duh.
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)

5) *** NullPointerException stack trace (sorry for the log format) this is
thrown on the preparedStatement.close() call inside the bean at the end of
the transaction (which is directly after the call to connection.close() --
when I change the order of the calls, i.e. first close the prepared
statement then close the connection it works fine)

[A

Re: [JBoss-user] Problem making CORBA call

2001-05-15 Thread Toby Allsopp

On Tue, May 15, 2001 at 02:38:15PM -0700, Dave Ortman wrote:
> < at some point, and we do a bit of CORBA, so I'm interested in how you get
> on, at least.>>
> 
> I have no qualms with continuing to bug the fine people on this list, so no
> problem. :)
> 
> I went back and checked... and found nothing that looked out of whack.  As I
> said earlier, I wrapped some CORBA calls in a helper class really quick.  I
> then create an instance of this helper object, have it connect to the CORBA
> server, then use it as a call through for subsequent CORBA calls.  The connect
> logic (which works in normal client, but fails in a session bean) is as follows:
> 
> 
>   public boolean connect(String fileName) {
> 
>   System.out.println(fileName);
>   String ior = "[snip]";
> 
> //System.out.println(ior);
>   if (ior == null) {
>   connected = false;
>   }
>   try 
>   {
>   System.out.println("1");
> org.omg.CORBA.ORB orb = ORB.init(new String[] {ior},
> null);

Why do you pass the IOR here?

> System.out.println("2");
> if (orb == null) {
> System.out.println("orb is null damn it
> to hell!");
> }
> System.out.println("3");
>   org.omg.CORBA.Object obj = orb.string_to_object(ior);
> System.out.println("4");
>   server = CorbaServerHelper.narrow(obj);
>   mediator = server.getCORBAMediator(); 
>   if (mediator == null) {
>   System.out.println("Crap!");
>   } 
>   }
>   catch (java.lang.Exception e)
>   {
>   System.err.println(e);

Please change this to e.printStackTrace(System.err).

>   }
>   
>   connected = true;
>   return connected;
>   }
> 
> I have the IOR string hard coded in the class.  I did this to avoid the I/O
> issues within the bean, and to make sure that I was using the same IOR string
> in both cases.  In the Swing client, this method works find.  It obtains a reference
> to an object and stores it for future requests.  However, when running within
> a session bean in JBoss, I receive a NullPointerException.  Within the console
> on JBoss, I see the numbers 1, 2, and 3 get printed out - which means that it's
> dying on the string_to_object() method.  The IOR is not null.  The orb is not
> null (as I check for it directly above).  So I assume the error is getting raised
> from inside the string_to_object method.

Oh, I thought you were getting a null back from string_to_object.  If you're
getting a NPE from the string_to_object call, then there's definitely a
problem with the ORB.

It would be helpful to see the complete stacktrace of the exception.

Toby.

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



[JBoss-user] Minerva and ResultSet MetaData Bug?

2001-05-15 Thread Rick Gibbs


We are getting the following exception when we try to access the ResultSet's
metadata:

ResultSetMetaData md = rs.getMetaData();
int columnCount = md.getColumnCount();

Stack Trace: java.sql.SQLException: ResultSet has been closed!
  at
org.opentools.minerva.jdbc.ResultSetInPool.getMetaData(ResultSetInPool.java:
542)
  at
com.earthcars.core.dao.BaseDAO.constructResultFromResultSet(BaseDAO.java:131
)
  at com.earthcars.core.dao.BaseDAO.execute(BaseDAO.java:113)

We aren't closing the ResultSet until after this piece of code but it seems
that Minerva is doing that before we get a chance to get the metadata.  Has
anyone else seen this or expirenced problems with Minerva and metadata?

Thanks,


Rick


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



[JBoss-user] Jbuilder 4.0 Foundation & JBoss2.2.1 HowTo Guide

2001-05-15 Thread John P. Coffey

Well after pulling my hair out for the last couple of days here is how to
get JBoss and JBuilder as friends...

Instructions for integrating JBuilder 4.0 Foundation or Higher with JBoss
for source level debugging

- Install the JBoss Server

For the purposes of this howto, I installed teh JBossTomcat release version
2.2.1 into d:\JBoss-2.2.1_Tomcat-3.2.1.  Download this from
http://www.jboss.org and select the binary link from the page.  This is a
little confusing as it also contains the source (in the best interests of
open source of course).

- Create a JBuilder 4.0 Project

I typically point this to the source for my EJB code.

- Create a JBoss-Server library

This is the most difficult part of the setup to get right, however once
completed it does not need to be changed so you can setup multiple ejb
projects and reuse this library (well done Borland)

- Project / Project Properties / RequiredLibraries / Add...

Add the following library entries to the JBoss-Server classpath (the order
is crucual here).  Pay specific attention to the log and tmp folders,
faulure to put these in the Library class path will cause the classloader to
spit out error messages, the most confusing of which is that /log.properties
or /tmp.properties files could not be located.  This is because the folders
containing these files need to be in the classpath and the class loader
complains.

/$JBOSS_TOMCAT_HOME/jboss/lib/crimson.jar
/$JBOSS_TOMCAT_HOME/jboss/bin/run.jar
/$JBOSS_TOMCAT_HOME/jboss/bin
/$JBOSS_TOMCAT_HOME/jboss/conf
/$JBOSS_TOMCAT_HOME/jboss/lib/jaas.jar
/$JBOSS_TOMCAT_HOME/jboss/lib/jboss-jaas.jar
/$JBOSS_TOMCAT_HOME/jboss/lib/jdbc2_0-stdext.jar
/$JBOSS_TOMCAT_HOME/jboss/lib/jmxri.jar
/$JBOSS_TOMCAT_HOME/tomcat/lib/parser.jar
/$JBOSS_TOMCAT_HOME/tomcat/lib/servlet.jar
/$JBOSS_TOMCAT_HOME/tomcat/lib/jaxp.jar
/$JBOSS_TOMCAT_HOME/tomcat/lib/webserver.jar
/$JBOSS_TOMCAT_HOME/tomcat/lib/jasper.jar
/$JBOSS_TOMCAT_HOME/jboss/lib/ext/activation.jar
/$JBOSS_TOMCAT_HOME/jboss/lib/ext/awt.jar
/$JBOSS_TOMCAT_HOME/jboss/lib/ext/dynaserver.jar
/$JBOSS_TOMCAT_HOME/jboss/lib/ext/ejb.jar
/$JBOSS_TOMCAT_HOME/jboss/lib/ext/ejxeditor.jar
/$JBOSS_TOMCAT_HOME/jboss/lib/ext/ejxejb.jar
/$JBOSS_TOMCAT_HOME/jboss/lib/ext/ejxjaws.jar
/$JBOSS_TOMCAT_HOME/jboss/lib/ext/ejxjboss.jar
/$JBOSS_TOMCAT_HOME/jboss/lib/ext/hsql.jar
/$JBOSS_TOMCAT_HOME/jboss/lib/ext/idb.jar
/$JBOSS_TOMCAT_HOME/jboss/lib/ext/jboss.jar
/$JBOSS_TOMCAT_HOME/jboss/lib/ext/jetty-service.jar
/$JBOSS_TOMCAT_HOME/jboss/lib/ext/jms.jar
/$JBOSS_TOMCAT_HOME/jboss/lib/ext/jmxtools.jar
/$JBOSS_TOMCAT_HOME/jboss/lib/ext/jndi.jar
/$JBOSS_TOMCAT_HOME/jboss/lib/ext/jnpserver.jar
/$JBOSS_TOMCAT_HOME/jboss/lib/ext/jpl-util-0_5b.jar
/$JBOSS_TOMCAT_HOME/jboss/lib/ext/jta-spec1_0_1.jar
/$JBOSS_TOMCAT_HOME/jboss/lib/ext/mail.jar
/$JBOSS_TOMCAT_HOME/jboss/lib/ext/tomcat-service.jar
/$JBOSS_TOMCAT_HOME/jboss/lib/ext/jbossmq.jar
/$JBOSS_TOMCAT_HOME/jboss/db
/$JBOSS_TOMCAT_HOME/jboss/conf/default
/$JBOSS_TOMCAT_HOME/jboss/lib/ext/log4j.jar
/$JBOSS_TOMCAT_HOME/jboss/log
/$JBOSS_TOMCAT_HOME/jboss/tmp
/$JBOSS_TOMCAT_HOME/jboss/lib/ext/jbosssx.jar
/$JBOSS_TOMCAT_HOME/jboss/lib/ext/jbosscx-0.2.jar
/$JBOSS_TOMCAT_HOME/jboss/lib/ext/connector.jar
/$JBOSS_TOMCAT_HOME/jboss/lib/ext/minerva-1_0b3.jar

In the source tab for the JBoss-Server library point to
/$JBOSS_TOMCAT_HOME/jboss/src.  This is how JBuilder resolves where to find
the source for stepping through the code.  Without this step typically you
will be able to step through the code but the Main.java  will appear as
Main.class.

Set the main class to 'org.jboss.Main'.  This is the main startup entry for
the JBoss server.  Also make sure that you set the working directory to
$JBOSS_TOMCAT_HOME/jboss/bin

cut and paste the following line and place it into the 'vm parameters' entry
field (Project/Properties/Run)

-classic -Dtomcat.home=D:\$JBOSS_TOMCAT_HOME\tomcat -Duser.dir=D:\$JBOSS_TOM
CAT_HOME\jboss\bin -Djavax.xml.parsers.SAXParserFactory=org.apache.crimson.j
axp.SAXParserFactoryImpl -Djavax.xml.parsers.DocumentBuilderFactory=org.apac
he.crimson.jaxp.DocumentBuilderFactoryImpl

The starup argument should be left blank with the above setting.  If you
want to run with the integrated tomcat you can put tomcat as the argument,
howevre beware that you MAY need to replace the
/$JBOSS_TOMCAT_HOME/jboss/conf/default with
/$JBOSS_TOMCAT_HOME/jboss/conf/tomcat

If the above steps have been done correctly, open up JBoss-Server.library,
this is located in the folder you specified when creating the library.
Typically this is C:\Documents and Settings\\.jbuilder4 or home
directory on Linux.  Do NOT edit this file, I found several problems
manually editing this file and I am unsure why but I got several instances
of resoce not found exceptions afterwards.  If in doubt don't touch it!




  
  JBoss-Server
  
[/$JBOSS_TOMCAT_HOME/jboss/lib/crimson.jar]
[/$JBOSS_TOMCAT_HOME/jboss/bin/run.jar]
/$JBOSS_TOMCAT_HOME/jboss/bin
/$JBOSS_TOMCAT_HOME/jboss/

Re: [JBoss-user] Blind Lookup

2001-05-15 Thread Alexander Kogan




Lucian Bargaoanu wrote:
> 
> Thanks, actually this is more than I need. I just need to return the result
> of  lookup.
> I've succeeded to do that locally, but from another host it doesn't work.
> I did set a security manager.

If by "from another host" you meant "from another jboss instance", that
is
a bug. I experienced it a few month ago and recently it was discovered
and
filed as "the bug" at sourceforge.

>From other side, if you were talking about a "client" on another host, it
should
work. At least for me.

Tell us, what are you exactly doing.



> 
> //Lucian,
> //
> //it's not legal, according to spec, but it works in jboss:
> 
> //try
> //{
> //Object home = context.lookup(componentName);
> //Method createMethod = home.getClass().getMethod("create",
> //null);
> 
> //Object component = createMethod.invoke(home, null);
> //}
> //catch (NamingException ne) {}
> 
> //and don't forget to set a SecurityManager.
> 
> //good luck.
> 
> //Lucian Bargaoanu wrote:
> >
> > I need to look up a bean without knowing about it's home interface.
> > Can i do that? I tried and it tells me that it cannot find the home
> > interface.
> > Can't i download somehow that .class file from the server?
> > Maybe with the RMI classloader.
> >
> > Sorry if this is a silly question.
> >
> > ___
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> --
> __
> Alexander Kogan  PTC   www.ptc.com
> [EMAIL PROTECTED]140 Kendrick St. Needham MA 02494
> 
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user

-- 
__
Alexander Kogan  PTC   www.ptc.com
[EMAIL PROTECTED]140 Kendrick St. Needham MA 02494

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



Re: [JBoss-user] JBoss and loading of DTDs -- How do I work offline?

2001-05-15 Thread Chris Rossi

> Date: Wed, 16 May 2001 07:46:27 +1200
> From: Toby Allsopp <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Re: [JBoss-user] JBoss and loading of DTDs -- How do I work offline?
> Reply-To: [EMAIL PROTECTED]
> 
> On Tue, May 15, 2001 at 02:15:38PM -0400, Chris Rossi wrote:
> > Hello.  I was trying to do some development the other day without being
> > connected to the internet.  But I got stuck when JBoss started trying to
> > load DTDs.  Is there an easy way to ask JBoss not to validate XML files,
> > or a way to have it use local copies of the DTDs it wants?
> 
> It is intended that JBoss use local copies of the DTDs.  If it's going
> out to the 'net for them then there is a bug somewhere.  If you could
> log a detailed bug report at SourceForge, including a complete example
> that shows this, that would be really helpful.
> 
Oops, sorry for the false alarm.  Your message caused me to check for
DTDs in deployment descriptor files and sure enough my partner in crime
had put a reference to the SUN ejb-jar DTD in our ejb-jar.xml.  Easily
fixed.  Not a bug.

thanks,
chris rossi

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



Re: [JBoss-user] Problem making CORBA call

2001-05-15 Thread Dave Ortman

<>

I had originally figured that perhaps the ORB was breaking some rule, but was
unable to guess as to what that might be.

 
> < client?  Are you running these things on the same machine?  Perhaps there

> is an environment configuration problem.  Are you using the same ORB?  Are

> you initialising the ORB the same way?>>
> 
> I'm 99% sure that everything is EXACTLY the same.  I actually have the connection

> logic in a helper class - CorbaManager.  The IOR string is hard coded in the

> class.  I'm running both EJB and Swing client on the same machine.  So, each

> create an instance of the CorbaManager object - one works, the other doesn't.

> 
> 
> I'll go and check for that extra 1% of confidence.  Perhaps I'm doing something

> different... but I really don't think that to be the case.  At any rate, knowing

> that it's not forbidden helps in now that I know there must be a problem
 somewhere

<>

I'm simply using the OMG classes which are distributed with the JDK.  The ORB
on the other end is a Forte server.. though that really shouldn't matter.

<>

I have no qualms with continuing to bug the fine people on this list, so no
problem. :)

I went back and checked... and found nothing that looked out of whack.  As I
said earlier, I wrapped some CORBA calls in a helper class really quick.  I
then create an instance of this helper object, have it connect to the CORBA
server, then use it as a call through for subsequent CORBA calls.  The connect
logic (which works in normal client, but fails in a session bean) is as follows:


public boolean connect(String fileName) {

System.out.println(fileName);
String ior = 
"IOR:01001c0049444c3a436f726261534f2f436f7262615365727665723a312e3100b40001010a0077656273657276657200ed139c006652744501002b00536974652f436f726261534f5f434c302f436f726261534f5f636c302d436f726261536572766572534f0100010006002600436f726261534f5f636c302f436f726261534f5f434c302f436f726261536572766572534f000100";

//System.out.println(ior);
if (ior == null) {
connected = false;
}
try 
{
System.out.println("1");
org.omg.CORBA.ORB orb = ORB.init(new String[] {ior},
null);
System.out.println("2");
if (orb == null) {
System.out.println("orb is null damn it
to hell!");
}
System.out.println("3");
org.omg.CORBA.Object obj = orb.string_to_object(ior);
System.out.println("4");
server = CorbaServerHelper.narrow(obj);
mediator = server.getCORBAMediator(); 
if (mediator == null) {
System.out.println("Crap!");
} 
}
catch (java.lang.Exception e)
{
System.err.println(e);
}

connected = true;
return connected;
}

I have the IOR string hard coded in the class.  I did this to avoid the I/O
issues within the bean, and to make sure that I was using the same IOR string
in both cases.  In the Swing client, this method works find.  It obtains a reference
to an object and stores it for future requests.  However, when running within
a session bean in JBoss, I receive a NullPointerException.  Within the console
on JBoss, I see the numbers 1, 2, and 3 get printed out - which means that it's
dying on the string_to_object() method.  The IOR is not null.  The orb is not
null (as I check for it directly above).  So I assume the error is getting raised
from inside the string_to_object method.

Am I doing something really stupid?

Thanks,
-Dave

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



Re: [JBoss-user] Velocity & JBoss

2001-05-15 Thread toby cabot

> I use Velocity as my web interface and JBoss as J2EE.

> Where is the root directory relative to servelet running by JBoss &
> Tomcat?

I believe that it's the directory where you are when you run jboss.

> Anyone knows how to solve it?

I use Velocity's classpath resource loader.  Jar up your templates, drop
the jar into the lib directory of your war file, and add:

resource.loader = classpath
classpath.resource.loader.class =
org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader

to WEB-INF/conf/velocity.properties.

HTH,
Toby




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



Re: [JBoss-user] RE: Error 'closing' a pooled connection (addendum)

2001-05-15 Thread danch (Dan Christopherson)

   wrote:

> Toby -
> 
> Well, I have a class with static utility methods such as:
> 
> public static void closeConnection(Connection connection)
> public static void closeStatement(Statement statement)
> public static void closeResultSet(ResultSet resultset)
> 
> which, back in the day had a little more utility for getting pooled
> connections for non-bean stuff - I just kept the close calls because it
> keeps me from having try/catch blocks in my finally blocks...
> 
> anyway, my beans use JNDI to get the pooled connections now and I was
> continuing to use these static calls, but received rmi errors ( a la
> java.rmi.ServerException: Transaction
> rolledback:com/bebee/recommender/utility/DatabaseUtility ).
> 
> So I removed the calls to these static methods and replaced them with
> Connection.close(), etc calls. This stopped the rmi errors. My conclusion
> here was that an ejb calling static methods is apparently a bad thing (makes
> sense since it is trying to circumvent the container, i guess?)


No this should work. This is a pretty common practice. What was the rest 
of the trace? There may have been a prior exception that would tell us more.


> 
> The next problem was that since I was used to using my utility methods
> (which checked for nulls being passed in) I grew lazy and closed things in
> no particular order which resulted in NullPointerExceptions when I did the
> following:
> 
> conn.close();
> preparedstmt.close(); // null pointer here


Or some other exception, or nothing, depending on the driver.


> // interesting point to make here -- no errors on regular statements
> closed here, just prepared ones... seemes rather odd ( i would be interested
> to hear more about this)


Hmmm. Statement caches?


> rs.close();
> 
> According to colleagues the 'proper' order for closing this stuff is
> ResultSet then Statement then Connection - so I will take them at their
> word.


With some drivers it won't matter, but I'd do as you're doing. You might 
want to make your static helper (once we figure out what's going on with 
those) take all three (connection, statement, resultset) as parameters 
so it can do it in order. You'd still want other overrides, though.


> 
> So in conclusion, I confiused the hell out of myself -- which is good every
> now and again.


Indeed it is!

-danch


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



[JBoss-user] Velocity & JBoss

2001-05-15 Thread Leigh Wanstead

Hello everyone,

I use Velocity as my web interface and JBoss as J2EE. In velocity you need
to get a location to get template files, but I can not figure out where I
specify it in WEB-INF\conf\velocity.properties.
file.resource.loader.path = ./webapps/forumdemo/template

Where is the root directory relative to servelet running by JBoss & Tomcat?

Anyone knows how to solve it?

Thanks in advance.

Leigh



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



[JBoss-user] RH7 JBoss221 Tomcat321 JSP Error 500 sun.tools.javac.main

2001-05-15 Thread hossa hossa

Thanks for the Help i already received. I installed
JBoss 2.2.1 with Tomcat 3.2.1 on a RedHat7 box and a
RH6 box. Also i installed it on a W2K box. on all
three boxes i get an error when I try to call the
Example JSP's. 500 sun.tools.javac.main.. That was the
result on all three machines. Servlets and JBoss
Example ran fine. I added
//lib/tools.jar to the clathpass. That
fixed my Problem on the W2K Machine, which i use most
of the time for development, but not on the RedHat
boxes, which I use to host the final Applications.
Adding tools.jar to the Classpath makes it possible to
run a tomcat 3.1.1 (older Version) without JBoss.
since I installed all that Stuff out of the box, it
should be no Problem to see the demo JSP's depoyed by
Tomcat. Has anybody the same Problem and can give me a
hint what to do? I'm running a Sun JSDK 1.3.0_02 on my
RH boxes and on my W2K Machine.
Would be grateful for eyery help. thanks in advance
Thomas

__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

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



[JBoss-user] Various DB problems (with CMP)

2001-05-15 Thread Damon Hart-Davis

Hi,

Some Hypersonic problems in JBoss 2.2.1 out of the box that have been
causing me trouble for a few weeks... I wonder if anyone can help me
with them?

 1) As I go on doing operations with CMPs (with lots of large
Serializable objects or byte[] in the entity beans in question, in case
that makes a difference) the
JBoss-2.2.1_Tomcat-3.2.1/jboss/db/hypersonic/default.script file grows
and grows, even if for example, I drop the tables.  The default.data
file never grows.  How can I get the `log' flushed?  Here, for example,
id the current state of the hypersonic directory after inserting the
same few MB of data a few times:

drwxr-x---   2 dhd  ExNet512 May 14 00:24 ./
drwxr-   5 dhd  ExNet512 May 10 22:51 ../
-rw-r-   1 dhd  ExNet 12 May 14 00:24 default.backup
-rw-r-   1 dhd  ExNet 20 May 14 00:24 default.data
-rw-r-   1 dhd  ExNet 80 May 14 00:24 default.properties
-rw-r-   1 dhd  ExNet125300428 May 15 18:46 default.script

 2) I cannot create records (entity beans), eg including largish
Serializable objects or byte[]s, larger than about 32kBytes in total. 
Is there any way to fix that directly?  At the moment I am fragmenting
data across several entity beans, but that will make some things that I
want to do, such as maintaining a live index in an object in a entity
bean, usually held in memory but passivatable back to the db,
spectacularly inefficient.

 3) Even if I keep records shorter than 32kBytes, if I undeploy and
redeploy the same (unchanged) EAR, on trying to read some entity beans
back into memory, they are reported as corrupt, `not containing
serializable data' in some ByteArray deserialisation routine inside
Hypersonic itself I think.  This means I usually have to reload lots of
data each time I make even the most minor change to my EAR, which is
very sad.  All data is loaded through Java with no access by anyone
else.

 4) I intend to have several GB of data in my database in the end, with
several tables/beans having up to millions of records each.  Will that
completely stuff Hypersonic?

I am resigned to having to sort some of these problems by moving to a
different DB, but I want at least to understand what's going on with
Hypersonic and make it a little more robust and to last as long as
possible.

Regards,

Damon

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



Re: [JBoss-user] RE: Error 'closing' a pooled connection (addendum)

2001-05-15 Thread Toby Allsopp

On Tue, May 15, 2001 at 01:23:13PM -0700,  wrote:
> Toby -
> 
> Well, I have a class with static utility methods such as:
> 
> public static void closeConnection(Connection connection)
> public static void closeStatement(Statement statement)
> public static void closeResultSet(ResultSet resultset)
> 
> which, back in the day had a little more utility for getting pooled
> connections for non-bean stuff - I just kept the close calls because it
> keeps me from having try/catch blocks in my finally blocks...
> 
> anyway, my beans use JNDI to get the pooled connections now and I was
> continuing to use these static calls, but received rmi errors ( a la
> java.rmi.ServerException: Transaction
> rolledback:com/bebee/recommender/utility/DatabaseUtility ).

Please, provide details here. *Exactly* where did you receive this exception?
What was the stacktrace?  What code is in those static methods?

> So I removed the calls to these static methods and replaced them with
> Connection.close(), etc calls. This stopped the rmi errors. My conclusion
> here was that an ejb calling static methods is apparently a bad thing (makes
> sense since it is trying to circumvent the container, i guess?)

There is no problem with calling static methods in utility classes from
an EJB.

> The next problem was that since I was used to using my utility methods
> (which checked for nulls being passed in) I grew lazy and closed things in
> no particular order which resulted in NullPointerExceptions when I did the
> following:
> 
> conn.close();
> preparedstmt.close(); // null pointer here
> // interesting point to make here -- no errors on regular statements
> closed here, just prepared ones... seemes rather odd ( i would be interested
> to hear more about this)
> rs.close();

Ah, yes, this will give you problems because the statements and result sets
need to have references to the connection on which they were created.  You
shouldn't get an exception, though, it should just be ignored.

If you post the stacktraces then we can look into what's causing the NPE.

> According to colleagues the 'proper' order for closing this stuff is
> ResultSet then Statement then Connection - so I will take them at their
> word.

Yes, it makes a lot more sense to close them in that order, but the pooled
connections shouldn't be so fragile.

> So in conclusion, I confiused the hell out of myself -- which is good every
> now and again.

Well, only if you get some understanding to replace the confusion.

Toby.

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



Re: [JBoss-user] RE: Error 'closing' a pooled connection (addendum)

2001-05-15 Thread

Toby -

Well, I have a class with static utility methods such as:

public static void closeConnection(Connection connection)
public static void closeStatement(Statement statement)
public static void closeResultSet(ResultSet resultset)

which, back in the day had a little more utility for getting pooled
connections for non-bean stuff - I just kept the close calls because it
keeps me from having try/catch blocks in my finally blocks...

anyway, my beans use JNDI to get the pooled connections now and I was
continuing to use these static calls, but received rmi errors ( a la
java.rmi.ServerException: Transaction
rolledback:com/bebee/recommender/utility/DatabaseUtility ).

So I removed the calls to these static methods and replaced them with
Connection.close(), etc calls. This stopped the rmi errors. My conclusion
here was that an ejb calling static methods is apparently a bad thing (makes
sense since it is trying to circumvent the container, i guess?)

The next problem was that since I was used to using my utility methods
(which checked for nulls being passed in) I grew lazy and closed things in
no particular order which resulted in NullPointerExceptions when I did the
following:

conn.close();
preparedstmt.close(); // null pointer here
// interesting point to make here -- no errors on regular statements
closed here, just prepared ones... seemes rather odd ( i would be interested
to hear more about this)
rs.close();

According to colleagues the 'proper' order for closing this stuff is
ResultSet then Statement then Connection - so I will take them at their
word.

So in conclusion, I confiused the hell out of myself -- which is good every
now and again.


Hope that helps clear it up.

scott


- Original Message -
From: "Toby Allsopp" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 15, 2001 12:51 PM
Subject: Re: [JBoss-user] RE: Error 'closing' a pooled connection (addendum)


> On Tue, May 15, 2001 at 12:19:14PM -0700,  wrote:
> > OK. So here is the answer *I* came up with:
> >
> > Rule 1: It is bad to use utility classes with static methods from your
> > beans - I got rmi errors
>
> Please provide some details about this.  As it stands it makes no sense.
>
> > Rule 2: Close your DB stuff in this order: ResultSet then Statement the
> > Connection
>
> Hmm, this shouldn't be neccessary.  Can you procide some details, such as
> exactly what you were doing to cuase the problems, and exactly what the
> problems were?
>
> Toby.
>
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user


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



Re: [JBoss-user] JBoss archve search problem

2001-05-15 Thread Anil Tatineni

yes i did have the same problem. and even i wrote and email to the
webmaster. no response yet.

Norton Lam wrote:

> Is anyone else having problem with the jboss-user archive on GeoCrawler?
>
> I keep getting:
>
> Your search for
> htsearch detected an error. Please report this to the returned matches
>
> webmaster of this site. The error message is:
> Unable to read configuration file '/bigassraid/htdig//conf/10767.conf'
>
> for at least two weeks.
>
> I've e-mailed the webmaster, but I don't get any response from him/her.
>
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user


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



Re: [JBoss-user] One more doubt about MDB(2)

2001-05-15 Thread pra

On 15 Maj, [EMAIL PROTECTED] wrote:
> Now i see the light!  :-o
> Last question (by the moment):
> How to use the same Topic with 2 or more subscribers?
> Perhaps, for every subscriber, have i to indicate in
> its 'jboss.xml' the same line:
> 
> topic/sameTopic ?

Thats correct. You could resue everything by just renaming the bean in
the deployment descriptors and the jar-file.

As long as you message bean does the EXACT same thing (i.e calls the
same session bean or has the same message selector) you should not
create a new subscriber - because one of the great thing with MDB is
that you get multithreaded execution of your message listenerns (which
is verry hard, if not even impossible for topics with vanlilla JMS.

//Peter
> 
> Regards:
> __
> Jaume Soriano Sivera <[EMAIL PROTECTED]>
> Tel: 96504 -ext. 44744 Fax: 965040047
> Portal y servicios multimedia - Nuevas tecnologias 
> W a n a d o o E s p a n a - http://www.wanadoo.es 
> __
> 
> 
> 
> 
> Per Lewau <[EMAIL PROTECTED]>
> Sent by: [EMAIL PROTECTED]
> 15/05/2001 10:51
> Please respond to jboss-user
> 
>  
> To: [EMAIL PROTECTED]
> cc: 
> Subject:Re: [JBoss-user] One more doubt about MDB
> 
> 
> 
> On Tue, 15 May 2001 [EMAIL PROTECTED] wrote:
> 
>> Hello again:
>> 
>> I'm using a Topic with (only) one subscriber (i.e. ListenerBean),
>> with this assumption...
>> which is the diference between using a QUEUE or a TOPIC?
> 
> None.
> 
> If you only have one subscriber and will only ever have one subscriber you
> could use a Queue instead. With a topic however you could add more
> subscribers if that becomes necessary, fun or whatever in the future
> without having to change anything else.
> 
> Cheers
> 
> ---
> Per Lewau ([EMAIL PROTECTED]) 
> 
> "Why waste time learning, when ignorance is instantaneous?"
>  - Hobbes
> 
> 
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> 
> 
> 
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user

-- 

Peter Antman Technology in Media, Box 34105 100 26 Stockholm
Systems ArchitectWWW: http://www.tim.se
Email: [EMAIL PROTECTED]WWW: http://www.backsource.org
Phone: +46-(0)8-506 381 11 Mobile: 070-675 3942 



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



Re: [JBoss-user] Adding JDBC-driver

2001-05-15 Thread Bas Cancrinus

Dovan Nguyen wrote:

>I believe you need to add your jdbc driver class in the mbean entry attribute
>name="Drivers" in the jboss.jcml
>
>dovan
>
I added


 [MyDriverClass]


just like in the manual. Any suggestions?   


Bas

-- 
Bas E. Cancrinus<[EMAIL PROTECTED]>
Product Manager RepTrack (TM)   
Developer Cancrinus Search  




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



Re: [JBoss-user] Adding JDBC-driver

2001-05-15 Thread Bas Cancrinus

Ivan wrote:

>If you are using embedded tomcat there will be 2 jboss.jcml files. 1 in
>conf\default and 1 in conf\tomcat
>
>are you sure that you checked the same file each time and that if you
>started jboss with tomcat that you are using the jboss.jcml file inside the
>conf\tomcat directory
>
>Ivan
>
I'm using the stand-alone release, which only has a conf/default. Do you 
have any idea what else could be wrong?

Bas

-- 
Bas E. Cancrinus<[EMAIL PROTECTED]>
Product Manager RepTrack (TM)   
Developer Cancrinus Search  




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



Re: [JBoss-user] Benchmarking Messaging in JBoss

2001-05-15 Thread pra

On 15 Maj, [EMAIL PROTECTED] wrote:
> hi list !
> 
> we are going to benchmark jboss for messaging.
> 

Great, and you will post the results I guess! 

Have you looked into the little benchmarking application done by
progress (soniqmq, maybe you could use something from there)?

//Peter
> scenario is the following :
> 
> PostingClient thread posts messages to Topic 1, with a key as identifier and some 
>junk data variable in size (Testing Parameter 1).
> Messagedriven Bean 1 listens on topic 1, writes the current time to 
>"lastTimeReceivedMDB1" in the message, increases the "howManyTimesSent" counter and 
>posts it to topic 2.
> 
> Messagedriven Bean 2 listens on topic 2, writes the current time to 
>"lastTimeReceivedMDB2" in the message and posts it to topic 1.
> 
> MonitoringClient thread listens on topic 1.
> 
> MDB1, also listening on topic 1, will recapture the message and then increase 
>counter, write time, and post it to topic 2, etc. etc.
> 
> PostingClient will continuously bring new messages to the system.
> 
> MonitoringClient has facilities for identifying the messages in topic 1 and will 
>care about :
> 
> - time difference between MDB1 and MDB2
> 
> and other parameters.
> 
> We are probably going to benchmark weblogic's newest app server version as well.
> 
> Best regards, jubin
> 
> 
> 
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user

-- 

Peter Antman Technology in Media, Box 34105 100 26 Stockholm
Systems ArchitectWWW: http://www.tim.se
Email: [EMAIL PROTECTED]WWW: http://www.backsource.org
Phone: +46-(0)8-506 381 11 Mobile: 070-675 3942 



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



Re: [JBoss-user] RE: Error 'closing' a pooled connection (addendum)

2001-05-15 Thread Toby Allsopp

On Tue, May 15, 2001 at 12:19:14PM -0700,  wrote:
> OK. So here is the answer *I* came up with:
> 
> Rule 1: It is bad to use utility classes with static methods from your
> beans - I got rmi errors

Please provide some details about this.  As it stands it makes no sense.

> Rule 2: Close your DB stuff in this order: ResultSet then Statement the
> Connection

Hmm, this shouldn't be neccessary.  Can you procide some details, such as
exactly what you were doing to cuase the problems, and exactly what the
problems were?

Toby.

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



Re: [JBoss-user] JBoss and loading of DTDs -- How do I work offline?

2001-05-15 Thread Toby Allsopp

On Tue, May 15, 2001 at 02:15:38PM -0400, Chris Rossi wrote:
> Hello.  I was trying to do some development the other day without being
> connected to the internet.  But I got stuck when JBoss started trying to
> load DTDs.  Is there an easy way to ask JBoss not to validate XML files,
> or a way to have it use local copies of the DTDs it wants?

It is intended that JBoss use local copies of the DTDs.  If it's going
out to the 'net for them then there is a bug somewhere.  If you could
log a detailed bug report at SourceForge, including a complete example
that shows this, that would be really helpful.

Thanks,
Toby.

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



Re: [JBoss-user] JBoss archve search problem

2001-05-15 Thread Toby Allsopp

On Tue, May 15, 2001 at 02:07:34PM -0500, Norton Lam wrote:
> Is anyone else having problem with the jboss-user archive on GeoCrawler?

Yes.  Use the archive links on the mailing lists page at www.jboss.org.

Toby.

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



Re: [JBoss-user] Adding JDBC-driver

2001-05-15 Thread Toby Allsopp

On Tue, May 15, 2001 at 05:12:03PM +0200, Bas Cancrinus wrote:
> Hi,
> 
> I'd like to connect JBoss 2.2.1 to a MySQL server.
> According to the manual (chapter 3 - Introduction) I copied the 
> driver-JAR to the lib/ext directory and I added an mbean-entry to 
> jboss.jcml. When I start JBoss my entry is ignored (no extra [JDBC] 
> output in log) and JBoss erases it from jboss.jcml.

If JBoss is modifying your jboss.jcml then you must be using an old
version.  This behaviour was removed before the release of 2.2.

Toby.

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



Re: [JBoss-user] MDB...why?

2001-05-15 Thread pra

On 14 Maj, [EMAIL PROTECTED] wrote:
> Thank you Per!!
> 
> The origin of this confusion is a sample in JBoss Documentation,
> making more specific: example called "MDB as a Listener".
> 
> How many "subscribers" appear in this example?
> I think a subscriber is 'Worker Bean', isn't it?
> Then, to have more than one subscriber i've to create other Beans
> similar (or not) to Worker Bean, haven't i?
> So, if i create new beans i have to modify my Listener to be able to
> comunicate with the new subscriber...

The ListenerBean is the subscriber. The logic is partitioned so that the
work is done in the stateless session  bean. Not that it is necesarry in
this example, but only to show how it is possible to do it.

When it commes to an MDB, you deploy one version (name, configuration)
for each logic and topic/selector combination.

Some areas to use this?

- A time task run in JMX could send its task to a queue. An MDB listens
  for missions and delegate to a sessiion bean (or does the work for
  itself).

- A bean get some cind of thing to do. To continue it need to wait one
  some cind of event (perhaps the presence of something). It triggers
  this and returns. A message bean listens on a queue where the event
  will be placed and calls the session bean (that perhaps has saves som
  temporary persistens data throug an entity bean from the earlier
  invokation, which it now uses.

//Peter
> 
> Please, am i in the correct way?
> 
> Thank you again!
> __
> Jaume Soriano Sivera <[EMAIL PROTECTED]>
> Tel: 96504 -ext. 44744 Fax: 965040047
> Portal y servicios multimedia - Nuevas tecnologias 
> W a n a d o o E s p a n a - http://www.wanadoo.es 
> __
> 
> 
> 
> 
> Per Lewau <[EMAIL PROTECTED]>
> Sent by: [EMAIL PROTECTED]
> 14/05/2001 13:08
> Please respond to jboss-user
> 
>  
> To: [EMAIL PROTECTED]
> cc: 
> Subject:Re: [JBoss-user] MDB...why?
> 
> 
> 
> On Mon, 14 May 2001 [EMAIL PROTECTED] wrote:
> 
>> Hi:
>> I'm testing JBoss with MDB but i'm still lost about its
>> utility...
>> I'd like to write an application to manage a little 
>> "web-shop" using EJBs and MDBs as follows:
>> 
>> * A java servlet who takes data from web application, i.e.
>>the identifier of a client who wants to buy a book.
>> 
>> * Before allowing this purchase i want to check if this client
>>is not in my 'defaulter list'.
>> 
>> * After this i'll be able to avoid/allow the purchase.
>> 
>> Well, i though to do this:
>> 
>> "The servlet takes data from web client and sends it to a Topic,
>> then Topic sends data to a Checker Bean that runs a method 
>> called 'checkClient' wich look for this client in a 'defaulter' 
> database.
>> If everything is ok, a 'true' value is returned to servlet"
> 
> Sounds more like a Queue than a Topic to me. Queues are for point-to-point
> messages and Topics are for Publisher/Subscriber (many receivers).
> 
>> Is this a good way to pose my problem?
>> I know its possible to develope *the same* without MDBs, but,
>> is there any advantage on using MDBs?
>> in other words, how can i take advantage of MDBs?
> 
> I'm not sure what you are trying to do, but this is my take on what you
> want.
> 
> 0. MDB listens for messages on in queue
> 1. serlvet sends message to in queue with whatever should be checked
> 2. servlet waits for message on out queue 
> 3. MDB.onMessage() called 
> 4. MDB checks whatever 
> 5. MDB sends message (true or false) to out queue 
> 6. servlet receives message and proceeds
> 
> 
> I'd say that the advantage of MDBs is that they can be called
> asynchronously. What you want to do sound synchronous and while possible
> to do it just adds a lot of overhead. A session bean is easier and faster.
> 
> To me it seems as though MDBs are useful for triggering some action that
> you don't want to hang around waiting for. For instance, you might want to
> send an email with an order confirmation and personally I wouldn't want to
> hang around in my "process order" session bean waiting for JavaMail to
> finish (after all it is talking SMTP to a mail server somewhere) so I
> would simple put a message in a queue and let an MDB deal with the sending
> of emails.
>  
> Regards, Per
> 
> ---
> Per Lewau ([EMAIL PROTECTED]) 
> 
> "Why waste time learning, when ignorance is instantaneous?"
>  - Hobbes
> 
> 
> 
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> 
> 
> 
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user

-- 

Peter Antman Technology in Media, Box 34105 100 26 Stockholm
Systems ArchitectWWW: http://

Re: [JBoss-user] XADataSourceLoader

2001-05-15 Thread Toby Allsopp

On Tue, May 15, 2001 at 01:35:22PM +0200, Christian Biasuzzi wrote:
> Hi,
>  I'm playing with the latest jboss CVS snapshot
> and I found yesterday that I'm not able to restart a XADataSource
> MBean (the DefaultDS, for example) after having stopped it
> 
>  here follows my log:
> 
> [DefaultDS] java.lang.NullPointerException
> [DefaultDS] at
> org.jboss.pool.jdbc.xa.XAPoolDataSource.setPoolName(XAPoolDataSource.java:96)
> 
> [DefaultDS] at
> org.jboss.jdbc.XADataSourceLoader.startService(XADataSourceLoader.java:267)
> 
> [DefaultDS] at
> org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:101)
> [DefaultDS] at java.lang.reflect.Method.invoke(Native Method)
> [DefaultDS] at
> com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
> 
>.
> 
>   If  I put a
> 
>  source = null;
> 
>  at the end of stopService() in XADataSourceLoader class
>   (actually forcing the creation of a new XADataSource) everything runs
> fine, but I'm not sure this is the
>   right thing to do

Please log this as a bug on SourceForge.  I'll have a look at it at some point
if no one else does.

Thanks,

Toby.

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



Re: [JBoss-user] JBoss archve search problem

2001-05-15 Thread danch (Dan Christopherson)

Norton Lam wrote:

> Is anyone else having problem with the jboss-user archive on GeoCrawler?
> 

The GeoCrawler search has never worked. Go to www.jboss.org, the mailing 
lists section, and follow those links instead.

Guess I'll never get to tell people to search the archives for _that_ 
one 8^})


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



Re: [JBoss-user] Problem making CORBA call

2001-05-15 Thread Toby Allsopp

On Tue, May 15, 2001 at 10:27:41AM -0700, Dave Ortman wrote:
> <>
> 
> Just a wild guess... I never assumed it would be correct.
> 
> <>
> 
> Well, at least that clears that up.  I had looked through the spec for something
> saying "You can't do this", but had no such luck.  So I guess that narrows it
> down to user error.

You might find that ORBs do some things that an EJB would be prohibited by
the spec from doing, but I'm pretty sure JBoss wouldn't stop them from
happening anyway.

...
> 
> < client?  Are you running these things on the same machine?  Perhaps there
> is an environment configuration problem.  Are you using the same ORB?  Are
> you initialising the ORB the same way?>>
> 
> I'm 99% sure that everything is EXACTLY the same.  I actually have the connection
> logic in a helper class - CorbaManager.  The IOR string is hard coded in the
> class.  I'm running both EJB and Swing client on the same machine.  So, each
> create an instance of the CorbaManager object - one works, the other doesn't.
> 
> 
> I'll go and check for that extra 1% of confidence.  Perhaps I'm doing something
> different... but I really don't think that to be the case.  At any rate, knowing
> that it's not forbidden helps in now that I know there must be a problem 
>somewhere

Which ORB are you using?  You might find that you're picking up an
orb.properties file in one but not the other, or something.

Anyway, keep us updated.  I plan to port an application at work to JBoss
at some point, and we do a bit of CORBA, so I'm interested in how you get
on, at least.

Toby.

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



Re: [JBoss-user] Datasource availability

2001-05-15 Thread danch (Dan Christopherson)

Norton Lam wrote:

>   
> When called from an entity bean, this method works fine.  However,
> when called from outside an entity bean, I get:
> 
> NamingException: mysql not bound


Define "outside an entity bean." That code _should_ work from an entity 
or a session or a servlet/JSP running under embedded tomcat/jetty. You 
might need an empty jboss-web.xml to make it work from servlets.

It _will not_ work from outside of the VM that JBoss is running in.

Note that looking up under that name isn't necessarily portable accross 
application servers, and goes against the J2EE recommendations. You 
should bite the bullet and put resource references into your descriptors 
( (ejb-jar.xml && jboss.xml) || (web.xml && jboss-web.xml) )


-danch




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



Re: [JBoss-user] MVCSoft Persistant Manager relationship problem

2001-05-15 Thread awc



Jim Archer wrote:

> This is a known problem with the MVC Soft PM. Add this to your descriptor
> for beans that access EBs:
>
> 
> 
>jdbc/PersistenceDS
>javax.sql.DataSource
>Container
> 
>
> Also, don't hesttate to participate in the mail list for MVC Soft. There is
> lots of great info there!
>
> Jim

Where is the MVCSoft mailing list??

anil


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



[JBoss-user] RE: Error 'closing' a pooled connection (addendum)

2001-05-15 Thread

OK. So here is the answer *I* came up with:

Rule 1: It is bad to use utility classes with static methods from your
beans - I got rmi errors
Rule 2: Close your DB stuff in this order: ResultSet then Statement the
Connection

Not sure about Rule 1, but Rule 2 works.




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



[JBoss-user] JBoss hangs ...

2001-05-15 Thread Ray

Hi there.

I've tried to execute a context.getEJBObject and a context.getEJBHome 
within an ejbPostCreate call

But for some reason, this hangs JBoss.

According to most stuff I've read, I should be able to use the context 
inside ejbPostCreate.


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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



[JBoss-user] JBoss archve search problem

2001-05-15 Thread Norton Lam

Is anyone else having problem with the jboss-user archive on GeoCrawler?

I keep getting:

Your search for 
htsearch detected an error. Please report this to the returned matches 

webmaster of this site. The error message is:
Unable to read configuration file '/bigassraid/htdig//conf/10767.conf'


for at least two weeks.

I've e-mailed the webmaster, but I don't get any response from him/her.



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



Re: [JBoss-user] where can i find the minerva source

2001-05-15 Thread Toby Allsopp

On Tue, May 15, 2001 at 03:28:54PM +0200, Vesco Claudio wrote:
> Hi!
> 
> They are in jbosscx :-)))
> 
> I have now cvs co (anonymous) the new jbosspool module...

Cool.  Please let me know of any problem you find with that.

>   Claudio
> 
> PS: I remember you: connector patches :-)))

Yeah, I forgot, sorry.  I'm juggling many things in my free time at the
moment.

Toby.

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



[JBoss-user] Error 'closing' a pooled connection

2001-05-15 Thread

i get the following error when i attempt to return a pooled connection back
to the pool by 'closing' it:
java.rmi.ServerException: Transaction
rolledback:com/bebee/recommender/utility/DatabaseUtility

I am using org.opentools.minerva.jdbc.xa.XAPoolDataSource.getConnection() to
retrieve the jdbc connections - since I  cannot find
any specific usage docs I am assuming that it works just like any other
pooled connection/resource. The code i use to close
the connection is simple enough (in a method call):

try {
if(connection == null)
return;
try {
connection.close();
}
catch(Exception exception) {
try {
if( !connection.isClosed() ); // no need to throw
} catch(Exception exception1) {  }
}
}
catch(Exception exception) { /* catches everything */ }

I used the pooled connections for a day of developing without problems, the
exceptions are now raised and the only modifications
that I can think that I made were to the JDBC MBean parameters for the
pool - such as min and max pool size and timeout
values - which should not have this affect.

Has anyone run across a similar problem? The only fix I have found so far is
to NOT close the connections (Which is why I
started trimming the timeout values ;)

thanks
scott





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



[JBoss-user] Datasource availability

2001-05-15 Thread Norton Lam

There's something I'm not understanding about datasources.

I have a utility class that includes the following method:

  public static Connection getConnection() throws SQLException {
try {
  InitialContext ic = new InitialContext();
  DataSource ds = (DataSource)ic.lookup("java:/mysql");
  
  return(ds.getConnection());
}
catch (NamingException e) {
  // Log exception
  throw(new SQLException("Datasource not found: " +
 e.getMessage()));
}
  }
  
When called from an entity bean, this method works fine.  However,
when called from outside an entity bean, I get:

NamingException: mysql not bound

The jboss server.log reports that java:/mysql is bound (I also know
it is bound because it works from the entity bean):

[mysql] Starting
[mysql] XA Connection pool mysql bound to java:/mysql
[mysql] Started

The class that is calling this method also uses the entity bean that
uses the same method and the entity bean works fine.

Is there something I need to do in my non-entity bean code that the
entity bean is doing for me?

Thanx.

Norton

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



Re: [JBoss-user] JBOSS migration problem ...

2001-05-15 Thread danch (Dan Christopherson)

Your client needs to have jbosssx-client.jar in its classpath.

Cumps Jef wrote:

> Hi all, 
> 
> I was using jboss 2.0 FINAL and I am now migrating to jboss 2.2.1. I have changed 
>all the config files as explained in the docs and I can succesfully deploy my 
>application. 
> 
> When I try to create any of my beans however, I get the following output: 
> 
> Exception in thread "main" java.lang.NoClassDefFoundError: 
>org/jboss/security/SecurityAssociation
>  at 
>org.jboss.ejb.plugins.jrmp.interfaces.GenericProxy.getPrincipal(GenericProxy.java:184)
>  at org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:231)
>  at $Proxy0.create(Unknown Source)
>  at jfk.shared.DCSTest.test(DCSTest.java:48)
>  at DCSTestClient.main(DCSTestClient.java:27)
> 
> Am I missing something ?? Maybe a jar-file somewhere ?? I did everything (except for 
>the configuration) just the same way as with the 2.0 version of jboss. Why isn't it 
>working ??
> 
> If anyone of you can help me i would be REALLY grateful !!!
> 
> thanks in advance, Jef Cumps
> 
> 
> 
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
> 




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



Re: [JBoss-user] JBoss and loading of DTDs -- How do I work offline?

2001-05-15 Thread danch (Dan Christopherson)

Change the URL for the DTDs, or eliminate the DTD reference entirely.

Chris Rossi wrote:

> Hello.  I was trying to do some development the other day without being
> connected to the internet.  But I got stuck when JBoss started trying to
> load DTDs.  Is there an easy way to ask JBoss not to validate XML files,
> or a way to have it use local copies of the DTDs it wants?
> 
> thanks,
> chris rossi
> 
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
> 




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



[JBoss-user] JBOSS migration problem ...

2001-05-15 Thread Cumps Jef

Hi all, 

I was using jboss 2.0 FINAL and I am now migrating to jboss 2.2.1. I have changed all 
the config files as explained in the docs and I can succesfully deploy my application. 

When I try to create any of my beans however, I get the following output: 

Exception in thread "main" java.lang.NoClassDefFoundError: 
org/jboss/security/SecurityAssociation
 at 
org.jboss.ejb.plugins.jrmp.interfaces.GenericProxy.getPrincipal(GenericProxy.java:184)
 at org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:231)
 at $Proxy0.create(Unknown Source)
 at jfk.shared.DCSTest.test(DCSTest.java:48)
 at DCSTestClient.main(DCSTestClient.java:27)

Am I missing something ?? Maybe a jar-file somewhere ?? I did everything (except for 
the configuration) just the same way as with the 2.0 version of jboss. Why isn't it 
working ??

If anyone of you can help me i would be REALLY grateful !!!

thanks in advance, Jef Cumps



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



RE: [JBoss-user] JBoss newbie needs help with installation!

2001-05-15 Thread Frank Villarreal

I lied. I must have openned the run.sh script when I was trying to debug it
and placed a carriage return or something in there. I made a new copy of
run.sh from the download and now JBoss+tomcat starts up just fine.

-Frank


-Original Message-
From: Frank Villarreal [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 15, 2001 12:20 PM
To: [EMAIL PROTECTED]
Subject: [JBoss-user] JBoss newbie needs help with installation!


Hello all!

I have installed Jboss 2.0 standalone successfully before, but now I have
installed Jboss2.2.1 w/tomcat and receive the following error when I attempt
startup:

cd /usr/jboss-tomcat/jboss/bin

/bin/sh run_with_tomcat.sh

JBOSS_CLASSPATH=run.jar:../crimson.jar:/usr/jdk1.3.0_02/lib/tools.jar

EXCEPTION in thread "main" java.io.IOException: jboss.properties missing at
org.jboss.Main.main(Main.java:66)

I know the jboss.properties file is in the right place and present. I have
not modified the package downloaded directly from jboss.org. 

Has anyone seen this before? Can someone please point me in the right
direction?
Thanks in advance!

-Frank

PS: Outstanding work JBOSS coders, the product seems to really be evolving
rapidly!

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

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



[JBoss-user] Create entity Bean ->Unable to create PreparedStatement!

2001-05-15 Thread Thomas Grnert

Hi,

I try to insert a entity into database interbase 6 with interserver 2.0 from firebird
(special thanxs to David)
and got this log output

[JAWS] Create, id is 42
[JAWS] Exists command executing: SELECT COUNT(*) FROM Katalog_Massnahme WHERE ID=?
[JAWS] java.sql.SQLException: Unable to create PreparedStatement!
[JAWS]  at 
org.opentools.minerva.jdbc.xa.wrapper.XAClientConnection.prepareStatement(XAClientConnection.java:169)
[JAWS]  at 
org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.jdbcExecute(JDBCCommand.java:158)
[JAWS]  at 
org.jboss.ejb.plugins.jaws.jdbc.JDBCBeanExistsCommand.execute(JDBCBeanExistsCommand.java:46)
[JAWS]  at 
org.jboss.ejb.plugins.jaws.jdbc.JDBCCreateEntityCommand.execute(JDBCCreateEntityCommand.java:126)
[JAWS]  at 
org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.createEntity(JAWSPersistenceManager.java:122)
[JAWS]  at 
org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:207)
[JAWS]  at org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:441)
[JAWS]  at java.lang.reflect.Method.invoke(Native Method)
[JAWS]  at 
org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:639)
[JAWS]  at 
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:160)
[JAWS]  at 
org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:87)
[JAWS]  at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:135)
[JAWS]  at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:263)
[JAWS]  at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:86)
[JAWS]  at 
org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:164)
[JAWS]  at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:106)
[JAWS]  at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:316)
[JAWS]  at 
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContainerInvoker.java:369)
[JAWS]  at java.lang.reflect.Method.invoke(Native Method)
[JAWS]  at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)
[JAWS]  at sun.rmi.transport.Transport$1.run(Transport.java:142)
[JAWS]  at java.security.AccessController.doPrivileged(Native Method)
[JAWS]  at sun.rmi.transport.Transport.serviceCall(Transport.java:139)
[JAWS]  at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:443)
[JAWS]  at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:643)
[JAWS]  at java.lang.Thread.run(Thread.java:484)

Prepared statment with a JDBC-only test tool is running. What can goes wrong here ?
Help needed.


Thomas



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



Connection refused to host: 127.0.0.1 [was: Re: [JBoss-user] Re:JBoss-user -- confirmation of subscription -- request 343542]

2001-05-15 Thread Xandy Johnson


I think the problem is that RedHat ships a broken /etc/hosts file.  If you
make yours look something like this it will probably help:

127.0.0.1   localhost.fgm.com   localhost
216.2.54.97 tux.fgm.com tux

Xandy

On Tue, 15 May 2001, Guy Rouillier wrote:

> >> Connection refused to host: 127.0.0.1
>
> Java is not getting the instruction to connect to a remote host - it is
> still trying to connect to JBoss locally.   Where are you providing the
> remote host ip address?  I put it in jndi.properties and everything works
> fine.
>
> - Original Message -
> From: "Kobi Schecider" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, May 13, 2001 2:51 AM
> Subject: [JBoss-user] Re: JBoss-user -- confirmation of subscription --
> request 343542
>
>
> > Hi everyone,
> >
> >   I am new to JBoss and have been trying to get the interestclient example
> > running (the client and the EBJ running on different machines) without
> > success. This example is the one found in chapter 1 of JBoss' online
> > documentation. I setup the software according to the tutorial and the FAQ
> > (there is one entry that mentions how to run a client application
> remotely.)
> > But I am consistantly getting exceptions. The following is my
> configuration:
> >
> > RedHat Linux 6.2
> > Sun JDK 1.3 standard edition, (jndi, rmiregistry, providerutil located in
> > jdk1.3/jre/lib/ext)
> > JBoss 2.2.1
> >
> > Since I don't have a DSN server, I use the IP address of the server
> running
> > JBoss for java.naming.provider.url. My machines, relying solely on hosts
> > files, are on a home network.
> >
> > My client code is kept inside a directory together the EBJ jar and a copy
> of
> > everything inside JBoss-2.2.1/client. The following is how I invoke the
> > client and the results I got:
> >
> > java -cp  InterestClient
> >
> > Got context
> > javax.naming.CommunicationException [Root exception is
> > java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested
> > exception is:
> > java.net.ConnectException: Connection refused: no further information]
> >
> > My CLASSPATH is empty. The same configuration (with the
> > java.naming.provider.url set to localhost) works perfectly when both
> client
> > and JBoss server are running on the same machine. I experienced the same
> > problem with JONAS. Could this be caused by an incorrect JDK
> configuration?
> > Basically, the examples (both JBoss and JONAS) work fine as long as both
> the
> > client and the EJB server are on the same machine. I would greatly
> > appreciate if anyone can shed some light on this. Thanks in advance.
> >
> >
> > Kobi
> > _
> > Get your FREE download of MSN Explorer at http://explorer.msn.com
> >
> >
> > ___
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/jboss-user
> >
>
>
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>


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



[JBoss-user] JBoss and loading of DTDs -- How do I work offline?

2001-05-15 Thread Chris Rossi

Hello.  I was trying to do some development the other day without being
connected to the internet.  But I got stuck when JBoss started trying to
load DTDs.  Is there an easy way to ask JBoss not to validate XML files,
or a way to have it use local copies of the DTDs it wants?

thanks,
chris rossi

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



[JBoss-user] Naming.lookup(String) vs. initCtx.lookup(String)

2001-05-15 Thread David Ward

Hi, all:

If I bind a JNDI object into JBoss-2.2.1_Tomcat-3.2.1
via a servlet in a webapp, I have no problem accessing
it via initCtx.lookup("foo").

However, what do I have to do config-wise to JBoss or
via syntax to be able to access that same object via
java.rmi.Naming.lookup("//localhost:1099/foo")?

"foo" does extend Remote and I did run rmic on it...

Thanks,
David


__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

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



Re: [JBoss-user] Re: JBoss-user -- confirmation of subscription -- request 343542

2001-05-15 Thread Guy Rouillier

>> Connection refused to host: 127.0.0.1

Java is not getting the instruction to connect to a remote host - it is
still trying to connect to JBoss locally.   Where are you providing the
remote host ip address?  I put it in jndi.properties and everything works
fine.

- Original Message -
From: "Kobi Schecider" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, May 13, 2001 2:51 AM
Subject: [JBoss-user] Re: JBoss-user -- confirmation of subscription --
request 343542


> Hi everyone,
>
>   I am new to JBoss and have been trying to get the interestclient example
> running (the client and the EBJ running on different machines) without
> success. This example is the one found in chapter 1 of JBoss' online
> documentation. I setup the software according to the tutorial and the FAQ
> (there is one entry that mentions how to run a client application
remotely.)
> But I am consistantly getting exceptions. The following is my
configuration:
>
> RedHat Linux 6.2
> Sun JDK 1.3 standard edition, (jndi, rmiregistry, providerutil located in
> jdk1.3/jre/lib/ext)
> JBoss 2.2.1
>
> Since I don't have a DSN server, I use the IP address of the server
running
> JBoss for java.naming.provider.url. My machines, relying solely on hosts
> files, are on a home network.
>
> My client code is kept inside a directory together the EBJ jar and a copy
of
> everything inside JBoss-2.2.1/client. The following is how I invoke the
> client and the results I got:
>
> java -cp  InterestClient
>
> Got context
> javax.naming.CommunicationException [Root exception is
> java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested
> exception is:
> java.net.ConnectException: Connection refused: no further information]
>
> My CLASSPATH is empty. The same configuration (with the
> java.naming.provider.url set to localhost) works perfectly when both
client
> and JBoss server are running on the same machine. I experienced the same
> problem with JONAS. Could this be caused by an incorrect JDK
configuration?
> Basically, the examples (both JBoss and JONAS) work fine as long as both
the
> client and the EJB server are on the same machine. I would greatly
> appreciate if anyone can shed some light on this. Thanks in advance.
>
>
> Kobi
> _
> Get your FREE download of MSN Explorer at http://explorer.msn.com
>
>
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>


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



RE: [JBoss-user] NamingService initialization problems--ConnectionException

2001-05-15 Thread Tim Taylor

Scott, thanks for the reply.  I get an NPE when I delete the jndi.properties
file.

Here's the code for org.jboss.naming.NamingService.initService() in JBoss
2.2.1.  Without the jndi.properties file, the System.getProperties... line
gets an NPE.  With the jndi.properties file in place, the Context ctx = ...
line gets a ConnectionException.  If the jndi.properties file contains no
provider url, the Context ctx = ... line gets a ConfigurationException
saying "Provider URL missing."

Tim Taylor

public void initService()
   throws Exception
{
   // Read jndi.properties into system properties
   // RO: this is necessary because some components (=Tomcat servlets) use a

   // buggy classloader that disallows finding the resource properly
 
System.getProperties().load(Thread.currentThread().getContextClassLoader().g
etResourceAsStream
   ("jndi.properties"));
   
   // Create "java:comp/env"
   RefAddr refAddr = new StringRefAddr("nns", "ENC");
   Reference envRef = new Reference("javax.naming.Context", refAddr,
ENCFactory.class.getName(), null);
   Context ctx = (Context)new InitialContext().lookup("java:");
   ctx.rebind("comp", envRef);
}

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



Re: [JBoss-user] Oracle Connection Pool Startup - Null Pointer Error

2001-05-15 Thread Guy Rouillier

You get a null pointer exception when JBoss cannot establish a connection.
The most common cause is not supplying a valid userid/password combination.
Having the wrong Oracle instance name would probably also cause it.

- Original Message -
From: "john cooney" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 14, 2001 4:14 AM
Subject: [JBoss-user] Oracle Connection Pool Startup - Null Pointer Error


> I am having lots of problems starting an Oracle connection pool, I
> am getting a null pointer exception.
>
> I am using: win 2000, Oracle 8.1.6 and JBoss 2.2.1.
>
> The instance DOES appear to have started. I can connect to the database
> using the JBuilder 4 JDBC explorer.
>
> I am using the XADataSourceImpl class (not the Oracle one).
>
> jboss.jcml looks like this:
>
>   
>name="DefaultDomain:service=JdbcProvider">
>  oracle.jdbc.driver.OracleDriver
>   
>
>name="DefaultDomain:service=XADataSource,name=OracleDS">
> OracleDS
> 
name="DataSourceClass">org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImp
l
> jdbc:oracle:[EMAIL PROTECTED]:1521:DB
> scott
> tiger
>   
>
> This is the stack trace:
>
> [OracleDS] Starting
> [OracleDS] XA Connection pool OracleDS bound to java:/OracleDS
> [OracleDS] Stopped
> [OracleDS] java.lang.NullPointerException
> [OracleDS]  at
> org.opentools.minerva.jdbc.xa.XAPoolDataSource.getConnection(
> XAPoolDataSource.java:165)
> [OracleDS]  at
> org.jboss.jdbc.XADataSourceLoader.startService(XADataSourceLo
> ader.java:330)
> [OracleDS]  at
> org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.
> java:93)
> [OracleDS]  at java.lang.reflect.Method.invoke(Native Method)
> [OracleDS]  at
> com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
> .java:1628)
> [OracleDS]  at
> com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
> .java:1523)
> [OracleDS]  at
> org.jboss.util.ServiceControl.start(ServiceControl.java:97)
> [OracleDS]  at java.lang.reflect.Method.invoke(Native Method)
> [OracleDS]  at
> com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
> .java:1628)
> [OracleDS]  at
> com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
> .java:1523)
> [OracleDS]  at org.jboss.Main.(Main.java:203)
> [OracleDS]  at org.jboss.Main$1.run(Main.java:107)
> [OracleDS]  at java.security.AccessController.doPrivileged(Native
> Method)
> [OracleDS]  at org.jboss.Main.main(Main.java:103)
> [Service Control] Could not start
> DefaultDomain:service=XADataSource,name=Oracle
> DS
> [Service Control] java.lang.NullPointerException
> [Service Control]   at
> org.opentools.minerva.jdbc.xa.XAPoolDataSource.getCon
> nection(XAPoolDataSource.java:165)
> [Service Control]   at
> org.jboss.jdbc.XADataSourceLoader.startService(XAData
> SourceLoader.java:330)
> [Service Control]   at
> org.jboss.util.ServiceMBeanSupport.start(ServiceMBean
> Support.java:93)
> [Service Control]   at java.lang.reflect.Method.invoke(Native Method)
> [Service Control]   at
> com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
> rverImpl.java:1628)
> [Service Control]   at
> com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
> rverImpl.java:1523)
> [Service Control]   at
> org.jboss.util.ServiceControl.start(ServiceControl.ja
> va:97)
> [Service Control]   at java.lang.reflect.Method.invoke(Native Method)
> [Service Control]   at
> com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
> rverImpl.java:1628)
> [Service Control]   at
> com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
> rverImpl.java:1523)
> [Service Control]   at org.jboss.Main.(Main.java:203)
> [Service Control]   at org.jboss.Main$1.run(Main.java:107)
> [Service Control]   at
> java.security.AccessController.doPrivileged(Native Me
> thod)
> [Service Control]   at org.jboss.Main.main(Main.java:103)
>
>
> _
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>


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



[JBoss-user] Example Servlet Connecting to EJB using JAAS

2001-05-15 Thread Lewis Henderson

Does anyone have an example of servlet connecting to an EJB in JBoss using
JAAS?

I have a 'struts' war file with an Action that creates a 'WorkflowClient'
bean...Using a regular 'Swing' application everything works, but I get the
exception below when accessed from the Action...As you can see the user has
been authorised...Any help/pointers will be much appreciated...

Lewis

[JAASSecurity] User 'Paul' authenticated.
[EmbeddedTomcat] Principal => Paul [org.jboss.security.SimplePrincipal]
[EmbeddedTomcat] Group => Roles [org.jboss.security.NestableGroup]
[EmbeddedTomcat]Principal => Echo
[org.jboss.security.SimplePrincipal]
[EmbeddedTomcat]Principal => Users
[org.jboss.security.SimplePrincipal]
[EmbeddedTomcat]Principal => PaulPrincipal
[org.jboss.security.SimplePrincipal]
[EmbeddedTomcat] Group => CallerPrincipal [org.jboss.security.NestableGroup]
[Thread-13] DEBUG client.WfoWorkflowHelper -
getResource(/RMI/JNDIWorkflowClient,{java.naming.provider.url=localhost:1099
, java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory,
java.naming.factory.url.pkgs=org.jboss.naming,
java.naming.security.principal=Paul, java.naming.security.credentials=paul})
[Thread-13] DEBUG client.WorkflowClientBean - setSessionContext(.)
[WorkflowClient] Authentication exception, principal=null
[WorkflowClient] TRANSACTION ROLLBACK EXCEPTION:checkSecurityAssociation;
nested exception is:
java.lang.SecurityException: Authentication exception; nested
exception is:
java.rmi.RemoteException: checkSecurityAssociation; nested exception
is:
java.lang.SecurityException: Authentication exception
[WorkflowClient] java.rmi.RemoteException: checkSecurityAssociation; nested
exception is:
[WorkflowClient]java.lang.SecurityException: Authentication
exception
[WorkflowClient] java.lang.SecurityException: Authentication exception
[WorkflowClient]at
org.jboss.ejb.plugins.SecurityInterceptor.checkSecurityAssociation(SecurityI
nterceptor.java:212)
[WorkflowClient]at
org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.jav
a:144)
[WorkflowClient]at
org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invokeHome(Stateful
SessionInstanceInterceptor.java:99)
[WorkflowClient]at
org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:135)
[WorkflowClient]at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.
java:263)
[WorkflowClient]at
org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:86)
[WorkflowClient]at
org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:106)
[WorkflowClient]at
org.jboss.ejb.StatefulSessionContainer.invokeHome(StatefulSessionContainer.j
ava:311)
[WorkflowClient]at
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContai
nerInvoker.java:436)
[WorkflowClient]at
org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:212)
[WorkflowClient]at $Proxy25.create(Unknown Source)
[WorkflowClient]at
com.cf.rt.client.WfoWorkflowHelper.connect(WfoWorkflowHelper.java:49)
[WorkflowClient]at
com.cf.rt.struts.WorkflowUser.connect(WorkflowUser.java:54)
[WorkflowClient]at
com.cf.rt.struts.WorkflowLogonAction.perform(WorkflowLogonAction.java:53)
[WorkflowClient]at
org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.ja
va:1726)
[WorkflowClient]at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1536)
[WorkflowClient]at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
[WorkflowClient]at
javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
[WorkflowClient]at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
[WorkflowClient]at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
[WorkflowClient]at
org.apache.tomcat.core.Handler.service(Handler.java:286)
[WorkflowClient]at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
[WorkflowClient]at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
[WorkflowClient]at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
[WorkflowClient]at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
[WorkflowClient]at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
[WorkflowClient]at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
[WorkflowClient]at java.lang.Thread.run(Thread.java:484)


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



Re: [JBoss-user] Problem making CORBA call

2001-05-15 Thread Dave Ortman

<>

Just a wild guess... I never assumed it would be correct.

<>

Well, at least that clears that up.  I had looked through the spec for something
saying "You can't do this", but had no such luck.  So I guess that narrows it
down to user error.


> I placed the IOR string in the Java file, as I can't use I/O classes to read

> it from a file (as I'm doing in my Swing client).  I've put some logging in

> the bean, and have found that the string_to_object method always returns a
null
> object.

<>

As would I.

<>

I'm 99% sure that everything is EXACTLY the same.  I actually have the connection
logic in a helper class - CorbaManager.  The IOR string is hard coded in the
class.  I'm running both EJB and Swing client on the same machine.  So, each
create an instance of the CorbaManager object - one works, the other doesn't.


I'll go and check for that extra 1% of confidence.  Perhaps I'm doing something
different... but I really don't think that to be the case.  At any rate, knowing
that it's not forbidden helps in now that I know there must be a problem somewhere


Thanks,
-Dave

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



Re: [JBoss-user] SQLServer type-mapping for text?

2001-05-15 Thread Sebastien Alborini

Lewis Henderson wrote:
> 
> Does anyone know what how to set up JAWS for SQLServer text columns? I tried
> LONGVARCHAR and got  :-

Sorry I don't know.

> 
> javax.ejb.CreateException: Could not create entity:java.sql.SQLException:
> [Microsoft][ODBC SQL Server Driver]String data, right truncation
> 
> ...also If I set up java.lang.String to be LONGVARCHAR or whatever, how do I
> then set up my 'standard' VARCHAR strings?

You can redefine a type-mapping on a per-column basis, see example 2 in
http://www.jboss.org/documentation/HTML/ch05s04.html

Sebastien


> 
> Any help here would make my life a LOT easier!!!
> 
> Kind regards
> 
> Lewis
> 
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user

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



Re: [JBoss-user] One more doubt about MDB

2001-05-15 Thread Anil Tatineni

guys,
i been followin this thread and i think this article answers most of the
questions in a lucid way
this is a pretty good intro to messaging.
http://www.execpc.com/~gopalan/jms/jms.html

Per Lewau wrote:

> On Tue, 15 May 2001 [EMAIL PROTECTED] wrote:
>
> > Hello again:
> >
> > I'm using a Topic with (only) one subscriber (i.e. ListenerBean),
> > with this assumption...
> > which is the diference between using a QUEUE or a TOPIC?
>
> None.
>
> If you only have one subscriber and will only ever have one subscriber you
> could use a Queue instead. With a topic however you could add more
> subscribers if that becomes necessary, fun or whatever in the future
> without having to change anything else.
>
> Cheers
>
> ---
> Per Lewau ([EMAIL PROTECTED])
>
> "Why waste time learning, when ignorance is instantaneous?"
> - Hobbes
>
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user


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



[JBoss-user] JBoss newbie needs help with installation!

2001-05-15 Thread Frank Villarreal

Hello all!

I have installed Jboss 2.0 standalone successfully before, but now I have
installed Jboss2.2.1 w/tomcat and receive the following error when I attempt
startup:

cd /usr/jboss-tomcat/jboss/bin

/bin/sh run_with_tomcat.sh

JBOSS_CLASSPATH=run.jar:../crimson.jar:/usr/jdk1.3.0_02/lib/tools.jar

EXCEPTION in thread "main" java.io.IOException: jboss.properties missing at
org.jboss.Main.main(Main.java:66)

I know the jboss.properties file is in the right place and present. I have
not modified the package downloaded directly from jboss.org. 

Has anyone seen this before? Can someone please point me in the right
direction?
Thanks in advance!

-Frank

PS: Outstanding work JBOSS coders, the product seems to really be evolving
rapidly!

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



Re: [JBoss-user] MVCSoft Persistant Manager relationship problem

2001-05-15 Thread Jim Archer

This is a known problem with the MVC Soft PM. Add this to your descriptor 
for beans that access EBs:




   jdbc/PersistenceDS
   javax.sql.DataSource
   Container


Also, don't hesttate to participate in the mail list for MVC Soft. There is 
lots of great info there!

Jim



--On Tuesday, May 15, 2001 12:29 PM +0200 Rune Hamnvik <[EMAIL PROTECTED]> 
wrote:

> Hello
> We want to start using the EJB 2.0 CMP model and have bought the MVCSofts
> Persistant
> Manager Educational Release. We have defined two local (same ear) Entity
> beans with
> a one-to-many relationship between those two. The deployment under JBoss
> 2.2.1 seems
> to work fine, but when we try to add elements to the relationship we get
> an exception.
> See the dump below. Has anyone any idea why we get this exception ?
>
> We are using MySql and all the tables has been created, and creating new
> entities works
> fine, but accessing the relationship fails.
>
> Regards
> Rune Hamnvik
> Mobinor AS
> Norway
>
> [ProductManagerEJB] javax.naming.NameNotFoundException: jdbc not bound
> [ProductManagerEJB] at
> org.jnp.server.NamingServer.getBinding(NamingServer.java:474)
> [ProductManagerEJB] at
> org.jnp.server.NamingServer.getBinding(NamingServer.java:482)
> [ProductManagerEJB] at
> org.jnp.server.NamingServer.getObject(NamingServer.java:488)
> [ProductManagerEJB] at
> org.jnp.server.NamingServer.lookup(NamingServer.java:254)
> [ProductManagerEJB] at
> org.jnp.server.NamingServer.lookup(NamingServer.java:257)
> [ProductManagerEJB] at
> org.jnp.interfaces.NamingContext.lookup(NamingContext.java:295)
> [ProductManagerEJB] at
> org.jnp.interfaces.NamingContext.lookup(NamingContext.java:403)
> [ProductManagerEJB] at
> org.jnp.interfaces.NamingContext.lookup(NamingContext.java:279)
> [ProductManagerEJB] at
> javax.naming.InitialContext.lookup(InitialContext.java:350)
> [ProductManagerEJB] at
> com.mvcsoft.persistence.util.NamespaceUtil.getTransactionalConnection(Nam
> esp aceUtil.java:68)
> [ProductManagerEJB] at
> com.mobinor.mymobile.product.ejb.PersistentRelationshipServiceHasCategori
> es.
> deleteRelationshipMembers(PersistentRelationshipServiceHasCategories.java
> :14 7)
> [ProductManagerEJB] at
> com.mvcsoft.persistence.relationship.RelationshipBase.storeRemovals(Relat
> ion shipBase.java:194)
> [ProductManagerEJB] at
> com.mvcsoft.persistence.jboss.spi.ContainerImpl.storeRelationshipUpdates(
> Con tainerImpl.java:253)
> [ProductManagerEJB] at
> com.mvcsoft.persistence.jboss.spi.ContainerImpl.storeForTransaction(Conta
> ine rImpl.java:266)
> [ProductManagerEJB] at
> com.mvcsoft.persistence.jboss.spi.ContainerImpl$PersistenceSynchronizatio
> n.b eforeCompletion(ContainerImpl.java:283)
> [ProductManagerEJB] at
> org.jboss.tm.TxCapsule.doBeforeCompletion(TxCapsule.java:1228)
> [ProductManagerEJB] at
> org.jboss.tm.TxCapsule.commit(TxCapsule.java:322) [ProductManagerEJB]
> at
> org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:76)
> [ProductManagerEJB] at
> org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorC
> MT. java:318)
> [ProductManagerEJB] at
> org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99)
> [ProductManagerEJB] at
> org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java
> :19 0)
> [ProductManagerEJB] at
> org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)
> [ProductManagerEJB] at
> org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.
> jav a:271)
> [ProductManagerEJB] at
> org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContain
> erI nvoker.java:392)
> [ProductManagerEJB] at java.lang.reflect.Method.invoke(Native Method)
> [ProductManagerEJB] at
> sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)
> [ProductManagerEJB] at
> sun.rmi.transport.Transport$1.run(Transport.java:142)
> [ProductManagerEJB] at
> java.security.AccessController.doPrivileged(Native Method)
> [ProductManagerEJB] at
> sun.rmi.transport.Transport.serviceCall(Transport.java:139)
> [ProductManagerEJB] at
> sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:443)
> [ProductManagerEJB] at
> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.jav
> a:6 43)
> [ProductManagerEJB] at java.lang.Thread.run(Thread.java:484)
> [ProductManagerEJB] javax.ejb.EJBException
> [ProductManagerEJB] at
> com.mvcsoft.persistence.util.NamespaceUtil.getTransactionalConnection(Nam
> esp aceUtil.java:75)
> [ProductManagerEJB] at
> com.mobinor.mymobile.product.ejb.PersistentRelationshipServiceHasCategori
> es.
> deleteRelationshipMembers(PersistentRelationshipServiceHasCategories.java
> :14 7)
> [ProductManagerEJB] at
> com.mvcsoft.persistence.relationship.RelationshipBase.storeRemovals(Relat
> ion shipBase.java:194)
> [ProductManagerEJB] at
> com.mvcsoft.persistence.jboss.spi.Con

Re: [JBoss-user] SQLServer type-mapping for text?

2001-05-15 Thread Anil Tatineni

try using java streambuffers we had same problem. the driver can have problem
writing huge chunks of data in a single leap.

Lewis Henderson wrote:

> Does anyone know what how to set up JAWS for SQLServer text columns? I tried
> LONGVARCHAR and got  :-
>
> javax.ejb.CreateException: Could not create entity:java.sql.SQLException:
> [Microsoft][ODBC SQL Server Driver]String data, right truncation
>
> ...also If I set up java.lang.String to be LONGVARCHAR or whatever, how do I
> then set up my 'standard' VARCHAR strings?
>
> Any help here would make my life a LOT easier!!!
>
> Kind regards
>
> Lewis
>
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user


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



[JBoss-user] SQLServer type-mapping for text?

2001-05-15 Thread Lewis Henderson

Does anyone know what how to set up JAWS for SQLServer text columns? I tried
LONGVARCHAR and got  :-

javax.ejb.CreateException: Could not create entity:java.sql.SQLException:
[Microsoft][ODBC SQL Server Driver]String data, right truncation

...also If I set up java.lang.String to be LONGVARCHAR or whatever, how do I
then set up my 'standard' VARCHAR strings?

Any help here would make my life a LOT easier!!!

Kind regards

Lewis


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



Re: [JBoss-user] jboss startup problems postgresql driver

2001-05-15 Thread Michael Bilow

I have a few suggestions.  First, if you are not using Hypersonic at all,
which appears to be the case, then you should remove the reference to
"org.hsql.jdbcDriver" as a JdbcProvider.  We had long hangs at the same
point you did, depending upon how much memory and CPU power we were
throwing at the installation.  On a throw-away 166 MHz machine with 64 MB
RAM running Debian Linux, we saw a hang of 45 minutes before jBoss woke
up and continued initializing!  Admittedly, we were specifically trying to
test how far down the hardware curve we could push this.

Second, I have heard that there is some sort of bug in connecting with
Postgres where a password must be specified.  I have not personally tried
using Postgres with a blank password, so I do not know if this is true.

-- Mike


On 2001-05-15 at 13:46 +0200, Haug Bürger wrote:

> Hi,
> 
> my jboss doesn't start propperly, it hangs at
> [myWMS] Starting
> [myWMS] XA Connection pool myWMS bound to java:/myWMS
> 
> I removed the jboss-auto config file and moved the drivers jar-file to
> lib/ext. I can access the database with isqlview which uses the same
> driver. I trimmed the jbos.jcml to the necessary stuff that i guess it's
> necessary.
> 
> What is wrong with my configuration?
* * *
> >   
>   
>  name="DefaultDomain:service=JdbcProvider">
>  name="Drivers">org.postgresql.Driver,org.hsql.jdbcDriver
>   
> 
>  name="DefaultDomain:service=XADataSource,name=myWMS">
> myWMS
>  
>name="DataSourceClass">org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl
> 
> 
> jdbc:PostgreSQL://mona/myWMS
> 120
> buerger
> 10
> 
> false
> false
> false
> true
> 12
> 180
> false
> false
> 1.0
> 0
>   



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



RE: [JBoss-user] ClassCastException thrown during Context.lookup()

2001-05-15 Thread Michael Hustler

I was missing jbossmq-client.jar from the classpath.

Why was there no ClassNotFoundException thrown instead?

m.

-Original Message-
From: Michael Hustler [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 14, 2001 5:41 PM
To: Jboss (E-mail)
Subject: [JBoss-user] ClassCastException thrown during Context.lookup()


Hi,
can anyone tell me what I am doing wrong in this code block?  
I am trying to establish a connection to a topicConnectionFactory from
within my client.  Executing the code block results in a ClassCastException
during the lookup() call.

Properties env = new Properties();
env.setProperty("java.naming.factory.initial",
"org.jnp.interfaces.NamingContextFactory");
env.setProperty("java.naming.provider.url", "localhost:1099");
env.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming");

jndiContext = new InitialContext(env);

topicConnectionFactory = (TopicConnectionFactory)
jndiContext.lookup("TopicConnectionFactory");


Thanks!
mike.


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

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



RE: [JBoss-user] Documentation issues (was: Unable to resolve JNDIname)

2001-05-15 Thread Michael Bilow

On 2001-05-15 at 12:12 +0200, [EMAIL PROTECTED] wrote:

> > Is it a bug? Shouldn't jBoss report that it could not
> > find jboss.xml during deployment?
> 
> No, if no jboss.xml found, it uses the standardjboss.xml in the
> configuration dir. Same applies to the jaws.xml (it uses standardjaws.xml
> instead). Only ejb-jar.xml is required.

This sort of thing, although not this particular one, bit me before
between jboss.xml and jboss-auto.xml.  It might be a good idea to put the
start-up sequence and the complete list of files and their alternatives
into a single place in the documentation under a heading like "Starting
Sequence."  Many of these issues are documented, but are scattered all
over the documentation.

I think it might be prudent for jBoss at least to make a log entry,
something like "jboss.xml not found; using standardjboss.xml default
instead."  This would make it a lot easier to figure out what is going on.

While on the subject of documentation, it would be really handy to have a
keyword index of the on-line HTML manual.  A utility such as ht://Dig --
http://www.htdig.org/ -- could be used to generate this off-the-shelf.  
For example, if someone wants to know how to configure jBoss for Postgres,
they need to look under "Minerva."  Having a keyword index would allow
them to look under "Postgres" and produce fruitful results.

-- Mike


P.S. Personal note to Manu Srivastava, who started this thread (his words
are those marked with ">>"): Are you the same person as Manoj Srivastava?  
If so, hello!



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



Re: [JBoss-user] Adding JDBC-driver

2001-05-15 Thread Ivan

If you are using embedded tomcat there will be 2 jboss.jcml files. 1 in
conf\default and 1 in conf\tomcat

are you sure that you checked the same file each time and that if you
started jboss with tomcat that you are using the jboss.jcml file inside the
conf\tomcat directory

Ivan


- Original Message -
From: "Bas Cancrinus" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 15, 2001 8:12 AM
Subject: [JBoss-user] Adding JDBC-driver


> Hi,
>
> I'd like to connect JBoss 2.2.1 to a MySQL server.
> According to the manual (chapter 3 - Introduction) I copied the
> driver-JAR to the lib/ext directory and I added an mbean-entry to
> jboss.jcml. When I start JBoss my entry is ignored (no extra [JDBC]
> output in log) and JBoss erases it from jboss.jcml.
> Because this approach didn't work, I added my JDBC driver-class to the
> "jdbc.drivers"-value in jboss.properties. After starting JBoss, my log
> contained the output "[JDBC] Loaded
> JDBC-driver:org.gjt.mm.mysql.Driver", which is the added JDBC
driver-class.
>
> I have the following questions about the above:
> - Why does JBoss behave like this towards the manual approach?
> - Does my approach have any consequences for the functioning of JBoss
> compared to the manual approach?
>
> Thanks in advance,
> Bas
>
> --
> Bas E. Cancrinus <[EMAIL PROTECTED]>
> Product Manager RepTrack (TM) 
> Developer Cancrinus Search 
>
>
>
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user


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



Re: [JBoss-user] Adding JDBC-driver

2001-05-15 Thread Dovan Nguyen

I believe you need to add your jdbc driver class in the mbean entry attribute
name="Drivers" in the jboss.jcml

dovan

Bas Cancrinus wrote:

> Hi,
>
> I'd like to connect JBoss 2.2.1 to a MySQL server.
> According to the manual (chapter 3 - Introduction) I copied the
> driver-JAR to the lib/ext directory and I added an mbean-entry to
> jboss.jcml. When I start JBoss my entry is ignored (no extra [JDBC]
> output in log) and JBoss erases it from jboss.jcml.
> Because this approach didn't work, I added my JDBC driver-class to the
> "jdbc.drivers"-value in jboss.properties. After starting JBoss, my log
> contained the output "[JDBC] Loaded
> JDBC-driver:org.gjt.mm.mysql.Driver", which is the added JDBC driver-class.
>
> I have the following questions about the above:
> - Why does JBoss behave like this towards the manual approach?
> - Does my approach have any consequences for the functioning of JBoss
> compared to the manual approach?
>
> Thanks in advance,
> Bas
>
> --
> Bas E. Cancrinus<[EMAIL PROTECTED]>
> Product Manager RepTrack (TM)   
> Developer Cancrinus Search  
>
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user


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



RE: [JBoss-user] select count(*) from ... during CMP bean creatio n

2001-05-15 Thread RRokytskyy

> It looks to me as if having JAWSPersistenceManager get the class of a
> JDBCCommandFactory from the container metadata, and having
> JDBCCommandFactory descendants (and the commands they create) 
> implement the
> db specific behaviour is a possibility.  Is this what you 
> were proposing?

Not exactly. Yes, you're right that if you go for the JDBCCommandFactory
then you're able to provide commands that can implement the database
specific functionality. However, what I propose, is to reuse the existing
commands, because almost the all functionality remains the same.

For example, if I want to override the setParameter(PreparedStatement, int,
int, Object), getResultObject(ResultSet, int, Class) or jdbcExecute(Object)
in the JDBCCommand class (to customize the serialization for example), I can
do this by  

public class MyJDBCCommand extends JDBCCommand {
  protected void setParameter(...) {...}
  protected Object getResultObject(...) {...}
  protected jdbcExecute(Object arg) {...}
}

All existing JDBC commands could be reused (the code there is basically
business logic, and not DB specific). But I cannot do this because all of
them are inherited from the JDBCCommand, not MyJDBCCommand. 

That is my vision of the problem. 

My idea is that all JDBC commands use delegation instead of the inheritence.
Then if I'm able to pass my JDBCCommand class as the parameter, I can reuse
current code and don't worry about the creating a bunch of classes by
copying them from existing code.

Regards,
Roman.

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



Re: [JBoss-user] Resource Management

2001-05-15 Thread danch (Dan Christopherson)

How resources are managed is dependent on the container implementation. 
I suppose some container could allow management at that level of 
granularity, but I don't know of any.

On the memory side, you could get close by twiddleing cache/pool 
configurations.

Those kind of statistics are hard to come by in Java applications in 
general.

-danch

[EMAIL PROTECTED] wrote:

> Hi,
> 
> well pardon me if I completely lack of knowledge about jboss here, but : is it 
>possible to write an EJB application in JBoss where it is possible to dynamically 
>manage an EJB's resources.
> Say "Paul" is an EJB component.
> 
> - percentage of container cpu time consumed by Paul : the container consumes its own 
>cpu time. Now I want that Paul, who is an EJB, consumes a max of 20% of the 
>container's cpu time.
> - percentage of memory consumed.
> 
> Best regards, 
> 
> Jubin
> 




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



[JBoss-user] Adding JDBC-driver

2001-05-15 Thread Bas Cancrinus

Hi,

I'd like to connect JBoss 2.2.1 to a MySQL server.
According to the manual (chapter 3 - Introduction) I copied the 
driver-JAR to the lib/ext directory and I added an mbean-entry to 
jboss.jcml. When I start JBoss my entry is ignored (no extra [JDBC] 
output in log) and JBoss erases it from jboss.jcml.
Because this approach didn't work, I added my JDBC driver-class to the 
"jdbc.drivers"-value in jboss.properties. After starting JBoss, my log 
contained the output "[JDBC] Loaded 
JDBC-driver:org.gjt.mm.mysql.Driver", which is the added JDBC driver-class.

I have the following questions about the above:
- Why does JBoss behave like this towards the manual approach?
- Does my approach have any consequences for the functioning of JBoss 
compared to the manual approach?

Thanks in advance,
Bas

-- 
Bas E. Cancrinus<[EMAIL PROTECTED]>
Product Manager RepTrack (TM)   
Developer Cancrinus Search  



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



[JBoss-user] Resource Management

2001-05-15 Thread connecstasy

Hi,

well pardon me if I completely lack of knowledge about jboss here, but : is it 
possible to write an EJB application in JBoss where it is possible to dynamically 
manage an EJB's resources.
Say "Paul" is an EJB component.

- percentage of container cpu time consumed by Paul : the container consumes its own 
cpu time. Now I want that Paul, who is an EJB, consumes a max of 20% of the 
container's cpu time.
- percentage of memory consumed.

Best regards, 

Jubin








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



RE: [JBoss-user] Using Xerces

2001-05-15 Thread Xandy Johnson


First, I am cross-posting this message to jboss-dev because I think it may
involve a development issue regarding class loaders.  At the minimum, I
think some explanatory material should be developed both for using other
XML parsers and for migrating to 2.2.x from earlier versions.  I am
willing to do this, but I know I won't be able to look at it at least
until next week, by which time I'm sure somebody else will have done
something.

Second, I apologize that this message is longer, less complete, and less
clear than I would generally hope, but I thought it better to send it than
to delay it until I have enough time, which may be never :-).

It seems to me that this problem relates to class loaders and the JAXP
mechanism for loading XML parsers, i.e. a factory method.  If
javax.xml.parsers.SAXParserFactory is loaded by the system ClassLoader
from crimson.jar, which is specified in the classpath given on the
command-line, then it will not have access to classes that are loaded
either from jboss/lib/ext, an MBean, or from the libraries of deployed
EAR files.  One solution, then, is to modify the scripts to put the Xerces
jar file in the classpath passed on the java command-line.  Then the
system ClassLoader will be able to see the classes.

However, this seems incomplete to me, since you can still only have one
value for the javax.xml.parsers.SAXParserFactory property, also passed on
the command-line.  I have not fully investigated this, but from a quick
glance at one of the former messages on jboss-user, it appeared that JBoss
itself would not work with Xerces specified as the parser.  If this is not
the case, I apologize to the developers for insinuating that it might be.
If it is true, then I think part of the solution is to modify JBoss so
that it can work with either Xerces or Crimson (or any other
JAXP-compliant parser).  Again, I can work on this, but not until at least
next week.  For those who may want to test this, put the Xerces jar file
in the classpath passed on the java command-line *BEFORE OR INSTEAD OF
CRIMSON* and specify -Djavax.xml.parsers.SAXParserFactory appropriately (I
think it may be the following)

set 
JAXP=-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
set JAXP="%JAXP% 
-Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl"

Note: UNIX users will need to adjust that to


JAXP=-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
JAXP="$JAXP 
-Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl"

Finally, the potential jboss-dev issue is this: is there some way that
beans or components (e.g Tomcat) could each be able to specify their own
XML parser and factory?  I'm not well-versed in the details of class
loading, so JBoss may already be doing the best that can be done given
Java classloading semantics, but I considered it worth asking the
question.

Xandy

On Mon, 14 May 2001, Dave Ortman wrote:

> I got a similar error and I'm not sure why.  Can anyone explain?
>
> In the meanwhile, if you change your scripts so that the Xerces jar files come
> AFTER all the JBoss jar files (run.jar, etc.) in the CLASSPATH, then all should
> work fine.
>
> -Dave Ortman
>
> >Folks,
> >
> >
> >I tried to configure JBoss to use Xerces as suggested but get the following
>
> >error at start-up:
> >
> >
> >JBOSS_CLASSPATH=;/lib/tools.jar;D:\Development\Landmark\Xerces\Xerces-1_3_1\
>
> >xerces.jar;run.jar;D:\Development\Landmark\Xerces\Xerces-1_3_1\xerces.jar;..
>
> >/lib/crimson.jar
> >jboss.home = C:\JBoss-2.2.1_Tomcat-3.2.1\jboss
> >Using configuration "tomcat"
> >[Info] Java version: 1.3.0,Sun Microsystems Inc.
> >[Info] Java VM: Java HotSpot(TM) Client VM 1.3.0-C,Sun Microsystems Inc.
> >[Info] System: Windows NT 4.0,x86
> >[Shutdown] Shutdown hook added
> >[Service Control] Registered with server
> >Exception in thread "main" [Default]
> >javax.xml.parsers.FactoryConfigurationError:
> >org/apache/xerces/jaxp/DocumentBuilder
> >FactoryImpl -Djavax/xml/parsers/SAXParserFactory=org/apache/xerces/jaxp/SAXP
>
> >arserFactoryImpl
> >[Default]   at
> >javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.
>
> >java:154)
> >[Default]   at org.jboss.Main.(Main.java:192)
> >[Default]   at org.jboss.Main$1.run(Main.java:107)
> >[Default]   at java.security.AccessController.doPrivileged(Native
> >Method)
> >[Default]   at org.jboss.Main.main(Main.java:103)
> >[Default] Shutting down
> >[Service Control] Stopping 0 MBeans
> >[Service Control] Stopped 0 services
> >[Service Control] Destroying 0 MBeans
> >[Service Control] Destroyed 0 services
> >[Default] Shutdown complete
> >
> >
> >
> >Any ideas?
> >
> >
> >The overall problem is that I want to use SOAP.
> >JBoss ZOAP doesnt appear to be supported at the mo, so I downloaded  Apache
>
> >SOAP 2.1 whiuch needs the Xerces parser...
> >
> >
> >
> >Thanks in adva

RE: [JBoss-user] select count(*) from ... during CMP bean creatio n

2001-05-15 Thread David Jencks

Hi,
I'm not sure I understand exactly which classes you propose modifying.

It looks to me as if having JAWSPersistenceManager get the class of a
JDBCCommandFactory from the container metadata, and having
JDBCCommandFactory descendants (and the commands they create) implement the
db specific behaviour is a possibility.  Is this what you were proposing?

thanks
david jencks
On 2001.05.15 04:15:40 -0400 [EMAIL PROTECTED] wrote:
> > It occurs to me that if you expect the insert to normally 
> > succeed, you could start by trying the insert, if it fails 
> > you can investigate further with the count(*) query to 
> > see if the problem is the existing row.  This would be 
> > one access for success, 2 for failure instead of 1+ 
> > for failure and 2 for success (Even if the key is missing, 
> > the insert might fail for other reasons.. maybe a unique 
> > index).  
> 
> I support this idea. Some time before I've used the same 
> technique for the small datawarehouse, it worked perfectly.
> 
> > Another possibility (presumably for the future) would be 
> > to have JAWS customizable with a plugin/database
> > vendor and recognize their error messages.
> 
> That would be great. I've tried to customize the JAWS jdbc
> command object, but left that idea because of complexities:
> The reason is the inheritence of all JDBC. Usually
> one need to change only JDBCCommand in order to customize
> it to the database, but then you're not able to tell all
> other commands to use new one. 
> 
> I suggest that we define the abstract class that can takes
> JDBCCommand as constructor parameter and then invokes all
> methods on the passed JDBCCommand. All concrete commands
> should be inherited from that abstract class. It seems to 
> me that in this case we will be able to customize JAWS
> for different databases easily.
> 
> Regards,
> Roman
> 
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
> 


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



SV: [JBoss-user] INSERTING AN ALREADY EXISTING BEAN..... problem

2001-05-15 Thread Lennart Petersson

This is strange

Following is (was) the problem:

a) Creates an entity bean with PK x

b) Does a remove on this entity bean

c) Tries again to create this entity bean with the same PK x.

I used to (and others also) to get an exception doing this telling me that i'm trying 
to insert an already existing bean. What i and others thought was that the removed 
entity bean was still available in the cache and therefore not possible to recreate. 
Please note that the entity was always successfully removed from the db.

I now made a simple test to show you this and what happens??? One of following is 
correct:

1) Same problem
2) Other problem
3) It works like a dream - no errors

And the right answer is: 3) It works like a dream...

Made my test in 2 variants: First when a, b and c was called in seperate transactions 
and then when a, b and c was called in one transaction. Both variants was working.

Now i rest my case, until it creeps up again.

/Lennart

- Original Message - 
From: Bordet, Simone <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 15, 2001 2:34 PM
Subject: RE: [JBoss-user] INSERTING AN ALREADY EXISTING BEAN. problem


> Ulp !
> 
> > yes, the problem exists and no, iv'e no fix on it yet.
> 
> What is exactly the problem ? I probably missed it...
> Do you have a simple test that fails ?
> 
> Simon
> 
> > I said for some weeks ago that i would take on it but there 
> > hasn't been any time for it yet :-(
> > 
> > /Lennart
> > 
> > 
> > ___
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/jboss-user
> > 
> 
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user


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



Re: [JBoss-user] MVCSoft Persistant Manager relationship problem

2001-05-15 Thread Brenton House

It sounds like your DefaultDS is not setup.


- Original Message -
From: "Rune Hamnvik" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 15, 2001 5:29 AM
Subject: [JBoss-user] MVCSoft Persistant Manager relationship problem


Hello
We want to start using the EJB 2.0 CMP model and have bought the MVCSofts
Persistant
Manager Educational Release. We have defined two local (same ear) Entity
beans with
a one-to-many relationship between those two. The deployment under JBoss
2.2.1 seems
to work fine, but when we try to add elements to the relationship we get an
exception.
See the dump below. Has anyone any idea why we get this exception ?

We are using MySql and all the tables has been created, and creating new
entities works
fine, but accessing the relationship fails.

Regards
Rune Hamnvik
Mobinor AS
Norway

[ProductManagerEJB] javax.naming.NameNotFoundException: jdbc not bound
[ProductManagerEJB] at
org.jnp.server.NamingServer.getBinding(NamingServer.java:474)
[ProductManagerEJB] at
org.jnp.server.NamingServer.getBinding(NamingServer.java:482)
[ProductManagerEJB] at
org.jnp.server.NamingServer.getObject(NamingServer.java:488)
[ProductManagerEJB] at
org.jnp.server.NamingServer.lookup(NamingServer.java:254)
[ProductManagerEJB] at
org.jnp.server.NamingServer.lookup(NamingServer.java:257)
[ProductManagerEJB] at
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:295)
[ProductManagerEJB] at
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:403)
[ProductManagerEJB] at
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:279)
[ProductManagerEJB] at
javax.naming.InitialContext.lookup(InitialContext.java:350)
[ProductManagerEJB] at
com.mvcsoft.persistence.util.NamespaceUtil.getTransactionalConnection(Namesp
aceUtil.java:68)
[ProductManagerEJB] at
com.mobinor.mymobile.product.ejb.PersistentRelationshipServiceHasCategories.
deleteRelationshipMembers(PersistentRelationshipServiceHasCategories.java:14
7)
[ProductManagerEJB] at
com.mvcsoft.persistence.relationship.RelationshipBase.storeRemovals(Relation
shipBase.java:194)
[ProductManagerEJB] at
com.mvcsoft.persistence.jboss.spi.ContainerImpl.storeRelationshipUpdates(Con
tainerImpl.java:253)
[ProductManagerEJB] at
com.mvcsoft.persistence.jboss.spi.ContainerImpl.storeForTransaction(Containe
rImpl.java:266)
[ProductManagerEJB] at
com.mvcsoft.persistence.jboss.spi.ContainerImpl$PersistenceSynchronization.b
eforeCompletion(ContainerImpl.java:283)
[ProductManagerEJB] at
org.jboss.tm.TxCapsule.doBeforeCompletion(TxCapsule.java:1228)
[ProductManagerEJB] at org.jboss.tm.TxCapsule.commit(TxCapsule.java:322)
[ProductManagerEJB] at
org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:76)
[ProductManagerEJB] at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.
java:318)
[ProductManagerEJB] at
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99)
[ProductManagerEJB] at
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:19
0)
[ProductManagerEJB] at
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)
[ProductManagerEJB] at
org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.jav
a:271)
[ProductManagerEJB] at
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerI
nvoker.java:392)
[ProductManagerEJB] at java.lang.reflect.Method.invoke(Native Method)
[ProductManagerEJB] at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)
[ProductManagerEJB] at
sun.rmi.transport.Transport$1.run(Transport.java:142)
[ProductManagerEJB] at
java.security.AccessController.doPrivileged(Native Method)
[ProductManagerEJB] at
sun.rmi.transport.Transport.serviceCall(Transport.java:139)
[ProductManagerEJB] at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:443)
[ProductManagerEJB] at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:6
43)
[ProductManagerEJB] at java.lang.Thread.run(Thread.java:484)
[ProductManagerEJB] javax.ejb.EJBException
[ProductManagerEJB] at
com.mvcsoft.persistence.util.NamespaceUtil.getTransactionalConnection(Namesp
aceUtil.java:75)
[ProductManagerEJB] at
com.mobinor.mymobile.product.ejb.PersistentRelationshipServiceHasCategories.
deleteRelationshipMembers(PersistentRelationshipServiceHasCategories.java:14
7)
[ProductManagerEJB] at
com.mvcsoft.persistence.relationship.RelationshipBase.storeRemovals(Relation
shipBase.java:194)
[ProductManagerEJB] at
com.mvcsoft.persistence.jboss.spi.ContainerImpl.storeRelationshipUpdates(Con
tainerImpl.java:253)
[ProductManagerEJB] at
com.mvcsoft.persistence.jboss.spi.ContainerImpl.storeForTransaction(Containe
rImpl.java:266)
[ProductManagerEJB] at
com.mvcsoft.persistence.jboss.spi.ContainerImpl$PersistenceSynchronization.b
eforeCompletion(ContainerImpl.java:283)
[ProductManagerEJB

RE: [JBoss-user] JBossRealm Security Bug

2001-05-15 Thread Mayo, Eric

Is this fix going to be in the next release of JBoss?   (I don't need to
worry about this yet as our project is far from deployment, but eventually
it will become an issue.)

Eric

-Original Message-
From: Shotton Mark MMUk [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 15, 2001 9:13 AM
To: '[EMAIL PROTECTED]'
Subject: [JBoss-user] JBossRealm Security Bug


Hello there

There is an omission in the version of org.jboss.tomcat.security.JbossRealm
that I checked out of CVS from the contrib/tomcat area. The principal and
credentials propogated from Tomcat are stored in ThreadLocal objects in
org.jboss.security.SecurityAssociation. However these ThreadLocal variables
are never reset to null. So the threads are returned to the pool and can be
used again with the principal and credentials still set (not very secure!).

The JbossRealm should implement a method to reset the principal and
credentials to null. I have done this as below:

package org.jboss.tomcat.security;

import java.security.Principal;
import java.util.Hashtable;

import org.apache.tomcat.core.Request;
import org.apache.tomcat.core.Response;

import org.apache.tomcat.util.SecurityTools;
import org.apache.tomcat.core.BaseInterceptor;
import org.jboss.security.SecurityAssociation;
import org.jboss.security.SimplePrincipal;

/**
 * This maps Tomcat credintials to jBoss credintials.  It can probably be
placed after
 * many other Tomcat realms to map that realm into jBoss.
 * @author mailto:[EMAIL PROTECTED]";>Kevin Lewis
 * @version $Revision: 1.3 $
 *
 * changed imports to reflect new org.jboss.security structure
 * @author mailto:[EMAIL PROTECTED]";>Dewayne McNair
 * @version $Revision: 1.3 $
 *
 */
public class JbossRealm  extends  BaseInterceptor {

public int authenticate( Request req, Response response ){
Hashtable cred=new Hashtable();
SecurityTools.credentials( req, cred );
String user=(String)cred.get("username");
SecurityAssociation.setPrincipal( new SimplePrincipal( user
) );
String pw=(String)cred.get("password");
if (null != pw)
SecurityAssociation.setCredential( pw.toCharArray() );
return 0;
}

public int afterBody( Request req, Response response ){
SecurityAssociation.setPrincipal(null);
SecurityAssociation.setCredential(null);
return 0;
}

}

Mark


Dr M.W. Shotton
MICROMASS UK LIMITED
Floats Road
Wythenshawe
Manchester M23 9LZ
UK

+44 (0) 161 718 4548



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


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



[JBoss-user] customization of security

2001-05-15 Thread Wei Ma

I am trying to implement a "personalization agent" which acts like a real time
store clerk. The agent keeps track on the user's information such as account
balance and number of visits.

When a user requires to see one account balance, the agent shall denie the
request if the user doesn't have the authority(only the owner of the account
and the spouse of the owner should have access to account balance).

Is there anyway  to implement this feature with JBoss without accessing
Database every time a request received?

thanks

Wei


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



RE: [JBoss-user] where can i find the minerva source

2001-05-15 Thread Vesco Claudio

Hi!

They are in jbosscx :-)))

I have now cvs co (anonymous) the new jbosspool module...

Claudio

PS: I remember you: connector patches :-)))

> -Original Message-
> From: Toby Allsopp [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, May 14, 2001 10:15 PM
> To:   [EMAIL PROTECTED]
> Subject:  Re: [JBoss-user] where can i find the minerva source
> 
> On Mon, May 14, 2001 at 10:11:44AM +0200, Vesco Claudio wrote:
> > Hi!
> > 
> > I need also the source of minerva package because I have implemented
> > connection sharing for jca... when can we have the new package in
> jboss?
> 
> Couple of days.  It will remain at a couple of days until
> approximately
> two days before it is done.
> 
> I'm a little confused by your statement.  How can you have implemented
> it without having the Minerva source?
> 
> Anyway, I should have it imported today or tomorrow.  Couple of days.
> 
> Toby.
> 
> > > -Original Message-
> > > From: Toby Allsopp [SMTP:[EMAIL PROTECTED]]
> > > Sent: Sunday, May 13, 2001 11:49 PM
> > > To:   [EMAIL PROTECTED]
> > > Subject:  Re: [JBoss-user] where can i find the minerva source
> > > 
> > > On Sun, May 13, 2001 at 11:28:18PM +0200, Tbone wrote:
> > > > Hi,
> > > > 
> > > > I have some pools of my own and i want to make them minerva( the
> > > jboss pool
> > > > implementation ) compatible.
> > > > 
> > > > where do I find the source of minerva package
> > > > i've traveled the jboss source tree.
> > > 
> > > You can find the sources in the jbosscx module, under
> src/external.
> > > However,
> > > I would advise holding off for a couple of days because we are
> forking
> > > Minerva and bringing it back under the JBoss umbrella.  This will
> mean
> > > that
> > > the package names will change.  Stay tuned.
> > > 
> > > Toby.
> > > 
> > > > greetz tbone
> > > 
> > > Word! :-)
> 
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user

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



[JBoss-user] JBossRealm Security Bug

2001-05-15 Thread Shotton Mark MMUk

Hello there

There is an omission in the version of org.jboss.tomcat.security.JbossRealm
that I checked out of CVS from the contrib/tomcat area. The principal and
credentials propogated from Tomcat are stored in ThreadLocal objects in
org.jboss.security.SecurityAssociation. However these ThreadLocal variables
are never reset to null. So the threads are returned to the pool and can be
used again with the principal and credentials still set (not very secure!).

The JbossRealm should implement a method to reset the principal and
credentials to null. I have done this as below:

package org.jboss.tomcat.security;

import java.security.Principal;
import java.util.Hashtable;

import org.apache.tomcat.core.Request;
import org.apache.tomcat.core.Response;

import org.apache.tomcat.util.SecurityTools;
import org.apache.tomcat.core.BaseInterceptor;
import org.jboss.security.SecurityAssociation;
import org.jboss.security.SimplePrincipal;

/**
 * This maps Tomcat credintials to jBoss credintials.  It can probably be
placed after
 * many other Tomcat realms to map that realm into jBoss.
 * @author mailto:[EMAIL PROTECTED]";>Kevin Lewis
 * @version $Revision: 1.3 $
 *
 * changed imports to reflect new org.jboss.security structure
 * @author mailto:[EMAIL PROTECTED]";>Dewayne McNair
 * @version $Revision: 1.3 $
 *
 */
public class JbossRealm  extends  BaseInterceptor {

public int authenticate( Request req, Response response ){
Hashtable cred=new Hashtable();
SecurityTools.credentials( req, cred );
String user=(String)cred.get("username");
SecurityAssociation.setPrincipal( new SimplePrincipal( user
) );
String pw=(String)cred.get("password");
if (null != pw)
SecurityAssociation.setCredential( pw.toCharArray() );
return 0;
}

public int afterBody( Request req, Response response ){
SecurityAssociation.setPrincipal(null);
SecurityAssociation.setCredential(null);
return 0;
}

}

Mark


Dr M.W. Shotton
MICROMASS UK LIMITED
Floats Road
Wythenshawe
Manchester M23 9LZ
UK

+44 (0) 161 718 4548



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



Re: [JBoss-user] One more doubt about MDB

2001-05-15 Thread danch (Dan Christopherson)

[EMAIL PROTECTED] wrote:

> Hello again:
> 
> I'm using a Topic with (only) one subscriber (i.e. ListenerBean),
> with this assumption...
> which is the diference between using a QUEUE or a TOPIC?


With a topic, multiple listeners will recieve the same message. With a 
queue at most one reciever will recieve the message.


-danch




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



Re: [JBoss-user] Backup problem?

2001-05-15 Thread danch (Dan Christopherson)

Jim Archer wrote:

> Hi All...
> 
> We are getting ready to put a system into production and a question 
> occured to us. Our plan is to use jBoss/Tomcat 2.2.1 with PostgreSQL on 
> Debian/Linux. Postgres has a pgdump utility that will allow an online 
> backup that is guaranteed correct (from a referential integrity 
> standpoint). Of course, we had planned to use commit option 'A' for 
> performance reasons.
> 
> So, the problem is, how do we do an online backup of a database when 
> jBoss is running commit option 'A'?  Will a backup be logically 
> consistent with jBoss caching EBs and queries and such if we use pgdump 
> while jBoss is running? We would prefer not to have to take the server 
> down to do a backup.


Under commit option A, entities are still synchronized _to_ the database 
on commit, so you won't miss any data. They're not necessarily read 
_from_ the database when they join a transaction, but that shouldn't be 
a problem with backups.

-danch


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



RE: [JBoss-user] INSERTING AN ALREADY EXISTING BEAN..... problem

2001-05-15 Thread Bordet, Simone

Hey Martin

> Hi,
> 
> I recently upgraded from JBoss 2.0 Final to Jboss 2.2.1. 
> Everything works as
> expected but now I get a IllegalStateException when creating 
> entity beans.
> If I wait some minutes after creation and try to create the next bean
> everything works. I searched the mailing list and found some 
> other postings
> regarding this issue, but I found no solution. As I have 
> understood there is
> a bug in JBoss` caching

Not that I know ;)
Are you sure you return the correct pk from ejbCreate ?
The problem you have happens for example if ejbCreate always returns the
same pk, maybe a typo or a forgot-to-modify cut'n'paste ?

HTH,

Simon

> 
> Are there any solutions now to solve this prob?
> 
> I´m running JBoss 2.2.1/Tomcat on Linux (SUN JDK 1.3)
> --
> --
> 
> 
> 
>  [BasketItemApp] TRANSACTION ROLLBACK EXCEPTION:null; nested 
> exception is:
> javax.ejb.EJBException
> [BasketItemApp] java.lang.IllegalStateException: INSERTING AN ALREADY
> EXISTING BEAN, ID = de.lilienthal.ET.ejb.entity.BasketItemPK@19317757
> [BasketItemApp] at
> org.jboss.ejb.plugins.AbstractInstanceCache.insert(AbstractIns
> tanceCache.jav
> a:207)
> [BasketItemApp] at
> org.jboss.ejb.plugins.BMPPersistenceManager.createEntity(BMPPe
> rsistenceManag
> er.java:165)
> [BasketItemApp] at
> org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:441)
> [BasketItemApp] at 
> java.lang.reflect.Method.invoke(Native Method)
> [BasketItemApp] at
> org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(
> EntityContaine
> r.java:639)
> [BasketItemApp] at
> org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeH
> ome(EntitySync
> hronizationInterceptor.java:160)
> [BasketItemApp] at
> org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(Ent
> ityInstanceInt
> erceptor.java:87)
> [BasketItemApp] at
> org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxIntercepto
> rCMT.java:135)
> [BasketItemApp] at
> org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxI
> nterceptorCMT.
> java:263)
> [BasketItemApp] at
> org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxIntercepto
> rCMT.java:86)
> [BasketItemApp] at
> org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityI
> nterceptor.jav
> a:164)
> [BasketItemApp] at
> org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor
> .java:106)
> [BasketItemApp] at
> org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:316)
> [BasketItemApp] at
> org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeH
> ome(JRMPContai
> nerInvoker.java:436)
> [BasketItemApp] at
> org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomePro
> xy.java:212)
> [BasketItemApp] at $Proxy27.create(Unknown Source)
> 
> 
> 
> 
> regards,
> 
> 
> Martin
> 
> 
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
> 

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



RE: [JBoss-user] INSERTING AN ALREADY EXISTING BEAN..... problem

2001-05-15 Thread Bordet, Simone

Ulp !

> yes, the problem exists and no, iv'e no fix on it yet.

What is exactly the problem ? I probably missed it...
Do you have a simple test that fails ?

Simon

> I said for some weeks ago that i would take on it but there 
> hasn't been any time for it yet :-(
> 
> /Lennart
> 
> 
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
> 

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



SV: [JBoss-user] INSERTING AN ALREADY EXISTING BEAN..... problem

2001-05-15 Thread Lennart Petersson

yes, the problem exists and no, iv'e no fix on it yet.

I said for some weeks ago that i would take on it but there hasn't been any time for 
it yet :-(

/Lennart


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



  1   2   >