ejb in other application ?
Hellu, What (extra) do I need to do to be able to call a bean in another application (from a servlet/bean in another application)? When I call the bean in the same application, everything is ok. However when I do the same in another application, Orion isn't able to find the Bean. Hh I think I need to configure something extra, but can't find what. Some help please ? Eddie
Re: Paged search results
My first thought is that a cache should not be stored in a session, since that would only be available in that session and "cannot" be shared... Better to store a searchresult in the application object ( if the result is static and is the same for all users). If the searchresult is specific to a certain user, then you could store it in a session. For multibrowser usage, there will be separate sessions for those. There is probably a way to get them to use the same session, but I haven't tried this. In this case I suggest a hashtable in the application object and an id string ( key in hashtable ) in the session. Hope this at least gives you a couple of ideas on how to get started. regards Johan - Original Message - From: "Holden Glova" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Wednesday, March 28, 2001 6:19 AM Subject: Paged search results > Hi all, > > Perhaps this is slightly off topic and > if so, I apologize and feel free to > ignore this. My knowledge of j2ee is not > high but I would like to know the best > way to handle this with of course, > minimal complexity. I am not sure where > else I can find information on this > subject from knowledgeable people > though, so here goes. > > We are wondering what the best approach > would be move through a collection of > page results that come back from a > search. We have thought about using > sessions to cache the results and help > keep track of what the current result > view consists of, but we are not sure if > this is the best way to handle something > like this. Some things that come to mind > are what would happen if we have > multiple browsers open trying to perform > different searches at the same time, > would we need a separate SessionBean to > cache these results in? > > What could be some of the advantages and > disadvantages of using sessions for this > problem? Can anyone point me to some > other ways of approaching this problem > aside from using sessions? > > Thanks in advance for any help and > pointers that are given. > > Regards, > > -- > Holden Glova, [EMAIL PROTECTED] > Software Engineer > Alchemy Group Limited > Level 6 Royal Sun Alliance Bldg > PO Box 2386 > Christchurch > New Zealand > Phone: +64 3 962-0382 > Fax: +64 3 962-0388
Re: help talking to the Orion JNDI tree from outside the container
al pivonka wrote: > > I have seperate application trying to utilize the > orion > jndi context of an webapp with in the orion container. > > I have setup a jndi.properties file in the classpath > of the application and on execution i recieve this > exception: > > javax.naming.CommunicationException: Can't find > SerialContextProvider jndi.properties contents: java.naming.provider.url=ormi\://127.0.0.1\:23791/appName java.naming.factory.initial=com.evermind.server.ApplicationClientInitialContextFactory works for me
Paged search results
Hi all, Perhaps this is slightly off topic and if so, I apologize and feel free to ignore this. My knowledge of j2ee is not high but I would like to know the best way to handle this with of course, minimal complexity. I am not sure where else I can find information on this subject from knowledgeable people though, so here goes. We are wondering what the best approach would be move through a collection of page results that come back from a search. We have thought about using sessions to cache the results and help keep track of what the current result view consists of, but we are not sure if this is the best way to handle something like this. Some things that come to mind are what would happen if we have multiple browsers open trying to perform different searches at the same time, would we need a separate SessionBean to cache these results in? What could be some of the advantages and disadvantages of using sessions for this problem? Can anyone point me to some other ways of approaching this problem aside from using sessions? Thanks in advance for any help and pointers that are given. Regards, -- Holden Glova, [EMAIL PROTECTED] Software Engineer Alchemy Group Limited Level 6 Royal Sun Alliance Bldg PO Box 2386 Christchurch New Zealand Phone: +64 3 962-0382 Fax: +64 3 962-0388
Un Subscribe
Re: Cookie creation bug (?) for servlet-including jsp files
On Tue, 27 Mar 2001, Ostroff, Mike wrote: > I am working on a web-app (powered by Orion 1.4.5) that uses a jsp page > with several Java servlets included within it that do the more complex > computations. The jsp file has lines like: > "" that load > the servlets. This does a request on the servlet and inserts the HTML > they return at the include point. > > The problem is that in one of the servlets I am trying to create some > cookies using the standard HttpServletResponse.addCookie(new > Cookie(name, val)) code. If I run the servlet directly without embedding do you think this might have something to do with the output of the JSP being committed (and thus the HTTP headers already being sent) by the time you do the jsp include of your servlet? > it in a jsp file then the cookies get created just fine. But when I try > to execute the servlet from within the jsp file, then the cookies do not > get created, even though I know that the addCookie() method is being > reached and executed. This same jsp and servlet combination worked and > created the cookies without problems when run under Allaire's JRun 2.3. perhaps JRUN has a bigger output buffer for jsp's than orion? Trevor > Is this an Orion bug? And can anyone think of a work around that won't > involve massive changes to how the code is organized? > > - Mike >
RE: Cookie creation bug (?) for servlet-including jsp files
Sounds like the flush=true is committing the response stream before you add teh cookie. This is not a bug. You have to add cookies before ANY part of the response is sent to the browser. -mike > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Ostroff, Mike > Sent: Wednesday, March 28, 2001 7:03 AM > To: Orion-Interest > Subject: Cookie creation bug (?) for servlet-including jsp files > > > I am working on a web-app (powered by Orion 1.4.5) that uses a jsp page > with several Java servlets included within it that do the more complex > computations. The jsp file has lines like: > "" that load > the servlets. This does a request on the servlet and inserts the HTML > they return at the include point. > > The problem is that in one of the servlets I am trying to create some > cookies using the standard HttpServletResponse.addCookie(new > Cookie(name, val)) code. If I run the servlet directly without embedding > it in a jsp file then the cookies get created just fine. But when I try > to execute the servlet from within the jsp file, then the cookies do not > get created, even though I know that the addCookie() method is being > reached and executed. This same jsp and servlet combination worked and > created the cookies without problems when run under Allaire's JRun 2.3. > Is this an Orion bug? And can anyone think of a work around that won't > involve massive changes to how the code is organized? > > - Mike > >
Cookie creation bug (?) for servlet-including jsp files
I am working on a web-app (powered by Orion 1.4.5) that uses a jsp page with several Java servlets included within it that do the more complex computations. The jsp file has lines like: "" that load the servlets. This does a request on the servlet and inserts the HTML they return at the include point. The problem is that in one of the servlets I am trying to create some cookies using the standard HttpServletResponse.addCookie(new Cookie(name, val)) code. If I run the servlet directly without embedding it in a jsp file then the cookies get created just fine. But when I try to execute the servlet from within the jsp file, then the cookies do not get created, even though I know that the addCookie() method is being reached and executed. This same jsp and servlet combination worked and created the cookies without problems when run under Allaire's JRun 2.3. Is this an Orion bug? And can anyone think of a work around that won't involve massive changes to how the code is organized? - Mike
RE: Connection Pooling
Have you tried adding following attributes to your data-source definition: min-connections=... max-connections=... Take a look at http://www.orionserver.com/docs/data-sources.xml.html regards, Taavi > How to specify min number of connections and max number of > connections in my > data base connection pooling. I am using the following settings > currently. > >name="Oracle8" location="jdbc/Challenger" > connection-driver="oracle.jdbc.driver.OracleDriver" username="vms" > password="vms" url="jdbc:oracle:thin:@challenger:1521:vmsdev" > inactivity-timeout="30"/>
RE: Oracle Clob Prob
Hi Jeff, Thanks for the note. Will implement your suggested changes asap. /Claus -Original Message- From: Jeff Hubbach [mailto:[EMAIL PROTECTED]] Sent: 27. marts 2001 17:08 To: Orion-Interest Subject: Re: Oracle Clob Prob Claus, If you use a StringBuffer instead of a String to copy the bytes into, you won't be allocating/deallocating as much memory. Jeff Hubbach Claus Ibsen wrote: > Hi > > We use this util method to get a clob field: > ejb: weblogic 5.1 at this time, but evaluating orionserver at the moment > oracle: 8.1.6i > > code > >/** > * Converts a Clob object to a String. > * > * > * Note: If there is a problem converting null is returned. > * > *@param clob the clob field to get as string > *@return the string > */ >public String getStringFromClob(Clob clob) { > String ss = ""; > try { > byte b = (byte) ' '; > int len = (int) clob.length(); > InputStream inp = clob.getAsciiStream(); > > for (int i = 0; i < len; i++) { > b = (byte) inp.read(); > ss += (char) b; > } > } catch (SQLException e) { > return ""; > } catch (IOException e) { > return ""; > } catch (NullPointerException e) { > return ""; > } > > return ss; >} > > Regards > > Claus Ibsen > Programmer at www.travelmarket.com > > -Original Message- > From: Tim Squires [mailto:[EMAIL PROTECTED]] > Sent: 27. marts 2001 10:54 > To: Orion-Interest > Subject: Oracle Clob Prob > > Hi, > > I'm having problems pulling a clob out of Oracle 8.1.7 into an entity ejb: > > When I declare the container managed field as a string (it's a clob in the > db), the field is always null. > When I declare the field as oracle.sql.CLOB and access the contents, the > following error is thrown: > java.lang.NullPointerException at > java.io.ObjectInputStream.readFullyInternal(ObjectInputStream.java:1780) at > java.io.ObjectInputStream.bufferData(ObjectInputStream.java:1750) at > java.io.ObjectInputStream.readShort(ObjectInputStream.java:1935) at > java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:842) at > java.io.ObjectInputStream.(ObjectInputStream.java:168) at > com.evermind.io.kq.(JAX) at com.evermind.server.ejb.gw.(JAX) at > com.evermind.server.ejb.EntityEJBObject.deSerialize(JAX) at > Knowledge_Content_EntityBeanWrapper44.loadState(Knowledge_Content_EntityBean > Wrapper44.java:1027) at > Knowledge_Content_EntityBeanWrapper44.getContent(Knowledge_Content_EntityBea > nWrapper44.java:222) at > __jspPage2_test_jsp._jspService(__jspPage2_test_jsp.java:63) at > com.orionserver.http.OrionHttpJspPage.service(JAX) at > com.evermind.server.http.HttpApplication.xu(JAX) at > com.evermind.server.http.JSPServlet.service(JAX) at > com.evermind.server.http.d4.s3(JAX) at com.evermind.server.http.d4.s1(JAX) > at com.evermind.server.http.eg.s9(JAX) at > com.evermind.server.http.eg.dr(JAX) at com.evermind.util.f.run(JAX) > > When I declare the field as java.sql.Clob, it throws this exception: > com.evermind.server.rmi.OrionRemoteException: java.lang.NullPointerException > at com.evermind.server.ejb.EJBUtils.getUserException(JAX) at > Knowledge_Content_EntityBeanWrapper44.getContent(Knowledge_Content_EntityBea > nWrapper44.java:273) at > __jspPage0_test_jsp._jspService(__jspPage0_test_jsp.java:63) at > com.orionserver.http.OrionHttpJspPage.service(JAX) at > com.evermind.server.http.HttpApplication.xu(JAX) at > com.evermind.server.http.JSPServlet.service(JAX) at > com.evermind.server.http.d4.s3(JAX) at com.evermind.server.http.d4.s1(JAX) > at com.evermind.server.http.eg.s9(JAX) at > com.evermind.server.http.eg.dr(JAX) at com.evermind.util.f.run(JAX) > > All the errors are thrown when I access the getContent method of the remote > interface even if I just return a test string. > > Any help would be appreciated, > Tim. -- Jeff Hubbach Internet Developer New Media Designs, Inc. www.nmd.com
RE: Connection Pooling
Refer to Orion documentation on the data-sources.xml file. You can find the documentation links through the orionserver web site. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Kesav Kumar Sent: Tuesday, March 27, 2001 10:08 AM To: Orion-Interest Subject: Connection Pooling How to specify min number of connections and max number of connections in my data base connection pooling. I am using the following settings currently. How should I specify min/max connections. Kesav Kumar Software Engineer Voquette, Inc. 650 356 3740 mailto:[EMAIL PROTECTED] http://www.voquette.com Voquette...Delivering Sound Information
Vote for Orion
Title: Vote for Orion Vote for Orion http://sys-con.com/java/readerschoice2001/liveupdateappserver2.cfm To vote click on the VOTE-2001-RCA banner on top: http://sys-con.com/java/readerschoice2001/index.cfm Larry
RE: off topic: JSP and Apache HTTP authentication
Look into form-based authentication in the servlet specification. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of John Miller Sent: Tuesday, March 27, 2001 5:36 AM To: Orion-Interest Subject: off topic: JSP and Apache HTTP authentication Does anyone know of a way to use JSP for Apache HTTP authentication instead of that annoying pop-up box you get? In particular what class's you used and any examples would be appreciated. Johnny
help talking to the Orion JNDI tree from outside the container
I have seperate application trying to utilize the orion jndi context of an webapp with in the orion container. I have setup a jndi.properties file in the classpath of the application and on execution i recieve this exception: javax.naming.CommunicationException: Can't find SerialContextProvider Can any one help awp = Al Pivonka (H)317.295.1737 Those who say it can't be done, are usually interrupted by those doing it. __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/?.refer=text
RE: java.lang.OutOfMemoryError
When I looked at your client, I found that you have a loop that creates 100,000 instances of the EJB and have never free any. Thus, your client now has 100,000 EJB's that will not be passivated until you leave the for loop. This type of code will break most app servers. SnowWolf Wagner -Original Message- From: theo van niekerk [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 27, 2001 9:31 AM To: Orion-Interest Subject: java.lang.OutOfMemoryError Hi there Orion is a great application server for small web apps. (We have deployed 2 small sites using orion with success). But the moment you start thinking of using it for bigger more serious apps it will always throw a java.lang.OutOfMemoryError The problem: Orion does not passivate EJB's. Attached an EAR file that will show this. How to deploy.. Change your server.xml file to include something like.. Start orion the normal way.. java -jar orion.jar Well, I don't know how to execute an external client that reference classes inside a jar that is inside an ear, but the following works fine.. Unjar/Unzip the EAR Unjar/Unzip the JARS (I've used the directory structures.. c:\work\oriontest c:\work\oriontest\test-ejb c:\work\oriontest\test-client and orion.jar is in.. c:\PRG\orion) execute.. c:\work\oriontest\test-client\test.cmd or cd to.. c:\work\oriontest and execute.. c:\java\jdk1.3\bin\java -cp .;test-client;test-ejb;c:\PRG\orion\orion.jar tests.TestClient 1 10 2000 PARAMS.. index of first bean to create = 1 create 10 beans refresh home reference every 2000 creations (thought it could make a difference) and after 6410 creations.. Created bean...6410 Exception in thread "main" java.lang.OutOfMemoryError at com.evermind.server.rmi.bb.invokeMethod(JAX) at com.evermind.server.rmi.a2.invoke(JAX) at com.evermind.server.rmi.a3.invoke(JAX) at __Proxy0.create(Unknown Source) at tests.TestClient.loopTest(TestClient.java:33) at tests.TestClient.main(TestClient.java:39) And about 7 seconds later on the server side.. a single bean gets passivated Good Luck
Connection Pooling
How to specify min number of connections and max number of connections in my data base connection pooling. I am using the following settings currently. How should I specify min/max connections. Kesav Kumar Software Engineer Voquette, Inc. 650 356 3740 mailto:[EMAIL PROTECTED] http://www.voquette.com Voquette...Delivering Sound Information
All running sessions
Is there any API which gives all the current running sessions in the Orion server. Kesav Kumar Software Engineer Voquette, Inc. 650 356 3740 mailto:[EMAIL PROTECTED] http://www.voquette.com Voquette...Delivering Sound Information
RE: java.lang.OutOfMemoryError
It is nothing to do with Orion stability its JVM stability. Try allocating more memory to orion server and it should work fine. instead of java -jar orion.jar try java -Xms50m -Xmx100m orion.jar Kesav Kumar Software Engineer Voquette, Inc. 650 356 3740 mailto:[EMAIL PROTECTED] http://www.voquette.com Voquette...Delivering Sound Information -Original Message- From: theo van niekerk [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 27, 2001 6:31 AM To: Orion-Interest Subject: java.lang.OutOfMemoryError Hi there Orion is a great application server for small web apps. (We have deployed 2 small sites using orion with success). But the moment you start thinking of using it for bigger more serious apps it will always throw a java.lang.OutOfMemoryError The problem: Orion does not passivate EJB's. Attached an EAR file that will show this. How to deploy.. Change your server.xml file to include something like.. Start orion the normal way.. java -jar orion.jar Well, I don't know how to execute an external client that reference classes inside a jar that is inside an ear, but the following works fine.. Unjar/Unzip the EAR Unjar/Unzip the JARS (I've used the directory structures.. c:\work\oriontest c:\work\oriontest\test-ejb c:\work\oriontest\test-client and orion.jar is in.. c:\PRG\orion) execute.. c:\work\oriontest\test-client\test.cmd or cd to.. c:\work\oriontest and execute.. c:\java\jdk1.3\bin\java -cp .;test-client;test-ejb;c:\PRG\orion\orion.jar tests.TestClient 1 10 2000 PARAMS.. index of first bean to create = 1 create 10 beans refresh home reference every 2000 creations (thought it could make a difference) and after 6410 creations.. Created bean...6410 Exception in thread "main" java.lang.OutOfMemoryError at com.evermind.server.rmi.bb.invokeMethod(JAX) at com.evermind.server.rmi.a2.invoke(JAX) at com.evermind.server.rmi.a3.invoke(JAX) at __Proxy0.create(Unknown Source) at tests.TestClient.loopTest(TestClient.java:33) at tests.TestClient.main(TestClient.java:39) And about 7 seconds later on the server side.. a single bean gets passivated Good Luck
Collection Finders With Entity Argument Always Return Empty Collection
My last shred of sanity is vapourizing as I type. I've spent several fruitless days trying to work around Orion 1.4.7's inability to generate a working finder method that takes an Entity reference as an argument. When I finish composing this message I think I'll gibber under my desk for a while. Help. Among many others, I've got two Entity EJBs built: CatalogEJB and CatalogEntryEJB. Both are CMP entities. CatalogEntryEJB has a working 1:1 CMR uni-directional relationship to CatalogEJB. I've defined the following finder method in the home interface of CatalogEntryEJB so that a CatalogEJB instance can find all the CatalogEntryEJB instances that 'belong' to it: Collection findByCatalog(Catalog catalog) throws EJBException, RemoteException, FinderException; Once deployed, the descriptor entry for CatalogEntryEJB contains the following: CatalogEntryEJB findByAll CatalogEntryEJB findByCatalog com.canlink.components.model.catalog.Catalog When called from a method in CatalogEJB, the findByAll method works fine, returning all the CatalogEntryEJB instances in existence. However, the findByCatalog method always returns an empty Collection, no matter what may exist in the database. There is never any exception thown, it just always returns an empty Collection. If I manually execute the generated SQL statement, I do in fact get the appropriate results. Investigating deeper, I've aimed Together Control Center's debugger at this bit of the generated code for the CatalogEntryEJB Home's findByCatalog method: java.sql.PreparedStatement statement = connection.getCustomStatement("select CatalogEntryEJB.identity, CatalogEntryEJB.catalogIdentity, CatalogEntryEJB.catalogLocale, CatalogEntryEJB.label, CatalogEntryEJB.targetRoleIdentity, CatalogEntryEJB.referenceidentity, CatalogEntryEJB.price, CatalogEntryEJB.discountRate, CatalogEntryEJB.parentreferenceidentity, CatalogEntryEJB.referenceTypeInt, CatalogEntryEJB.productCode, CatalogEntryEJB.description, CatalogEntryEJB.extendedDescription, CatalogEntryEJB.listIndex, CatalogEntryEJB.created, CatalogEntryEJB.creator, CatalogEntryEJB.modified, CatalogEntryEJB.modifier from CatalogEntryEJB where CatalogEntryEJB.catalogIdentity = ? and CatalogEntryEJB.catalogLocale = ?"); try { com.canlink.components.base.LocalizedEntityPK primaryKey398 = argument0 == null ? null : ((com.canlink.components.base.LocalizedEntityPK) argument0.getPrimaryKey()); { if (primaryKey398 == null) { if (((java.util.Locale) null) == null) statement.setNull(1, java.sql.Types.VARCHAR); else statement.setString(1, com.evermind.util.ObjectUtils.toString(((java.util.Locale) null))); if (((java.lang.String) null) == null) statement.setNull(2, java.sql.Types.VARCHAR); else statement.setString(2, ((java.lang.String) null)); } else { if (primaryKey398.locale == null) statement.setNull(1, java.sql.Types.VARCHAR); else statement.setString(1, com.evermind.util.ObjectUtils.toString(primaryKey398.locale)); if (primaryKey398.identity == null) statement.setNull(2, java.sql.Types.VARCHAR); else statement.setString(2, primaryKey398.identity); } } } finally { } java.sql.ResultSet set = statement.executeQuery(); while (set.next()) { } Although I can't inspect anything while debugging this code (presumably because Orion compiles it without debugging info), I can step through it and observe that primaryKey398 is not null, and that both appropriate statement.setString() methods are being called. I can also observer that much to my disappointment, the ResultSet never returns true from its next() method since the contents of the while{} block at the end of this snippet is never executed. Interestingly, the generated code (below) for the findByAll method always works: the ResultSet contains all the extant CatalogEntryEJB rows, and the while{} block gets executed for each one. java.sql.PreparedStatement statement = connection.getCustomStatement("select CatalogEntryEJB.identity, CatalogEntryEJB.catalogIdentity, CatalogEntryEJB.catalogLocale, CatalogEntryEJB.label, CatalogEntryEJB.targetRoleIdentity, CatalogEntryEJB.referenceidentity, CatalogEntryEJB.price, CatalogEntryEJB.discountRate, CatalogEntryEJB.parentreferenceidentity, CatalogEntryEJB.referenceTypeInt, CatalogEntryEJB.productCode, CatalogEntryEJB.description, CatalogEntryEJB.extendedDescription, CatalogEntryEJB.listIndex, CatalogEntryEJB.created, CatalogEntryEJB.creator, CatalogEntryEJB.modified, CatalogEntryEJB.modifier from CatalogEntryEJB"); java.sql.ResultSet set = statement.executeQuery(); while (set.next()) { ... }
Re: JNDI SecurityException
> >I have no idea. I simply know that someone on the list claimed to have reported this > >bug, and to this day my servlets simply will not properly authenticate. I do not >know > >if this is a problem with just servlets, or anything using ApplicationClient{ICF}. >Our > >servlets are running in Orion. I consider this a very serious bug that has servived > >several releases. > > Serious indeed. What are you doing for a work-around? There is no workaround. If they do not fix this bug, we will need to deploy on another application server. tim.
Un Subscribe
RE: java.lang.OutOfMemoryError
This is beacause Orion doesn't free unused beans you need to use the inactivity-timeout attribute in the orion-ejb-jar.xml file it serves to free unused beans : H. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of theo van niekerk Sent: mardi, 27. mars 2001 16:31 To: Orion-Interest Subject: java.lang.OutOfMemoryError Hi there Orion is a great application server for small web apps. (We have deployed 2 small sites using orion with success). But the moment you start thinking of using it for bigger more serious apps it will always throw a java.lang.OutOfMemoryError The problem: Orion does not passivate EJB's. Attached an EAR file that will show this. How to deploy.. Change your server.xml file to include something like.. Start orion the normal way.. java -jar orion.jar Well, I don't know how to execute an external client that reference classes inside a jar that is inside an ear, but the following works fine.. Unjar/Unzip the EAR Unjar/Unzip the JARS (I've used the directory structures.. c:\work\oriontest c:\work\oriontest\test-ejb c:\work\oriontest\test-client and orion.jar is in.. c:\PRG\orion) execute.. c:\work\oriontest\test-client\test.cmd or cd to.. c:\work\oriontest and execute.. c:\java\jdk1.3\bin\java -cp .;test-client;test-ejb;c:\PRG\orion\orion.jar tests.TestClient 1 10 2000 PARAMS.. index of first bean to create = 1 create 10 beans refresh home reference every 2000 creations (thought it could make a difference) and after 6410 creations.. Created bean...6410 Exception in thread "main" java.lang.OutOfMemoryError at com.evermind.server.rmi.bb.invokeMethod(JAX) at com.evermind.server.rmi.a2.invoke(JAX) at com.evermind.server.rmi.a3.invoke(JAX) at __Proxy0.create(Unknown Source) at tests.TestClient.loopTest(TestClient.java:33) at tests.TestClient.main(TestClient.java:39) And about 7 seconds later on the server side.. a single bean gets passivated Good Luck
RE: java.lang.OutOfMemoryError
We found we could force passivation in the later orion builds - not sure exactly whch builds it works in, but its OK in 1.4.7. Create a directory called orion in the root of your ejb jar (i.e. as a sibling of your META-INF directory). In the orion folder, create a file orion-ejb-jar.xml (The easy way is to copy the one that was auto created on a previous deployment - look in the $ORION_ROOT\application-deployments and the correct sub-folder.) Edit the file so that there is a max-instances="100" attribute on each of the entity-deployment entities. Delete the previous deployment directory (otherwise the new file will not be copied over), and repackage/deploy. Seems to work for us. Kev -Original Message- From: theo van niekerk [mailto:[EMAIL PROTECTED]] Sent: 27 March 2001 15:31 To: Orion-Interest Subject: java.lang.OutOfMemoryError Hi there Orion is a great application server for small web apps. (We have deployed 2 small sites using orion with success). But the moment you start thinking of using it for bigger more serious apps it will always throw a java.lang.OutOfMemoryError The problem: Orion does not passivate EJB's. Attached an EAR file that will show this. How to deploy.. Change your server.xml file to include something like.. Start orion the normal way.. java -jar orion.jar Well, I don't know how to execute an external client that reference classes inside a jar that is inside an ear, but the following works fine.. Unjar/Unzip the EAR Unjar/Unzip the JARS (I've used the directory structures.. c:\work\oriontest c:\work\oriontest\test-ejb c:\work\oriontest\test-client and orion.jar is in.. c:\PRG\orion) execute.. c:\work\oriontest\test-client\test.cmd or cd to.. c:\work\oriontest and execute.. c:\java\jdk1.3\bin\java -cp .;test-client;test-ejb;c:\PRG\orion\orion.jar tests.TestClient 1 10 2000 PARAMS.. index of first bean to create = 1 create 10 beans refresh home reference every 2000 creations (thought it could make a difference) and after 6410 creations.. Created bean...6410 Exception in thread "main" java.lang.OutOfMemoryError at com.evermind.server.rmi.bb.invokeMethod(JAX) at com.evermind.server.rmi.a2.invoke(JAX) at com.evermind.server.rmi.a3.invoke(JAX) at __Proxy0.create(Unknown Source) at tests.TestClient.loopTest(TestClient.java:33) at tests.TestClient.main(TestClient.java:39) And about 7 seconds later on the server side.. a single bean gets passivated Good Luck
Re: JNDI SecurityException
>> I tried the ApplicationClientInitialContextFactory (by mistake) when I first set >this up. >> I just gave me other problems (I think there was some sort of complaint about a >missing >> application.xml file). > >I believe this complaint is because it is looking for META-INF/application-client.xml >and is not finding it. Ah yes, I think you're right. I think that I tried to get around this by copying a sample application-client.xml file into META-INF on the client side, and that had no effect at all. Perhaps the contents did not make Orion happy. >I have no idea. I simply know that someone on the list claimed to have reported this >bug, and to this day my servlets simply will not properly authenticate. I do not know >if this is a problem with just servlets, or anything using ApplicationClient{ICF}. Our >servlets are running in Orion. I consider this a very serious bug that has servived >several releases. Serious indeed. What are you doing for a work-around? Bugs aside, the amount of work required to deploy code on Orion is pretty mind-boggling. That, combined with the lack of detailed documentation, is disasterous. I've only had experience with one other J2EE server, JBoss. JBoss can be a real pain to set up, and like Orion has useless or missing error messages, but at least deployment is relatively painless. Orion is my private nightmare - I've wasted days trying to get the simplest things to work, like this JNDI lookup. I *want* to use Orion, but it doesn't want me to use it! Eric Get 250 color business cards for FREE! at Lycos Mail http://mail.lycos.com/freemail/vistaprint_index.html
Re: Oracle Clob Prob
Claus, If you use a StringBuffer instead of a String to copy the bytes into, you won't be allocating/deallocating as much memory. Jeff Hubbach Claus Ibsen wrote: > Hi > > We use this util method to get a clob field: > ejb: weblogic 5.1 at this time, but evaluating orionserver at the moment > oracle: 8.1.6i > > code > >/** > * Converts a Clob object to a String. > * > * > * Note: If there is a problem converting null is returned. > * > *@param clob the clob field to get as string > *@return the string > */ >public String getStringFromClob(Clob clob) { > String ss = ""; > try { > byte b = (byte) ' '; > int len = (int) clob.length(); > InputStream inp = clob.getAsciiStream(); > > for (int i = 0; i < len; i++) { > b = (byte) inp.read(); > ss += (char) b; > } > } catch (SQLException e) { > return ""; > } catch (IOException e) { > return ""; > } catch (NullPointerException e) { > return ""; > } > > return ss; >} > > Regards > > Claus Ibsen > Programmer at www.travelmarket.com > > -Original Message- > From: Tim Squires [mailto:[EMAIL PROTECTED]] > Sent: 27. marts 2001 10:54 > To: Orion-Interest > Subject: Oracle Clob Prob > > Hi, > > I'm having problems pulling a clob out of Oracle 8.1.7 into an entity ejb: > > When I declare the container managed field as a string (it's a clob in the > db), the field is always null. > When I declare the field as oracle.sql.CLOB and access the contents, the > following error is thrown: > java.lang.NullPointerException at > java.io.ObjectInputStream.readFullyInternal(ObjectInputStream.java:1780) at > java.io.ObjectInputStream.bufferData(ObjectInputStream.java:1750) at > java.io.ObjectInputStream.readShort(ObjectInputStream.java:1935) at > java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:842) at > java.io.ObjectInputStream.(ObjectInputStream.java:168) at > com.evermind.io.kq.(JAX) at com.evermind.server.ejb.gw.(JAX) at > com.evermind.server.ejb.EntityEJBObject.deSerialize(JAX) at > Knowledge_Content_EntityBeanWrapper44.loadState(Knowledge_Content_EntityBean > Wrapper44.java:1027) at > Knowledge_Content_EntityBeanWrapper44.getContent(Knowledge_Content_EntityBea > nWrapper44.java:222) at > __jspPage2_test_jsp._jspService(__jspPage2_test_jsp.java:63) at > com.orionserver.http.OrionHttpJspPage.service(JAX) at > com.evermind.server.http.HttpApplication.xu(JAX) at > com.evermind.server.http.JSPServlet.service(JAX) at > com.evermind.server.http.d4.s3(JAX) at com.evermind.server.http.d4.s1(JAX) > at com.evermind.server.http.eg.s9(JAX) at > com.evermind.server.http.eg.dr(JAX) at com.evermind.util.f.run(JAX) > > When I declare the field as java.sql.Clob, it throws this exception: > com.evermind.server.rmi.OrionRemoteException: java.lang.NullPointerException > at com.evermind.server.ejb.EJBUtils.getUserException(JAX) at > Knowledge_Content_EntityBeanWrapper44.getContent(Knowledge_Content_EntityBea > nWrapper44.java:273) at > __jspPage0_test_jsp._jspService(__jspPage0_test_jsp.java:63) at > com.orionserver.http.OrionHttpJspPage.service(JAX) at > com.evermind.server.http.HttpApplication.xu(JAX) at > com.evermind.server.http.JSPServlet.service(JAX) at > com.evermind.server.http.d4.s3(JAX) at com.evermind.server.http.d4.s1(JAX) > at com.evermind.server.http.eg.s9(JAX) at > com.evermind.server.http.eg.dr(JAX) at com.evermind.util.f.run(JAX) > > All the errors are thrown when I access the getContent method of the remote > interface even if I just return a test string. > > Any help would be appreciated, > Tim. -- Jeff Hubbach Internet Developer New Media Designs, Inc. www.nmd.com
java.lang.OutOfMemoryError
Hi there Orion is a great application server for small web apps. (We have deployed 2 small sites using orion with success). But the moment you start thinking of using it for bigger more serious apps it will always throw a java.lang.OutOfMemoryError The problem: Orion does not passivate EJB's. Attached an EAR file that will show this. How to deploy.. Change your server.xml file to include something like.. Start orion the normal way.. java -jar orion.jar Well, I don't know how to execute an external client that reference classes inside a jar that is inside an ear, but the following works fine.. Unjar/Unzip the EAR Unjar/Unzip the JARS (I've used the directory structures.. c:\work\oriontest c:\work\oriontest\test-ejb c:\work\oriontest\test-client and orion.jar is in.. c:\PRG\orion) execute.. c:\work\oriontest\test-client\test.cmd or cd to.. c:\work\oriontest and execute.. c:\java\jdk1.3\bin\java -cp .;test-client;test-ejb;c:\PRG\orion\orion.jar tests.TestClient 1 10 2000 PARAMS.. index of first bean to create = 1 create 10 beans refresh home reference every 2000 creations (thought it could make a difference) and after 6410 creations.. Created bean...6410 Exception in thread "main" java.lang.OutOfMemoryError at com.evermind.server.rmi.bb.invokeMethod(JAX) at com.evermind.server.rmi.a2.invoke(JAX) at com.evermind.server.rmi.a3.invoke(JAX) at __Proxy0.create(Unknown Source) at tests.TestClient.loopTest(TestClient.java:33) at tests.TestClient.main(TestClient.java:39) And about 7 seconds later on the server side.. a single bean gets passivated Good Luck oriontest.ear
RE: EJBUser & User
The EJBUserManager returns an instance of EJBUserWrapper, which implements User. The EJBUserWrapper converts RemoteExceptions to RuntimeExceptions. Marcel > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Kapa > Sent: Tuesday, March 13, 2001 3:07 PM > To: Orion-Interest > Subject: EJBUser & User > > > Hi people, > > I'm trying to figure out how to set up a usermanager for my > application, > and since the User is supposed to be an EJB, I'm having a look at the > EJBUserManager. But I can't figure out why the User interface is not a > superinterface of the EJBUser interface, and the > EJBUSerManager methods > return a User interface. Any clue? Is > > EJBUser ejbUser = (EJBUser) ejbUserManager.getUser(username) > > where ejbUserManager is my EJBUserManager > > supposed to work? > > Greetings > Diego >
RE: Orion + IE + HTTPS = Trouble
We have experienced session problems with both Bluestone's product and Orion. This only happened to us when using IE 5.5. We did some extensive tests and determine that certain IE versions have a problem with session. This happened on secured and non-secured sites as well. Our workaround - at the moment, we cannot correctly support certain versions of IE 5.5. Just my thoughts Tom Pridham -Original Message- From: Tim Endres [mailto:[EMAIL PROTECTED]] Sent: Monday, March 26, 2001 5:33 PM To: Orion-Interest Subject: RE: Orion + IE + HTTPS = Trouble If your code demonstrates that Orion loses the session (or creates a new one), each time that the SSL session is re-established, then that would indicate to me that it is an Orion bug. I assumed that your problem was tied to the Basic Auth, but you are apparently using a FORM instead, and your processing it just like ours in that case. Bugzilla :( tim. > This is my first HTTPS application, so maybe I'm doing something wrong. Our > logon uses a JSP page, and places a UserInfo object in the HttpSession > (along with other objects we use for workflow tracking). All subsequent > access checks for this object before processing, forwarding to the logon > page if it is not found. Our problem was that every two minutes the session > changes (a println() in the servlet now displays a different session id), > the UserInfo object is not found, so the logon page is displayed again. > Adding this registry entry solved the problem on all client machines. How > should I change this to get around the problem? > > My only reason for suggesting that it may be an Orion problem is just that > I've never had problems using IE on other company's secure sites, so > something is being handled differently. If the problem lies with me, thats > OK, I just need someone to point me in the right direction so I can fix it. > > Thanks, > Bruce > > -Original Message- > From: Tim Endres [mailto:[EMAIL PROTECTED]] > Sent: Monday, March 26, 2001 2:24 PM > To: Orion-Interest > Subject: Re: Orion + IE + HTTPS = Trouble > > > The artical you reference on Microsoft's site explicitly states that the > problem > is in MS's products, which implies it is not an Orion problem. Further, the > problem > is related to BASIC AUTH dialogs. Thus, the reason I believe you are not > seeing this > problem in general with other servers is that nobody uses basic auth. Most > sites put > their login pages up as HTML FORM's, not as basic authentication. > > tim. > > > IE 5.0/5.5 running on 95/98/NT keeps losing it's HTTPS session with Orion, > > which is big trouble if you store logon info there. By default these > > versions of IE renegotiate their SSL connections every two minutes, but > this > > can be changed by adding a DWORD registry entry. > > > > > HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\ClientCache > > Time > > > > Adding this entry, and setting it to 0x7FFF has solved all our issues > > with forcing constant logons when running in secure mode, but is a major > > pain because it has to be done for all clients (except Win2K and WinME > > clients) > > > > Since I have never come across this problem when logging on to other HTTPS > > sites on the web, I can't help but wonder if Orion is not handling the > > situation properly (I've tried it on both 1.38 and 1.45). Does anyone > else > > have any experience with this problem, or can comment on whether Orion > > should be handling this without modifying every client machine? > > > > Thanks, > > Bruce > > > > Microsoft reference: > > http://support.microsoft.com/support/kb/articles/Q265/3/69.ASP > > > >
off topic: JSP and Apache HTTP authentication
Does anyone know of a way to use JSP for Apache HTTP authentication instead of that annoying pop-up box you get? In particular what class's you used and any examples would be appreciated. Johnny
Re: Verisign 128-bit SSL??
We use a verisign 128 bit cert in our production site James Birchfield Ironmax maximizing your construction equipment assets 5 Corporate Center 9960 Corporate Campus Drive, Suite 2000 Louisville, KY 40223 Tomas Anderson <[EMAIL PROTECTED]To: Orion-Interest <[EMAIL PROTECTED]> > cc: Sent by: Subject: Verisign 128-bit SSL?? owner-orion-interest@orion server.com 03/27/01 03:53 AM Please respond to Orion-Interest Hi. Has anyone succesfully installed a 128-bit Verisign server-certificate for use in a SSL enabled application on Orion? I have done the "HOW-TO" with the Thawte 40-bit test-cert and that worked fine. I have also with no problem used Microsofts Cert Server. But for production we need a real cert. Thanks for any information Tomas __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/?.refer=text
EJBUser & User
Hi people, I'm trying to figure out how to set up a usermanager for my application, and since the User is supposed to be an EJB, I'm having a look at the EJBUserManager. But I can't figure out why the User interface is not a superinterface of the EJBUser interface, and the EJBUSerManager methods return a User interface. Any clue? Is EJBUser ejbUser = (EJBUser) ejbUserManager.getUser(username) where ejbUserManager is my EJBUserManager supposed to work? Greetings Diego
RE: Oracle Clob Prob
Hi We use this util method to get a clob field: ejb: weblogic 5.1 at this time, but evaluating orionserver at the moment oracle: 8.1.6i code /** * Converts a Clob object to a String. * * * Note: If there is a problem converting null is returned. * *@param clob the clob field to get as string *@return the string */ public String getStringFromClob(Clob clob) { String ss = ""; try { byte b = (byte) ' '; int len = (int) clob.length(); InputStream inp = clob.getAsciiStream(); for (int i = 0; i < len; i++) { b = (byte) inp.read(); ss += (char) b; } } catch (SQLException e) { return ""; } catch (IOException e) { return ""; } catch (NullPointerException e) { return ""; } return ss; } Regards Claus Ibsen Programmer at www.travelmarket.com -Original Message- From: Tim Squires [mailto:[EMAIL PROTECTED]] Sent: 27. marts 2001 10:54 To: Orion-Interest Subject: Oracle Clob Prob Hi, I'm having problems pulling a clob out of Oracle 8.1.7 into an entity ejb: When I declare the container managed field as a string (it's a clob in the db), the field is always null. When I declare the field as oracle.sql.CLOB and access the contents, the following error is thrown: java.lang.NullPointerException at java.io.ObjectInputStream.readFullyInternal(ObjectInputStream.java:1780) at java.io.ObjectInputStream.bufferData(ObjectInputStream.java:1750) at java.io.ObjectInputStream.readShort(ObjectInputStream.java:1935) at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:842) at java.io.ObjectInputStream.(ObjectInputStream.java:168) at com.evermind.io.kq.(JAX) at com.evermind.server.ejb.gw.(JAX) at com.evermind.server.ejb.EntityEJBObject.deSerialize(JAX) at Knowledge_Content_EntityBeanWrapper44.loadState(Knowledge_Content_EntityBean Wrapper44.java:1027) at Knowledge_Content_EntityBeanWrapper44.getContent(Knowledge_Content_EntityBea nWrapper44.java:222) at __jspPage2_test_jsp._jspService(__jspPage2_test_jsp.java:63) at com.orionserver.http.OrionHttpJspPage.service(JAX) at com.evermind.server.http.HttpApplication.xu(JAX) at com.evermind.server.http.JSPServlet.service(JAX) at com.evermind.server.http.d4.s3(JAX) at com.evermind.server.http.d4.s1(JAX) at com.evermind.server.http.eg.s9(JAX) at com.evermind.server.http.eg.dr(JAX) at com.evermind.util.f.run(JAX) When I declare the field as java.sql.Clob, it throws this exception: com.evermind.server.rmi.OrionRemoteException: java.lang.NullPointerException at com.evermind.server.ejb.EJBUtils.getUserException(JAX) at Knowledge_Content_EntityBeanWrapper44.getContent(Knowledge_Content_EntityBea nWrapper44.java:273) at __jspPage0_test_jsp._jspService(__jspPage0_test_jsp.java:63) at com.orionserver.http.OrionHttpJspPage.service(JAX) at com.evermind.server.http.HttpApplication.xu(JAX) at com.evermind.server.http.JSPServlet.service(JAX) at com.evermind.server.http.d4.s3(JAX) at com.evermind.server.http.d4.s1(JAX) at com.evermind.server.http.eg.s9(JAX) at com.evermind.server.http.eg.dr(JAX) at com.evermind.util.f.run(JAX) All the errors are thrown when I access the getContent method of the remote interface even if I just return a test string. Any help would be appreciated, Tim.
Oracle Clob Prob
Hi, I'm having problems pulling a clob out of Oracle 8.1.7 into an entity ejb: When I declare the container managed field as a string (it's a clob in the db), the field is always null. When I declare the field as oracle.sql.CLOB and access the contents, the following error is thrown: java.lang.NullPointerException at java.io.ObjectInputStream.readFullyInternal(ObjectInputStream.java:1780) at java.io.ObjectInputStream.bufferData(ObjectInputStream.java:1750) at java.io.ObjectInputStream.readShort(ObjectInputStream.java:1935) at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:842) at java.io.ObjectInputStream.(ObjectInputStream.java:168) at com.evermind.io.kq.(JAX) at com.evermind.server.ejb.gw.(JAX) at com.evermind.server.ejb.EntityEJBObject.deSerialize(JAX) at Knowledge_Content_EntityBeanWrapper44.loadState(Knowledge_Content_EntityBean Wrapper44.java:1027) at Knowledge_Content_EntityBeanWrapper44.getContent(Knowledge_Content_EntityBea nWrapper44.java:222) at __jspPage2_test_jsp._jspService(__jspPage2_test_jsp.java:63) at com.orionserver.http.OrionHttpJspPage.service(JAX) at com.evermind.server.http.HttpApplication.xu(JAX) at com.evermind.server.http.JSPServlet.service(JAX) at com.evermind.server.http.d4.s3(JAX) at com.evermind.server.http.d4.s1(JAX) at com.evermind.server.http.eg.s9(JAX) at com.evermind.server.http.eg.dr(JAX) at com.evermind.util.f.run(JAX) When I declare the field as java.sql.Clob, it throws this exception: com.evermind.server.rmi.OrionRemoteException: java.lang.NullPointerException at com.evermind.server.ejb.EJBUtils.getUserException(JAX) at Knowledge_Content_EntityBeanWrapper44.getContent(Knowledge_Content_EntityBea nWrapper44.java:273) at __jspPage0_test_jsp._jspService(__jspPage0_test_jsp.java:63) at com.orionserver.http.OrionHttpJspPage.service(JAX) at com.evermind.server.http.HttpApplication.xu(JAX) at com.evermind.server.http.JSPServlet.service(JAX) at com.evermind.server.http.d4.s3(JAX) at com.evermind.server.http.d4.s1(JAX) at com.evermind.server.http.eg.s9(JAX) at com.evermind.server.http.eg.dr(JAX) at com.evermind.util.f.run(JAX) All the errors are thrown when I access the getContent method of the remote interface even if I just return a test string. Any help would be appreciated, Tim.
Verisign 128-bit SSL??
Hi. Has anyone succesfully installed a 128-bit Verisign server-certificate for use in a SSL enabled application on Orion? I have done the "HOW-TO" with the Thawte 40-bit test-cert and that worked fine. I have also with no problem used Microsofts Cert Server. But for production we need a real cert. Thanks for any information Tomas __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/?.refer=text
Un Subscribe
begin:vcard n:Eichinger;Christian tel;work:+43 662 22 88 422 x-mozilla-html:FALSE url:www.salzburgresearch.at org:Salzburg Research Forschungsgesellschaft m.b.H.;SunTREC version:2.1 email;internet:[EMAIL PROTECTED] adr;quoted-printable:;;Jakob-Haringer-Str. 5/III=0D=0A;Salzburg;;5020;Austria fn:Christian Eichinger end:vcard
RE: Deployment of principals.xml
I've been trying to get this to work too. Even for a fresh install, I can't get orion to copy principals.xml to the application-deployments/app directory. I've tried deploying from an .ear file and from a directory structure. Marcel > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of > Hani Suleiman > Sent: Monday, March 26, 2001 9:46 PM > To: Orion-Interest > Subject: Re: Deployment of principals.xml > > > This is deliberate. J2EE makes a point of separating out the > 'deployer' > role. In theory, a vendor could deliver a .ear file, and the > deployer is > then free to configure it for that particular deployment, > which is done > through changing the files in application-deployments. Now, > the application > provider can help this process by providing 'default' deployment > descriptors, but Orion will honour 'pre-deployed apps' and > not clobber any > deployment specific files if they already exist under > application-deployments (eg, all the orion-* files and > principals.xml). If > the file does not exist, then the default one will be copied over. > > > >From: "cybermaster" <[EMAIL PROTECTED]> > >Reply-To: Orion-Interest <[EMAIL PROTECTED]> > >To: Orion-Interest <[EMAIL PROTECTED]> > >Subject: Deployment of principals.xml > >Date: Mon, 26 Mar 2001 10:06:23 -0700 > > > >Not a big deal, but I can't find a place from where > principals.xml would be > >deployed - I put it into applications/app, app/META-INF (where e.g. > >application.xml resides, which *is* copied on deployment), > app/app-web, > >app/app-web/WEB-INF, but no go. Always need to replace the > principals file > >automatically created by Orions deployer in > application-deployments/app > > > >Maybe this is so on purpose - if not, I'd like to find out ... > > > > > > > > > > > > _ > Get your FREE download of MSN Explorer at http://explorer.msn.com > >