Classpath for helper classes
To get started using Orion I'm migrating an existing application (not J2EE) from Netscape/WebSphere to Orion. I want to get it running in non-JAR/WAR mode first. My servlet (in orion/servlets directory) runs but I get a NoClassDefFoundError: com/hksystems/ui/OAJob when it attempts to use the OAJob helper class. Based on an earlier message from Magnus (Re: classloader problem) I've placed all of those classes under: orion/default-web-app/Web-inf/classes It's not a jar file but an expanded tree of the classes. Should this work? Do I need to specify something else in the xml config files to get the classloader to find my OAJob class? - running 0.9.1b
Re: Trouble Setting up an Application
Unsubscribe me. >From: David Geary <[EMAIL PROTECTED]> >To: Orion-Interest <[EMAIL PROTECTED]> >Subject: Trouble Setting up an Application >Date: Tue, 22 Feb 2000 13:22:27 -0700 > >I'm trying to create an application by following the >application-creation-howto.html, but I'm having no luck. The application >is a simple JSP file that accesses a JavaBean. > >In orion/applications, I have the following directory structure: > >sunpress/beans/propertyAccess/test.jsp >sunpress/beans/propertyAccess/META-INF/application.xml >sunpress/beans/propertyAccess/WEB-INF/web.xml >sunpress/beans/propertyAccess/WEB-INF/classes/com/sunpress/beans/Item.java > >In orion/config/server.xml, I have added the following line ... > > path="../applications/sunpress/beans/propertyAccess" /> > >... in orion/config/default-web-site.xml, I have added the following >line ... > > name="sunpress/beans/propertyAccess" > root="/sunpress/beans/propertyAccess" /> > >... /sunpress/beans/propertyAccess/META-INF/application.xml looks like >this: > > >Application 1.2//EN" >"http://java.sun.com/j2ee/dtds/application_1_2.dtd"> > > > sunpress/beans/propertyAccess > > >sunpress/beans/propertyAccess > > > > >... /sunpress/beans/propertyAccess/WEB-INF/web.xml looks like this: > > > > > > "sunpress/beans/propertyAccess" > Simple Bean Example > > >... when I try to start the Orion server, I get the following error >message: > >F:\ORION>java -jar orion.jar >Error initializing server: Error instantiating application at >file:/F:/orion/app >lications/sunpress/beans/propertyAccess: Error reading deployment >descriptor at >META-INF/application.xml > >The error message does not provide much help. The file is there, and it >looks to me as though it is correct. Btw, this seems awfully complicated >just to set up a simple JSP example. > > >david > > __ Get Your Private, Free Email at http://www.hotmail.com
Trouble Setting up an Application
I'm trying to create an application by following the application-creation-howto.html, but I'm having no luck. The application is a simple JSP file that accesses a JavaBean. In orion/applications, I have the following directory structure: sunpress/beans/propertyAccess/test.jsp sunpress/beans/propertyAccess/META-INF/application.xml sunpress/beans/propertyAccess/WEB-INF/web.xml sunpress/beans/propertyAccess/WEB-INF/classes/com/sunpress/beans/Item.java In orion/config/server.xml, I have added the following line ... ... in orion/config/default-web-site.xml, I have added the following line ... ... /sunpress/beans/propertyAccess/META-INF/application.xml looks like this: http://java.sun.com/j2ee/dtds/application_1_2.dtd"> sunpress/beans/propertyAccess sunpress/beans/propertyAccess ... /sunpress/beans/propertyAccess/WEB-INF/web.xml looks like this: "sunpress/beans/propertyAccess" Simple Bean Example ... when I try to start the Orion server, I get the following error message: F:\ORION>java -jar orion.jar Error initializing server: Error instantiating application at file:/F:/orion/app lications/sunpress/beans/propertyAccess: Error reading deployment descriptor at META-INF/application.xml The error message does not provide much help. The file is there, and it looks to me as though it is correct. Btw, this seems awfully complicated just to set up a simple JSP example. david
Re: Classes in JARs in WEB-INF/lib Not Being Loaded
I had this problem til I downloaded the latest orion.jar on the web site. It updated me to .91g and then the 'library path' stuff worked fine for me. .91b never could find my classes. On Tue, 22 Feb 2000, JonTom Kittredge wrote: > I have just started using Orion 0.9.1b, and have gotten it to load my > web-app, except that it throws NoClassDefFound for classes that I have > stored in the WEB-INF/lib directory of my web-app war (which is in turn > packaged in an ear). > > Searching the archives of this list, I found a message posted on 4 Feb > from someone having the same problem ("Why can't Orion get into my jar > files?"), but I didn't see any reply. Is this a known problem, or is > this result of a configuration error on my part? > > I also a reference in email posted on 8 Feb, from Magnus Stenman ("Re: > Re: classloader problem") to a recently fixed bug: > > PS. The 0.9.1 bug was that the servlet loader did not get > access to the > library loader if no EJBs where deployed in the > application. > > Could what I'm seeing be related to this bug? > > I also references in the archive to version 0.9.1c, 0.9.1g, etc. The > only version I could find on the web site was 0.9.1b. Should I try a > more recent build for fixes to this problem? Are these more recent > versions available for download? > > I am appending to this message some of the relevant details of my > configuration, in case they are of help in diagnosing my problem. > > Yours, JonTom > > JT Kittredge > ITA Software > Cambridge, Massachusetts > > Stack trace from the application log: > 2/22/00 11:36 AM web-app: ITA.cvg.CVGServices: DEBUG: CVGServices, init > 2/22/00 11:36 AM web-app: Error initializing servlet > java.lang.NoClassDefFoundError: > com/bitmechanic/sql/ConnectionPoolManager > at ITA.cvg.DBManager.initDBConnection(Compiled Code) > at ITA.cvg.DBManager.(Compiled Code) > at ITA.cvg.CVGServices.initDBManager(Compiled Code) > at ITA.cvg.CVGServices.init(Compiled Code) > at com.evermind.server.http.HttpApplication.n_(Compiled Code) > at com.evermind.server.http.HttpApplication.no(JAX) > at com.evermind.server.http.HttpApplication.nu(Compiled Code) > at com.evermind.server.http.HttpApplication.(Compiled Code) > at fk.ml(Compiled Code) > at c3.ml(Compiled Code) > at c2.mg(Compiled Code) > at c4.mu(JAX) > at c.run(Compiled Code) > 2/22/00 11:36 AM web-app: Error preloading servlet > javax.servlet.ServletException: Error initializing servlet > at com.evermind.server.http.HttpApplication.no(JAX) > at com.evermind.server.http.HttpApplication.nu(Compiled Code) > at com.evermind.server.http.HttpApplication.(Compiled Code) > at fk.ml(Compiled Code) > at c3.ml(Compiled Code) > at c2.mg(Compiled Code) > at c4.mu(JAX) > at c.run(Compiled Code) > 2/22/00 11:36 AM web-app: Started > > > Listing of directories in my EAR file: > ./web-app > ./web-app/WEB-INF > ./web-app/WEB-INF/classes > ./web-app/WEB-INF/classes/ITA > ./web-app/WEB-INF/classes/ITA/core > ./web-app/WEB-INF/classes/ITA/util > ./web-app/WEB-INF/classes/ITA/prego > ./web-app/WEB-INF/classes/ITA/cvg > ./web-app/WEB-INF/classes/ITA/cvg/jsp > ./web-app/WEB-INF/classes/ITA/server > ./web-app/WEB-INF/classes/ITA/lookup > ./web-app/WEB-INF/classes/ITA/pogo85 > ./web-app/WEB-INF/lib > ./web-app/help > ./web-app/images > ./web-app/images/signin > ./web-app/signin > ./web-app/jsp > ./web-app/html > ./META-INF > > Listing of JARs in my EAR file: > ./web-app/WEB-INF/lib/jdbcpool-0.94.jar (contains > com/bitmechanic/sql/ConnectionPoolManager, the class that is not found) > ./web-app/WEB-INF/lib/mysql.jar > ./web-app/WEB-INF/lib/activation.jar > ./web-app/WEB-INF/lib/mail.jar > > Listing of ./META-INF/application.xml: > > CVG > > > web-app > > > > > Listing of ./META-INF/orion-application.xml: > > > > > > > > > Partial listing of ./web-app/WEB-INF/web.xml: > > CVG > > 90 > > > > cvgservices > ITA.cvg.CVGServices > 1 > > debugparams > {default|cvg|cvghi} > > > > > cvgservices > /services/* > > > >utiltags >/WEB-INF/lib/utiltags.jar > > > > James Dalrymple Telesoft Corp.
Classes in JARs in WEB-INF/lib Not Being Loaded
I have just started using Orion 0.9.1b, and have gotten it to load my web-app, except that it throws NoClassDefFound for classes that I have stored in the WEB-INF/lib directory of my web-app war (which is in turn packaged in an ear). Searching the archives of this list, I found a message posted on 4 Feb from someone having the same problem ("Why can't Orion get into my jar files?"), but I didn't see any reply. Is this a known problem, or is this result of a configuration error on my part? I also a reference in email posted on 8 Feb, from Magnus Stenman ("Re: Re: classloader problem") to a recently fixed bug: PS. The 0.9.1 bug was that the servlet loader did not get access to the library loader if no EJBs where deployed in the application. Could what I'm seeing be related to this bug? I also references in the archive to version 0.9.1c, 0.9.1g, etc. The only version I could find on the web site was 0.9.1b. Should I try a more recent build for fixes to this problem? Are these more recent versions available for download? I am appending to this message some of the relevant details of my configuration, in case they are of help in diagnosing my problem. Yours, JonTom JT Kittredge ITA Software Cambridge, Massachusetts Stack trace from the application log: 2/22/00 11:36 AM web-app: ITA.cvg.CVGServices: DEBUG: CVGServices, init 2/22/00 11:36 AM web-app: Error initializing servlet java.lang.NoClassDefFoundError: com/bitmechanic/sql/ConnectionPoolManager at ITA.cvg.DBManager.initDBConnection(Compiled Code) at ITA.cvg.DBManager.(Compiled Code) at ITA.cvg.CVGServices.initDBManager(Compiled Code) at ITA.cvg.CVGServices.init(Compiled Code) at com.evermind.server.http.HttpApplication.n_(Compiled Code) at com.evermind.server.http.HttpApplication.no(JAX) at com.evermind.server.http.HttpApplication.nu(Compiled Code) at com.evermind.server.http.HttpApplication.(Compiled Code) at fk.ml(Compiled Code) at c3.ml(Compiled Code) at c2.mg(Compiled Code) at c4.mu(JAX) at c.run(Compiled Code) 2/22/00 11:36 AM web-app: Error preloading servlet javax.servlet.ServletException: Error initializing servlet at com.evermind.server.http.HttpApplication.no(JAX) at com.evermind.server.http.HttpApplication.nu(Compiled Code) at com.evermind.server.http.HttpApplication.(Compiled Code) at fk.ml(Compiled Code) at c3.ml(Compiled Code) at c2.mg(Compiled Code) at c4.mu(JAX) at c.run(Compiled Code) 2/22/00 11:36 AM web-app: Started Listing of directories in my EAR file: ./web-app ./web-app/WEB-INF ./web-app/WEB-INF/classes ./web-app/WEB-INF/classes/ITA ./web-app/WEB-INF/classes/ITA/core ./web-app/WEB-INF/classes/ITA/util ./web-app/WEB-INF/classes/ITA/prego ./web-app/WEB-INF/classes/ITA/cvg ./web-app/WEB-INF/classes/ITA/cvg/jsp ./web-app/WEB-INF/classes/ITA/server ./web-app/WEB-INF/classes/ITA/lookup ./web-app/WEB-INF/classes/ITA/pogo85 ./web-app/WEB-INF/lib ./web-app/help ./web-app/images ./web-app/images/signin ./web-app/signin ./web-app/jsp ./web-app/html ./META-INF Listing of JARs in my EAR file: ./web-app/WEB-INF/lib/jdbcpool-0.94.jar (contains com/bitmechanic/sql/ConnectionPoolManager, the class that is not found) ./web-app/WEB-INF/lib/mysql.jar ./web-app/WEB-INF/lib/activation.jar ./web-app/WEB-INF/lib/mail.jar Listing of ./META-INF/application.xml: CVG web-app Listing of ./META-INF/orion-application.xml: Partial listing of ./web-app/WEB-INF/web.xml: CVG 90 cvgservices ITA.cvg.CVGServices 1 debugparams {default|cvg|cvghi} cvgservices /services/* utiltags /WEB-INF/lib/utiltags.jar
Unsubscribe
Unsubscribe
Unsubscribe
Unsubscribe Thanks, Paul
Unsubscribe
Please unsubscribe. Thanks >From: Jochen Strunk <[EMAIL PROTECTED]> >To: Orion-Interest <[EMAIL PROTECTED]> >CC: [EMAIL PROTECTED] >Subject: Bug with persistent cookies >Date: Tue, 22 Feb 2000 11:49:44 +0100 > >Hi, > >when trying to set a persistent cookie from a servlet like this: > > Cookie c = new Cookie( "test", "test" ); > c.setMaxAge( 108000 ); > response.addCookie( c ); > >it results in the following header being sent to the client: > >HTTP/1.1 200 OK >Date: Mon, 21 Feb 2000 20:19:25 GMT >Server: Orion/0.9.1n >Last-Modified: Sat, 19 Feb 2000 19:37:02 GMT >Accept-Ranges: bytes >Content-Length: 7157 >Set-Cookie: test=test; Expires=Wed, 23-Feb-0 02:19:25 GMT; Path>Cache-Control: private >Connection: Close >Content-Type: text/html > >At least netscape communicator does not seem to like the "23-Feb-0" part in >the expires field and >refuses to persist the cookie. > >Furthermore, if we repeat the request, one Set-Cookie header is added for >every subsequent request. >After four requests, we get the following header: > >HTTP/1.1 200 OK >Date: Mon, 21 Feb 2000 20:19:25 GMT >Server: Orion/0.9.1n >Last-Modified: Sat, 19 Feb 2000 19:37:02 GMT >Accept-Ranges: bytes >Content-Length: 7157 >Set-Cookie: test=test; Expires=Wed, 23-Feb-0 02:19:25 GMT; Path>Set-Cookie: >test=test; Expires=Wed, 23-Feb-0 02:19:25 GMT; Path>Set-Cookie: test=test; >Expires=Wed, 23-Feb-0 02:19:25 GMT; Path>Set-Cookie: test=test; Expires=Wed, 23-Feb-0 >02:19:25 GMT; Path>Cache-Control: private >Connection: Close >Content-Type: text/html > >This looks like the server is doing some kind of response reuse, but not >clearing the headers correctly. > >regards, >Jochen Strunk > > > >(-) Jochen Strunk >(-) SIGNAL 7 Gesellschaft für Informationstechnologie mbH >(-) Brüder-Knauß-Str. 79 - 64285 Darmstadt, >(-) Tel: 06151 665402, Fax: 06151 665373 >(-) [EMAIL PROTECTED], www.signal7.de > > __ Get Your Private, Free Email at http://www.hotmail.com
Bug with persistent cookies
Hi, when trying to set a persistent cookie from a servlet like this: Cookie c = new Cookie( "test", "test" ); c.setMaxAge( 108000 ); response.addCookie( c ); it results in the following header being sent to the client: HTTP/1.1 200 OK Date: Mon, 21 Feb 2000 20:19:25 GMT Server: Orion/0.9.1n Last-Modified: Sat, 19 Feb 2000 19:37:02 GMT Accept-Ranges: bytes Content-Length: 7157 Set-Cookie: test=test; Expires=Wed, 23-Feb-0 02:19:25 GMT; Path= Cache-Control: private Connection: Close Content-Type: text/html At least netscape communicator does not seem to like the "23-Feb-0" part in the expires field and refuses to persist the cookie. Furthermore, if we repeat the request, one Set-Cookie header is added for every subsequent request. After four requests, we get the following header: HTTP/1.1 200 OK Date: Mon, 21 Feb 2000 20:19:25 GMT Server: Orion/0.9.1n Last-Modified: Sat, 19 Feb 2000 19:37:02 GMT Accept-Ranges: bytes Content-Length: 7157 Set-Cookie: test=test; Expires=Wed, 23-Feb-0 02:19:25 GMT; Path= Set-Cookie: test=test; Expires=Wed, 23-Feb-0 02:19:25 GMT; Path= Set-Cookie: test=test; Expires=Wed, 23-Feb-0 02:19:25 GMT; Path= Set-Cookie: test=test; Expires=Wed, 23-Feb-0 02:19:25 GMT; Path= Cache-Control: private Connection: Close Content-Type: text/html This looks like the server is doing some kind of response reuse, but not clearing the headers correctly. regards, Jochen Strunk (-) Jochen Strunk (-) SIGNAL 7 Gesellschaft für Informationstechnologie mbH (-) Brüder-Knauß-Str. 79 - 64285 Darmstadt, (-) Tel: 06151 665402, Fax: 06151 665373 (-) [EMAIL PROTECTED], www.signal7.de
Re: CGI, PHP, etc...
>Has anyone successfully managed to get PHP workingwith Orion? Their is some >mention of "com.evermind.server.http.CGIServlet", but that doesn't seem to >come with the Orion package, and the evermind site is in German - or >something - and I can't find the classes. (I only speak english!:p) The CGI Servlet is a wrapper to a fork a native CGI. If you install PHP as a CGI and ensure the php executable is in your PATH before starting orion, it should work. Briefly, Orion has the following Servlet called php setup: php com.evermind.server.http.CGIServlet interpreter php This calls the CGIServlet telling it to use 'php' as the interpreter for the page. This can easily be switched for any other interpreter such as Python, Perl, Bash, Cold-Fusion, Q-Basic(!) etc. If the executable is not in the PATH environment variable, use the full path to the interpreter in the . A mapping is then set to map all files that end in .php to the php servlet. php /*.php That's it really. On another note, the PHP4 beta's 3 and 4 contain some Java mappings which allow java objects to be used directly in php. On top of that, a servlet wrapper has evolved allowing PHP to be invoked from a servlet without having to start a new process each time and have persistent resources (such as db connections and session variables) - greatly improving performance. Have a look in /ext/java/ and /sapi/servlet/ of the PHP distribution for information on this. -Joe Walnes
AW: Problems while connecting to ejb server
Well, i did not find the problem, but if i remove the demo folder from the orion folder, the error on connecting seems to be more reasonable: javax.naming.NamingException: META-INF/application-client.xml resource not found at com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext (JAX) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:668) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246) at javax.naming.InitialContext.init(InitialContext.java:222) at javax.naming.InitialContext.(InitialContext.java:198) at de.netmedia.ejb.test.clienttest.main(clienttest.java:59) The only thing, i need to know: where do i have to put the application-client.xml ? I tried both the META-INF folder of my ear file and the one of the ejb-jar file. P.S.: Currently my ear contains the following: ejb-jar51841.jar (created by the j2ee deploytool...) META-INF/MANIFEST.MF (created by the j2ee deploytool...) META-INF/application.xml (created by the j2ee deploytool...) Contents: - http://java.sun.com/j2ee/dtds/application_1_2.dtd'> BaseModule Application description ejb-jar51841.jar --- META-INF/sun-j2ee-ri.xml (created by the j2ee deploytool...) The ejb-jar51841.jar contains: jndi.properties (added manually by myself) Contents: - java.naming.factory.initial=com.evermind.server.ApplicationClientInitialCont extFactory java.naming.provider.url=ormi://localhost/BaseModule java.naming.security.principal=admin java.naming.security.credentials=123 --- META-INF/MANIFEST.MF (created by the j2ee deploytool...) Contents: - Manifest-Version: 1.0 --- META-INF/application-client.xml (added manually by myself:) Contents: - http://java.sun.com/j2ee/dtds/application-client_1_2.dtd"> NMejbBinary NMejbBinaryHome NMejbBinaryObject --- META-INF/ejb-jar.xml (created by the j2ee deploytool...) de/netmedia/ejb/general/basebean/NMejbBinaryObject.class (added by the j2ee deploytool...) de/netmedia/ejb/general/basebean/NMejbBinaryHome.class (added by the j2ee deploytool...) de/netmedia/ejb/general/basebean/NMejbBinaryBean.class (added by the j2ee deploytool...) -Ursprüngliche Nachricht- Von: Jens Stutte [mailto:[EMAIL PROTECTED]] Gesendet am: Montag, 21. Februar 2000 19:05 An: Orion-Interest Betreff: Problems while connecting to ejb server Hi again, i tried to write a client for my freshly deployed bean and ran into a problem about looking up the jndi context "the right way". I assume, that the "application-client.xml" gives some hints about the jndi names of the deployed bean(s) in an ejb-jar. And on creating the initial context with the "com.evermind.server.ApplicationClientInitialContextFactory" and an url like "ormi://servername/appname", orion tries to look up an appropriate application-client.xml for that application. However, i get strange results with this. First of all, i wasn't able to create an initial context for my application, since orion complained about missing application client values. Unfortunately i cannot reproduce this behaviour (see below) and therefore cannot give the exact error message. I than had a look at the samples and tried them: I created an initial context for the samples like that: Hashtable h = new Hashtable(); h.put(Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.ApplicationClient InitialContextFactory"); h.put(Context.PROVIDER_URL, "ormi://beatnix.net-media.de/ejbsamples"); h.put(Context.SECURITY_PRINCIPAL, "admin"); h.put(Context.SECURITY_CREDENTIALS, "123"); Context context = new InitialContext(h); with only one application in the server.xml, that is ejbsamples. This works, even remote (actually i replaced the new InitialContext(); of the CartClient sample). Then i changed my server.xml to contain only my application's ear (created with the j2ee deployment wizard) and changed the client appropriate: Hashtable h = new Hashtable(); h.put(Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.ApplicationClient InitialContextFactory"); h.put(Context.PROVIDER_URL, "ormi://beatnix.net-media.de/BaseModule"); h.put(Context.SECURITY_PRINCIPAL, "admin"); h.put(Context.SECURITY_CREDENTIALS, "123"); Context context = new InitialContext(h); This leads to the following exception: j
Entity bean creation and load problems.
Occasionally Orion throws a following exception, whem I am creating a new Entity bean in the JSP page (code is below). After restarting the Orion Server, the problem usually disappears. java.lang.ArrayIndexOutOfBoundsException at com.evermind.util.ExternalHashMap.get(JAX, Compiled Code) at ag.start(JAX, Compiled Code) at com.evermind.server.ApplicationServerTransaction.getConnection(JAX, Compiled Code) at EntityHomeWrapper1.create(EntityHomeWrapper1.java:426) at __jspPage12._jspService(__jspPage12.java:47) at com.evermind.server.http.EvermindHttpJspPage.service(JAX) at com.evermind.server.http.HttpApplication.oc(JAX) at com.evermind.server.http.JSPServlet.service(JAX) at cv.kt(JAX) at cv.forward(JAX) at c4.mu(JAX, Compiled Code) at c.run(JAX, Compiled Code) Sometimes I get a similar kind (ArrayIndexOutOfBOundsExceptions) when Orion loads an existing entity bean from the database (EJBLoad method). My database is MySql. Can anyone tell me, what the problem is? Juha Lehtonen JSP CODE: <%@ taglib uri="ejbtags" prefix="ejb" %> <% String userId = request.getParameter("userId"); String dealId = request.getParameter("dealId"); int securityId = new nteger(request.getParameter("securityId")).intValue( ); String portfolioId = request.getParameter("portfolioId"); double price = new Double(request.getParameter("price")).doubleValue( ); double amount = new Double(request.getParameter("amount")).doubleValue( ); double cost = new Double(request.getParameter("cost")).doubleValue( ); java.util.Date date = java.text.DateFormat.getDateInstance().parse(request.getParameter("date")); String type = "NEW"; home.create(dealId,portfolioId,securityId,userId,date,amount,price,cost,type ); %>