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: Orion 1.5.4 changes '.' to '_' in table specification in orion-ejb-jar.xml

2002-02-22 Thread Daniele Arduini

trond ronneberg wrote:
 When we are trying to deploy an existing .EAR file
 to Orion 1.5.4,
 Orion changes the orion-ejb-jar.xml file in a way that makes the deployed
 CMP entity beans to fail:
 
 The tables are situated in a database on a AS400 server, and when 
 connecting
 from the app-server we can not log on with the 'user' owning the tables.
 Because of this, our orion-ejb-jar.xml specifies the tables to be used by
 entity-beans like:
 
 table=dtks000.quote
 
 When starting Orion, this is now changed to:
 
 table=dtks000_quote
 
 which does not work.
 
 This is not the same behavior as in Orion 1.5.3.
 Is there anyone who can tell me whats wrong?
 

Same problem here. I don't known if the container should change
the table name specified by the user (I think it shouldn't!),
but I found a workaround:

with the as400 JDBC driver you can specify in the connection URL
the default library prefix:

es:
  jdbc:as400://192.168.0.1;prompt=false;libraries=dtks000


hope this will help you.

ciao,
dan






bug generating orion-ejb-jar.xml ?

2001-11-15 Thread Daniele Arduini

Hi all,
setting both instance-cache-timeout and pool-cache-timeout attributes
for the entity-deployment, orion will overwrite the latter with
the value of the former:

example:

entity-deployment instance-cache-timeout= pool-cache-timeout=

become after deployment:

entity-deployment instance-cache-timeout= pool-cache-timeout=

Did someone ever played with these attributes?

Regards,
Daniele Arduini





call-timeout value

2001-10-11 Thread Daniele Arduini

Hi all,
from orionserver documentation I read:

orion-ejb-jar
enterprise-beans
   session-deployment ...

  call-timeout - The time (long millis in hex) to wait for
 an EJB if it is busy (before throwing a RemoteException,
 treating it as a deadlock).
 0 equals forever and is the deafault.


but, if I encode the value in hex the server (orion 1.5.2) complaint about
a numeric value is required.
Please, can someone show me an example value for this parameter?

thank in advance,

Daniele Arduini





Re: Virtual DirecTory -- Help

2001-08-26 Thread Daniele Arduini

Eddie Post wrote:
  Hellu,
 
  I am trying to exculde my JSP files from the war file, such that the
  designer can easily change them without my help (withoud deployment,
  etc...).
 
  Anyone any idea/advice how to do that as I tried many things, but
  appearantly am not able to succeed ?
 

1. create an orion user and an orion group.
2. chown -R orion:orion /opt/orion
3. Run Orion as orion user from a shell script:
...
umask 002   # IMPORTANT!
cd /opt/orion
java -jar orion.jar $@
...

4. add your designer to the orion group.
in /etc/group:
...
orion::204:designer
...

5. use symbolic links to enable access .jsp pages from
designer's home.


bye,
Daniele Arduini


  What I tried  (I am running on a linux box, RedHat 7.0, Orion 1.5.1, JDK
  1.3) ?
  - First I changed the jsp entry in my web.xml, from a relative path to a
  absolute path, that doesn't work, as he always starts looking from within
  the web application:
  ---
   servlet
servlet-nameMainWebShop/servlet-name
display-nameMain page of web-shop/display-name
description/description
 
  
jsp-file/home/development/vwr/web-client/jsp/webwinkel/html/main.jsp/jsp-
  file
   /servlet
  --
  - I did add a virtual directoy entry in orion-web.xml of the the 
default web
  application, as the application runs under the default web application:
  -
  virtual-directory real-path=/home/development/vwr/web-client/jsp
  virtual-path=/VWR/jsp /
  
  However this doesn't work as the j2ee application itself listens to 
the root
  url /VWR/.
  It also tried the following:
  -
  virtual-directory real-path=/home/development/vwr/web-client/jsp
  virtual-path=/VWR_jsp /
  
  Which works but then the jsp's don't run in the application 
environment, and
  as such you need to make a connection as if you were an external j2ee
  client, which isn't very logical ofcource.
  - I tried to put a symbolic link in the war file to the jsp's, but jar
  doesn't understand that. It will just copy all the files.
 
  Any ideas are more than welcome.
 
  Eddie :(