Syntax error in Orion generated wrapper classes

2000-10-30 Thread Gordon Tyler
Title: Syntax error in Orion generated wrapper classes





Hi,


I'm having a weird problem with Orion 1.3.8 on WinNT4, JDK 1.3. When deploying an EAR with two EJB-JARs (each containing multiple EJBs, stateless session beans and entity beans) and a WAR, I get the following error:

StaffMembers_StatelessSessionBeanWrapper77.java:378: Undefined variable: created


 methodException = EJBUtils.getUserException(e, !created);
 ^


StaffMembers is a stateless session bean. I get similar errors for all the other stateless session beans in both EJB-JARs.

Why is invalid code being generated?


Ciao,
Gordon


--- Codito ergo sum - I code therefore I am ---
Gordon Tyler [EMAIL PROTECTED]
AST -- Product Development
Tel: +27-(0)21-6803412
PGP key available on request


If we knew what we were doing, it wouldn't be called research. -- Einstein


Beware of Dragons, for thou art crunchy and taste good with ketchup. -- Unknown


All programmers are optimists. -- Frederick P. Brooks, Jr.






EAR Deployer (Orion stable v1.3.8)

2000-10-13 Thread Gordon Tyler
Title: EAR Deployer (Orion stable v1.3.8)





Hi,


I'm not sure if this is by design or not ...


When deploying an EAR via the Service Console, the EAR Deployer pops up and allows one to set various deploy-time settings like the JNDI name a bean is bound to. However, it seems that the Deployer tool is only allowing Session Beans' JNDI names to be changed. Clicking on an Entity Bean doesn't display any information in the right-hand panel.

Another thing... The default JNDI name for a Bean is just BeanName, but the J2EE standard says that Beans should be bound to ejb/BeanName. Is there a reason for this deviation?

Ciao,
Gordon


--- Codito ergo sum - I code therefore I am ---
Gordon Tyler [EMAIL PROTECTED]
AST -- Product Development
Tel: +27-(0)21-6803412
PGP key available on request


If we knew what we were doing, it wouldn't be called research. -- Einstein
Beware of Dragons, for thou art crunchy and taste good with ketchup. -- Unknown





More EAR Deployer (Orion stable 1.3.8)

2000-10-13 Thread Gordon Tyler
Title: More EAR Deployer (Orion stable 1.3.8)





Another problem in the EAR Deployer: I am unable to modify the Link for any EJB reference. The drop down list is empty and any text typed into the field is not retained or used.

Ciao,
Gordon


--- Codito ergo sum - I code therefore I am ---
Gordon Tyler [EMAIL PROTECTED]
AST -- Product Development
Tel: +27-(0)21-6803412
PGP key available on request


If we knew what we were doing, it wouldn't be called research. -- Einstein
Beware of Dragons, for thou art crunchy and taste good with ketchup. -- Unknown





RE: Classpath : Orion On Linux

2000-09-28 Thread Gordon Tyler
Title: RE: Classpath : Orion  On  Linux





 -Original Message-
 From: Mr Shailesh Joshi [mailto:[EMAIL PROTECTED]]
 
 I have deployed beans and running clients successfully.
 The problem is the server can't get the Driver in 
 Class.forName(
 );
 I have copied driver class in the orion-root directory; set the
 classpath .
 But still the server is not able to get the class ?


You shouldn't be using Class.forName(). You should be defining a DataSource in Orion's configuration and getting that DataSource via its JNDI name and asking that DataSource for a Connection. That's the correct J2EE method of getting a database connection.

 FROM WHERE ORION TAKES THE CLASSPATH ?


Orion's classpath only includes it's own jar files. You can't modify that. It finds your EJBs and servlets and stuff using a different mechanism to the normal Java classpath (as do most EJB servers).

Ciao,
Gordon





RE: classpath for third party tools

2000-08-22 Thread Gordon Tyler
Title: RE: classpath for third party tools





 Problem: When running on the same VM started by orion server 
 they cannot
 find the path to these config files through classpath.
 
 java - cp %classpath%;..\..\some path -jar orion.jar does not work.


The java documentation says that when running a JAR, any user-specified classpath is ignored -- all classes are loaded from the JAR. Orion is doing it's own manual loading of those JARs from the lib directory.

 Any suggestions would be highly appreciated.


You can change the way that Orion is started:


java -cp %classpath%;orion.jar;blahblah com.evermind.server.ApplicationServer


But you have to include all the JARs that orion needs. You'll find this list in the orion.jar's META-INF/MANIFEST.MF file.

Ciao,
Gordon





Background info about the Orion team

2000-06-15 Thread Gordon Tyler
Title: Background info about the Orion team





Hi,


There's quite a dearth of information about the *people* writing Orion. Is there anywhere I can find information about them and/or their company?

Thanks,
Gordon


--- Codito, ergo sum -- I code, therefore I am ---
Gordon Tyler [EMAIL PROTECTED]
AST -- Product Development
Tel: +27-(0)21-6803412
PGP key available on request






Deviations from Servlet 2.2 spec

2000-06-09 Thread Gordon Tyler
Title: Deviations from Servlet 2.2 spec





I have a question about the ejb-ref section of the web-xml.html documentation and the related Orion behaviour:


In the web-xml.html there is the following description of the ejb-ref-name elemnt:


 ejb-ref-namenameOfEJB/ejb-ref-name 
 Contains the name of an EJB reference. This name must match an context-param name. 


And then one has to put the actual JNDI location in the context-param value.


But then there is an additional thing which confuses me and that is in the orion-web.xml, one specifies an ejb-ref-mapping which maps the ejb-ref-name to a JNDI location. Why is there this duplication? The ejb-ref-mapping in orion-web.xml seems to be the correct way to do it according to Sun's example below.

This is the description of this element in the Servlet 2.2 spec:


 The ejb-ref-name element contains the name of an EJB reference. This is the JNDI name that the servlet code uses to get a reference to the enterprise bean.

And in the Sun specific sun-j2ee-ri.xml there is an ejb-ref tag which maps the ejb-ref-name in the web.xml to the actual JNDI location.

Why has Orion deviated from the specification? Or am I misreading or misinterpreting the documentation?


Thanks,
Gordon


--- Codito, ergo sum -- I code, therefore I am ---
Gordon Tyler [EMAIL PROTECTED]
AST -- Product Development
Tel: +27-(0)21-6803412
PGP key available on request




--- Codito, ergo sum -- I code, therefore I am ---
Gordon Tyler [EMAIL PROTECTED]
AST -- Product Development
Tel: +27-(0)21-6803412
PGP key available on request






www.orionsupport.com

2000-05-30 Thread Gordon Tyler
Title: www.orionsupport.com





Is this site supposed to be up? I get the following error when trying to access http://www.orionsupport.com/:


500 Internal Server Error
java.net.MalformedURLException: no protocol: orion.xsl
 at com.evermind.servlet.ax.d1(JAX, Compiled Code)
 at com.evermind.servlet.SAXXSLTServlet.service(JAX, Compiled Code)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code)
 at com.evermind.server.http.dm.pa(JAX, Compiled Code)
 at com.evermind.server.http.dm.o9(JAX)
 at com.evermind.util.e.run(JAX, Compiled Code)


--- Codito, ergo sum -- I code, therefore I am ---
Gordon Tyler [EMAIL PROTECTED]
AST -- Product Development
Tel: +27-(0)21-6803412
PGP key available on request







RE: www.orionsupport.com

2000-05-30 Thread Gordon Tyler
Title: RE: www.orionsupport.com





 -Original Message-
 From: Joseph B. Ottinger [mailto:[EMAIL PROTECTED]]
 
 Gordon, the site *is* supposed to be up, but note that it's 
 MY site and
 not Orion's (although it's done hand-in-glove, more or less.)
 
 We're aware of the XSL issues, and I'm working on it.
 
 BTW, would you like to help with it?


I was merely looking to see what support was provided. As far as helping goes, I wouldn't call myself an expert in EJB or Orion so I'm not sure how much I could help. What do you need help with?

Ciao,
Gordon






RE: New Feature Idea

2000-05-24 Thread Gordon Tyler
Title: RE: New Feature Idea





 I know there was a start/stop tool with Orion from a while 
 ago..just haven't
 figured out how to use it yet.


java -jar admin.jar ormi://the_orion_server_host/ username password -shutdown


Substitute username and password with the admin username and password.


There is also a -restart command which restarts the server:


java -jar admin.jar ormi://the_orion_server_host/ username password -restart


It seems to work but it does give this error in the server's console while restarting:


Error starting RMIServer: IO Error: Address in use: bind


Perhaps the RMIServer is not being shutdown first before restarting?


Ciao,
Gordon





RE: Datasource definitions and the meaning of their location attribute

2000-05-22 Thread Gordon Tyler
Title: RE: Datasource definitions and the meaning of their location attribute





I didn't get a reply when I posted this message previously. I'm hoping I will get one this time around because this problem makes Orion impossible to use.

 -Original Message- 
 From: David Elliot [mailto:[EMAIL PROTECTED]] 
 
 The Orion team have previosuly recommended using the ejb-location 
 datasource as this is both pooled and transactional (xa). 


I have a datasource defined like this: 
 data-source 
 name=CompleteDB 
 class=com.evermind.sql.ConnectionDataSource 
 location=jdbc/Complete 
 pooled-location=jdbc/CompleteDBPool 
 xa-location=jdbc/xa/CompleteDBXA 
 ejb-location=jdbc/CompleteDB 
 url=jdbc:oracle:thin:@MDA9:1521:COMP 
 connection-driver=oracle.jdbc.driver.OracleDriver 
 / 


When I use the datasource bound to jdbc/CompleteDB (i.e. the EJB aware datasource) from a Bean Managed Persistence entity bean, I get the following exception in the application's log: 

00/05/17 01:27 Error in bean ejb/Baskets 
java.lang.NullPointerException: 
 at com.evermind.sql.OrionCMTDataSource.c7(JAX) 
 at com.evermind.sql.OrionPooledDataSource.cw(JAX, Compiled Code) 
 at com.evermind.sql.OrionPooledDataSource.cw(JAX) 
 at com.evermind.sql.ah.da(JAX) 
 at com.evermind.sql.ah.dc(JAX) 
 at com.evermind.sql.am.prepareStatement(JAX) 
 at com.ast.complete.SQL.prepareStatement(SQL.java:742) 
 at com.ast.complete.BasketsBean.getAll(BasketsBean.java:101) 
 at StatelessSessionBeanWrapper0.getAll(StatelessSessionBeanWrapper0.java:181) 
 at java.lang.reflect.Method.invoke(Native Method) 
 at com.evermind.server.rmi.a9.run(JAX) 
 at com.evermind.server.rmi.a7.gs(JAX, Compiled Code) 
 at com.evermind.server.rmi.a7.run(JAX, Compiled Code) 
 at com.evermind.util.e.run(JAX, Compiled Code) 


Thanks,
Gordon





Datasource definitions and the meaning of their location attributes

2000-05-16 Thread Gordon Tyler
Title: Datasource definitions and the meaning of their location attributes





Hi,


A datasource is defined in Orion's data-sources.xml something like this:


 data-source
 name=Test
 class=com.evermind.sql.ConnectionDataSource
 location=jdbc/Test
 pooled-location=jdbc/TestPool
 xa-location=jdbc/xa/TestXA
 ejb-location=jdbc/TestEJB
 url=jdbc:oracle:thin:@Test:1521:Test
 connection-driver=oracle.jdbc.driver.OracleDriver
 /


Could somebody explain what the different types of location attributes are used for? The Orion docs are rather terse in this regard. I've tried making an entity use one of the other locations for getting it's DataSource and thus Connection but I get various exceptions. The entity only works when it uses the name defined in the plain location attribute.

Thanks,
Gordon


--- Codito, ergo sum - I code, therefore I am ---
Gordon Tyler [EMAIL PROTECTED]
Abraxas IT Services - Component Based Devleopment
Tel: +27-(0)21-6803412
PGP key available on request or finger [EMAIL PROTECTED]


Official IT Partner to the Two Oceans Marathon 
http://www.twooceansmarathon.org.za






RE: Trouble getting Orion working with Oracle in data-sources.xml

2000-05-11 Thread Gordon Tyler
Title: RE: Trouble getting Orion working with Oracle in data-sources.xml





Your class, url and connection-driver attributes are set incorrectly. They should be:


class=com.evermind.sql.ConnectionDataSource
url=jdbc:oracle:thin:@laptop:1521:mas
connection-driver=oracle.jdbc.driver.OracleDriver


The class attribute determines what class is used for the implementation of the javax.sql.DataSource interface. The url attribute is the the JDBC URL that msut be understood by the JDBC driver class specified in connection-driver.

-Original Message-
From: Neal Kaiser [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 10 May 2000 23:39
To: Orion-Interest
Subject: Trouble getting Orion working with Oracle in data-sources.xml



I'm having trouble propperly configuring data-sources.xml.


This is what my data-sources.xml looks like:


data-sources
 data-source 
 name=Default data-source
 schema=database-schemas/oracle.xml
 class=oracle.jdbc.driver.OracleDriver
 location=jdbc/DefaultDS
 pooled-location=jdbc/DefaultPooledDS
 xa-location=jdbc/xa/DefaultXADS
 ejb-location=jdbc/DefaultEJBDS
 url=jdbc:ORACLE:defaultdb
 connection-driver=jdbc:oracle:thin:@laptop:1521:mas
 username=scott
 password=tiger
/
/data-sources


I copied classes111.zip to the orion/lib dir as well. When I start up Orion it says:


Error initializing server: Unknown DataSource type: oracle.jdbc.driver.OracleDriver


I've even tried unzipping the classes111.zip file, no luck. And my server.xml specifies the library of ../lib (as it does

by default)


Any ideas?


Thanks!
Neal





RE: Possible Bug wrt Servlets and creating/finding entities

2000-05-09 Thread Gordon Tyler
Title: RE: Possible Bug wrt Servlets and creating/finding entities





I would like to apologise to the Orion team. This is probably one of the stupidest mistakes I've made in a while.


Thanks to Victor for making me look at my code more closely ;)


The problem was that the servlet calls a private member method to create the entity and takes it's return value (an Object) as the primary key of the newly created entity. However, I had made a mistake when creating the method and it was returning the entity itself and not its primary key. A REAL ClassCastException ;)

Thanks,
Gordon


-Original Message-
From: Victor A. Salaman [mailto:[EMAIL PROTECTED]]
Sent: Monday, 08 May 2000 19:08
To: 'Gordon Tyler'
Subject: RE: Possible Bug wrt Servlets and creating/finding entities



Hi Gordon:

We can't help you much without a snippet of the code in question... 

-- Victor
-Original Message-
From: Gordon Tyler [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 08, 2000 12:15 PM
To: Orion-Interest
Subject: Possible Bug wrt Servlets and creating/finding entities



Hi, 
Sorry, this is fairly long... 
The scenario is this: An Entity bean called InboundMessage, and a servlet called InboundServlet. The InboundMessage entity is used to store the XML of incoming messages according to a primary key extracted from the XML.

The InboundServlet processes an HTTP POST (by implementing the doPost method of HttpServlet) and reads a string containing XML from the request into a String. The InboundServlet then gets InboundMessageHome calls create() to create a new entity with the primary key and the XML string (the XML string is stored in a CLOB column).

Now, in the real application, the servlet would then start a new Thread, giving it the primary key of the entity that was just created, and the Thread then gets InboundMessageHome and calls findByPrimaryKey to get the entity and works on it while the Servlet returns a success code to the client.

However, to simplify matters while testing, I incorporated the Thread's processing code into the servlet's doPost method directly after the entity has been created.

But what happens is that after the servlet has successfully created the entity and it calls InboundMessageHome.findByPrimaryKey, it gets a ClassCastException like so:

java.lang.ClassCastException: EntityBeanWrapper0 
 at com.ast.test.InboundServlet.doPost(InboundServlet.java:57) 
 at javax.servlet.http.HttpServlet.service(HttpServlet.java) 
 at javax.servlet.http.HttpServlet.service(HttpServlet.java) 
 at javax.servlet.http.HttpServlet.service(HttpServlet.java) 
 at com.evermind.server.http.de.o0(JAX) 
 at com.evermind.server.http.de.forward(JAX) 
 at com.evermind.server.http.dl.cd(JAX) 
 at com.evermind.util.e.run(JAX) 
I'm assuming that this is when Orion's implementation of the home interface is casting the instance of EntityBeanWrapper0 to the InboundMessage remote interface when it returns from the findByPrimaryKey method.

I then stopped the server, modified the servlet so that it doesn't create the entity but rather uses a hard-coded primary key of a row that already exists in the database in the call to InboundMessageHome.findByPrimaryKey and reran the server. Now it finds the entity successfully without the ClassCastException.

I tried a further permutation of this. I took the code of the servlet that creates and then finds the entity and put that into a standalone client. The standalone client creates and immediately finds the newly created entity without a problem.

So the ClassCastException only occurrs in a servlet when finding an entity that has just been created. 
Any suggestions? Is this a bug in Orion? 
Thanks, 
Gordon 
--- Codito, ergo sum - I code, therefore I am --- 
Gordon Tyler [EMAIL PROTECTED] 
Abraxas IT Services - Component Based Devleopment 
Tel: +27-(0)21-6803412 
PGP key available on request or finger [EMAIL PROTECTED] 
Official IT Partner to the Two Oceans Marathon 
http://www.twooceansmarathon.org.za 





Package private member access between JARs and WARs

2000-05-05 Thread Gordon Tyler
Title: Package private member access between JARs and WARs





I'm having a problem with Orion that I don't get with the Sun J2EE RI, regarding the use of package private members in one class by another class in the same package (i.e. com.x.y) but in different JARs or WARs.

Say that I have a value class in package com.x.y called One as part of an EJB JAR:


package com.x.y;


class One
{
 private String name = null;


 void setName(String newName)
 {
 name = newName;
 }
}


And a class in the same package com.x.y called Two as part of a WAR:


package com.x.y;


class Two
{
 public Two()
 {
 One one = new One();
 one.setName(Foo);
 }
}


These two classes are packaged in their respective EJB JARs and WARs and deployed as an application.


In Orion, I get an IllegalAccessException on the one.setName line, however other classes in the same EJB JAR as class One don't the exception when the call setName.

The problem does not occur in the J2EE RI and I have not found anything in the EJB/J2EE spec that would prohibit this cross-JAR usage of package private members.

Any thoughts?


Thanks,
Gordon


--- Codito, ergo sum - I code, therefore I am ---
Gordon Tyler [EMAIL PROTECTED]
Abraxas IT Services - Component Based Devleopment
Tel: +27-(0)21-6803412
PGP key available on request or finger [EMAIL PROTECTED]


Official IT Partner to the Two Oceans Marathon 
http://www.twooceansmarathon.org.za






Specifying application deployment directory

2000-05-05 Thread Gordon Tyler
Title: Specifying application deployment directory





When one specifies a deployment directory in server.xml for an application, the orion-ejb-jar.xml file which is placed in that directory does not propogate the values of location attributes of entity-deployment or session-deployment tags from the orion-ejb-jar.xml file included in the EJB JARs of the application. There may be other attributes which are also not being propogated, I've only noticed this one.

For example:
Application Foo.ear has an EJB JAR called Blah.jar which contains an orion-ejb-jar.xml file. This orion-ejb-jar.xml file specifies ejb/Bob as the location attribute for the entity Bob. However, when the application is deployed and one inspects the orion-ejb-jar.xml file in the deployment directory for Blah.jar, the Bob entity's location attribute is Bob.

Ciao,
Gordon


--- Codito, ergo sum - I code, therefore I am ---
Gordon Tyler [EMAIL PROTECTED]
Abraxas IT Services - Component Based Devleopment
Tel: +27-(0)21-6803412
PGP key available on request or finger [EMAIL PROTECTED]


Official IT Partner to the Two Oceans Marathon 
http://www.twooceansmarathon.org.za