Why the request.getInputStream() return nothing?
I use this code to display the request content :
<%
java.util.Enumeration headerNames = request.getHeaderNames();
while(headerNames.hasMoreElements()) {
out.println(request.getHeader((String)headerNames.nextElement()) + "<br/>");
int contentLength = request.getContentLength();
byte[] buffer = new byte[contentLength];
java.io.InputStream inputStream = request.getInputStream();
inputStream.read(buffer);
String content = new String(buffer);
out.println(content.length());
out.println(content);
%>It displayed:
image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */*
http://127.0.0.1:8080/test/
zh-cn
application/x-www-form-urlencoded
gzip, deflate
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
127.0.0.1:8080
20
Keep-Alive
no-cache
JSESSIONID=51895EB733CE767A5176BD62111221EA
20
I use the "out.println(content.length());" to check the length of the content,it displayed 20.
But when i try displaying the content,it display nothing. Why?
I think that javax.servlet.http.HttpServletRequest is an object that warp the HTTP1.1 request message (including the header and the message entity).
So i want to display it on the JSP page.
In some book, it told me this will display message like:
-----------------------------7d137a26e18
Content-Disposition: form-data; name="name"
123
-----------------------------7d137a26e18
Content-Disposition: form-data; name="introduce"
I am...
I am..
-----------------------------7d137a26e18
Content-Disposition: form-data; name="file3"; filename="C:\Autoexec.bat"
Content-Type: application/octet-stream
But why it dosn't display anything?
Why the "content" length is 20 but it didn't display anythingMost probably the JSPServlet has already read the parameters from the input stream for itself.
Try it from a servlet:
package servlet;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class InputStreamTest extends HttpServlet {
protected void doGet(HttpServletRequest arg0, HttpServletResponse arg1) throws ServletException, IOException {
doPost(arg0, arg1);
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
PrintWriter out = response.getWriter();
java.util.Enumeration headerNames = request.getHeaderNames();
while (headerNames.hasMoreElements()) {
out.println(request.getHeader((String) headerNames.nextElement()) + "<br/>");
int contentLength = request.getContentLength();
out.println("<hr>");
out.println("Content length = " +contentLength);
if (contentLength > 0) {
byte[] buffer = new byte[contentLength];
java.io.InputStream inputStream = request.getInputStream();
inputStream.read(buffer);
String content = new String(buffer);
out.println(content.length());
out.println(content);
}Cheers,
evnafets
Similar Messages
-
[SOLVED]"The requested URL returned error: 407" while using pacman
pacman worked fine until now. When I try to upgrade with
pacman -Syu
it returns what is written below even though internet works fine without problems(I'm posting from the same system using firefox)
How can I get pacman working again?
:: Synchronizing package databases...
error: failed retrieving file 'core.db' from mirror.cse.iitk.ac.in : The requested URL returned error: 403
error: failed retrieving file 'core.db' from mirror.cse.iitk.ac.in : The requested URL returned error: 403
error: failed retrieving file 'core.db' from [url=ftp://ftp.jaist.ac.jp]ftp.jaist.ac.jp[/url] : The requested URL returned error: 407
error: failed retrieving file 'core.db' from [url=ftp://ftp.jaist.ac.jp]ftp.jaist.ac.jp[/url] : The requested URL returned error: 407
error: failed retrieving file 'core.db' from mirror.yongbok.net : The requested URL returned error: 407
error: failed retrieving file 'core.db' from mirror.yongbok.net : The requested URL returned error: 407
error: failed to update core (download library error)
error: failed retrieving file 'extra.db' from mirror.cse.iitk.ac.in : The requested URL returned error: 403
error: failed retrieving file 'extra.db' from mirror.cse.iitk.ac.in : The requested URL returned error: 403
error: failed retrieving file 'extra.db' from [url=ftp://ftp.jaist.ac.jp]ftp.jaist.ac.jp[/url] : The requested URL returned error: 407
error: failed retrieving file 'extra.db' from [url=ftp://ftp.jaist.ac.jp]ftp.jaist.ac.jp[/url] : The requested URL returned error: 407
error: failed retrieving file 'extra.db' from mirror.yongbok.net : The requested URL returned error: 407
error: failed retrieving file 'extra.db' from mirror.yongbok.net : The requested URL returned error: 407
error: failed to update extra (download library error)
error: failed retrieving file 'community.db' from mirror.cse.iitk.ac.in : The requested URL returned error: 403
error: failed retrieving file 'community.db' from mirror.cse.iitk.ac.in : The requested URL returned error: 403
error: failed retrieving file 'community.db' from [url=ftp://ftp.jaist.ac.jp]ftp.jaist.ac.jp[/url] : The requested URL returned error: 407
error: failed retrieving file 'community.db' from [url=ftp://ftp.jaist.ac.jp]ftp.jaist.ac.jp[/url] : The requested URL returned error: 407
error: failed retrieving file 'community.db' from mirror.yongbok.net : The requested URL returned error: 407
error: failed retrieving file 'community.db' from mirror.yongbok.net : The requested URL returned error: 407
error: failed to update community (download library error)
error: failed retrieving file 'archlinuxfr.db' from repo.archlinux.fr : The requested URL returned error: 407
error: failed to update archlinuxfr (download library error)
error: failed to synchronize any databases
error: failed to init transaction (download library error)
Last edited by ebshankar (2012-02-19 08:08:59)hokasch wrote:
What did you update? Are you using a proxy?
You can try pacman -Syy --debug which will show the actual url it tries to access. When posting console output, please use the code tags.
I tried to upgrade the system.
I don't use a proxy. My isp uses authentication from the browser, when the browser is authenticated with the username and password, the whole system will be connected to the internet as long as the authentication page is open.
Here is the output of "pacman -Syy --debug":
debug: parseconfig: options pass
debug: config: attempting to read file /etc/pacman.conf
debug: config: finish section '(null)'
debug: config: new section 'options'
debug: config: HoldPkg: pacman
debug: config: HoldPkg: glibc
debug: config: SyncFirst: pacman
debug: config: arch: x86_64
debug: config: SigLevel: Never
debug: config: finish section 'options'
debug: config: new section 'core'
debug: config file /etc/pacman.conf, line 81: including /etc/pacman.d/mirrorlist
debug: config: attempting to read file /etc/pacman.d/mirrorlist
debug: config: finished parsing /etc/pacman.d/mirrorlist
debug: config: finish section 'core'
debug: config: new section 'extra'
debug: config file /etc/pacman.conf, line 85: including /etc/pacman.d/mirrorlist
debug: config: attempting to read file /etc/pacman.d/mirrorlist
debug: config: finished parsing /etc/pacman.d/mirrorlist
debug: config: finish section 'extra'
debug: config: new section 'community'
debug: config file /etc/pacman.conf, line 93: including /etc/pacman.d/mirrorlist
debug: config: attempting to read file /etc/pacman.d/mirrorlist
debug: config: finished parsing /etc/pacman.d/mirrorlist
debug: config: finish section 'community'
debug: config: new section 'archlinuxfr'
debug: config: finish section 'archlinuxfr'
debug: config: finished parsing /etc/pacman.conf
debug: setup_libalpm called
debug: option 'logfile' = /var/log/pacman.log
debug: option 'gpgdir' = /etc/pacman.d/gnupg/
debug: option 'cachedir' = /var/cache/pacman/pkg/
debug: parseconfig: repo pass
debug: config: attempting to read file /etc/pacman.conf
debug: config: finish section '(null)'
debug: config: new section 'options'
debug: config: finish section 'options'
debug: config: new section 'core'
debug: config file /etc/pacman.conf, line 81: including /etc/pacman.d/mirrorlist
debug: config: attempting to read file /etc/pacman.d/mirrorlist
debug: config: finished parsing /etc/pacman.d/mirrorlist
debug: config: finish section 'core'
debug: registering sync database 'core'
debug: database path for tree core set to /var/lib/pacman/sync/core.db
debug: adding new server URL to database 'core': ftp://mirror.cse.iitk.ac.in/archlinux/core/os/x86_64
debug: adding new server URL to database 'core': http://mirror.cse.iitk.ac.in/archlinux/core/os/x86_64
debug: adding new server URL to database 'core': ftp://ftp.jaist.ac.jp/pub/Linux/ArchLinux/core/os/x86_64
debug: adding new server URL to database 'core': http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/core/os/x86_64
debug: adding new server URL to database 'core': ftp://mirror.yongbok.net/archlinux/core/os/x86_64
debug: adding new server URL to database 'core': http://mirror.yongbok.net/archlinux/core/os/x86_64
debug: config: new section 'extra'
debug: config file /etc/pacman.conf, line 85: including /etc/pacman.d/mirrorlist
debug: config: attempting to read file /etc/pacman.d/mirrorlist
debug: config: finished parsing /etc/pacman.d/mirrorlist
debug: config: finish section 'extra'
debug: registering sync database 'extra'
debug: database path for tree extra set to /var/lib/pacman/sync/extra.db
debug: adding new server URL to database 'extra': ftp://mirror.cse.iitk.ac.in/archlinux/extra/os/x86_64
debug: adding new server URL to database 'extra': http://mirror.cse.iitk.ac.in/archlinux/extra/os/x86_64
debug: adding new server URL to database 'extra': ftp://ftp.jaist.ac.jp/pub/Linux/ArchLinux/extra/os/x86_64
debug: adding new server URL to database 'extra': http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/extra/os/x86_64
debug: adding new server URL to database 'extra': ftp://mirror.yongbok.net/archlinux/extra/os/x86_64
debug: adding new server URL to database 'extra': http://mirror.yongbok.net/archlinux/extra/os/x86_64
debug: config: new section 'community'
debug: config file /etc/pacman.conf, line 93: including /etc/pacman.d/mirrorlist
debug: config: attempting to read file /etc/pacman.d/mirrorlist
debug: config: finished parsing /etc/pacman.d/mirrorlist
debug: config: finish section 'community'
debug: registering sync database 'community'
debug: database path for tree community set to /var/lib/pacman/sync/community.db
debug: adding new server URL to database 'community': ftp://mirror.cse.iitk.ac.in/archlinux/community/os/x86_64
debug: adding new server URL to database 'community': http://mirror.cse.iitk.ac.in/archlinux/community/os/x86_64
debug: adding new server URL to database 'community': ftp://ftp.jaist.ac.jp/pub/Linux/ArchLinux/community/os/x86_64
debug: adding new server URL to database 'community': http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/community/os/x86_64
debug: adding new server URL to database 'community': ftp://mirror.yongbok.net/archlinux/community/os/x86_64
debug: adding new server URL to database 'community': http://mirror.yongbok.net/archlinux/community/os/x86_64
debug: config: new section 'archlinuxfr'
debug: config: finish section 'archlinuxfr'
debug: registering sync database 'archlinuxfr'
debug: database path for tree archlinuxfr set to /var/lib/pacman/sync/archlinuxfr.db
debug: adding new server URL to database 'archlinuxfr': http://repo.archlinux.fr/x86_64
debug: config: finished parsing /etc/pacman.conf
:: Synchronizing package databases...
debug: url: ftp://mirror.cse.iitk.ac.in/archlinux/core/os/x86_64/core.db
debug: maxsize: 26214400
debug: opened tempfile for download: /var/lib/pacman/sync/core.db.part (wb)
debug: curl returned error 22 from transfer
error: failed retrieving file 'core.db' from mirror.cse.iitk.ac.in : The requested URL returned error: 403
debug: url: http://mirror.cse.iitk.ac.in/archlinux/core/os/x86_64/core.db
debug: maxsize: 26214400
debug: opened tempfile for download: /var/lib/pacman/sync/core.db.part (wb)
debug: curl returned error 22 from transfer
error: failed retrieving file 'core.db' from mirror.cse.iitk.ac.in : The requested URL returned error: 403
debug: url: ftp://ftp.jaist.ac.jp/pub/Linux/ArchLinux/core/os/x86_64/core.db
debug: maxsize: 26214400
debug: opened tempfile for download: /var/lib/pacman/sync/core.db.part (wb)
debug: curl returned error 22 from transfer
error: failed retrieving file 'core.db' from ftp.jaist.ac.jp : The requested URL returned error: 407
debug: url: http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/core/os/x86_64/core.db
debug: maxsize: 26214400
debug: opened tempfile for download: /var/lib/pacman/sync/core.db.part (wb)
debug: curl returned error 22 from transfer
error: failed retrieving file 'core.db' from ftp.jaist.ac.jp : The requested URL returned error: 407
debug: url: ftp://mirror.yongbok.net/archlinux/core/os/x86_64/core.db
debug: maxsize: 26214400
debug: opened tempfile for download: /var/lib/pacman/sync/core.db.part (wb)
debug: curl returned error 22 from transfer
error: failed retrieving file 'core.db' from mirror.yongbok.net : The requested URL returned error: 407
debug: url: http://mirror.yongbok.net/archlinux/core/os/x86_64/core.db
debug: maxsize: 26214400
debug: opened tempfile for download: /var/lib/pacman/sync/core.db.part (wb)
debug: curl returned error 22 from transfer
error: failed retrieving file 'core.db' from mirror.yongbok.net : The requested URL returned error: 407
debug: failed to sync db: download library error
error: failed to update core (download library error)
debug: url: ftp://mirror.cse.iitk.ac.in/archlinux/extra/os/x86_64/extra.db
debug: maxsize: 26214400
debug: opened tempfile for download: /var/lib/pacman/sync/extra.db.part (wb)
debug: curl returned error 22 from transfer
error: failed retrieving file 'extra.db' from mirror.cse.iitk.ac.in : The requested URL returned error: 403
debug: url: http://mirror.cse.iitk.ac.in/archlinux/extra/os/x86_64/extra.db
debug: maxsize: 26214400
debug: opened tempfile for download: /var/lib/pacman/sync/extra.db.part (wb)
debug: curl returned error 22 from transfer
error: failed retrieving file 'extra.db' from mirror.cse.iitk.ac.in : The requested URL returned error: 403
debug: url: ftp://ftp.jaist.ac.jp/pub/Linux/ArchLinux/extra/os/x86_64/extra.db
debug: maxsize: 26214400
debug: opened tempfile for download: /var/lib/pacman/sync/extra.db.part (wb)
debug: curl returned error 22 from transfer
error: failed retrieving file 'extra.db' from ftp.jaist.ac.jp : The requested URL returned error: 407
debug: url: http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/extra/os/x86_64/extra.db
debug: maxsize: 26214400
debug: opened tempfile for download: /var/lib/pacman/sync/extra.db.part (wb)
debug: curl returned error 22 from transfer
error: failed retrieving file 'extra.db' from ftp.jaist.ac.jp : The requested URL returned error: 407
debug: url: ftp://mirror.yongbok.net/archlinux/extra/os/x86_64/extra.db
debug: maxsize: 26214400
debug: opened tempfile for download: /var/lib/pacman/sync/extra.db.part (wb)
debug: curl returned error 22 from transfer
error: failed retrieving file 'extra.db' from mirror.yongbok.net : The requested URL returned error: 407
debug: url: http://mirror.yongbok.net/archlinux/extra/os/x86_64/extra.db
debug: maxsize: 26214400
debug: opened tempfile for download: /var/lib/pacman/sync/extra.db.part (wb)
debug: curl returned error 22 from transfer
error: failed retrieving file 'extra.db' from mirror.yongbok.net : The requested URL returned error: 407
debug: failed to sync db: download library error
error: failed to update extra (download library error)
debug: url: ftp://mirror.cse.iitk.ac.in/archlinux/community/os/x86_64/community.db
debug: maxsize: 26214400
debug: opened tempfile for download: /var/lib/pacman/sync/community.db.part (wb)
debug: curl returned error 22 from transfer
error: failed retrieving file 'community.db' from mirror.cse.iitk.ac.in : The requested URL returned error: 403
debug: url: http://mirror.cse.iitk.ac.in/archlinux/community/os/x86_64/community.db
debug: maxsize: 26214400
debug: opened tempfile for download: /var/lib/pacman/sync/community.db.part (wb)
debug: curl returned error 22 from transfer
error: failed retrieving file 'community.db' from mirror.cse.iitk.ac.in : The requested URL returned error: 403
debug: url: ftp://ftp.jaist.ac.jp/pub/Linux/ArchLinux/community/os/x86_64/community.db
debug: maxsize: 26214400
debug: opened tempfile for download: /var/lib/pacman/sync/community.db.part (wb)
debug: curl returned error 22 from transfer
error: failed retrieving file 'community.db' from ftp.jaist.ac.jp : The requested URL returned error: 407
debug: url: http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/community/os/x86_64/community.db
debug: maxsize: 26214400
debug: opened tempfile for download: /var/lib/pacman/sync/community.db.part (wb)
debug: curl returned error 22 from transfer
error: failed retrieving file 'community.db' from ftp.jaist.ac.jp : The requested URL returned error: 407
debug: url: ftp://mirror.yongbok.net/archlinux/community/os/x86_64/community.db
debug: maxsize: 26214400
debug: opened tempfile for download: /var/lib/pacman/sync/community.db.part (wb)
debug: curl returned error 22 from transfer
error: failed retrieving file 'community.db' from mirror.yongbok.net : The requested URL returned error: 407
debug: url: http://mirror.yongbok.net/archlinux/community/os/x86_64/community.db
debug: maxsize: 26214400
debug: opened tempfile for download: /var/lib/pacman/sync/community.db.part (wb)
debug: curl returned error 22 from transfer
error: failed retrieving file 'community.db' from mirror.yongbok.net : The requested URL returned error: 407
debug: failed to sync db: download library error
error: failed to update community (download library error)
debug: url: http://repo.archlinux.fr/x86_64/archlinuxfr.db
debug: maxsize: 26214400
debug: opened tempfile for download: /var/lib/pacman/sync/archlinuxfr.db.part (wb)
debug: curl returned error 22 from transfer
error: failed retrieving file 'archlinuxfr.db' from repo.archlinux.fr : The requested URL returned error: 407
debug: failed to sync db: download library error
error: failed to update archlinuxfr (download library error)
error: failed to synchronize any databases
error: failed to init transaction (download library error)
debug: unregistering database 'local'
debug: unregistering database 'core'
debug: unregistering database 'extra'
debug: unregistering database 'community'
debug: unregistering database 'archlinuxfr'
Last edited by ebshankar (2012-02-18 14:18:30) -
[SOLVED] The requested URL returned error: 403 Forbidden
Hi guys
(sory for my english
I have a problem with packer -Syu
the output:
Proceed with installation? [Y/n] y
Edit openbox-menu PKGBUILD with $EDITOR? [Y/n] n
==> Making package: openbox-menu 0.3.6.8-1 (Tue Feb 12 15:52:19 UTC 2013)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving Sources...
-> Downloading openbox-menu-0.3.6.8.tar.bz2...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (22) The requested URL returned error: 403 Forbidden
==> ERROR: Failure while downloading openbox-menu-0.3.6.8.tar.bz2
Aborting...
The build failed.
for full detials:
http://pastebin.com/Acq0uY78
iam try another mirrors... but i get same problen
i install tor (for use tsocks or torify) but its dont work in my country
HELP ME PLZ
thanks
Last edited by tareef (2013-02-14 19:39:07)It's http://mimarchlinux.googlecode.com/file … .8.tar.bz2, just as the PKGBUILD says.
Edit:
If something is broken, you should ask on the AUR page for the maintainer to fix the PKGBUILD https://aur.archlinux.org/packages/openbox-menu/, but the PKGBUILD worked for me.
tareef wrote:
for full detials:
http://pastebin.com/Acq0uY78
iam try another mirrors... but i get same problen
i install tor (for use tsocks or torify) but its dont work in my country
openbox-menu is from the AUR and not from the repos, so changing mirrors won't do anything here. You might want to read on what AUR is and deal with the issues with the signatures first.
Last edited by karol (2013-02-13 00:10:04) -
Hello
I'm with you old client I've got some observations
When you request from your Website demand is refused I would like to inquire why the request is rejected
Please refer my account and make sure rejected previous applications
Thank you very muchCheck the Ethernet connection to the AirPort Express. Make sure that the Ethernet connection from the Comcast modem is connected to the WAN port on the back of the AirPort Express. The WAN port is the one with the circle of dots shown over the port.
It sounds like you are connected to the Ethernet LAN port. -
Uln-yum-mirror [Errno 14] PYCURL ERROR 22 - The requested URL returned error: 416
Server is running Oracle Linux 6.5 and can receive updates from ULN without issue, I could easily upgrade the local servers version of Bash. The problem I am having is that the server is the local yum server however it is not downloading updates when I run /usr/bin/uln-yum-mirror I am receiving the errors below
[root@cr-svc-orayum1 yum]# cat /etc/oracle-release
Oracle Linux Server release 6.5
[root@cr-svc-orayum1 yum]# yum repolist
Loaded plugins: refresh-packagekit, rhnplugin, security
This system is receiving updates from ULN.
ol6_x86_64_UEKR3_latest/primary | 8.5 MB 00:21
ol6_x86_64_UEKR3_latest 234/234
ol6_x86_64_latest/primary | 41 MB 01:46
ol6_x86_64_latest 26159/26159
repo id repo name status
ol6_x86_64_UEKR3_latest Unbreakable Enterprise Kernel Release 3 for Oracle Linux 6 (x86_64) - Latest 234
ol6_x86_64_latest Oracle Linux 6 Latest (x86_64) 26,159
repolist: 26,393
[root@cr-svc-orayum1 yum]# yum clean all
Loaded plugins: refresh-packagekit, rhnplugin, security
Cleaning repos: ol5_x86_64_UEK_base ol5_x86_64_ksplice ol5_x86_64_latest ol6_x86_64_UEKR3_latest ol6_x86_64_latest
Cleaning up Everything
[root@cr-svc-orayum1 yum]#
[root@cr-svc-orayum1 yum]# /usr/bin/uln-yum-mirror
## BEGIN PROCESSING ol5_x86_64_ksplice ##
Channel Dir: /var/www/html/yum/OracleLinux/OL5/ksplice/x86_64
Loaded plugins: refresh-packagekit, rhnplugin
This system is receiving updates from ULN.
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete
Wrote: /var/www/html/yum/OracleLinux/OL5/ksplice/x86_64/repodata/updateinfo.xml.gz
type = updateinfo
location = repodata/updateinfo.xml.gz
checksum = bd8daef04c28ee5907c0482c5a55e5fdb2c56fae
timestamp = 1412066205.18
open-checksum = cd80d41782f6770822485ade46f1a8bf75cfa20b
Wrote: /var/www/html/yum/OracleLinux/OL5/ksplice/x86_64/repodata/repomd.xml
## END PROCESSING ol5_x86_64_ksplice ##
## BEGIN PROCESSING ol5_x86_64_latest ##
Channel Dir: /var/www/html/yum/OracleLinux/OL5/latest/x86_64
Loaded plugins: refresh-packagekit, rhnplugin
This system is receiving updates from ULN.
Could not retrieve package alsa-lib-devel-1.0.17-1.el5.i386. Error was failed to retrieve getPackage/alsa-lib-devel-1.0.17-1.el5.i386.rpm from ol5_x86_64_latest
error was [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 416 Requested Range Not Satisfiable"
Could not retrieve package alsa-lib-devel-1.0.17-1.el5.x86_64. Error was failed to retrieve getPackage/alsa-lib-devel-1.0.17-1.el5.x86_64.rpm from ol5_x86_64_latest
error was [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 416 Requested Range Not Satisfiable"
Could not retrieve package alsa-utils-1.0.17-7.el5.x86_64. Error was failed to retrieve getPackage/alsa-utils-1.0.17-7.el5.x86_64.rpm from ol5_x86_64_latest
error was [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 416 Requested Range Not Satisfiable"
Could not retrieve package 5:am-utils-6.1.5-9.el5_10.x86_64. Error was failed to retrieve getPackage/am-utils-6.1.5-9.el5_10.x86_64.rpm from ol5_x86_64_latest
error was [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 416 Requested Range Not Satisfiable"
Could not retrieve package amanda-devel-2.5.0p2-9.el5.i386. Error was failed to retrieve getPackage/amanda-devel-2.5.0p2-9.el5.i386.rpm from ol5_x86_64_latest
error was [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 416 Requested Range Not Satisfiable"
Could not retrieve package amanda-server-2.5.0p2-9.el5.x86_64. Error was failed to retrieve getPackage/amanda-server-2.5.0p2-9.el5.x86_64.rpm from ol5_x86_64_latestFirst, you need to upgrade to the latest version of uln-yum-mirror to avoid these errors in future. The latest version has mitigation tools to remove RPMs that fail GPG checking.
In this instance, you need to manually delete the RPMs that pyCURL can't download. Once you delete all the RPMs, the next run of uln-yum-mirror will download them fresh and recreate the yum metadata locally. -
Can someone else try to compile this and see why the program is returning..
Can someone else try to compile this and see why the program is returning "false" when I try to delete the files on exit (at bottom of code)... I have the source code uploaded to the web as well as my 2 text test files inside a zip file(they need to be unzipped so you can try to test the program) and .class file... the program works the way i want it to, but i just can't seem to delete the 3 temporary files i use... why??? why does it return false???
Thanks in advance,
Disco Hristo
http://www.holytrinity-holycross.org/DiscoHristo/Assemble.java
http://www.holytrinity-holycross.org/DiscoHristo/Assemble.class
http://www.holytrinity-holycross.org/DiscoHristo/tests.zip
* Assemble.java 1.0 02/06/22
* @author Disco Hristo
* @version 1.0
import java.io.*;
import java.lang.*;
import java.util.*;
public class Assemble
public static void main(String args[]) throws IOException
if (args.length > 0) // Checks to see if there are any arguments
printArgumentInfo ();
else // if no arguments run the program
getInput ();
printToFile ();
deleteFiles ();
public static void getInput () throws IOException
// Gets the input and then send it to 3 files according to Tags
File head = new File ("head.chris");
PrintStream headStream = new PrintStream (new FileOutputStream (head));
File body = new File ("body.chris");
PrintStream bodyStream = new PrintStream (new FileOutputStream (body));
File foot = new File ("foot.chris");
PrintStream footStream = new PrintStream (new FileOutputStream (foot));
String input; // String used to store input
File d = new File(".");
String files[] = d.list();
for (int n=0; n!=files.length; n++)
if (files[n].endsWith(".txt") == true)
String fileName = files[n];
BufferedReader in = new BufferedReader (new FileReader(fileName));
while (true)
input = in.readLine();
if (input != null)
input = input.trim();
if (input == null) // if no more input
break;
else if ( (input.compareTo("<HEAD>")) == 0) // if start of <HEAD> text
do
input = in.readLine();
if (input != null)
input = input.trim();
if ( ((input.compareTo("<BODY>")) == 0) ||
((input.compareTo("<FOOT>")) == 0) ||
((input.compareTo("</BODY>")) == 0) ||
((input.compareTo("</FOOT>")) == 0) ||
((input.compareTo("<HEAD>")) == 0))
//checks to see if tags in input are in correct order
System.out.println("Input Is Incorrectly Formatted - Tag Error");
System.out.println("Close your <HEAD> tag before starting another tag.");
System.exit(1); //exit program without printing data
if ( (input.compareTo("</HEAD>")) != 0) //if not end of tag
headStream.println(input); //print to text file
while ( (input.compareTo("</HEAD>")) != 0);
else if ( (input.compareTo("<BODY>")) == 0) // if start of <BODY> text
do
input = in.readLine();
if (input != null)
input = input.trim();
if ( ((input.compareTo("<HEAD>")) == 0) ||
((input.compareTo("<FOOT>")) == 0) ||
((input.compareTo("</HEAD>")) == 0) ||
((input.compareTo("</FOOT>")) == 0) ||
((input.compareTo("<BODY>")) == 0))
//checks to see if tags in input are in correct order
System.out.println("Input Is Incorrectly Formatted - Tag Error");
System.out.println("Close your <BODY> tag before starting another tag.");
System.exit(1); //exit program without printing data
if ( (input.compareTo("</BODY>")) != 0) //if not end of tag
bodyStream.println(input); //print to text file
while ( (input.compareTo("</BODY>")) != 0);
else if ( (input.compareTo("<FOOT>")) == 0) // if start of <FOOT> text
do
input = in.readLine();
if (input != null)
input = input.trim();
if ( ((input.compareTo("<BODY>")) == 0) ||
((input.compareTo("<HEAD>")) == 0) ||
((input.compareTo("</BODY>")) == 0) ||
((input.compareTo("</HEAD>")) == 0) ||
((input.compareTo("<FOOT>")) == 0))
//checks to see if tags in input are in correct order
System.out.println("Input Is Incorrectly Formatted - Tag Error");
System.out.println("Close your <FOOT> tag before starting another tag.");
System.exit(1); //exit program without printing data
if ( (input.compareTo("</FOOT>")) != 0) //if not end of tag
footStream.println(input); //print to text file
while ( (input.compareTo("</FOOT>")) != 0);
else
break;
public static void printToFile () throws IOException
// Prints the text from head.txt, body.txt, and foot.txt to the output.log
File head = new File ("head.chris");
FileReader headReader = new FileReader(head);
BufferedReader inHead = new BufferedReader(headReader);
File body = new File ("body.chris");
FileReader bodyReader = new FileReader(body);
BufferedReader inBody = new BufferedReader(bodyReader);
File foot = new File ("foot.chris");
FileReader footReader = new FileReader(foot);
BufferedReader inFoot = new BufferedReader(footReader);
PrintStream outputStream = new PrintStream (new FileOutputStream (new File("output.log")));
String output; //string used to store output
while (true)
output = inHead.readLine();
if (output == null) //if no more text to get from file
break;
else
outputStream.println(output); // print to output.log
while (true)
output = inBody.readLine();
if (output == null)// if no more text to get from file
break;
else
outputStream.println(output); // print to output.log
while (true)
output = inFoot.readLine();
if (output == null) //if no more text to get from file
break;
else
outputStream.println(output); // print to output.log
//Close up the files
inHead.close ();
inBody.close ();
inFoot.close ();
outputStream.close ();
public static void printArgumentInfo () // Prints argument info to screen
System.out.println("");
System.out.println("Disco Hristo");
System.out.println("");
System.out.println("Assemble.class is a small program that");
System.out.println("takes in as input a body of text and then");
System.out.println("outputs the text in an order according to");
System.out.println("the tags that are placed in the input.");
public static void deleteFiles ()
File deleteHead = new File ("head.chris");
File deleteBody = new File ("body.chris");
File deleteFoot = new File ("foot.chris");
deleteHead.deleteOnExit();
deleteBody.deleteOnExit();
deleteFoot.deleteOnExit();
}I tired your program, it still gives false for files deleted. I tool the same functions you used in your program and ran it. The files get deleted. Tried this :
<pre>
import java.io.*;
import java.lang.*;
import java.util.*;
public class FileTest {
public static void main(String args[]) {
FileTest f = new FileTest();
try {
f.createFile();
f.deleteFile();
} catch(IOException ioe){
System.out.println(ioe.getMessage());
public void createFile() throws IOException {
System.out.println("In create file method...");
File test = new File("test1.txt");
File tst = new File("text2.txt");
PrintStream testStream = new PrintStream (new FileOutputStream (test));
PrintStream tstStream = new PrintStream (new FileOutputStream (tst));
testStream.println("this is a test to delete a file");
tstStream.println("this is the second file created");
testStream.close();
tstStream.close();
public void deleteFile() throws IOException {
File test = new File("test1.txt");
File tst = new File("text2.txt");
System.out.println(test.delete());
System.out.println(tst.delete());
</pre>
Also check the starting and closing braces for your if..else blocks.
-Siva -
Why the alert massage return twice on the screen?
Hi, everyone
I got this script:
var
mySelected = Number( app.extractLabel("mDialog") ),
myDialog = app.dialogs.add({name:"Colse files save \"Yes\" or \"No\"",canCancel:true});
with(myDialog){
with(dialogColumns.add()){
with(dialogRows.add()){
var
mySelection = dropdowns.add({stringList:["01 Yes", "02 No", "03 Reverse"], selectedIndex: 0});
if (myDialog.show() == true)
main();
myDialog.destroy();
function main(){
colse_file();
function colse_file(){
if (mySelection.selectedIndex == 0){
var docs = app.documents;
for (var i = docs.length-1; i >= 0; i--) {
docs[i].close(SaveOptions.YES);
alert("Done.\rAll files are saved.");
if (mySelection.selectedIndex == 1){
var docs = app.documents;
for (var i = docs.length-1; i >= 0; i--) {
docs[i].close(SaveOptions.NO);
alert("Done.\rAll files are closed without save.");
if (mySelection.selectedIndex == 2){
var docs = app.documents;
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.neverInteract;
app.documents.everyItem().revert();
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
alert("Done.\rAll files are reversed.");
Why the alert massage return twice on the screen?
VKHi, Chinna
I changed it into this:
var
mySelected = Number( app.extractLabel("mDialog") ),
myDialog = app.dialogs.add({name:"Colse files save \"Yes\" or \"No\"",canCancel:true});
with(myDialog){
with(dialogColumns.add()){
with(dialogRows.add()){
var
mySelection = dropdowns.add({stringList:["01 Yes", "02 No", "03 Reverse"], selectedIndex: 0});
if (myDialog.show() == true)
main();
myDialog.destroy();
function main(){
colse_file();
function colse_file(){
if (mySelection.selectedIndex == 0){
var docs = app.documents;
for (var i = docs.length-1; i >= 0; i--) {
docs[i].close(SaveOptions.YES);
alert("Done.\rAll files are saved.");
if (mySelection.selectedIndex == 1){
var docs = app.documents;
for (var i = docs.length-1; i >= 0; i--) {
docs[i].close(SaveOptions.NO);
alert("Done.\rAll files are closed without save.");
if (mySelection.selectedIndex == 2){
var docs = app.documents;
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.neverInteract;
app.documents.everyItem().revert();
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
alert("Done.\rAll files are reversed.");
but I still got twice
VK -
How to divide the request.getInputStream()?
I use a form in a web page to update files, the form code is
<form action="/Mywork/servlet/fileupdate1" method="post" enctype="multipart/form-data">
<p>
Please select a file1 to upload: <input type="file" name="foo">
</p>
<p>
Please select a file2 to upload:<input type="file" name="foo1">
</p>
<input type="submit" value="Upload File!">
</form>
and the "fileupdate1" servlet which the "action" in the form tag refers to will get the inputstream by
"ServletInputStream servIn = request.getInputStream();", and create new OutputFileStream in the disk. But
new files which the servlet stored always have some additional codes "
-----------------------------7d419320202be
Content-Disposition: form-data; name="foo"; filename="H:\Documents and
Settings\administrator\desktop\ee.java"
Content-Type: application/octet-stream
If I updating two files, each file will has these kinds of codes and the two files only have one inputstream. I don't
how to remove these additional codes and how to divide the stream into pieces according to the updated-file-size.
I don't know wether I say it clearly?And
does anyone know the reasons and can help me?
Thank you very much.Well, if you know the format, you'd know that the file data starts after the first blank line (\r\n\r\n).
But why don't you just use Jakarta Commons File Upload or some other existing free package to handle multipart forms and save yourself the trouble. -
Any idea why the applets starts but nothing works?
I am 1 month old. Here is small training program that I am trying. Any idea why the applet is running but nothing works?
thanks
package javaapplication1;
import java.awt.Container;
import java.awt.FlowLayout;
import java.awt.event.*;
import javax.swing.*;
public class MoneyCollect extends JApplet implements ActionListener {
private JLabel promt;
private JTextField input;
private int total;
public void main(String [] args){
Container c = getContentPane();
c.setLayout( new FlowLayout() );
promt = new JLabel ("Enter number of hours");
input = new JTextField (10);
input.addActionListener(this);
c.add(promt);
c.add(input);
public int calculateCharges(int hrs){
if ( (hrs>=0) && (hrs<=3) && (hrs != 24) ){
total = 2*hrs;
if((hrs>=3)&& (hrs<24) && (hrs != 24)){
total = (int) (((hrs - 3) * 0.50) + 6);
if (hrs == 24){
total = 10;
return total;
public void actionPerformed(ActionEvent e) {
int hrs = Integer.parseInt(e.getActionCommand());
showStatus ("You have to pay:"+calculateCharges(hrs));
}...because changing this:
public class MoneyCollect extends JFrameto this:
public class MoneyCollect extends JAppletdoes not create an applet. Get a beginning java book and start reading it. I recommend "Java2: A Beginner's Guide".
Or, you can read the following tutorial to learn why your program is not an applet:
[http://java.sun.com/docs/books/tutorial/deployment/applet/getStarted.html] -
Who knows: How to divide the request.getInputStream()?
I use a form in a web page to update files, the form code is
<form action="/Mywork/servlet/fileupdate1" method="post" enctype="multipart/form-data">
<p>
Please select a file1 to upload: <input type="file" name="foo">
</p>
<p>
Please select a file2 to upload:<input type="file" name="foo1">
</p>
<input type="submit" value="Upload File!">
</form>
and the "fileupdate1" servlet which the "action" in the form tag refers to will get the inputstream by
"ServletInputStream servIn = request.getInputStream();", and create new OutputFileStream in the disk. But
new files which the servlet stored always have some additional codes "
-----------------------------7d419320202be
Content-Disposition: form-data; name="foo"; filename="H:\Documents and
Settings\administrator\desktop\ee.java"
Content-Type: application/octet-stream
If I updating two files, each file will has these kinds of codes and the two files only have one inputstream. I don't
how to remove these additional codes and how to divide the stream into pieces according to the updated-file-size.
I don't know wether I say it clearly?And
does anyone know the reasons and can help me?
Thank you very much.Use something like Jakarta Commons FileUpload to process the multipart/form-data request:
http://jakarta.apache.org/commons/fileupload/ -
Why the request to download Pages?
If I open on my iMac or MacBookPro in iCloud the iWork option Pages I get the message to download Pages for IOS.
I have Pages for IOS already installed and used for some time.
I have Lion and the latest version of Pages on my computers.
So, why the message?
Goos Bakker.I am facing the same issue. Did you resolve it?
-
Hi.
I discovered my Firefox v26 was SOMETIMES trying to send multiple requests on port 7070 (ukrainian ip-address) independently on what websites were opened at the moment.
The problem remains after v27 update.
I have an addon "live http headers" installed.
As I manually allow the request by firewall nothing appears in the headers window.
Does my firefox seem to be modified with adware/spyware?Have you tried Opening your Firefox in Safe Mode
[[Troubleshoot Firefox issues using Safe Mode]]
please report back to us -
Putting variable in regexp_substr pattern returns nothing
I'm trying to create a function to simply extract positioned text from a string, ie I want the text in position two from string X with a pattern of ' - '. I want to create a function so it is simpler for the developers but regexp_substr doesn't seem to like it.
So I want a function like below to be executed, select text_extractor('ABC - DEF - HIJ',' - ',2) from dual; which would return DEF;
But regexp_substr doesn't like matching on ' - '. If I tell it to give me position 2, I get '-', and if I tell it position 3, I get DEF. It seems to work fine if the '-' is substritued with a ':'
ie
select regexp_substr('ABC - DEF - HIJ','[^ - ]+',1,2) from dual;
results
select regexp_substr('ABC - DEF - HIJ','[^ - ]+',1,3) from dual;
results
DEF
select regexp_substr('ABC : DEF : HIJ','[^ : ]+',1,2) from dual;
results
DEF
I would further like to make a function to wrap it in but it didn't work at all.
The following examples return nothing.
create or replace function text_extractor (p_text varchar2, p_delimiter varchar2, p_position number)
return varchar2
is
begin
return (regexp_substr(p_text,'^p_delimiter]+', 1,p_position));
end;
I've also tried
create or replace function text_extractor (p_text varchar2, p_delimiter varchar2, p_position number)
return varchar2
is
v_search_expression varchar2(2000);
begin
v_search_expression := '''[^'||p_delimiter||']+''';
return (regexp_substr(p_text,v_search_expression),1,p_position);
end;
But I get nothing. Any ideas?When you do this:
select regexp_substr('ABC - DEF - HIJ','[^ - ]+',1,2) from dual;
results
-Your search string is a set of characters, so you are saying anything that is NOT a space or dash (or space again, but that's redundant). So the first match is ABC, the second match is "-" as that's the second non-space match, so that's why you get that. Probably what you want is to ignore the spaces and use the "-" as your delimiter, then just trim the spaces off after...
SQL> ed
Wrote file afiedt.buf
1* select trim(regexp_substr('ABC - DEF - HIJ','[^-]+',1,2)) from dual
SQL> /
TRI
DEF
SQL> -
Hello Experts,
I have a very strange problem: Every night an ODS update is running. As a selection criteria I have from date: 01.01.2009 - sy-datum.
That works fine. The ODS is very day updated.
BUT: The request from previous day is deleted. In IP there is nothing marked to delete. I have no clue why the request is deleted.
Don't know if relevant in job log:
Log: Program RSDELREQ1; Request REQU_4D3F0GNT5E8FSEIUSOHM2SW75; Status ; Action Start
Log: Program RSDELREQ1; Request REQU_4D3F0GNT5E8FSEIUSOHM2SW75; Status @08@; Action SET STATUS GREEN
Log: Program RSDELREQ1; Request REQU_4D3F0GNT5E8FSEIUSOHM2SW75; Status @08@; Action Finished
Any idea?Hi..........
In the infopackage group.............for that particular Infopackage........in the Infopackage scheduler >> Data target tab.......check whether the indicator Completely delete data target content is selected or not.......
Check this...........
http://help.sap.com/saphelp_nw04/helpdata/en/80/1a65a8e07211d2acb80000e829fbfe/frameset.htm
Regards,
Debjani........ -
Spatial query inside the exists clause return ora-13226
The following does not work:
select b.state, b.county from counties b where exists
(select 's' from states a where a.state = 'New Jersey'
and mdsys.sdo_relate (b.geom, a.geom, 'mask=INSIDE querytype=WINDOW' ) = 'TRUE');
ERROR at line 1:
ORA-13226: interface not supported without a spatial index
ORA-06512: at "MDSYS.MD", line 1723
ORA-06512: at "MDSYS.MDERR", line 8
ORA-06512: at "MDSYS.SDO_3GL", line 302
ORA-06512: at line 1
The following does work:
select b.* from states a,
counties b where a.state = 'New Jersey'
and mdsys.sdo_relate (b.geom, a.geom, 'mask=INSIDE querytype=WINDOW') = 'TRUE';
I found bug 1243095 telling that this is not a bug but a limitation of the spatial operator. It cannot be invoked on a table that is not spatially indexed. In fact, the table is indexed but oracle cannot find the spatial index because table b(counties) is declared outside the EXISTS clause.
In my case, I use object table. I cannot use the workaround specified above because I should use the DISTINCT clause but I cannot define the MAP and ORDER function (this is a general query).
I've found another workaround :
select b.state, b.county from counties b where exists
(select 's' from states a where a.state = 'New Jersey'
and mdsys.sdo_relate (a.geom, b.geom, 'mask=CONTAINS querytype=WINDOW') = 'TRUE');
but sdo_relate still doesn't use the spatial index of table b (even if I specify it explicitely in the operator) and the query is very slow (more than 15 minutes).
Is there a better workaround ?OK but I work in object model.
And if I don't use the EXISTS clause, I must use the distinct clause.(I used the exists because of that)
If I will to retrieve all the country that have at least a state beginning with the C letter, I will wrote :
select c.* from country c, table(c.states) s where s.column_value.name like 'C%';
(It is a simplified request to express the problem)
In this case, I must use the distinct clause to select one occurence of each country objet (one country may contains more than one state beginning with C).
select distinct c.* from country c, table(c.states) s where s.column_value.name like 'C%';
For that, I must define a MAP or ORDER function for EACH type used in the country object.
My first question is : I must retrieve all different country objects. Why the request doesn't use the MAP or ORDER function of the country type to distinct them ? Is there another syntax (or a hint) to express that ?
In this case, it will make an ORA-00932 : incoherent datatype because the type of the nested table column cannot contain map or order method.
Any suggestion ?
Thanks in advance.
Maybe you are looking for
-
Report problem directly in iTunes has been disabled?
I had understood that it was possible to report a problem on a purchase directly from within iTunes, by going to my account, history then selcting the ourchase that had the problem. However the "Report a Problem"link now just boots me off to the Appl
-
How do I import music files from a flash drive to my iTunes library on my laptop
How can I import music files from a flash drive to my iTunes library? I put the flash drive into my laptop, selected " add file to library", selected the songs I wanted from the flash drive, and it looked like they were added as the names show under
-
Hi everyone,,i bought a used iphone 5 with iOs 7.0.3. i want to delete the icloud account and add mine. I have sent an e-mail to the current account being used in my iphone. How can i get rid of this account plzzz help me ou
-
FM HR_INFOTYPE_OPERATION - Cost Assignment
hello, I need to modify an 0014 infotype created by PA30. I use the MF RP_PLANT_DATA_UPDATE_TABLES to create the assob and asshr entries for that infotype, that´s
-
I have PSE9 and a Nikon d5100 Camera. Can't get PSE to accept 5100 raw files.
I have set up to use iphoto to store my psotos and externally edit my files in PSE. Works fine with jpeg files but raw files will not transfer. Get message that PSE will not accept. I think that PSE9 will accept wit an upgrade Camera Raw Plug in 6.4.