javax.jms.MessageFormatException when ObjectMessage.getObject()

2002-03-04 Thread Tom Koutn



Hi,
I'm sending message via topic:
 ObjectMessage 
message = session.createObjectMessage(new 
Event()); 
session.createPublisher(topic).publish(message, deliveryMode, priority, 
expiration);
When I catch the message in my MDB,I get 
exception in getObject():
public void 
onMessage(Message msg) 
{1.Thread.currentThread().getContextClassLoader().loadClass("com.cleverlance.cmds.comm.Event");2.((ObjectMessage)msg).getObject();Class 
Event is in classpath and is visible for classloader (line 1 is ok). When 
running line 2, I get javax.jms.MessageFormatException: 
com.cleverlance.cmds.comm.Event

Class Event is very simple:
 package 
com.cleverlance.cmds.comm;
 public class Event 
implements java.io.Serializable {
 public 
Event();
 }

Do you know what's wrong? 
Thanks.


Re: BigDecimal problem...

2002-03-04 Thread Daniele Arduini

Hi Nicolas,
seems like you caught a bug in the Postgresql's JDBC driver.
I had similar problem using the driver from Postgresql 7.1.3,
you can either upgrage your driver to version 7.2 or
apply the following patch and rebuild it:

===[ begin BigDecimal patch ]==
diff -urN jdbc.orig/org/postgresql/jdbc2/PreparedStatement.java 
jdbc/org/postgresql/jdbc2/PreparedStatement.java
--- jdbc.orig/org/postgresql/jdbc2/PreparedStatement.java   Fri Feb 16 17:45:00 
2001
+++ jdbc/org/postgresql/jdbc2/PreparedStatement.javaTue Nov 20 12:16:53 2001
@@ -259,7 +259,11 @@
  */
 public void setBigDecimal(int parameterIndex, BigDecimal x) throws 
SQLException
 {
+   if (x != null) {
 set(parameterIndex, x.toString());
+   } else {
+   set(parameterIndex, null);
+   }
 }

 /**
===[ end BigDecimal patch ]==




Nicolas Camut wrote:
 Thanks, but I have already mapped BigDecimal type in this database schema.
 As I'm using Postgres dbms for development I have mapped it as follows but
 without any success:
 
 type-mapping type=java.math.BigDecimal name=decimal /
 
 As far as the pk type is concerned it is not up to me, being an Orion user
 basically I've always used long types. Still my task is to port this
 application from Weblogic to Orion - J2EE protability ;).
 
 Anyways, thanks for helping me out.
 
 
 Nicolas
 
 -Original Message-
 From: The elephantwalker [mailto:[EMAIL PROTECTED]]
 Sent: 2. maaliskuuta 2002 22:23
 To: Orion-Interest
 Subject: RE: BigDecimal problem...
 
 
 This could be your database-scheme. I notice that most of the database
 schemas that come with Orion (look at the config/database-schemas) do not
 include a field for java.math.BigDecimal. However, the SapDB.xml schema
 does. Copy this bit into your database schema, and this will probably fix
 your problem:
 
 type-mapping type=java.math.BigDecimal name=fixed(15,15) /
 
 Why aren't you using Long as the pk? Many who use orion use Long's. This
 could be why you found this problem, because you were the first to use a
 BigDecimal as a pk.
 
 If you are new to Orion, come join us at www.elephantwalker.com. We have the
 largest and oldest Orion forum on the web.
 
 regards,
 
 the elephantwalker
 www.elephantwalker.com
 
 .ps There is an excellent document on database schemas in Orion at:
 
 http://www.orionserver.com/docs/database-schema-configuration/database-schem
 a-configuration.xml
 
 
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of Nicolas Camut
 Sent: Saturday, March 02, 2002 5:47 AM
 To: Orion-Interest
 Subject: BigDecimal problem...
 
 
 Hi,
 
 I'm having a really annoying problem with Orion. I'm importing an
 application from Weblogic to Orion. It consists of basic CMP EntityBeans so
 that I can test whether I can port a much bigger application. Anyways, those
 Beans use BigDecimal as Primary keys. 
 
 In the design of this application, some of those beans have a parenthood
 relationship as well as references to other beans. As the application should
 allow null parenthood for instance, the beans should store null value in the
 associated DB field.
 
 This being said, this test framework works fine with weblogic. As far as
 Orion is concerned, I get NullPointerExceptions when creating the beans,
 which by default have null references to other beans. As I found it weird I
 messed up with the automatically-generated classes -e.g.
 PersonBeanHome_EntityHomeWrapper14.java - and I found out that when a bean
 generates PreparedStatements and instanciates them, it checks whether String
 or Date fields are null and if so call the setNull(...) method, but does not
 for BigDecimal fields leading to the NullPointerException.
 
 Well, d'you have any idea how to walk round this?
 
 Thanks,
 
 Nicolas
  
  
 
 






Re: File Upload from an Application

2002-03-04 Thread Greg Matthews



you need to use

1. type="file" in the form within the 
browser.

2. get a ServletInputStream (?) from the request 
object in Orion and parse out the byte stream.

do a search for ServletInputStream in google or 
something and you should find some examples.

afaik, there is no simple method to call to extract 
an uploaded file from a request but parsing out the ServletInputStream data is 
not that hard.

greg.

  - Original Message - 
  From: 
  Michael Maurer 
  To: Orion-Interest 
  Sent: Monday, March 04, 2002 5:38 
PM
  Subject: File Upload from an 
  Application
  
  
  Hi 
  
  I am trying to upload a file from 
  an application to the orion server, but could not find the right solution so 
  far. 
  Does anyone has a nice solution 
  ?
  
  Michael


RE: File Upload from an Application

2002-03-04 Thread Reynir Hübner

check out oreilly's cos.jar, multipart request parser.
I think the object is called MultipartReqeust.

it's rather popular, even though the license is rather discomforting.
-hope it helps

[EMAIL PROTECTED]

-Original Message-
From: Michael Maurer [mailto:[EMAIL PROTECTED]]
Sent: 4. mars 2002 07:38
To: Orion-Interest
Subject: File Upload from an Application


Hi 

I am trying to upload a file from an application to the orion server,
but could not find the right solution so far. 
Does anyone has a nice solution ?

Michael




Re: Local / Local Home

2002-03-04 Thread Ray Harrison

There have been a few local interface bugs fixed - don't know the specific one you are 
talking
about - go on out to orionserver.com and follow the bugzilla link to get the 
information on the
specific bug. If it has been fixed - it won't be out until 1.5.5 is released which is 
hopefully
soon.

Cheers
Ray

--- David Tunkrans [EMAIL PROTECTED] wrote:
 Does anyone know if the bug mentioned in previous postings is fixed? (Using 
Local/LocalHome with
 BMP and CMP)
 
 /David
 


__
Do You Yahoo!?
Yahoo! Sports - sign up for Fantasy Baseball
http://sports.yahoo.com




Local interface with self defined Primary key Class doesn't work ?? (bug)

2002-03-04 Thread Eddie Post

Hello,

I am using Orion 154 and am converting my entity beans to local 
interfaces
However, I can't convert my entity bean that has an self defined Primary 
Class (see below) to a local interface Every time it gives an error:

Nested exception is:
javaxejbNoSuchObjectLocalException: nlunwiredsgsumGroupMember
PK@18dc19
at GroupMemberHome_EntityHomeWrapper22findExistingEntity(G
roupMemberHome_EntityHomeWrapper22java:46)
at GroupMemberHome_EntityHomeWrapper22findByPrimaryKey(Gro
upMemberHome_EntityHomeWrapper22java:263)
at nlunwiredsgsumUserManagerEJBgetGroupMember(UserMana
gerEJBjava:381)
-

I tried it several times, also with other entity beans that have an self 
defined Primary class and keep getting the same error, whereas the rest work 
well

Is this a bug or am I missing something The Primery key class below is 
serializable and I am not sure if this is still necessary with local 
interface However also when I remove it, it gives the same error

Please some help,
Eddie

_
Send and receive Hotmail on your mobile device: http://mobilemsncom





Re: javax.jms.MessageFormatException when ObjectMessage.getObject()

2002-03-04 Thread Tom Koutn



I solved this problem by putting transmitting class 
(Event) into orion's lib directory.It's not clear solution, but it 
works.
I realized that bean's classloader knows the where 
the class Event is, but message's classloader knows only path to orion's 
lib.
TK

  - Original Message - 
  From: 
  Tomá¹ 
  Koutný 
  To: Orion-Interest 
  Sent: Monday, March 04, 2002 9:43 
AM
  Subject: javax.jms.MessageFormatException 
  when ObjectMessage.getObject()
  
  Hi,
  I'm sending message via topic:
   ObjectMessage 
  message = session.createObjectMessage(new 
  Event()); 
  session.createPublisher(topic).publish(message, deliveryMode, priority, 
  expiration);
  When I catch the message in my MDB,I get 
  exception in getObject():
  public void 
  onMessage(Message msg) 
  {1.Thread.currentThread().getContextClassLoader().loadClass("com.cleverlance.cmds.comm.Event");2.((ObjectMessage)msg).getObject();Class 
  Event is in classpath and is visible for classloader (line 1 is ok). When 
  running line 2, I get javax.jms.MessageFormatException: 
  com.cleverlance.cmds.comm.Event
  
  Class Event is very simple:
   package 
  com.cleverlance.cmds.comm;
   public class Event 
  implements java.io.Serializable {
   
  public Event();
   }
  
  Do you know what's wrong? 
Thanks.


Filling data for one-top many relationship

2002-03-04 Thread Alex

Hello,

 One Resource corresponds to many Image's
 When I create Image, one of parameters is Resource However this
 action does not fill in Resource_Image supplementary table and
 thus ResourcegetImages does not work as expected
 Do I have to add Image explicitly to Resource? If yes, then how
 do I?

-- 
Best regards,
Alex





Re: MySQL Connection Pool?

2002-03-04 Thread Clay Mitchell

what about the database schema?

On Mon, 4 Mar 2002, Joacim J?keborn wrote:



  Can anybody tell me how to set up a connection pool with
 a mysql
  database? Anybody have a guide on how to do this? Is it
 even possible?

 Checkout
 orggjtmmmysqljdbc2optionalMysqlConnectionPoolDataSour
 ce

 Download the lastest driver from:

 http://sourceforgenet/projects/mmmysql/

 // Joacim








RE: File Upload from an Application

2002-03-04 Thread Justin Crosbie

Also,

You will need to use a POST form, with the parameter:
enctype=multipart/form-data. Don't forget to handle the parameters as well
as the files, they're no longer visible with req.getParameter() when you use
this.

There is a few MultipartParsers out there, including an Orion version. I
would recommend wrapping these in an interface, so you can easily swap them.
Not that I don't trust them or anything, but its code I have no control
over.

This was posted on another thread, very useful:
http://kb.atlassian.com/content/orionsupport/articles/fileupload.html


-Original Message-
From: Reynir Hübner [mailto:[EMAIL PROTECTED]]
Sent: 04 March 2002 11:47
To: Orion-Interest
Subject: RE: File Upload from an Application


check out oreilly's cos.jar, multipart request parser.
I think the object is called MultipartReqeust.

it's rather popular, even though the license is rather discomforting.
-hope it helps

[EMAIL PROTECTED]

-Original Message-
From: Michael Maurer [mailto:[EMAIL PROTECTED]]
Sent: 4. mars 2002 07:38
To: Orion-Interest
Subject: File Upload from an Application


Hi 

I am trying to upload a file from an application to the orion server,
but could not find the right solution so far. 
Does anyone has a nice solution ?

Michael




Trouble with Informix

2002-03-04 Thread Michael Moossen





Hello, 
I am having 
trouble with a j2ee application in an informatix database.
Sometimes I encounter the following error 
message.


java.sql.SQLException: 
java.sql.SQLException: System or internal error java.sql.SQLException: Cannot 
attach to transaction. at 
java.sql.SQLException.init(SQLException.java:84) 
at 
com.informix.jdbc.IfxSqliConnect.init(IfxSqliConnect.java:871) 
at java.lang.reflect.Constructor.newInstance(Native 
Method) at 
com.informix.jdbc.IfxDriver.connect(IfxDriver.java:241) 
at 
com.evermind.sql.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:65) 
at 
com.evermind.sql.DriverManagerConnectionPoolDataSource.getPooledConnection(DriverManagerConnectionPoolDataSource.java:29) 
at 
com.evermind.sql.OrionPooledDataSource.getPooledConnection(OrionPooledDataSource.java:275) 
at 
com.evermind.sql.PooledConnectionUsage.getPooledConnection(PooledConnectionUsage.java:21) 
at 
com.evermind.sql.OrionPooledDataSource.getConnection(OrionPooledDataSource.java:145) 
at 
com.evermind.sql.OrionPooledDataSource.getConnection(OrionPooledDataSource.java:100) 
at 
com.evermind.sql.DriverManagerXADataSource.getAutoCommitConnection(DriverManagerXADataSource.java:233) 
at 
com.evermind.sql.LogicalDriverManagerXAConnection.intercept(LogicalDriverManagerXAConnection.java:88) 
at 
com.evermind.sql.FilterConnection.createStatement(FilterConnection.java:324) 
at 
com.evermind.sql.FilterConnection.createStatement(FilterConnection.java:325

somebody knows this problem and how i could fix 
it? 

Best Regards

Michael Moossen ( mailto:[EMAIL PROTECTED] )Tuxpan 
Software ( http://www.tuxpan.cl )Los 
Castaños 357 / Viña del Mar / ChilePhone : +56 32 680906 (Anexo 
210)
Saludos


RE: Uploading files to Orion webserver with MultipartParser API

2002-03-04 Thread Justin Crosbie

Looks like this didn't go through again. This a hint? (lol) ;)

-Original Message-
From: Justin Crosbie 
Sent: 04 March 2002 10:31
To: 'Orion-Interest'
Subject: RE: Uploading files to Orion webserver with MultipartParser API


Hi Bill,

Now that you mention it, I have never been able to download stuff off the
Java site from my own machine, but it always worked on another machine on
the network, even though there was no noticeable differences between the
two, same OS, same IE, same privs. When it was failing, it appeared that it
was trying to download the index.html document (if I remember correctly)
from the download site rather than the requested file.

I upgraded to IE 6 a few days ago, and I just tried downloading from the
Java site, and its working fine. Curious.

Thanks,
Justin

-Original Message-
From: Bill Winspur [mailto:[EMAIL PROTECTED]]
Sent: 01 March 2002 13:27
To: Orion-Interest
Subject: Re: Uploading files to Orion webserver with MultipartParser API


I've had numerous weird and transient problems with IE 5.5. Yesterday,
getting set up at a client site,  I could not download j2sdk1.4 from sun,
and had to go to a machine with IE5.0 to get it. However, IE5.5 was able to
download netbeans just fine. The Sys Admin guys dont think its a firewall
problem. It will probably work OK today if things go the way they have in
the past.
- Original Message -
From: Justin Crosbie [EMAIL PROTECTED]
To: Orion-Interest [EMAIL PROTECTED]
Sent: Wednesday, February 27, 2002 2:17 AM
Subject: RE: Uploading files to Orion webserver with MultipartParser API


 Hi

 Thanks for that, I wasn't aware of those classes, I gave them a go.
Similar
 problem. Different error, but its occasionally failing. I also tried the
 non-brand-specific UploadServlet.java, similar results.

 However, I have gotten closer. It was failing on Internet Explorer 5.5. I
 tried Netscape 4.7, and it seemed fine. I tried it on 5.0 and IE 6 and it
 seemed fine. So it appears that it is a problem with IE 5.5. Very
strange...


 Thanks for the help, much appreciated.
 Justin

 P.S. this is my second attempt at posting this, it appears the list does
not
 pick up everything that is posted.

 -Original Message-
 From: Joan Josep Iglesias [mailto:[EMAIL PROTECTED]]
 Sent: 22 February 2002 09:33
 To: Orion-Interest
 Subject: Re: Uploading files to Orion webserver with MultipartParser API


 Hi,

 I'm trying to upload files to my server, but I'm  using the orion
 libreries
 to do it

 http://kb.atlassian.com/content/orionsupport/articles/fileupload.html


 Why don't you try with those libraries?


 Joan








HELP! Newbie with orion and EJB's

2002-03-04 Thread Joe Antkowiak



I need some help understanding the configuration of Orion so that I 
canlearn EJB. I understand most of the concepts behind it, but am 
failing inconfiguring my server properly.Right now, I'm doing the 
Cabin bean example out of Enterprise JavaBeans (2ndEd) by O'Reilly 
publishing. I'm doing the first example with the basiccabin bean, and 
static application (I'm not looking up the entity beans froma servlet - I am 
looking them up from a static void main method in a class).Anyways, I'm 
getting the following error:"Error reading application-client 
descriptor: No location specified and notsuitable instance of the type 
'com.titan.cabin.Cabin' found for the ejb-refejb/Cabin"I have the 
application being deployed properly. I have an ejb-jar.xml inthe 
META-INF directory in my cabin.jar. I have an application.jar in 
theMETA-INF directory of my cabin.ear file. I have an 
application-client.xmlfile in the META-INF directory where my application 
Client_1.class resides.When I invoke the client, I set the classpath to 
reference the directorywhere Client_1.class is, so that it can find the 
application-client.xmlfile, and it does. But I'm getting that 
error.Any help would be greatly appreciated.Thank 
you,Joe


RE: How can I perform an action when web user is first logged on?

2002-03-04 Thread peter_saurugger

If you want to use form-based authentication, the only 'legal' way that I
can think of is to  write a sessionfilter that checks when a principal
exists for the first time during a session.

Otherwise you'd have to do your own authentication, calling
RoleManager.login() and if it succeeds write a record to the database with
the current date. (Of course this could be within a filter, too)

This would be much easier if either login() or authenticate() would be
handled by the UserManager (which is user configurable), but alas that is
not so ...

A real hack would be to have two forms on the login page, the first one
being submitted on buttonpress to itself, where it handles the creation of
the login record, and then when resent automatically submitting the
loginform (which must have been filled out previously) to j_security_check
by script ... drawbacks: the user may notice the screen reloading, and I
noticed most people here try to avoid html client side programming like the
pestilence:)

cheers

--peter

-Original Message-
From: Alex Paransky [mailto:[EMAIL PROTECTED]]
Sent: Sunday, March 03, 2002 9:30 AM
To: Orion-Interest
Subject: How can I perform an action when web user is first logged on?


I would like to keep lastLogonDate for my users.  However, with the J2EE
security model it does not appear that I can inject any processing between
the time when user is authenticated and a forward to the target url occurs.

Did anyone solve this problem.  If so, could you share your solution?

-AP_
http://www.alexparansky.com
Java/J2EE Architect/Consultant





Re: How can I perform an action when web user is first logged on?

2002-03-04 Thread Mike Cannon-Brookes

This would work great except that you cannot 'force' a container to bring up
the login page (portably).

UserManager doesn't help you because it too is an Orion specific API (just
like RoleManager)

About the only way to do portable user
management/authentication/authorisation is with an open source project
called OSUser (part of OpenSymphony which I participate in). See
http://www.opensymphony.com/osuser for details. I currently have an
application porting well (single EAR) between JBoss and Orion, and
Weblogic/Pramati/JRun support are almost done. It also supports Resin (if
you just want WARs).

Check it out anyway,

Cheers,
Mike

On 5/3/02 1:49 PM, [EMAIL PROTECTED]
([EMAIL PROTECTED]) penned the words:

 If you want to use form-based authentication, the only 'legal' way that I
 can think of is to  write a sessionfilter that checks when a principal
 exists for the first time during a session.
 
 Otherwise you'd have to do your own authentication, calling
 RoleManager.login() and if it succeeds write a record to the database with
 the current date. (Of course this could be within a filter, too)
 
 This would be much easier if either login() or authenticate() would be
 handled by the UserManager (which is user configurable), but alas that is
 not so ...
 
 A real hack would be to have two forms on the login page, the first one
 being submitted on buttonpress to itself, where it handles the creation of
 the login record, and then when resent automatically submitting the
 loginform (which must have been filled out previously) to j_security_check
 by script ... drawbacks: the user may notice the screen reloading, and I
 noticed most people here try to avoid html client side programming like the
 pestilence:)
 
 cheers
 
 --peter
 
 -Original Message-
 From: Alex Paransky [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, March 03, 2002 9:30 AM
 To: Orion-Interest
 Subject: How can I perform an action when web user is first logged on?
 
 
 I would like to keep lastLogonDate for my users.  However, with the J2EE
 security model it does not appear that I can inject any processing between
 the time when user is authenticated and a forward to the target url occurs.
 
 Did anyone solve this problem.  If so, could you share your solution?
 
 -AP_
 http://www.alexparansky.com
 Java/J2EE Architect/Consultant