RE: InstantiationException in Tag Extension Tutorial, Lesson #3
Title: RE: InstantiationException in Tag Extension Tutorial, Lesson #3 James, The correct way nowadays would be to put the taglib.jar in the WEB-INF/lib/ and point it out in your web.xml. The servlet and beans should then go under WEB-INF/classes/. Its strange that it cant find the servlet for you when you put it in orion/servlets/, better get Karl or Magnus on the case.. I will probably update the docs to reflect the proper way of deploying them with the new file-structure in mind this weekend (got loads of work right now) WR -Original Message-From: james mcmullen [mailto:[EMAIL PROTECTED]]Sent: den 22 mars 2000 11:39To: Orion-InterestCc: 'Orion-Interest'Subject: RE: InstantiationException in Tag Extension Tutorial, Lesson #3 Magnus, Thanks for the prompt reply. I fixed the typo, but my problem remains. How does JSP decide where to look for classes? I've been unable to get my jsp files to find classes in jar files. For example, if I put hello.jsp and mytags.jar (from Lesson 2) directly under orion/default-web-app, I get "The page cannot be displayed". Yet I can run the example JSPs OK. Similarly, Lesson 3 says to put connection.jar into orion/servlets, but as far as I can tell it's ignored unless I put it in orion/lib, and I got farther by moving the class tree directly to orion/default-web-app/Web-Inf/classes. What is correct? James
AW: EJB performance
Sure, i know this, but (as pointed out) the database access seems not to be the 'rock tied to the feet'. Almost all CPU power gets eaten by orion's java process, and normally (at least this is my experience), a pure jdbc/database combination has more or less equal loads on both sides. Regards, Jens Stutte -Ursprüngliche Nachricht- Von: Karl Avedal [mailto:[EMAIL PROTECTED]] Gesendet am: Dienstag, 21. März 2000 18:49 An: Orion-Interest Cc: Orion-Interest Betreff: Re: EJB performance Hello, Note that when using BMP Entity beans a request is made to the db for every bean (no select * from...). This makes getting a large number of BMP entity beans remarkably slow, however, your test seems awfully slow even considering that so we will do some more internal benchmarking to see if we find it to be very slow due to some bug. Regards, Karl Avedal Jens Stutte wrote: Hi, i made some tests regarding the EJB performance. Well... i know it's still beta, and EJB is never lightning fast. But are you expecting some serious improvements of performance with the release version ? Not to get me wrong, i like the product and so on (and i know it's a general problem for EJB servers, too). Well, here are some facts: I have an entity bean (bean managed), with 4737 instances. After restarting the server, a findAll and a call of one business-get method (so that it must be instanciated) from a remote client of these take aprox. 160 s (orion 0.9.4 on an Athlon 600 Linux box with 256 MB, Classic VM, build 1.2.2-L, green threads, javacomp), that means ca. 33 ms per bean. To obtain this result, i optimized the retrieving of DB connections with a cache to not connect newly to the DB for every bean. The transaction type of all involved methods is "required" (as usual). Memory is no matter since memory usage of the server only grows by 12MB. There is no other application running. These 160s of CPU time are consumed almost all by the orion server, the DB server (informix) uses less than 1% of the time. And the CPU usage is at 100% all the time (so there is no lock or waiting for ports/network or similar). Of course this is not representive and others are welcome to post me their results. But to me it seems pretty much to guarantee a good response time in a production system (and the used server should be sufficient for a - small - production system, at least with another 256 MB of DRAM). Just for my curiousity: What process in instanciating an entity bean is such complex that it takes so much time? I know, the logic is very complex (with transactions and so on), but it seems pretty linear to me (correct me, if i'm wrong). If it's for me, i'd prefer much more memory consumption, if it helps the performance... Any suggestions on improving the performance are very appreciated, best regrads and keep on the good work, Jens Stutte [EMAIL PROTECTED], http://www.net-media.de NetMedia GmbH Schubertstr. 8 66111 Saarbruecken Germany fon: +49 (0) 681 - 37 98 80 fax: +49 (0) 681 - 33 89 3
Another time: EJB performance
Ok, after a day of testing and measuring, i have the following result (always regarding the performance of the tests i described in the mail "EJB performance"): First of all: you are right, Karl (i have to apologize for the somewhat "angry" other mail). A great deal of performance gots eaten by the database calls - or, to be more precise, by the jdbc calls within orion's process (since the database itself does nearly nothing...). Of the 33ms/bean ca. 17ms are caused by my ejbLoad function. This means two things to me: - it would be nice of orion, if his part in the game could be tuned - it is very important to grow the lifetime of entity beans in server memory; they should be kicked out only if the server needs the space (see the issue "Entity lifetime in memory"). We are planning to use orion for a big application with many bean instances and many searches with large result sets among them. So performance is very important to us (and our customers won't be able to afford a Sun Enterprise 1 for this ;-) Best regards, Jens Stutte [EMAIL PROTECTED], http://www.net-media.de NetMedia GmbH Schubertstr. 8 66111 Saarbruecken Germany fon: +49 (0) 681 - 37 98 80 fax: +49 (0) 681 - 33 89 3
Orion and Visibroker 4: ClassLoader probs(?)
I'm trying to use Orion as a client for some CORBA based objects that are accessible via Visibroker. The following code works as a standalone client, providing the correct jars are in the classpath and the appropriate system properties are set, and the ORB is running on the localhost: - // Get context Properties p = new Properties(); p.put(Context.INITIAL_CONTEXT_FACTORY,"com.inprise.j2ee.jndi.CtxFactory"); p.put(Context.URL_PKG_PREFIXES,"com.inprise.j2ee"); Context context = new InitialContext(p); // Lookup CustomerHome Object ref = context.lookup("customer"); CustomerHome home = (CustomerHome) PortableRemoteObject.narrow(ref,CustomerHome.class); - However, I'm trying to allow servlets/jsps access to the objects from within Orion. All the appropriate system properties (-Dxx=yy) where set on the command line when starting orion, the appropriate jars where placed in orion/lib and the orb was running on localhost. In a Servlet running in Orion, when the code got as far as creating the new InitialContext, a NoClassDefFoundError for com.inprise.j2ee.jndi.CtxFactory was thrown, however, Class.forName("com.inprise.j2ee.jndi.CtxFactory") did not throw an error. The problem appeared to be a ClassLoader problem, where InitialContext was using a different method for loading classes that the servlet was using, and only seemed to be looking in the base jars in the orion dir. I added the appropriate jndi/corba/iiop/orb classes to orion/jndi.jar and the code succesfully managed to lookup the required object. Hurrah! However, the object returned by context.lookup() is of type org.omg.CORBA.portable.ObjectImpl which needs to be narrowed to appropriate type before casting. This always throws a ClassCastException, even though the ObjectImpl says it is the correct type. I'm stuck! I've been trying to get round this problem for days now unsuccesfully. I can access the corba objects as standalone java apps, and from within Sun Web Server, mod_jserv and jRun with no problem, just not Orion. Can anyone help, or shed some light on what the problem may be. I suspect the problem is related to ClassLoader. Could one of the Orion team explain how the ClassLoader works in the server please. Note, in this case Orion is simply being used as a web-server for serving jsp/servlets. EJB/JTS/etc is not required, and the JNDI service is replaced by that that Visibroker supplies. Thanks in advance -Joe Walnes
Please help, with deploying EJB bean....
Everything is deployed but, the home is not bound to the registry, or I cannot find the home in the registry. What configuration file do I need to check? Thanks. -AP_
BUG with com.evermind.naming.ik - no support for bundled extensions
Hi, It appears that the Orion class loader (com.evermind.naming.ik) does not support the Class-Path jar manifest attribute and hence bundled extensions. I've experimented with the java.net.URLClassLoader and noticed that it supports bundled extensions but Orion does not use this. This is a key feature - we group common classes used within an enterprise application in separate jars that are then either deployed into the WEB-INF/lib directory or specified as bundled extensions of EJB jars depending on the scope of usage. Because of this bug we are unable to auto-deploy our EJBs, let alone run them. The only way around this is to explicitly specify the extension jars in the library element of the server.xml or as installed extensions - both solutions are undesirable. Any expediency that can be applied to fixing this bug would be greatly appreciated. Otherwise, great job on developing a leading edge server. Regards, Jeff
Any planned usage for Thread.setContextClassLoader ?
Hi, Wondering if there has been any consideration to using Thread.setContextClassLoader() to set the context ClassLoader when invoking a web application servlet/JSP or EJB ? It would make life a lot simpler for our application framework (which currently is deployed as an installed extension) to do its dynamic class loading! Regards, Jeff
Feature request
In the XML parser, if an error occurs in a well-formed document, can you *please* convert to lt;, etc? --- Joseph B. Ottinger [EMAIL PROTECTED] http://cupid.suninternet.com/~joeo HOMES.COM Developer
RE: BUG with com.evermind.naming.ik - no support for bundled extensions
Just tried Orion 0.9.4p - the problem still exists with com.evermind.naming.il - Jeff -Original Message- From: Tuatini, Jeff (PS, IM) Sent: Wednesday, March 22, 2000 1:03 PM To: 'Orion-Interest' Subject: BUG with com.evermind.naming.ik - no support for bundled extensions Hi, It appears that the Orion class loader (com.evermind.naming.ik) does not support the Class-Path jar manifest attribute and hence bundled extensions. I've experimented with the java.net.URLClassLoader and noticed that it supports bundled extensions but Orion does not use this. This is a key feature - we group common classes used within an enterprise application in separate jars that are then either deployed into the WEB-INF/lib directory or specified as bundled extensions of EJB jars depending on the scope of usage. Because of this bug we are unable to auto-deploy our EJBs, let alone run them. The only way around this is to explicitly specify the extension jars in the library element of the server.xml or as installed extensions - both solutions are undesirable. Any expediency that can be applied to fixing this bug would be greatly appreciated. Otherwise, great job on developing a leading edge server. Regards, Jeff
processing of JSP tags in HTML comments?
The following case doesn't seem to get processed by the JSP engine -- (the actual function of the tag doesn't really matter - it's a simple custum tag extension that just prints out an encoded URL based on an attribute) SCRIPT LANGUAGE="JavaScript" !-- js_variable = "mytag:encode url="myfile.html"/"; // -- /SCRIPT This just passes the tag right through to the output. If I remove the HTML comments "!--" and "// --" then it is processed ok. I was trying to figure out whether this is the expected behavior or a bug, and looking at the JSP 1.1 Spec section 2.3 (Comments) it looks like this should be processed: "If the generated comment is to have dynamic data, this can be obtained through an expression syntax, as in: !-- comments %= expression % more comments ... -- " This is not exactly the same as using a custom tag (which isn't addressed), but since there is specifically a JSP "%--" "--%" syntax for comments that JSP ignores, it seems like the intent was that JSP processing does not pay any attention to HTML comments (ie. just treat them like any other normal text). Does this interpretation make sense? Jake
RE: Please help, with deploying EJB bean....
My SERVER.XML contains: application name="citysearch" path="../../citysearch" / My ../../citysearch/META-INF/application.xml contains: xmlheader... application display-nameCitySearch/display-name module ejbcom/citysearch/ejb/ClassType/ejb /module /application My com/citysearch/ejb/ClassType/META-INF contains: xmlheader... ejb-jar enterprise-beans entity ejb-nameClassType/ejb-name homecom.citysearch.ejb.ClassType.ClassTypeHome/home remotecom.citysearch.ejb.ClassType.ClassType/remote ejb-classcom.citysearch.ejb.ClassType.ClassTypeEJB/ejb-class primkey-classjava.lang.Integer/primkey-class reentrantFalse/reentrant persistence-typeBean/persistence-type /entity /enterprise-beans assembly-descriptor container-transaction method ejb-nameClassType/ejb-name method-name*/method-name /method trans-attributeNotSupported/trans-attribute /container-transaction /assembly-descriptor /ejb-jar What else do I need to do? Are there any other files to configure? Thanks -AP_ -Original Message- From: Alex Paransky Sent: Wednesday, March 22, 2000 3:04 PM To: Alex Paransky; Orion-Interest Subject: RE: Please help, with deploying EJB bean I tried to bind something else into the naming registry with: Context context = new InitialContext(); Integer test = new Integer(23); context.bind("test", test); list(context, 0); and it works ok. So I know it's not the registry that is having problem. What could be the problem? Are there any logs? This is all I get from ORION: E:\work\orionjava -jar d:\java\orion\orion.jar Auto-deploying com/citysearch/ejb/ClassType... done. Orion/0.9.4 initialized No exceptions, no error messages NOTHING TO GO ON! -AP_ -Original Message- From: Alex Paransky [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 22, 2000 11:46 AM To: Orion-Interest Subject: RE: Please help, with deploying EJB bean I wrote a program that iterates the registry. I see the following: Context: jdbc Binding: DefaultPooledDS -- com.evermind.sql.DefaultConnectionPoolDataSource Context: xa Binding: DefaultXADS -- com.evermind.sql.DefaultXADataSource Binding: DefaultDS -- com.evermind.sql.ConnectionDataSource Context: java:comp Binding: ServerAdministrator -- Proxy0 Binding: Administrator -- Proxy1 Binding: ResourceFinder -- Proxy2 When I try to bind to java:comp/env/ejb/MyBean I get an exception: javax.naming.NameNotFoundException: java:comp/env/ejb/MyBean not found at com.evermind.server.rmi.RMIContext.lookup(JAX) at javax.naming.InitialContext.lookup(InitialContext.java:354) at com.citysearch.ejb.ClassType.ClassTypeClient.main(ClassTypeClient.java, Compiled Code) I don't think the home is binding to the naming registry since it is not under java:comp. Any thing else I can look at? Thanks. -AP_ -Original Message- From: Vasilenko, Dmitry [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 22, 2000 11:33 AM To: 'Alex Paransky' Subject: RE: Please help, with deploying EJB bean Try to use fully qualified JNDI name, i.e. instead of ejb/MyBean use java:comp/env/ejb/MyBean. I had the similar problem and that was the solution, kind of confusing, though... Please, let me know if it did not work for you ;-] -Original Message- From: Alex Paransky [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 22, 2000 12:46 PM To: Orion-Interest Subject: Please help, with deploying EJB bean Everything is deployed but, the home is not bound to the registry, or I cannot find the home in the registry. What configuration file do I need to check? Thanks. -AP_
Frustration
I would like to share my frustrations with the group. I have a small JSP application that works fine withjswdk-1.0.1 from SUN. This application does getClass().getResourceAsStream("X.properties") to retrieve some run-time property values and then does classGenericDynDataBase = clsldrEIEDynLoader.loadClass ("com.mkaseman.util.JDBC.JEieDBInstantDB", true); uoDynDataBase = (JEieDynDBBase) classGenericDynDataBase.newInstance(); based on the values in the run-time properties. This all works fine under jswdk-1.0.1, under ORION I have nothing but java.lang.Exceptions. It seems I can no longer find my properties file? I can tweak my getResourceAsStream and redeploy my jar file to get past this problem, but the next exception now on the loadClass method. No we can't find the class I am trying to load dynamically. I give up, what's the issue??? I don't want to re-configure everything at this point only to find another exception awaits me.
RE: Frustration
Join the club. I have been trying to get some help on deploying a simple EJB Bean for the last 3 days. There are no messages of exceptions from ORION. Everything appears to deploy correctly, but I cannot find the 'home' bound in to the naming space. At this point, I don't have the time, energy, resources, or the budget to continue with ORION evaluation. It might be great, but spending 3 days on such a trivial problem is not acceptable. I'll continue my evaluation with BEA Weblogic. -AP_ -Original Message- From: mark kaseman [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 22, 2000 6:22 PM To: Orion-Interest Subject: Frustration I would like to share my frustrations with the group. I have a small JSP application that works fine with jswdk-1.0.1 from SUN.This application does getClass().getResourceAsStream("X.properties") to retrieve some run-time property values and then does classGenericDynDataBase= clsldrEIEDynLoader.loadClass ("com.mkaseman.util.JDBC.JEieDBInstantDB", true); uoDynDataBase = (JEieDynDBBase) classGenericDynDataBase.newInstance(); based on the values in the run-time properties. This all works fine under jswdk-1.0.1, under ORION I have nothing but java.lang.Exceptions. It seems I can no longer find my properties file? I can tweak my getResourceAsStream and redeploy my jar file to get past this problem, but the next exception now on the loadClass method. No we can't find the class I am trying to load dynamically. I give up, what's the issue??? I don't want to re-configure everything at this point only to find another exception awaits me.
Re: JMSChat
It's been a week. I can't find 0.9.5 on the web site. Can anyone point me to documentation on JMS in the current release of Orion? The demo doesn't work. Out of curiousity, is anyone out there using JMS or even interested in it? If so, what are you using? - Original Message - From: "Magnus Stenman" [EMAIL PROTECTED] To: "Eric Hodges" [EMAIL PROTECTED]; "Orion-Interest" [EMAIL PROTECTED] Sent: Thursday, March 16, 2000 12:42 PM Subject: Re: JMSChat Hi, the demos in the 0.9.4 distro are temporary and use internal Orion APIs (which have changed which failed to get reflected in the demos). The next release will have updated demos that do it the proper x-platform way via resource-refs and a way to define additional factories in the jms.xml. The next release (0.9.5) is due in a few days, stay tuned. /Magnus Stenman, the Orion team - Original Message - From: Eric Hodges To: Orion-Interest Sent: Tuesday, March 14, 2000 3:48 AM Hi there, new Orion user here. I installed Orion today to use the JMS implementation. I tried to run the demo code (JMSChat) and it won't compiler. It complains that EvermindTopicConnection is an abstract class. Looking at the class file, I see 4 abstract methods. g1, g2, g3, g4 and run. I might figure out how to implement run, but g1-4 are a complete mystery. Any suggestions?
Weird deployment error....cmt-datasource?
Well, I wish I had real documentation or source, but I'll have to accept realities :) Anyways, I'm having this error in 0.94p, Auto-deploying tspg-ejb... Error compiling file:/C:/projects/tspg/deploy/tspg-ejb/: No default cmt-datasource and no source specified. This is my ebj-bar: ?xml version="1.0" encoding="UTF-8"? ejb-jar description/ enterprise-beans entity ejb-nameMerchant/ejb-name homecom.teknos.tspg.server.ejb.MerchantHome/home remotecom.teknos.tspg.server.ejb.Merchant/remote ejb-classcom.teknos.tspg.server.ejb.MerchantBean/ejb-class persistence-typeContainer/persistence-type prim-key-classjava.lang.String/prim-key-class reentrantTrue/reentrant cmp-fieldfield-nameccid/field-name/cmp-field cmp-fieldfield-namewmk/field-name/cmp-field cmp-fieldfield-namehashSecret/field-name/cmp-field /entity /enterprise-beans/ejb-jar Any ideas?
specifying security constraints
I am trying to specify security constraints for my web app and am running into some difficulty. In the web.xml file below for twa.war (twa = test web application), what is the correct url-pattern element of the security-constraint element that will cause /login/login.jsp to be invoked when the user attempts to access the "mytwa" servlet? i.e. http://localhost/twa/mytwa should invoke http://localhost/twa/login/login.jsp and then upon successful login redirect the user to that servlet. /*, * cause a 500 error, /mytwa, /mytwa/* pass the user straight to it. I thought (checking with the 2.2 spec) that /mytwa/* was correct, but I guess not. thanks, Kit -- ?xml version="1.0"? !DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd" web-app servlet servlet-namemytwa/servlet-name servlet-classtwa.TestWebApp/servlet-class /servlet servlet-mapping servlet-namemytwa/servlet-name url-pattern/mytwa/*/url-pattern /servlet-mapping welcome-file-list welcome-file/login/login.jsp/welcome-file /welcome-file-list security-constraint web-resource-collection web-resource-nameEvery JSP Except Login Stuff/web-resource-name url-pattern/*.jsp/url-pattern !-- WHAT SHOULD THE LINE BELOW BE? -- url-pattern/mytwa/*/url-pattern http-method*/http-method /web-resource-collection auth-constraint role-nametwausers/role-name /auth-constraint /security-constraint security-role role-nametwausers/role-name descriptionUsers of the TWA/description /security-role login-config auth-methodFORM/auth-method form-login-config form-login-page/login/login.jsp/form-login-page form-error-page/login/loginretry.jsp/form-error-page /form-login-config /login-config /web-app