w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Stream Closed error on Tomcat 7 with Clojure Compojure Application
I often encounter such situations, where something works in development and fails in production, when a call to the DB is returning a lazy sequence of records, which is being printed to the repl or logger in development and not being realized on the production system. It could be that something in the call to get-productivity is missing a call to doall around the returned rows. Another case is where the exception handler is wrapping around a call to with-connection so when the exception happens the db connection is not longer available, though this seems less likely than a missing doall based on my guess of what could be in get-productivity if you include get-productivity and log an example of it's return value during the failure we will be able to make better guesses.

Categories : Tomcat

How to configure tomcat web.xml and tomcat-users.xml to secure a tomcat page
As far as access to the tomcat manager GUI is considered, there is no role as "manager" to set in tomcat-users.xml. you have to specify one of these roles. You can find the role names in the web.xml file of the Manager web application. The available roles are: •manager-gui — Access to the HTML interface. •manager-status — Access to the "Server Status" page only. •manager-script — Access to the tools-friendly plain text interface that is described in this document, and to the "Server Status" page. •manager-jmx — Access to JMX proxy interface and to the "Server Status" page. have a look into this link for further info, http://tomcat.apache.org/tomcat-7.0-doc/manager-howto.html I hope it helps, thanks.

Categories : Xml

Finalizing a Cursor that has not been deactivated or closed or database not closed error
When you are done with the cursor, you need to call Cursor.close(). Leaving it not closed leads to memory leaks. E.g.: Cursor cursor = null; try { cursor = getContentResolver().query(myUri, MY_PROJECTION, null, null, null); if (cursor != null && cursor.moveToFirst()) { // moar code } } finally { if (cursor != null) { cursor.close(); } }

Categories : Android

Application gets closed when terminal is closed, how to stop this?
Use nohup to prevent child processes from being killed when the terminal closes. spawn nohup /usr/bin/firefox https://www.google.com/ I assume there's more to the script, since there's no need to use Expect just to start firefox.

Categories : Python

How to draw closed spline 3D (closed curve 3d) through unordered list of points3D. How to arrange points3D?
It sounds like you're looking for the Concave Hull of the data set. Unfortunately, I don't know of any pre-canned algorithms, but the link references a paper that another developer was starting from, as well as some sample code, so maybe that'll help you in the right direction.

Categories : C#

how to access tomcat servlet in maven project structure with embeddable tomcat
Your application context path is /Archery (defined in context.xml) Your servlet path is also /Archery (urlPatterns property of @WebServlet) It's also duplicated by your web.xml So, your URL should be localhost:8080/Archery/Archery First server[:port], followed by context path, followed by servlet path Anyway, you will have to fix project structure in order for this to work. If you are following Maven conventions web resources directory should be src/main/webapp The web.xml (and context.xml) should be put under WEB-INF directory under this directory. After you have packaged the war, just make sure these files are there (under WEB-INF)

Categories : Maven

How to deploy war with automatic buildnumber to tomcat using maven tomcat plugin
Use tomcat 7, with '##' tomcat7 is possible to use the aritfactId as context and the version as version in tomcat. <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.2</version> <configuration> <url>http://localhost:8080/manager/text</url> <server>tomcatserver</server> <path>/${project.artifactId}##${project.version}</path> </configuration> </plugin> Parts in your pom that you use in more that one pom like 'maven-compiler-plugin' put in the parent pom and include in all your project poms.

Categories : Maven

Netbeans fails to deploy to Tomcat 7, works with Tomcat 6
I spent several hours today with this and find a solution minutes after posting here. In Netbeans I had to delete Tomcat from the list of servers then manually add it back with all the same information. Netbeans must save details about the server the first and only time it connects.

Categories : Tomcat

How to change port of tomcat from eclipse's tomcat plugin
It worked after changing server.xml in tomcat's home directory. The problem was that there were multiple instances of tomcat that were running. I changed the ports of other connectors too.. that may also have had an effect, though I am not sure.

Categories : Eclipse

share tomcat logs using tomcat http service
With the http://tomcatip.domain.com:8080/share-log you'll get 404 because there is not a index.html inside tomcat/logs. Did you try to check if http://tomcatip.domain.com:8080/share-log/catalina.out is working?

Categories : Http

Tomcat 7 in Eclipse Indigo: Tomcat failing to start
Your project should be created as a Dynamic Web Project. Since your project is already created, you should add the Dynamic Web Module facet to it. Right-click the project --> Properties --> Project Facets --> check the Dynamic Web Module facet --> OK.

Categories : Eclipse

The underlying connection was closed: The connection was closed unexpectedly wcf service
The first thing i will do is, instead of returning the full list of candidates i will return an empty list. If that works fine, then it is very clear that the size of the data is a problem. To modify the size play with your binding parameters.

Categories : Wcf

An incompatible version 1.1.22 of the APR based Apache Tomcat Native library is installed, while Tomcat requires version 1.1.24
From the error its clear that your tomcat native is of older version (1.1.22) and service looks for much newer version at least 1.1.24. The latest and stable version of tomcat native is 1.1.27. You can install that. Use the following link to install and fix your current issue.

Categories : Apache

Unknown version of Tomcat was specified with tomcat-7.0.42
You are specifying tomcat source directory. You need to specify tomcat binary installation root directory, also known as CATALINA_HOME. Usually, this is where you untar apache-tomcat-7.0.42.tar.gz file.

Categories : Java

"The underlying connection was closed: The connection was closed unexpectedly"
The first request does not utilize a header that indicates the length of the result. It closes the connection when it finishes. The second request utilizes the length header, reads the designated number of bytes, then closes the connection gracefully. (under the client side control instead of server driven disconnection) -or- The url you sent caused an error on the server. Is there an error in the server log or event viewer?

Categories : C#

JAVA - Tomcat 5 Application connecting to Web Service using HTTPS, while Tomcat 7 Application does not
It would seem that the root cause of this problem is that when you are running the newer version (tc7, jdk1.7) you application is unable to find the certificate store. Are you specifying where the certificates are stored in you java code? Or anywhere else for that matter? If so you may be doing it in a Java1.4 way that has been updated in later versions. The default certificate store for java is {$JAVA_HOME}/lib/security/cacerts If your certificate is not being stored here, then this may be your problem. This store is per java version so this would explain why the older version is working while the new version is not. (This is covered in the post linked to by Michael) If this doesn't fix the problem, then it would be useful if you could post some more information about how you are con

Categories : Java

Tag 'h1' not closed
Try adding space: <h1> @employee.Name </h1> Take a look at this question

Categories : Asp Net Mvc

How do I tell if an HttpResponse is already closed?
Stab in the dark here, but would connectionInfo being null mean that the HttpResponse has finished? Otherwise, I guess you could set a "closed" bool variable from the Future returned by done, and test whether it's set before processing the response? HttpResponse response = ...; bool closed = false; response.done.then((_) => closed = true); if (!closed) { ... } But I'm not sure whether you could ever do this early enough, would depend on the scenario.

Categories : Dart

When is FileDescriptor closed?
I belive you are right. A small test shows that the FileDescriptor becomes invalid after its FileInputStream is closed. Note that, in case of more than one FileInputStream for the same FileDescriptor, the FileDescriptor becomes invalid as soon as its first FileInputStream is closed, i.e. it does not matter if you close first fis1 and then fis2 or the other way around: FileInputStream fis1 = new FileInputStream("/tmp/adb.log"); FileDescriptor fd = fis1.getFD(); FileInputStream fis2 = new FileInputStream(fd); System.out.println(fd.valid()); fis1.close(); System.out.println(fd.valid()); fis2.close(); System.out.println(fd.valid()); Output is: true false false Do not forget to close the stream in a finally block, to make sure you close it also in case of an I/O (read/write) error.

Categories : Java

Is this inputstream being closed?
You re doing some wierd stuff it seems? For each archieve entry while your reading your archieve you re recursively calling your read archieve method which results in opening the next archieve while your parent code is still handling your previous archieve. You should loop entirely through your archieve entry before handling any new archieve entry in your compressed file. Something like ArArchiveEntry entry = (ArArchiveEntry) arInput.getNextEntry(); byte[] content = new byte[entry.getSize()]; LOOP UNTIL entry.getSize() HAS BEEN READ { arInput.read(content, offset, content.length - offset); } as stated in the examples on the apache site

Categories : Java

get the information on the last closed iOS App
It is not possible to get the last closed iOS app, but if you have two apps and you want to be able to move between the apps you may be able to use URL schemes. URL Schemes Documentation Here: http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/AdvancedAppTricks/AdvancedAppTricks.html#//apple_ref/doc/uid/TP40007072-CH7-SW18

Categories : IOS

Is socket closed from my end or the other end
It looks like your application is shutting down the HttpClient connection pool too soon. It is not happening in the code you showed in your Question. That code looks like "an innocent victim". Is this an issue with the HttpClient version I am using? Probably not. Or is something in my environment changing the behaviour? Erm ... could be. Especially if "my environment" is an obscure way of saying some other part of your program.

Categories : Java

Detecting whether .exe was closed
Use the Exited event (note: you need to set EnableRaisingEvents to true) e.g. : private void button1_Click(object sender, EventArgs e) { string openexe= @"C:UsersmarekDocumentsVisual Studio 2012Projects ours oursinDebug etpokl.exe"; var proc = new Process(); proc.StartInfo = new ProcessStartInfo(openexe); proc.EnableRaisingEvents = true; proc.Exited += new EventHandler(proc_Exited); proc.Start(); } private void proc_Exited(object sender, EventArgs e) { // the process has exited... } This is the asynchronous way, for a synchronous approach you can use the WaitForExit method : private void button1_Click(object sender, EventArgs e) { string openexe= @"C:UsersmarekDocumentsVisual Studio 2012Projects ours oursinDebug etpokl.exe"; var proc = new Proces

Categories : C#

Closed Captions in YouTube API v3
We are hoping to have Captions support on Data API v3 soon. You won't need to scrape the website. Update: This has been implemented now. The docs can be found here.

Categories : Java

PSQLException: this ResultSet is closed
when you close the connection object in your getProduttori method, your result set will be automatically closed. when you try to re use it , it will be null. ResultSet rs = ProduttoreDCS.getProduttori(); = null, as you have closed the connection in getProduttori method, which will automatically close the resultset thus, it returns null. From Connection#close Releases this Connection object's database and JDBC resources immediately instead of waiting for them to be automatically released. applies same when closing the Statement as well.For your code to work don't close Statement and Connection untill you get the rows. @Baadshah has already shown you the standard way. If you are using java 7+ you can make use of try-with-resource block,

Categories : Java

Haskell IO - handle closed
getContents == hGetContents stdin. In fact hGetContents marks its handle (semi-)closed and this means anything attempting to read from stdin ever again will fail. Take a look at After using getContents in the Haskell User Guide

Categories : Haskell

IE 10 not using AppCache after browser closed
Did you find the answer to this? I have the same problem. I did get a bit further though. I found that if you go to the IE10 File menu option and tick Work Offline then try and access your cached app it loads the page but I still have an issue as it does not appear to be using the javascript file that should also be cached. All works ok on Google Chrome but our clients are restricted to IE so Chrome is not an option.

Categories : Internet Explorer

HTML5 App on Windows 8 which cannot be closed
This isn't possible on Windows 8; the soon to be released Windows 8.1 has a "Kiosk Mode", which seems to be what you are looking for. From Windows 8.1 kiosk mode locks systems to a single app: Generally speaking, kiosk mode is something that’s intended for use in corporate and shared computing settings — like public information terminals. It would, for example, make an excellent way to lock a point-of-sale terminal in to the “cash register” app and prevent would-be procrastinators from tabbing out and surfing the web.

Categories : HTML

Does IndexedDB need to be closed other than on upgrade?
Take a look to the documentation from W3: When a connection is initially created it is in opened state. The connection can be closed through several means. If the connection is GCed or execution context where the connection is created is destroyed (for example due to the user navigating away from that page), the connection is closed. The connection can also be closed explicitly using the steps for closing a database connection. When the connection is closed the closePending flag is always set to true if it hasn't already been. There is no need to close explicitly the connection, the browser should handle that.

Categories : Javascript

What determines if a variable is closed over?
This code closes over sample twice. from x in new int[]{0} from i in sample from j in sample select Math.Pow(i,j); The actual method calls this evaluates to are: new int[] {0} .SelectMany(x => sample, (x, i) => new {x, i}) .SelectMany(@t => sample, (@t, j) => Math.Pow(@t.i, j)); This code closes over sample once. from i in sample from j in sample select Math.Pow(i,j); The actual method calls this evaluates to are: sample.SelectMany(i => sample, (i, j) => Math.Pow(i, j)); So if you change sample, only the i => sample lambda will "see" the "new" value for sample; sample.SelectMany has already run with the "old" value. Both examples cause R# to issue an Access to modified closure warning, which is usually a big red flag. Consider keeping a private cop

Categories : C#

How to exit a sub if a dialog is closed?
You just need to check the DialogResult being returned from the modal form. This way your code only executes if they get an ok from the form. Private Sub AddJarMod_Click(sender As Object, e As EventArgs) Handles AddJarMod.Click If addModDialog.ShowDialog() = DialogResult.Ok Then newJarModDir = addModDialog.FileName newJarMod = System.IO.Path.GetFileNameWithoutExtension(newJarModDir) If System.IO.Path.GetExtension(newJarModDir) = ".zip" Then jarModList.Items.Add(newJarMod) devConsoleList.Items.Add(newJarModDir) ElseIf System.IO.Path.GetExtension(newJarModDir) <> ".zip" Then MsgBox("File extension not a zip") End If End If End Sub

Categories : Vb.Net

Cant open a closed file
You need to have all code that references fs inside of the using, otherwise you are attempting to access an object that has already been disposed. I would also do the same thing with the BinaryReader, since it also implements IDisposable: Dim data() As Byte Using fs As New FileStream(FileName, FileMode.Open, FileAccess.Read) data = New Byte(fs.Length) {} Using br As New BinaryReader(fs) br.Read(data, 0, data.Length) End Using End Using ...

Categories : Asp Net

.Net SoapClient Connection Was Not Closed
The error occurs in the database connection. Make sure that the SqlConnection object is properly disposed in your server code (a good practice is to wrap your code with using statements).

Categories : Asp Net

Reopening closed file: Lua
So, now the problem is that the "LoadScript" function isn't doing what you expect: Because I'm psychic, i have divined that you're writing a Crysis plugin, and are attempting to use it's LoadScript API call. (Please don't assume everyone here would guess this, or be bothered to look for it. It's vital information that must form part of your questions) The script you're writing attempts to set Backup - but your script, as written - does not separate lines with newline characters. As the first line is a comment, the entire script will be ignored. Basicallty the script you've written looks like this, which is all treated as a comment. --[[ comment ]]--Backup="Hello!" You need to write a " " after the comment (and, I'd recommend in other places too) to make it like this. In fact, you d

Categories : Windows

Closed type classes
I believe the answer is a qualified yes, depending on what you're trying to achieve. You can refrain from exporting the type class name itself from your interface module1, while still exporting the names of the type class functions. Then no one can make an instance of the class because no one can name it! Example: module Foo ( foo, bar ) where class SecretClass a where foo :: a bar :: a -> a -> a instance SecretClass Int where foo = 3 bar = (+) The downside is no one can write a type with your class as a constraint either. This doesn't entirely prevent people from writing functions that would have such a type, because the compiler will still be able to infer the type. But it would be very annoying. You can mitigate the downside by providing another emp

Categories : Haskell

Detect whether workbook is closed?
As you are opening the workbook the best advice is to keep track of the workbook and close it when appropriate. If your code is quite detailed then you could store a Boolean value indicating whether the file is currently open or closed. In Excel there is no property such as IsOpen. You could try to reference the workbook: Workbook wbTest = xlApp.Workbooks.get_Item("some.xlsx"); but this creates a COM error if the book is not open, so gets quite messy. Instead, create your own function IsOpen that returns a boolean and loops through the currently open workbooks (the Workbooks collection) checking the name, using code like this: foreach (_Workbook wb in xlApp.Workbooks) { Console.WriteLine(wb.Name); } workbook.Close() would not be necessary if the workbook has been saved - reflec

Categories : C#

OpenCV 'Almost' Closed contours
You can utilize color information and kmeans clustering as explained in the link. As long as target object color differs from the background, the pixels of the square object can be detected accurately.

Categories : C++

Detect closed contours
If your example image is a bitmap, even a single pixel has an area already, so it also has a contour. The closed circle even has two contours, one on the inside, one on the outside. The half circle has just one, spanning inside and outside and making a U-turn at the ends. I guess you want to treat these two circles as curves that indeed have no area and just one "contour". The circle would then be a closed curve, the half circle would be open. If that is the case, your new problem is turning a bitmap into curves. This isn't trivial, even though we humans easily perceive the curve there, because it requires defining an algorithm and parameters that turn an area into a curve. One approach I know is deriving a skeleton from the bitmap, which basically peels off layers of pixels on the outsi

Categories : Python

Opening new datepicker when old one is closed
the datepicker provides an close event, maybe you can use this? Take a look at the API here http://amsul.ca/pickadate.js/api.htm#method-on some lines further down, you find $('.datepicker').pickadate({ onOpen: function() { console.log('Opened up!') }, onClose: function() { console.log('Closed now') }, onRender: function() { console.log('Just rendered anew') }, onStart: function() { console.log('Hello there :)') }, onStop: function() { console.log('See ya') }, onSet: function(event) { console.log('Set stuff:', event) } }) when entering the close event, open a new datepicker and set default value of the currently closed.

Categories : Javascript

Flashlight app getting closed in background
Got solution. What you should do is, write all the code like following in onBackPressed. I merge two methods code in one method. @Override public void onBackPressed() { // TODO Auto-generated method stub super.onBackPressed(); myparas = mycamera.getParameters(); myparas.setFlashMode(Parameters.FLASH_MODE_OFF); mycamera.setParameters(myparas); mycamera.stopPreview(); flashon = false; if (mycamera != null) { mycamera.release(); mycamera = null; } Log.d("Camera","Back Pressed"); } And remove all the code from onStop() and onPause() method. Because when you press Home key, it calls first onPause() and then onStop(). I implement your code and worked fine for me.

Categories : Android



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.