REPOST - Error restoring application state

2001-10-24 Thread Christian . Tellefsen

REPOST - I think my previous attempt failed.


I always get this strange exception when i start Orion after creating a
stateful session bean:

D:\oriontest\orionjava -jar orion.jar
Licensed to Telenor Mobil AS
[...]
Error restoring application state: java.lang.NullPointerException (null)
Orion/1.5.3 initialized


...and my stateful sessions are lost. Does anyone have any experience with
this problem? The error message is unfortunately too nondescriptive, a stack
trace might have helped a lot here.

This has never worked for us with earlier Orion versions either, so it's not
a 1.5.3 thing.

Yours,
Christian.





Logging in to server twice does not work

2001-10-05 Thread Christian . Tellefsen

Hi Elephantwalker,

thank you very much for taking the time to reply to me.

I cut  pasted your code into my class, and ran it. I am sorry to say that
the change in the code does not have any obvious effect (we have actually
tried this solution earlier).

What happens if I write wrong credentials, is that I get a stack trace, the
program writes the message, then immediately the other stack trace appears
and that's it. The login box does not reappear.

But if this works in your enviroment and not in ours, surely something,
somewhere must be different between our enviroments? Could it possibly be
some server setting? 

*
D:\clienttestconnect
java.lang.SecurityException: Invalid username/password for appit (yo)
at com.evermind._cd._mu(Unknown Source)
at com.evermind._cd._mu(Unknown Source)
at com.evermind._cd._np(Unknown Source)
at com.evermind._ce._np(Unknown Source)
at com.evermind.server.rmi.RMIContext.lookup(Unknown Source)
at com.evermind.server.administration.LazyResourceFinder._np(Unknown
Source)
at
com.evermind.server.administration.LazyResourceFinder.getEJBHome(Unknown
Source)
at com.evermind._ck._ho(Unknown Source)
at
com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext
(Unknown Source)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at
com.telenor.mobil.planit.appit.test.ContextTest.connect(ContextTest.java:29)
at
com.telenor.mobil.planit.appit.test.ContextTest.main(ContextTest.java:35)
Once more unto the breach...
java.lang.SecurityException: Invalid username/password for appit (yo)
at com.evermind._cd._mu(Unknown Source)
at com.evermind._cd._mu(Unknown Source)
at com.evermind._cd._np(Unknown Source)
at com.evermind._ce._np(Unknown Source)
at com.evermind.server.rmi.RMIContext.lookup(Unknown Source)
at com.evermind.server.administration.LazyResourceFinder._np(Unknown
Source)
at
com.evermind.server.administration.LazyResourceFinder.getEJBHome(Unknown
Source)
at com.evermind._ck._ho(Unknown Source)
at
com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext
(Unknown Source)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at
com.telenor.mobil.planit.appit.test.ContextTest.connect(ContextTest.java:29)
at
com.telenor.mobil.planit.appit.test.ContextTest.main(ContextTest.java:37)
*
D:\clientjava -version
java version 1.3.1
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)
*
D:\clientjava -jar orion.jar -version
Orion/1.5.2 (build 10460)
*
D:\clienttype testconnect.bat
java -classpath .;orion.jar com.telenor.mobil.planit.appit.test.ContextTest
*

yours,
Christian.

-Original Message-
From: The elephantwalker [mailto:[EMAIL PROTECTED]]
Sent: 5. oktober 2001 11:21
To: [EMAIL PROTECTED]
Subject: FW: Why can't orion respond to their customers? (was RE: FW:
Logging in to server twice does not work.)


Christian,

Just in case the list server is down...your double login is not a bug. You
left out a the dedicated.connection=true from your code, see below.

Regards,

the elephantwalker
www.elephantwalker.com

-Original Message-
From: The elephantwalker [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 05, 2001 2:18 AM
To: Orion-Interest
Subject: RE: Why can't orion respond to their customers? (was RE: FW:
Logging in to server twice does not work.)


Yash and Christian,

Obviously this works, because the OrionConsole app uses ormi, and if you put
in the wrong password, you just remove the server, and add a server with the
right password.

They are a little clunky with the interface...but adding the wrong password
doesn't prevent you from connecting. So lets look at your code.

It looks like you left out one important bit in the properties. The
dedicated.connection should be true.

With the code below, you won't have to restart your server.

Regards,


the elephantwalker
www.elephantwalker.com

So here is the code:

import javax.naming.*;
import java.util.*;
/**
  * InitialContext reconnection test.
  * @author Christian Tellefsen
 */

// Make sure you:
// a) Have a META-INF/application-client.xml in the right place.
// b) Replace the server name below.

public class ContextTest {
 static void connect() {
Hashtable env = new

Why can't orion respond to their customers? (was RE: FW: Logging in to server twice does not work.)

2001-08-08 Thread Christian . Tellefsen

My God, this is frustrating.

I have tried reporting the bug in bugzilla. 
I have tried mailing to the list.
I have tried mailing Orion directly.

All I have received from Orion is complete and utter silence. I have not
even gotten a reply saying that the matter is being looked at, or even that
my mail has been received. If I had gotten any respnse at all I would not
have said this publicly, but since you refuse to acknowledge my mails, I
have to ask:

Why do you not take your paying customers seriously? Your support is
extremely bad. We have production systems running on your server, and we
need to know when the bugs will be fixed. 

yours
Christian.

Does anyone have any email address the Orion guys will respond to?

-Original Message-
From: Mike Weissman [mailto:[EMAIL PROTECTED]]
Sent: 8. august 2001 15:34
To: Orion-Interest
Subject: Re: FW: Logging in to server twice does not work.


Christian,

We never found a way around this, we run from an applet.  we were able
to use the RMIContextfactory and have repeated login attempts.  We have
also abandoned rmi lookups due to performance and are going towards a
messaging paradigm for communication.
mike

[EMAIL PROTECTED] wrote:
 
 In think the message was lost again, trying one more time. Sorry for the
 repost...
 
  Does anyone know how to login again when the first attempt fails?
 
  Logging in twice seems to be impossible. How to reproduce:
 
  import javax.naming.*;
  import java.util.*;
 
  /**
   * InitialContext reconnection test.
   * @author Christian Tellefsen
   */
 
  // Make sure you:
  // a) Have a META-INF/application-client.xml in the right place.
  // b) Replace the server name below.
 
  public class ContextTest {
  static void connect() {
  Hashtable env = new Hashtable();
  env.put(
  java.naming.factory.initial,
 
com.evermind.server.ApplicationClientInitialContextFactory);
  env.put(
  java.naming.provider.url,
  ormi://localhost/appit); // replace with your server
  try{
  // This will show the login box the first time,
  // but not the second time.
  new InitialContext(env);
  }
  catch(Exception e) {e.printStackTrace();}
  }
 
  public static void main(String[] s) {
  connect();
  System.out.println(Once more unto the breach...);
  connect();
  }
  }
 
  Obviously I would like the login box to appear again. I cannot find any
  way to tell the server to replace the old principal and credential. I
feel
  weird telling my users that sorry, if you enter the wrong password you
  have to restart the program. Obviously this is a showstopper.
 
  I see that other people have asked the same question, but no answers. I
am
  also reporting this as a bug (#577) in bugzilla.
 
  Any help or workarounds would be greatly appreciated.
 
  yours
  Christian Tellefsen
 

-- 
##
Michael Weissman e-mail: [EMAIL PROTECTED]  
Clarent Corporation 303-734-5003 Fax 303-734-4244
1221 W. Mineral Ave.  Littleton, Co 80120 
In the land of the dark, the ship of the sun is 
drawn by the grateful dead -- Egyptian Book of the Dead
##




FW: Logging in to server twice does not work.

2001-08-07 Thread Christian . Tellefsen

In think the message was lost again, trying one more time. Sorry for the
repost...




 Does anyone know how to login again when the first attempt fails? 
 
 Logging in twice seems to be impossible. How to reproduce:
 
 import javax.naming.*;
 import java.util.*;
 
 /**
  * InitialContext reconnection test.
  * @author Christian Tellefsen
  */
 
 // Make sure you:
 // a) Have a META-INF/application-client.xml in the right place.
 // b) Replace the server name below.
 
 public class ContextTest {
 static void connect() {
 Hashtable env = new Hashtable();
 env.put(
 java.naming.factory.initial,
 com.evermind.server.ApplicationClientInitialContextFactory);
 env.put(
 java.naming.provider.url, 
 ormi://localhost/appit); // replace with your server
 try{
 // This will show the login box the first time,
 // but not the second time.
 new InitialContext(env);
 }
 catch(Exception e) {e.printStackTrace();}
 }
 
 public static void main(String[] s) {
 connect();
 System.out.println(Once more unto the breach...);
 connect();
 }
 }
 
 Obviously I would like the login box to appear again. I cannot find any
 way to tell the server to replace the old principal and credential. I feel
 weird telling my users that sorry, if you enter the wrong password you
 have to restart the program. Obviously this is a showstopper.
 
 I see that other people have asked the same question, but no answers. I am
 also reporting this as a bug (#577) in bugzilla.
 
 Any help or workarounds would be greatly appreciated.
 
 yours
 Christian Tellefsen
 




RE: Re: RE: Simple Java Doubts

2001-05-10 Thread Christian . Tellefsen
Title: SV: Re: RE: Simple Java Doubts



That's 
an evil communist lie. Please report to the nearest termination 
center.

The 
computer is your friend!

  -Original Message-From: Magnus Rydin 
  [mailto:[EMAIL PROTECTED]]Sent: 10. mai 2001 
  10:41To: Orion-InterestSubject: SV: Re: RE: Simple Java 
  Doubts
  THEY just "informed" me that the Frog is leaping through tiny 
  blue loops. SOMEONE tells me that the Bavarian Illuminati has teamed up with 
  BORG and are involved in this affair in SOME WAY.
  Fnord! 
   -Ursprungligt meddelande-  Från: Johan Fredriksson [mailto:[EMAIL PROTECTED]] 
   Skickat: den 10 maj 2001 01:03  Till: Orion-Interest  Ämne: Re: Re: 
  RE: Simple Java DoubtsResistance is futile, you will be 
  assimilated.   
  Johan  - Original Message - 
   From: "John Hogan" 
  [EMAIL PROTECTED]  To: "Orion-Interest" 
  [EMAIL PROTECTED]  Sent: 
  Wednesday, May 09, 2001 9:55 PM  Subject: Re: Re: 
  RE: Simple Java Doubts Santosh, Is the original disclaimer 
  a secret plot to own all content on the   
  orion list? Somehow doesn't seem appropriate.  
 
  *** 
Disclaimer :   The 
  information contained and transmitted in this e-mail is   confidential information, and is intended only for the 
named recipient to which it is addressed. The 
  content of   this e-mail may not have been 
  sent with the authority of   the 
  company. If the reader of this message is not the  
   named recipient or a person responsible for delivering it 
to the named recipient, you are notified that the 
  review,   dissemination, distribution, 
  transmission, printing or copying,   
  forwarding, or any other use of this message or any part of   it, including any attachments, is strictly prohibited. If 
  you   have received this communication in 
  error, please delete   the e-mail and destroy 
  all record of this communication.   Thank you 
  for your assistance.
  ** 
   Begin Original Message 
   From: 
  "John Hogan" [EMAIL PROTECTED]   
  Sent: Wed, 9 May 2001 08:03:18 -0400   To: 
  Orion-Interest [EMAIL PROTECTED]   Subject: Re: RE: Simple Java Doubts   On response 2, if the remote client is actually a web server, 
  the   scheme will work nicely. No polling 
  would be necessary, an http   request would 
  only be issued on event. John Hogan _ Get your free E-mail at http://www.ireland.com 
   End Original Message 
   
  
  _   
Get your free E-mail at http://www.ireland.com 




RE: Compiling, packaging, and directory structure

2001-01-23 Thread Christian . Tellefsen

We do it in one huge tree. Currently it is about 1300 .java files. We have
one package for each ejb deployment, and keep the META-INF and orion files
in separate directories. Ant then combines these files with the packages
upon deployment.

We find this a simple solution, since we have lots of common packages and
interfaces which are used by many parts of the system. At the current
project size, it takes about five to ten seconds to scan the source tree
during compilation (with javac, on a PentiumIII/600).

CT

-Original Message-
From: Jeff Schnitzer [mailto:[EMAIL PROTECTED]]
Sent: 23. januar 2001 02:21
To: Orion-Interest
Subject: Compiling, packaging, and directory structure


Here's an open question:  How do you have your source tree set up?
 
Do you have a separate source tree for each component, or do you compile
a "single big tree"?
 
I currently have a separate directory for each of my components, and
it's getting out of hand.  I have a couple layers of RMI components, so
the interfaces are shared among several components, and the dependencies
are ugly.
 
I'm starting to think that what I really want is a single big java
source tree (in a package hierarchy, of course) which is compiled in one
big step, then each component build step would simply copy the
appropriate class files and deployment descriptors into the staging area
and package them up.
 
Am I asking for trouble by doing this?  Or is this the natural way to
build large interdependent java projects?
 
Sorry if this is a silly question, but I've never had to deal with with
a dependency graph this incestuous before.  My build process has always
looked like the way you would set up a C++ project, mostly out of habit.
I'd like to know if I'm pointed in the right direction before I wreck my
CVS tree :-)
 
Thanks,
Jeff Schnitzer
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
 




java:comp/env namespace is only available from within a J2EE component

2000-11-23 Thread Christian . Tellefsen

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Weird exception:

Recently, I have been getting this error from my applet:

16:54:30 [unknown class] [ERROR] Exception caught. Stack trace
follows: javax.naming.NamingException: java:comp/env namespace is
only available from within a J2EE component at
com.sun.enterprise.naming.java.javaURLContext.getComponentContext(java
URLContext.java:392)at
com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.ja
va:51)  at javax.naming.InitialContext.lookup(Unknown Source)   at
com.telenor.mobil.planit.appit.util.AppitUtilities.getHome(AppitUtilit
ies.java:254)   at
com.telenor.mobil.planit.appit.util.AppitUtilities.getSessionHome(Appi
tUtilities.java:104)at
com.telenor.mobil.planit.doping.applet.RnpAppletSharedProperties.init
(RnpAppletSharedProperties.java:75)at
com.telenor.mobil.planit.doping.applet.RnpAppletSharedProperties.getIn
stance(RnpAppletSharedProperties.java:298)  at
com.telenor.mobil.planit.doping.applet.RnpApplet.init(RnpApplet.java:1
95) at sun.applet.AppletPanel.run(Unknown Source)   at
java.lang.Thread.run(Unknown Source)

Does anyone know what this means? If the java:comp/env namespace is
only available from within a J2EE component, then how is it possible
to program a client or applet which should communicate with my EJBs?

The code creating the error is:

private static final EJBHome getHome(
String remoteInterfaceName,
String moduleName,
String beanType
)
throws ClassNotFoundException, NamingException {
if( DEBUG ) Log.debug( "getHome( " + remoteInterfaceName + "
" + moduleName + " " + beanType + " )", instance );
final StringBuffer homeName = new StringBuffer(
"com.telenor.mobil.planit." );
homeName.append( moduleName.replace('/', '.') );
homeName.append( ".ejb." );
homeName.append( beanType );
homeName.append( "." );
homeName.append( remoteInterfaceName );
homeName.append( "Home" );

if( context == null ) {
if( env != null ) {
context = new InitialContext( env );
}
else {
context = new InitialContext();
}
}

final Object homeObject = context.lookup("java:comp/env/ejb/"
+
moduleName + "/" + remoteInterfaceName );

yours,
Christian Tellefsen

-BEGIN PGP SIGNATURE-
Version: PGP Personal Privacy 6.5.8

iQA/AwUBOh0ySCZr3JnfcXIbEQJcsQCglBp12GnKYrCQ34qkO9lxYPtD6YwAoLOq
+g4vsyMu9gSt8RcLns8HOkPG
=7K60
-END PGP SIGNATURE-




RE: java:comp/env namespace is only available from within a J2EE com ponent

2000-11-23 Thread Christian . Tellefsen

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I should add, that I have no problems running the program as a
standalone client, the bug/whatever only appears inside applets.

CT

- -Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: 23. november 2000 17:06
To: Orion-Interest
Subject: java:comp/env namespace is only available from within a J2EE
com ponent


Weird exception:

Recently, I have been getting this error from my applet:

16:54:30 [unknown class] [ERROR] Exception caught. Stack trace
follows: javax.naming.NamingException: java:comp/env namespace is
only available from within a J2EE component at
com.sun.enterprise.naming.java.javaURLContext.getComponentContext(java
URLContext.java:392)at
com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.ja
va:51)  at javax.naming.InitialContext.lookup(Unknown Source)   at
com.telenor.mobil.planit.appit.util.AppitUtilities.getHome(AppitUtilit
ies.java:254)   at
com.telenor.mobil.planit.appit.util.AppitUtilities.getSessionHome(Appi
tUtilities.java:104)at
com.telenor.mobil.planit.doping.applet.RnpAppletSharedProperties.init
(RnpAppletSharedProperties.java:75)at
com.telenor.mobil.planit.doping.applet.RnpAppletSharedProperties.getIn
stance(RnpAppletSharedProperties.java:298)  at
com.telenor.mobil.planit.doping.applet.RnpApplet.init(RnpApplet.java:1
95) at sun.applet.AppletPanel.run(Unknown Source)   at
java.lang.Thread.run(Unknown Source)

Does anyone know what this means? If the java:comp/env namespace is
only available from within a J2EE component, then how is it possible
to program a client or applet which should communicate with my EJBs?

The code creating the error is:

private static final EJBHome getHome(
String remoteInterfaceName,
String moduleName,
String beanType
)
throws ClassNotFoundException, NamingException {
if( DEBUG ) Log.debug( "getHome( " + remoteInterfaceName + "
" + moduleName + " " + beanType + " )", instance );
final StringBuffer homeName = new StringBuffer(
"com.telenor.mobil.planit." );
homeName.append( moduleName.replace('/', '.') );
homeName.append( ".ejb." );
homeName.append( beanType );
homeName.append( "." );
homeName.append( remoteInterfaceName );
homeName.append( "Home" );

if( context == null ) {
if( env != null ) {
context = new InitialContext( env );
}
else {
context = new InitialContext();
}
}

final Object homeObject = context.lookup("java:comp/env/ejb/"
+
moduleName + "/" + remoteInterfaceName );

yours,
Christian Tellefsen


-BEGIN PGP SIGNATURE-
Version: PGP Personal Privacy 6.5.8

iQA/AwUBOh09jCZr3JnfcXIbEQJpZACgl+icXCyutsSgQTpvLmA9y0Fur6IAnRtp
jd9LwkoeWFUeQmQ0n27fw4ET
=nC4O
-END PGP SIGNATURE-




Problem with applets

2000-10-19 Thread Christian . Tellefsen

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

We currently have a problem using Orion with applets on both IE and
Netscape (JRE 1.3.0-C).

If we, without exiting the browser, 

1. Start an applet which does a JNDI lookup
2. Close the browser window containing the applet
3. Start the applet again,

then all of these occur:

a) Java Plug-in hangs
b) IE hangs / Netscape refuses to show the applet

If we attempt to do this on an applet with the JNDI lookup removed,
everything works fine.

We are wondering, has anyone else tried to use Applets with Orion?
Did you experience the same problems we have, or did it work fine? 

We are not sure if there is some problem with our setup or whether
there is a problem in orion.jar. BTW our applet EMBED has
ARCHIVE=orion.jar, and uses Orion's classes to do the lookup.

Any help will be greatly appreciated! We are kind of stuck!

yours,
Christian Tellefsen


-BEGIN PGP SIGNATURE-
Version: PGP Personal Privacy 6.5.8

iQA/AwUBOe8PISZr3JnfcXIbEQIzDwCdGshaWs5YViq+tc7wLCWkmFqWQosAn2xj
4bi/ClD0uquCrFCFbAo2sEwq
=2upp
-END PGP SIGNATURE-




Lookup with orion.jar

2000-10-19 Thread Christian . Tellefsen

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Is it possible to do a JNDI lookup from an applet or stand-alone
client against Orion, without using files from orion.jar? Or is the
whole 2 MB file necessary to do this?

Any help will be greatly appreciated.

Yours,
Christian Tellefsen


-BEGIN PGP SIGNATURE-
Version: PGP Personal Privacy 6.5.8

iQA/AwUBOe8cjCZr3JnfcXIbEQLgZgCfazFp9mDbmI6AS6cmmmG6nJbvNz8AoI20
QCCIdRERk+zGcGjoNgIxaIzz
=3B7A
-END PGP SIGNATURE-




Used entity instances

2000-08-07 Thread Christian . Tellefsen

I have had some problems with Orion running out of memory. 

As far as I can tell, the amount of Used Instances just gets larger and
larger and larger as I process more findByXXX methods. The problem is that I
have methods which go through a database with millions of records. It seems
like no entity instances are ever released, even after I have exited the
method requesting the entity beans. So I run out of memory after a while.

What can I do about this? Can I specify that Orion shall use no more than X
bytes of memory, forcing it to discard old entities, or this there some
other solution? 

yours,
Christian Tellefsen
Exense ASA







Applets and Orion

2000-06-08 Thread Christian . Tellefsen

What files do I need to include in my applet if I want it to communicate
with Orion? 

I have included the remote and home interfaces, of course, but I also need
some other stuff...

med vennlig hilsen
Christian Tellefsen
Telenor Mobil AS - Planavdelingen





Problem with orion-ejb-jar.xml

2000-05-10 Thread Christian . Tellefsen

I have a problem with using my source control system with Orion. 

The problem occurs because the orion-ejb-jar.xml file both contains source
code (the query="" part, among other things) and is also partially generated
by Orion.

Therefore, is someone checks out orion-ejb-jar.xml and not all the files
which orion-ejb-jar.xml depends on (like ejb-jar.xml and the Home
interfaces, and the PK class, and so on), he risks deleting source code when
he runs Orion! 

In a way, this file is both a source code file and an object file at the
same time. I would therefore suggest removing fields like query="" and
cmp-field-mapping and so on from orion-ejb-jar.xml, and putting them in
another file which is not automatically updated by Orion. Or, you could make
sure that stuff is never automatically deleted from the file, and show some
warnings if the file is out of sync with the files it is dependent on. Or
maybe some other solution is better...

yours
Christian Tellefsen
Telenor Mobil AS - Planavdelingen






Session EJB tutorial

2000-03-01 Thread Christian . Tellefsen

In the Session EJB tutorial you write:

in config/ejb.xml add an
ejb-jarpath/to/your/ejb/dir/relative/to/the/config/dir/ejb-jar. 
In config/server.xml uncomment the rmi-config tag to enable the rmi server
and uncomment the ejb-config tag to enable the ejb server. 

I cannot find an ejb.xml file in Orion, and neither can I find a
specification of the ejb-config tag in the server.xml documentation. Is the
tutorial for some other version of Orion? How do I enable the EJB server in
my version?

My Orion version is 091b, and I am running on NT.

Yours,
Christian Tellefsen
Seniorkonsulent, Info-Expert AS
Telenor Mobil AS - Planavdelingen