Re: Deployment platforms

2000-10-14 Thread Klaus Thiele

Mike Cannon-Brookes wrote:
 
[...]
   6. What has been your experience (stability, performance, managability,
   etc) - mainly of the underlying platform, not orion.
 Perfect, we've never had any problems with the OS or the DB (Sybase
 11.0.3.3). Our only problem now is twofold:
 1) Finding a way for Orion effectively to run as something other than root.

some time ago there was a nice tip from a guy on this list:

Linux kernel configuration:
  Networking options  ---
[*] IP: firewalling
[*] IP: transparent proxy support

and then a small startup-script:
   [...]
   start)
   echo -n "Redirect port 80"
   /sbin/ipchains -A input -p tcp -s 0/0 -d 0/0 80 -j REDIRECT 8000
this should also work (https):
   /sbin/ipchains -A input -p tcp -s 0/0 -d 0/0 443 -j REDIRECT 8443
   [...]

then you can run orion as any user you want.

hope that helps
  klaus

--
Klaus Thiele - Personal  Informatik AG
mailto:[EMAIL PROTECTED]

 "There's got to be more to life than compile-and-go."




Re: Problems with EJB and JNDI-context

2000-10-14 Thread Nils Frohberg

Hi,

my problem was a mistake in the ejb-ref in web.xml.
(i am also using "java:comp/env/ejb/user" now)

--nils

-- 
**
* Your mouse has moved. Windows must be restarted for the change to take effect. *
**
*  Nils Frohberg *
*http://www.tako.de/ *
**




Problem deploying EJBs using a MySQL data-source

2000-10-14 Thread Nils Frohberg

Hi,

up to now i always connected to the Hypersonic database. Since i have a mysql database 
running on another box, i tried to connect to it, using Shailesh Joshi's 
data-sources.xml and database-schemas/mysql.xml (cf. msg# 05137 Re: Orion and MySQL).

This is the errormessage i get when orion tries to deploy my EJBs:
Auto-deploying myEJB.jar (No previous deployment found)... Error compiling 
file:/home/wuzzah/myEJB/myEJB.jar: Error finding a suitable DataSource: 
jdbc/DefaultCoreDS did not contain a cmt-dataSource/ejb-datasource

My data-source:
data-source
name="MySQL"
class="com.evermind.sql.ConnectionDataSource"
location="jdbc/DefaultDS"
pooled-location="jdbc/DefaultPooledDS"
xa-location="jdbc/xa/DefaultXADS"
ejb-location="jdbc/DefaultEJBDS"
url="jdbc:mysql://hostname/myEJBdatabase"
connection-driver="org.gjt.mm.mysql.Driver"
username="user"
password="passwd"
inactivity-timeout="30"
schema="database-schemas/mysql.xml"
/

My database-schema:
?xml version="1.0"?
!DOCTYPE database-schema PUBLIC "-//Evermind//- Database schema" 
"http://www.orionserver.com/dtds/database-schemas.dtd"

database-schema name="Mysql" not-null="not null" null="" primary-key="primary key"
type-mapping type="java.lang.String" name="varchar(255)" /
type-mapping type="int" name="integer" /
type-mapping type="float" name="float" /
type-mapping type="double" name="double" /
type-mapping type="byte" name="smallint" /
type-mapping type="char" name="char(1)" /
type-mapping type="short" name="integer" /
type-mapping type="boolean" name="bit" /
type-mapping type="java.util.Date" name="datetime" /

disallowed-field name="password" /
disallowed-field name="username" /
disallowed-field name="date" /
disallowed-field name="text" /
/database-schema


any hints?
thanks,
--nils


-- 
**
* Your mouse has moved. Windows must be restarted for the change to take effect. *
**
*  Nils Frohberg *
*http://www.tako.de/ *
**




Entity bean ejb/entity/Autor autocreate table

2000-10-14 Thread Sven van 't Veer

Upon deploying my beans, my EntityBean AutorBean (jndi env/entity/Autor)
tries to Autocreate the table Autor as create table env/entity/Autor. Is
this standard behaviour, or is there an option in ejb-jar.xml to change
this behaviour?

sven
-- 
==
Sven E. van 't Veer  
http://www.cachoeiro.net
Java Developer  [EMAIL PROTECTED]
==




javax.naming.NameNotFoundException

2000-10-14 Thread Sven van 't Veer

Orion can't find my deployed bean:

java.rmi.RemoteException: com.evermind.server.rmi.OrionRemoteException:
Transaction was rolled back: Error while creating session:
java.rmi.RemoteException: javax.naming.NameNotFoundException: Autor not
found in AutorFacade; nested exception is: 
java.rmi.RemoteException: javax.naming.NameNotFoundException: Autor not
found in AutorFacade
at
br.com.snpc.web.user.AutorWrapper.getInterfaces(AutorWrapper.java:34)
at br.com.snpc.web.user.AutorWrapper.init(AutorWrapper.java:23)
at /editar_autor.jsp._jspService(/editar_autor.jsp.java:31)
at com.orionserver.http.OrionHttpJspPage.service(JAX)

This is the getInterfaces method for AutorWrapper:
  private void getInterfaces() throws RemoteException{
if (home == null){
  try{
Context ctx = new InitialContext();
Object obj =
ctx.lookup("java:comp/env/ejb/session/AutorFacade");
home =
(AutorFacadeHome)javax.rmi.PortableRemoteObject.narrow(obj,
AutorFacadeHome.class);
remote = home.create();
  } catch (Exception ex){
throw new RemoteException(ex.toString());
  }
}
  }
and the ejb-jar.xml:
display-nameAutor/display-name
ejb-nameAutor/ejb-name
homebr.com.snpc.user.ejb.entity.AutorHome/home
remotebr.com.snpc.user.ejb.entity.Autor/remote
ejb-classbr.com.snpc.user.ejb.entity.AutorBean/ejb-class
persistence-typeContainer/persistence-type
prim-key-classbr.com.snpc.user.util.AutorPK/prim-key-class
and the web.xml:
ejb-ref
descriptionAutor DB layer/description
ejb-ref-nameAutor/ejb-ref-name
ejb-ref-typeEntity/ejb-ref-type
homebr.com.snpc.user.ejb.entity.AutorHome/home
remotebr.com.snpc.user.ejb.entity.Autor/remote
/ejb-ref
The AutorFacade on ejbCreate() tries to get the Home Interface for the
AutorEntityBean:
  private void getInterfaces() throws RemoteException{
if (home == null){
  try{
Context ctx = new InitialContext();
Object obj = ctx.lookup("java:comp/env/Autor");
home = (AutorHome)javax.rmi.PortableRemoteObject.narrow(obj,
AutorHome.class);
  } catch (Exception ex){
throw new RemoteException(ex.toString());
  }
}
  }

I don't understand why this interface cannot be found.

sven
-- 
==
Sven E. van 't Veer  
http://www.cachoeiro.net
Java Developer  [EMAIL PROTECTED]
==




Re: Problem deploying EJBs using a MySQL data-source

2000-10-14 Thread Robert Krueger


the error message is quite explicit. what kind of datasource does 
'jdbc/DefaultCoreDS' point to? is that the location you specified in 
orion-ejb-jar.xml for your entity beans? if so, did you map it to 
"jdbc/DefaultEJBDS"? I don't see it in your datasource declaration.

robert

At 17:13 14.10.00 , you wrote:
Hi,

up to now i always connected to the Hypersonic database. Since i have a 
mysql database running on another box, i tried to connect to it, using 
Shailesh Joshi's data-sources.xml and database-schemas/mysql.xml (cf. msg# 
05137 Re: Orion and MySQL).

This is the errormessage i get when orion tries to deploy my EJBs:
Auto-deploying myEJB.jar (No previous deployment found)... Error compiling 
file:/home/wuzzah/myEJB/myEJB.jar: Error finding a suitable DataSource: 
jdbc/DefaultCoreDS did not contain a cmt-dataSource/ejb-datasource

My data-source:
 data-source
 name="MySQL"
 class="com.evermind.sql.ConnectionDataSource"
 location="jdbc/DefaultDS"
 pooled-location="jdbc/DefaultPooledDS"
 xa-location="jdbc/xa/DefaultXADS"
 ejb-location="jdbc/DefaultEJBDS"
 url="jdbc:mysql://hostname/myEJBdatabase"
 connection-driver="org.gjt.mm.mysql.Driver"
 username="user"
 password="passwd"
 inactivity-timeout="30"
 schema="database-schemas/mysql.xml"
 /

My database-schema:
?xml version="1.0"?
!DOCTYPE database-schema PUBLIC "-//Evermind//- Database schema" 
"http://www.orionserver.com/dtds/database-schemas.dtd"

database-schema name="Mysql" not-null="not null" null="" 
primary-key="primary key"
 type-mapping type="java.lang.String" name="varchar(255)" /
 type-mapping type="int" name="integer" /
 type-mapping type="float" name="float" /
 type-mapping type="double" name="double" /
 type-mapping type="byte" name="smallint" /
 type-mapping type="char" name="char(1)" /
 type-mapping type="short" name="integer" /
 type-mapping type="boolean" name="bit" /
 type-mapping type="java.util.Date" name="datetime" /

 disallowed-field name="password" /
 disallowed-field name="username" /
 disallowed-field name="date" /
 disallowed-field name="text" /
/database-schema


any hints?
thanks,
--nils


--
*** 
***
* Your mouse has moved. Windows must be restarted for the change to take 
effect. *
*-- 
--*
*  Nils 
Frohberg *
* 
http://www.tako.de/ *
*** 
***

(-) Robert Krüger
(-) SIGNAL 7 Gesellschaft für Informationstechnologie mbH
(-) Brüder-Knauß-Str. 79 - 64285 Darmstadt,
(-) Tel: 06151 665401, Fax: 06151 665373
(-) [EMAIL PROTECTED], www.signal7.de





Re: Entity bean ejb/entity/Autor autocreate table

2000-10-14 Thread Robert Krueger


check out orion-ejb-jar.dtd docs. you can change the table names to 
whatever you like.

At 12:32 14.10.00 , you wrote:
Upon deploying my beans, my EntityBean AutorBean (jndi env/entity/Autor)
tries to Autocreate the table Autor as create table env/entity/Autor. Is
this standard behaviour, or is there an option in ejb-jar.xml to change
this behaviour?

sven
--
=== 
===
Sven E. van 't Veer
http://www.cachoeiro.net
Java 
Developer 
[EMAIL PROTECTED]
=== 
===

(-) Robert Krüger
(-) SIGNAL 7 Gesellschaft für Informationstechnologie mbH
(-) Brüder-Knauß-Str. 79 - 64285 Darmstadt,
(-) Tel: 06151 665401, Fax: 06151 665373
(-) [EMAIL PROTECTED], www.signal7.de





Re: javax.naming.NameNotFoundException

2000-10-14 Thread Robert Krueger


does AutorFacade have an ejb-ref to Autor? if not and you don't know why, 
I'd suggest reading up on these things. you're not going to have very much 
fun with orion without a basic understanding of these issues. orion is a 
very powerful but raw tool and it assumes a good working knowledge of the 
j2ee spec. check out ed roman's book (free download at theserverside.com).

robert

At 12:41 14.10.00 , you wrote:
Orion can't find my deployed bean:

java.rmi.RemoteException: com.evermind.server.rmi.OrionRemoteException:
Transaction was rolled back: Error while creating session:
java.rmi.RemoteException: javax.naming.NameNotFoundException: Autor not
found in AutorFacade; nested exception is:
 java.rmi.RemoteException: javax.naming.NameNotFoundException: 
 Autor not
found in AutorFacade
 at
br.com.snpc.web.user.AutorWrapper.getInterfaces(AutorWrapper.java:34)
 at br.com.snpc.web.user.AutorWrapper.init(AutorWrapper.java:23)
 at /editar_autor.jsp._jspService(/editar_autor.jsp.java:31)
 at com.orionserver.http.OrionHttpJspPage.service(JAX)

This is the getInterfaces method for AutorWrapper:
   private void getInterfaces() throws RemoteException{
 if (home == null){
   try{
 Context ctx = new InitialContext();
 Object obj =
ctx.lookup("java:comp/env/ejb/session/AutorFacade");
 home =
(AutorFacadeHome)javax.rmi.PortableRemoteObject.narrow(obj,
AutorFacadeHome.class);
 remote = home.create();
   } catch (Exception ex){
 throw new RemoteException(ex.toString());
   }
 }
   }
and the ejb-jar.xml:
 display-nameAutor/display-name
 ejb-nameAutor/ejb-name
 homebr.com.snpc.user.ejb.entity.AutorHome/home
 remotebr.com.snpc.user.ejb.entity.Autor/remote
 
ejb-classbr.com.snpc.user.ejb.entity.AutorBean/ejb-class
 persistence-typeContainer/persistence-type
 
prim-key-classbr.com.snpc.user.util.AutorPK/prim-key-class
and the web.xml:
 ejb-ref
 descriptionAutor DB layer/description
 ejb-ref-nameAutor/ejb-ref-name
 ejb-ref-typeEntity/ejb-ref-type
 homebr.com.snpc.user.ejb.entity.AutorHome/home
 remotebr.com.snpc.user.ejb.entity.Autor/remote
 /ejb-ref
The AutorFacade on ejbCreate() tries to get the Home Interface for the
AutorEntityBean:
   private void getInterfaces() throws RemoteException{
 if (home == null){
   try{
 Context ctx = new InitialContext();
 Object obj = ctx.lookup("java:comp/env/Autor");
 home = (AutorHome)javax.rmi.PortableRemoteObject.narrow(obj,
AutorHome.class);
   } catch (Exception ex){
 throw new RemoteException(ex.toString());
   }
 }
   }

I don't understand why this interface cannot be found.

sven
--
=== 
===
Sven E. van 't Veer
http://www.cachoeiro.net
Java 
Developer 
[EMAIL PROTECTED]
=== 
===

(-) Robert Krüger
(-) SIGNAL 7 Gesellschaft für Informationstechnologie mbH
(-) Brüder-Knauß-Str. 79 - 64285 Darmstadt,
(-) Tel: 06151 665401, Fax: 06151 665373
(-) [EMAIL PROTECTED], www.signal7.de





Re: Entity bean ejb/entity/Autor autocreate table

2000-10-14 Thread Sven van 't Veer



Robert Krueger wrote:
 
 check out orion-ejb-jar.dtd docs. you can change the table names to
 whatever you like.
I knew that much, but that's created -after- deployment, and only if
deployment was succesful. I was looking for a way to do this before
deployment.

sven

-- 
==
Sven E. van 't Veer  
http://www.cachoeiro.net
Java Developer  [EMAIL PROTECTED]
==