RE: [E] Re: Cannot get a connection, pool error Timeout waiting for ideal object
Hi Chris, Thank you for your reply!! Please note that we tried to make changes to the contex.xml file located under the conf directory of tomcat. On 2/16/18 6:58 PM, Halder, Arpan [ITSUS Non J] wrote: > We could able to locate context.xml under " > /apps/apache-tomcat-7.0.67/conf" path - see below: The properties we were modifying are given below . > type="javax.sql.DataSource" maxActive="50" maxIdle="30" > maxWait="1" username="saevdcep" password="xx" > driverClassName="org.postgresql.Driver" > url="jdbc:postgresql://itsusralsp06829:5432/spectra"/> > > type="javax.sql.DataSource" maxActive="50" maxIdle="30" > maxWait="1" username="saevdcep" password="xxx" > driverClassName="org.postgresql.Driver" > url="jdbc:postgresql://itsusralsp06829:5432/evidencesearch"/> However, on restarting the tomcat server after making changes to values in these, the application is throwing a 404: Resource not Found error. The tomcat server is up and running but on hitting the application URL, we are getting the 404 error. We even tried restoring the context.xml file to its original values but that did not seem to make a difference. Can you please advise what steps we need to follow in order to fix this issue? Thanks and Regards, Arpan Arpan Halder Tata Consultancy Services providing services to: Global Data and Analytics Application Support / ITAS Route 22 West▪NJ 08876 ▪ USA Mobile: +1 (908) 392 2947 -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Sunday, February 18, 2018 11:13 AM To: users@tomcat.apache.org Subject: [EXTERNAL] Re: [E] Re: Cannot get a connection, pool error Timeout waiting for ideal object -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Arpan, On 2/16/18 6:58 PM, Halder, Arpan [ITSUS Non J] wrote: > We could able to locate context.xml under " > /apps/apache-tomcat-7.0.67/conf" path - see below: That is the wrong file. The file conf/context.xml contains the defaults for every application deployed onto that Tomcat server. Your application should have its own, separate context.xml file in the META-INF directory. > type="javax.sql.DataSource" maxActive="50" maxIdle="30" > maxWait="1" username="saevdcep" password="xx" > driverClassName="org.postgresql.Driver" > url="jdbc:postgresql://itsusralsp06829:5432/spectra"/> > > type="javax.sql.DataSource" maxActive="50" maxIdle="30" > maxWait="1" username="saevdcep" password="xxx" > driverClassName="org.postgresql.Driver" > url="jdbc:postgresql://itsusralsp06829:5432/evidencesearch"/> Okay. > Could you please check which are the parameters to add/modify/delete. Everything looks okay up there. You might want to add: logAbandoned="true" This will log places in your code where you have resource leaks. > Also we could locate another "context.xml" under " > /apps/apache-tomcat-7.0.67/webapps/host-manager/META-INF" and " > /apps/apache-tomcat-7.0.67/webapps/manager/META-INF" path - could you > please advise if we need to make any change here Those are the deployment descriptors for the host-manager and the manager applications respectively. Do not modify those files. - -chris -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlqJpggACgkQHPApP6U8 pFi3UQ/+K3rSSb0cke4obIjlrZUrOsiPFCsNPRPl9iTRvU/L1AGb8cJ1YjPdbu03 Veac/wM3gNa9PgRpfUImq9gaKl03MjMCfyCGMfX1Z/dJWcw8WNiFGDxW69O+sANl ALoFBzi0ya0icYKFfk7EF4e7DkZ9Jcwp0CfE319Z7+b/rTUNhD3AMjRsW0LK3E0c kxr6qbu0Ba+WmuITLKXSLGJBAW9nNBLIJ+WuO73S7UpTVWBexXLTNAyNheG6KFJl eC7ukAyunrXagoKmC6JAVl2wboNGgCZStIuj+htq/nxjRSb7MA+uSah+uzCPR94k GC17fhxPx76seW3kbmt8UUPU1thqUjsE+pXgmskHlUw70al3MO59rdjuoRm0ac3r +TrtCoeanYQYfXGJmHI8tClZ2f2qhwhfZ0Co9DxF/Pjz8V/01CXKYHfeV3a74+GF LTw2MHfwHXT8NgpmixCExC47HNGrYDqZG7gNtmKiytIaAi+f0otEjFLvlNeRId67 Fs9pXlyBDlwhPigFj1Uv4f3yBw2cqsZDvL7YD6tioU48ptu113yM0R4S61x4xAZw bwpuZomRgzbsOHvoWkNfQ3/1H6U/YEJvmUFJ/D9mmjEfSZq+u0czZ4jiRkcz3shA EKyatdAlRGBcT21t/AkdR6QRPaAB5YPOuj+/+ycVVXRXT7uln7M= =EpQk -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat stopped and Debug can't be done in Eclipse
2018-02-20 17:57 GMT+03:00 Karen Goh: > > Hi Konstantin, > > Can you point me some useful resources where I can learn about setting the > Tomcat launch configuration. 1. On the topic of debugging, see the following page: https://wiki.apache.org/tomcat/FAQ/Developing The following two items on that page should be interesting for you: a) "Official Eclipse IDE Web Tools FAQ for Tomcat" with links to Eclipse documentation b) "How do I configure Tomcat to support remote debugging?" This is for the use case when you start Tomcat separately and attach a debugger to an already running Tomcat. 2. On a topic of simply running Tomcat (not debugging), official documentation is "RUNNING.txt" file. There is also http://tomcat.apache.org/tomcat-8.5-doc/setup.html Environment variables used by launch scripts are documented in a comment at the top of those scripts (catalina.bat, catalina.sh). > Currently, I have the below inside my arguments : > > -Dcatalina.base="C:\Users\Karen.Goh\workspace3\.metadata\.plugins\org.eclipse.wst.server.core\tmp0" > -Dcatalina.home="C:\Program > Files\Apache\apache-tomcat-9.0.4-windows-x64\apache-tomcat-9.0.4" > -Dwtp.deploy="C:\Users\Karen.Goh\workspace3\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps" > -Djava.endorsed.dirs="C:\Program > Files\Apache\apache-tomcat-9.0.4-windows-x64\apache-tomcat-9.0.4\endorsed" > > Is this the part that is causing Tomcat to just hang ? Or I have missed out > something I am not aware of. Kindly highlight please. 3. When Tomcat starts, its actual arguments are printed by VersionLoggerListener. You can see them in your previous e-mail, Search for "Command line argument" http://markmail.org/message/tgymk3r43ox5ggps > Cos I can't proceed with any debugging at all as in run the green button : > Please see this attachment at https://imgur.com/OQLyJFb 4. In your image I see that your Tomcat is not running (The "Console" view at the bottom says "". The "Servers" view says "[Stopped, Synchronized]".) How did you start it? 5. My recipe will be: - In the "Servers" view select the server and deploy you application onto it (right click -> context menu -> ...) - Then click the small green "bug" button in the toolbar of this view (in the small toolbar right above "Servers" view, not the one in the main toolbar). The server should launch in debug mode. HTH > Is there any other changes I need to make since I am also using a maven plug > in as below : > > > org.apache.maven.plugins > maven-war-plugin > 3.2.0 > > > It used to be very easy for me to do debugging and now things are so much > complicated now. > Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Error parsing HTTP request header, HTTP method names must be tokens
On Tue, Feb 20, 2018 at 4:01 PM, Alex O'Reewrote: > I keep running into the an IllegalArgumentException at or near startup of > tomcat 8.5 with a bunch of cxf web services deployed and I have no idea > what's causing it. The error message mentions turning on logging at the > debug level. Random shot in the dark given the minimal date provided :) Does it look like this: INFO [http-nio-8080-exec-3] org.apache.coyote.http11.Http11Processor.service Error parsing HTTP request header Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level. java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986 at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:460) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:291) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:754) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1376) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) If so, then your client is sending you requests with unencoded special characters that are now disallowed by Tomcat. > Question: Assuming i need to edit the logging.properties file, which > setting/line do i have to edit to reveal what the root cause is? I can't answer that without more information. What is throwing the exception? A stack trace would be helpful. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Error parsing HTTP request header, HTTP method names must be tokens
I keep running into the an IllegalArgumentException at or near startup of tomcat 8.5 with a bunch of cxf web services deployed and I have no idea what's causing it. The error message mentions turning on logging at the debug level. Question: Assuming i need to edit the logging.properties file, which setting/line do i have to edit to reveal what the root cause is?
Re: Tomcat stopped and Debug can't be done in Eclipse
On Tue, 2/20/18, Konstantin Kolinkowrote: Subject: Re: Tomcat stopped and Debug can't be done in Eclipse To: "Tomcat Users List" Date: Tuesday, February 20, 2018, 4:10 PM 2018-02-20 5:04 GMT+03:00 Karen Goh : > Hi, > > I am writing to this mailing group again because I finally know that Tomcat is the cause of the problem(after writing to an expert) > and thus I hope to sort help for this problem. > > The tomcat version is Apache Tomcat 9.0.4 windows 64. > > Eclipse Oxygen. > Project : Maven dynamic MVC web app with Hibernate, JPA and JSP. > MySQL server 5.7. > > Whenever, I run debug on jsp, after submitting the form, tomcat will just stop and Eclipse does not take over the debugging. > > All the breakpoints are there and perspective is showing debug mode, except the debug buttons are all grey out though. > > I do not know how to make Tomcat not stopping. > > Kindly advise if there is a setting I have missed out such that the above scenario is happening. 1. How exactly do you start Tomcat in debug mode? What instructions and documentation are you following? 2. From log output in your previous thread, http://markmail.org/message/tgymk3r43ox5ggps your command line options are > Jan 21, 2018 11:25:58 PM org.apache.catalina.startup.VersionLoggerListener log INFO: Command line argument: > -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:51917 I think that "suspend=y" option is the cause of the behaviour that you are seeing. IIRC, with that option Java stops and waits for a debugger just after JVM launch. I think that in Eclipse you can look into "threads" view, find a running (stopped) "main" thread there and hit a green button to resume it. Hi Konstantin, Can you point me some useful resources where I can learn about setting the Tomcat launch configuration. Currently, I have the below inside my arguments : -Dcatalina.base="C:\Users\Karen.Goh\workspace3\.metadata\.plugins\org.eclipse.wst.server.core\tmp0" -Dcatalina.home="C:\Program Files\Apache\apache-tomcat-9.0.4-windows-x64\apache-tomcat-9.0.4" -Dwtp.deploy="C:\Users\Karen.Goh\workspace3\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps" -Djava.endorsed.dirs="C:\Program Files\Apache\apache-tomcat-9.0.4-windows-x64\apache-tomcat-9.0.4\endorsed" Is this the part that is causing Tomcat to just hang ? Or I have missed out something I am not aware of. Kindly highlight please. Cos I can't proceed with any debugging at all as in run the green button : Please see this attachment at https://imgur.com/OQLyJFb Is there any other changes I need to make since I am also using a maven plug in as below : org.apache.maven.plugins maven-war-plugin 3.2.0 It used to be very easy for me to do debugging and now things are so much complicated now. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Save the date: ApacheCon North America, September 24-27 in Montréal
Dear Apache Enthusiast, (You’re receiving this message because you’re subscribed to a user@ or dev@ list of one or more Apache Software Foundation projects.) We’re pleased to announce the upcoming ApacheCon [1] in Montréal, September 24-27. This event is all about you — the Apache project community. We’ll have four tracks of technical content this time, as well as lots of opportunities to connect with your project community, hack on the code, and learn about other related (and unrelated!) projects across the foundation. The Call For Papers (CFP) [2] and registration are now open. Register early to take advantage of the early bird prices and secure your place at the event hotel. Important dates March 30: CFP closes April 20: CFP notifications sent August 24: Hotel room block closes (please do not wait until the last minute) Follow @ApacheCon on Twitter to be the first to hear announcements about keynotes, the schedule, evening events, and everything you can expect to see at the event. See you in Montréal! Sincerely, Rich Bowen, V.P. Events, on behalf of the entire ApacheCon team [1] http://www.apachecon.com/acna18 [2] https://cfp.apachecon.com/conference.html?apachecon-north-america-2018 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: asgard tomcat application 404
I don't know about Spring, but according to your exception, and my short experience, could be a database connection issue. grails.web.context.GrailsContextLoaderError initializing Grails: Error creating bean with name 'pluginManager' defined in ServletContext resource *[/WEB-INF/applicationContext.**xml]*: Invocation of init method failed; nested exception is java.lang.NullPointerException: Cannot invoke method getAt() on null object Usually in the context file is where u define the connection pool, and JPA stuff. The null pointer exception makes me imagine that a DB connection, or entity manager, couldn't be created. Maybe the asgard database was not created as expected by the app? Hope it helps, "No olvides, no traiciones, lo que llevas bien dentro de ti. No olvides, no traiciones, lo que siempre te ha hecho vivir." On Tue, Feb 20, 2018 at 12:06 AM, Tim Dunphywrote: > Ok guys. Got it! Thanks for your input. I'll follow up with the Asgard > list, assuming I can find it. > > Thanks > > On Fri, Feb 16, 2018 at 2:40 PM, Olaf Kock wrote: > > > > > On 15.02.2018 23:39, Tim Dunphy wrote: > > > >> I'm trying to get Netflix Asgard tomcat app working. I'm using tomcat 9. > >> I'm using windows. > >> [...] > >> > > Tomcat is about as much involved in this as is Windows. To second > > Christopher's OT answer: This is a problem of the deployed application, > not > > of Tomcat. You should look for help in the Asgard community. Tomcat > doesn't > > use spring, thus there's not even common ground. > > > > Olaf > > > > > > - > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > > For additional commands, e-mail: users-h...@tomcat.apache.org > > > > > > > -- > GPG me!! > > gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B >
Stream closed error while rendering JSP
Hello, I'm trying to debug an exception that sometimes happens when Tomcat renders a JSP page. I have a custom error page (error.jsp) in a Struts 2 application defined in struts.xml like this: /error.jsp Sometimes it fails to render with and Tomcat says that it can't read the JSP file: org.apache.jasper.JasperException - Cannot read file: /error.jsp org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:55) org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:277) org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:75) org.apache.jasper.compiler.JspReader.(JspReader.java:122) ... and the underlying exception is: org.apache.jasper.compiler.JspReader. Exception parsing file java.io.IOException: Stream closed at java.util.zip.InflaterInputStream.ensureOpen(InflaterInputStream.java:67) at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:142) at org.apache.catalina.webresources.AbstractArchiveResource$JarInputStreamWrapper.read(AbstractArchiveResource.java:255) at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284) at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326) at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178) at java.io.InputStreamReader.read(InputStreamReader.java:184) at java.io.Reader.read(Reader.java:140) at org.apache.jasper.compiler.JspReader.(JspReader.java:115) at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:225) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:100) at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:199) But error.jsp exists in the .war file, I checked that. How can I determine what is causing the input stream to get closed? I would appreciate any help. Thank you. Tomcat version: 8.0.28 OS: Linux 4.14 JVM: Oracle 1.8.0_92-b14 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat stopped and Debug can't be done in Eclipse
2018-02-20 5:04 GMT+03:00 Karen Goh: > Hi, > > I am writing to this mailing group again because I finally know that Tomcat > is the cause of the problem(after writing to an expert) > and thus I hope to sort help for this problem. > > The tomcat version is Apache Tomcat 9.0.4 windows 64. > > Eclipse Oxygen. > Project : Maven dynamic MVC web app with Hibernate, JPA and JSP. > MySQL server 5.7. > > Whenever, I run debug on jsp, after submitting the form, tomcat will just > stop and Eclipse does not take over the debugging. > > All the breakpoints are there and perspective is showing debug mode, except > the debug buttons are all grey out though. > > I do not know how to make Tomcat not stopping. > > Kindly advise if there is a setting I have missed out such that the above > scenario is happening. 1. How exactly do you start Tomcat in debug mode? What instructions and documentation are you following? 2. From log output in your previous thread, http://markmail.org/message/tgymk3r43ox5ggps your command line options are > Jan 21, 2018 11:25:58 PM org.apache.catalina.startup.VersionLoggerListener > log INFO: Command line argument: > -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:51917 I think that "suspend=y" option is the cause of the behaviour that you are seeing. IIRC, with that option Java stops and waits for a debugger just after JVM launch. I think that in Eclipse you can look into "threads" view, find a running (stopped) "main" thread there and hit a green button to resume it. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org