Running 5.5.4 from netbeans
Hi, I asked this question on the netbeans list, and got no reply, so I'm trying my luck here: I'm using Netbeans 4.1 EA2. I've got a web app which works fine with the built-in tomcat 5.0. But I'd like to use an external 5.5.4 (same machine though). When I try to run the app, I get the following error below. Has anyone seen this before? In-place deployment at /home/mike/tbrc/cvs/src/TbrcCatalog/build/web deploy?config=file:/home/mike/tbrc/cvs/src/TbrcCatalog/build/web/META-INF/context.xmlwar=file:/home/mike/tbrc/cvs/src/TbrcCatalog/build/web/ FAIL - Invalid context path null was specified /home/mike/tbrc/cvs/src/TbrcCatalog/nbproject/build-impl.xml:340: org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment$DeploymentException: Deployment failed. BUILD FAILED (total time: 12 seconds) - The contents of context.xml are: ?xml version=1.0 encoding=UTF-8? Context docBase=/home/mike/tbrc/cvs/src/TbrcCatalog/build/web path=/TbrcCatalog Logger className=org.apache.catalina.logger.FileLogger prefix=TbrcCatalog. suffix=.log timestamp=true/ /Context I thought that when you used the tomcat manager deploy command, as long as you passed in a war file you didn't have to specify a context? As an aside, when I copy the war file to my hosting server, I have to delete context.xml because the docBase of course is invalid on a different machine. Can I get netbeans to stop using that docbase? Thanks very much, Michael Davis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet won't load
Hi, I've got an application which runs fine for me, but which won't run on my hosting company's server which is running Tomcat 5.5.4 on Solaris. I've got a jsp page which has a link to a servlet. When I click the link, I get a 404 error. Tomcat doesn't attempt to load and run the servlet, it just think's it's a bad link. I was able to create a tiny web app which illustrates the problem. It's at www.damaru.com/webapp I've checked that the mapping is correct in web.xml. This runs fine on my linux box with tomcat 5.0, and I also tested it on a win2k box using tomcat 5.5.4. The strange thing is that I have another web app which is running fine on that server. I suspect that the hosting company has got something strange in their global config file, but I have not found anything myself. thanks for any hints Michael Davis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Moving from 4.1 to 5
Hi, I've got an app running nicely on tomcat 4.1. We're setting up a brand new server, and I'm trying to decide whether it's a good time to migrate to version 5. Will my app run without modification? I'm using the Standard Tag Library and the Hibernate persistence library, nothing else special. thanks Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat error-page not working (was: RE: Tomcat and checked vs.
Hi, This is really easy with jsp. I'm doing something similar. I don't have the code here, but it goes something like: in servlet.java: HttpRequest req; // this is passed to you HttpSession sess = req.getSession(); sess.setAttribute( errorMessage, Something terrible has happened. ); And I have this code in a file called header.jsp, which is included by other pages. It uses the Standard Tag Library: jsp:useBean id=errorMessage scope=session class=java.jang.String/ c:if test=${errorMessage.length == 0} c:out value=${errorMessage}/ /c:if Good luck, Michael Toronto On Mar 16, Wendy Smoak [EMAIL PROTECTED] wrote: So... From a plain-old Servlet, when, for example, I'm retrieving text from a database and trying to create a PDF, and there is no text, how do I show a nice error page? It's been a LONG time since I've done a regular Servlet. Am I trying to apply some Struts-type global forward idea here without realizing it? Or is this supposed to work, except that in this case IE is helpfully refusing to show my page? What I'm currently doing: [in PDFServlet.java] throw new ServletException( No data found in HOLD file ); [in web.xml] error-page exception-typejavax.servlet.ServletException/exception-type location/error.jsp/location /error-page Should I instead be doing something with RequestDispatcher and forwarding to this JSP to avoid the status being set to 500 and confusing IE? -- Wendy Smoak Application Systems Analyst, Sr. ASU IA Information Resources Management - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: final class problem
Thanks again, Yoav. I lucked out. I had installed the newest stable version of Hibernate, the persistence library. I just went back to using the previous version, and my app magically worked again. It will take me a while to figure out which of about 12 jar files caused the problem, but I don't need to figure that out right now, thank goodness. Michael On March 12, 2004 01:59 pm, Shapira, Yoav wrote: Hi, machine at home. But when I try to install it on my server, using the tomcat manager init command, I get this error. If I knew which class it was trying to instanciate, I might be able to fix it, but I'm basically hoping that someone has seen this before and knows what the problem is. None of the classes I wrote are marked 'final'. You're likely extending a class that's marked as final in a library whose version on your home machine is different than on your server. It's tough to tell which class from this stack trace, so the thing to do is make very sure all the libraries at home and on the server are the same, including extras like Xerces etc, and that you can compile your app at home against these libraries. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
final class problem
Hi, I have a web app which was working fine. I made a lot of changes, and it works fine on my machine at home. But when I try to install it on my server, using the tomcat manager init command, I get this error. If I knew which class it was trying to instanciate, I might be able to fix it, but I'm basically hoping that someone has seen this before and knows what the problem is. None of the classes I wrote are marked 'final'. This dump was copied from the app log. Thanks in advance for any clues: Michael Davis Toronto 2004-03-12 13:29:27 Manager: ManagerServlet.install[/sham] java.lang.VerifyError: Cannot inherit from final class at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:502) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1664) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:953) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1394) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1274) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.createContentDispatcher(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.init(XMLDocumentFragmentScannerImpl.java:248) at org.apache.xerces.impl.XMLDocumentScannerImpl.init(XMLDocumentScannerImpl.java:245) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.init(Unknown Source) at org.apache.xerces.parsers.IntegratedParserConfiguration.createDocumentScanner(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.init(DTDConfiguration.java:366) at org.apache.xerces.parsers.StandardParserConfiguration.init(StandardParserConfiguration.java:197) at org.apache.xerces.parsers.IntegratedParserConfiguration.init(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.init(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.init(Unknown Source) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:274) at java.lang.Class.newInstance0(Class.java:306) at java.lang.Class.newInstance(Class.java:259) at org.apache.xerces.util.ObjectFactory.newInstance(ObjectFactory.java:293) at org.apache.xerces.util.ObjectFactory.createObject(ObjectFactory.java:224) at org.apache.xerces.util.ObjectFactory.createObject(ObjectFactory.java:119) at org.apache.xerces.parsers.SAXParser.init(SAXParser.java:140) at org.apache.xerces.parsers.SAXParser.init(SAXParser.java:125) at org.apache.xerces.jaxp.SAXParserImpl.init(SAXParserImpl.java:102) at org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParser(SAXParserFactoryImpl.java:95) at org.apache.commons.digester.Digester.getParser(Digester.java:676) at org.apache.commons.digester.Digester.getXMLReader(Digester.java:892) at org.apache.commons.digester.Digester.parse(Digester.java:1514) at org.apache.catalina.startup.ContextConfig.tldScanStream(ContextConfig.java:977) at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:921) at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3493) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579) at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:257) at org.apache.catalina.core.StandardHost.install(StandardHost.java:772) at org.apache.catalina.servlets.ManagerServlet.install(ManagerServlet.java:650) at org.apache.catalina.servlets.ManagerServlet.doGet(ManagerServlet.java:342) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
Is Tomcat considered to be a J2EE implementation?
Hi, I've been coding Java for a while, and now I'd like to learn J2EE. I downloaded and installed Tomcat version 4. Is Tomcat a reasonably complete implementation of J2EE? That is, if I learn and use Tomcat, can I claim to know J2EE? Thanks, -- Michael Davis Damaru Custom Programming - Web Development - Database Design http://www.damaru.com 416-540-1284 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Is Tomcat considered to be a J2EE implementation?
Thanks, I've been using JServ to create servlets for a while, and I thought that the difference between simply using servlets and J2EE was that the latter has an EJB container. If this is true, then does Tomcat come with an EJB container? Or maybe a better question is, can you program EJBs with Tomcat? Thanks again, Michael On December 15, 2001 11:34 am, you wrote: hello, The J2EE includes the following technologies : Servlets, JSP, JNDI, JAXP, JDBC, EJB, JMS, Java Transactions, JavaMail, Java IDL, J2EE connectors and Corba (am I missing something ?). Read all about j2ee and related technologies at http://java.sun.com/j2ee Tomcat is only a Servlet / JSP container... so while using it you´re not neccesarely using all the other technologies, so I would not say that you know j2ee untill you know at least half of em. But then again Servlets, and JSP are a very big part of J2EE functionality. I would say if you learn and use Tomcat, you can claim you know servlets jsp, and probably some of the other parts of J2EE. If you check out EJBs along the way u´re getting very close to knowing J2EE, at least you should know what to claim. hope that explaines it... --reynir -Original Message- From: Michael Davis [mailto:[EMAIL PROTECTED]] Sent: 15. desember 2001 16:14 To: [EMAIL PROTECTED] Subject: Is Tomcat considered to be a J2EE implementation? Hi, I've been coding Java for a while, and now I'd like to learn J2EE. I downloaded and installed Tomcat version 4. Is Tomcat a reasonably complete implementation of J2EE? That is, if I learn and use Tomcat, can I claim to know J2EE? Thanks, -- Michael Davis Damaru Custom Programming - Web Development - Database Design http://www.damaru.com 416-540-1284 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Is Tomcat considered to be a J2EE implementation?
Thanks to everyone who replied. One big relieve is that you all agree! I'll get JBoss and try that out. Regards, Michael On December 15, 2001 01:29 pm, you wrote: On Sat, 15 Dec 2001, Michael Davis wrote: Date: Sat, 15 Dec 2001 11:48:23 -0500 From: Michael Davis [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: Is Tomcat considered to be a J2EE implementation? Thanks, I've been using JServ to create servlets for a while, and I thought that the difference between simply using servlets and J2EE was that the latter has an EJB container. J2EE has a large number of technologies beyond the servlet and JSP support present in Tomcat, plus requirements on the container for configuring resources such as JDBC data sources. Tomcat 4 is a complete implementation of the servlet 2.3 and JSP 1.2 requirements, and supports a small subset of resource factories that are upwardly compatible with J2EE programming standards, but it does NOT contain any support for the extra technologies such as EJB. If this is true, then does Tomcat come with an EJB container? Or maybe a better question is, can you program EJBs with Tomcat? You will need an EJB container in order to program EJBs. Two approaches for you to look at: * Get the J2EE 1.3 Reference Implementation from Sun http://java.sun.com/j2ee. It embeds Tomcat 4 inside to provide the servlet and JSP technologies, and also supports all the rest. * Get an external EJB server that can integrate with Tomcat, such as JBoss http://www.jboss.org. It connects with Tomcat to provide the web layer, and itself provides EJB support. Thanks again, Michael Craig McClanahan -- Michael Davis Damaru Custom Programming - Web Development - Database Design http://www.damaru.com 416-540-1284 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]