Hemali da

Greenhorn
+ Follow
since May 19, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Hemali da

I am getting error While Reading .png file with ImageIO.read(InputStream is).

javax.imageio.IIOException: Error reading PNG image data
at com.sun.imageio.plugins.png.PNGImageReader.readImage(PNGImageReader.java:1291)
at com.sun.imageio.plugins.png.PNGImageReader.read(PNGImageReader.java:1560)
at javax.imageio.ImageIO.read(ImageIO.java:1422)
at javax.imageio.ImageIO.read(ImageIO.java:1326)
at xyz.nativ.mio.workflow.console.servlet.io.download.KeyframeDownloadControllerServlet.doAction(KeyframeDownloadControllerServlet.java:66)
at xyz.nativ.mio.workflow.console.servlet.io.download.DownloadControllerServlet.doGet(DownloadControllerServlet.java:31)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:698)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jbpm.web.JbpmContextFilter.doFilter(JbpmContextFilter.java:83)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at xyz.nativ.mio.workflow.console.filter.Utf8EncodingFixFilter.doFilter(Utf8EncodingFixFilter.java:26)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
at org.jboss.web.tomcat.service.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:97)
at org.jboss.web.tomcat.service.session.JvmRouteValve.invoke(JvmRouteValve.java:84)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.jboss.web.tomcat.service.sso.ClusteredSingleSignOn.invoke(ClusteredSingleSignOn.java:677)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437)
at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:366)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.EOFException: Unexpected end of ZLIB input stream
at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:223)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:141)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
at java.io.DataInputStream.readFully(DataInputStream.java:178)
at com.sun.imageio.plugins.png.PNGImageReader.decodePass(PNGImageReader.java:1075)
at com.sun.imageio.plugins.png.PNGImageReader.decodeImage(PNGImageReader.java:1179)
at com.sun.imageio.plugins.png.PNGImageReader.readImage(PNGImageReader.java:1284)
... 36 more

can any buddy help me with this.
13 years ago
Hi,

I am using hibernate in that i have used from statement for fetching data . the column which i m fetching from database which is having attribute cascade="save-update" so it updates in my database...


can any buddy please help me regarding this.........

it should not update the database but still doing it .
I can't change xml like that way.
13 years ago
My XML file starts with

<?xml version="1.0" encoding="ISO-8859-1"?>

and i have tried it for by passing InputStream but facing same problem.
13 years ago
I XML have file which contains é char when i m streaming this file with File contents loss so my XML file Became in validate.

I have Input Stream avaliable to me

File f = new File("fos.xml");
FileOutputStream fos = new FileOutputStream(f);


InputStreamReader br = new InputStreamReader(returnStr,"UTF-8");
StringBuffer documentContent = new StringBuffer();
int len;
byte[] buf = new byte[1024];
while((len = (returnStr.read(buf)))!= -1){
//documentContent.append(line);
fos.write(buf,0,len);
}

IDocument = IDocumentBuilder.parse(f);

where returnStr is my InputStream

please Help me
13 years ago
It's Google language Translator in which i don't have to make any .property files to convert it to any language
13 years ago
For Web Development Google Is providing API I am talking about it is their any other API available
13 years ago
I know that but is their any really available API. Which can work for me So i don't have to create .properties Files.
13 years ago
Yes I m saying that only Database in terms of Properties files. We have to create .Properties Files for each and every language that thing i want to customize .
13 years ago
As We know Java is providing support for internalization. But in that we have to provide different Language Database which we have to create by our own is their any way where we don't have to create that Language Database. If i write some code and it automatically convert that in Particular language which i want ?If any one knows about it then please help me .


Thank You In Advance



13 years ago
explain it properly what you want their are so many ways to do it.
13 years ago
This is my pac file

function FindProxyForURL(url, host)
{
var returnValue = "DIRECT";

//Show request
//alert("FindProxyForURL url=" + url + " host=" + host);

// Plain host name (including "localhost")
if (isPlainHostName(host))
returnValue = "DIRECT";


// Return value
return returnValue;
}

function hashProxy(address)
{

var n = URLhash2(address) % 2;

if (n < 1)
return "PROXY 192.168.100.6:8080; " +
"PROXY 192.168.100.62:8080";
if (n < 2)
return "PROXY 192.168.100.62:8080; " +
"PROXY 192.168.100.6:8080";
}

function URLhash2(name)
{
var cnt=0;
var dirptr=0;

var str=name.toLowerCase(name);
if ( str.length ==0) {
return cnt;
}

/* skip filename in directory */
for(var i=str.length - 1;i >=0 ; i--) {
if ( str.substring(i,i +1) == '/' ) {
dirptr = i+1 ;
break;
}
}

for(var i=0;i < dirptr; i++) {
var ch= atoi(str.substring(i,i + 1));
cnt = cnt + ch;
}

return cnt ;
}


function atoi(charstring)
{

if ( charstring == "a" ) return 0x61; if ( charstring == "b" ) return 0x62;
if ( charstring == "c" ) return 0x63; if ( charstring == "d" ) return 0x64;
if ( charstring == "e" ) return 0x65; if ( charstring == "f" ) return 0x66;
if ( charstring == "g" ) return 0x67; if ( charstring == "h" ) return 0x68;
if ( charstring == "i" ) return 0x69; if ( charstring == "j" ) return 0x6a;
if ( charstring == "k" ) return 0x6b; if ( charstring == "l" ) return 0x6c;
if ( charstring == "m" ) return 0x6d; if ( charstring == "n" ) return 0x6e;
if ( charstring == "o" ) return 0x6f; if ( charstring == "p" ) return 0x70;
if ( charstring == "q" ) return 0x71; if ( charstring == "r" ) return 0x72;
if ( charstring == "s" ) return 0x73; if ( charstring == "t" ) return 0x74;
if ( charstring == "u" ) return 0x75; if ( charstring == "v" ) return 0x76;
if ( charstring == "w" ) return 0x77; if ( charstring == "x" ) return 0x78;
if ( charstring == "y" ) return 0x79; if ( charstring == "z" ) return 0x7a;
if ( charstring == "0" ) return 0x30; if ( charstring == "1" ) return 0x31;
if ( charstring == "2" ) return 0x32; if ( charstring == "3" ) return 0x33;
if ( charstring == "4" ) return 0x34; if ( charstring == "5" ) return 0x35;
if ( charstring == "6" ) return 0x36; if ( charstring == "7" ) return 0x37;
if ( charstring == "8" ) return 0x38; if ( charstring == "9" ) return 0x39;
if ( charstring == "." ) return 0x2e;
return 0x20;
}



This is my proxy file when it going to come at point isPlainHostName() it's showing me this function is not avaliable so can any budy help me with this.



can any budy tell me how to read .pac file using java.
13 years ago
This is my pac file

function FindProxyForURL(url, host)
{
var returnValue = "DIRECT";

//Show request
//alert("FindProxyForURL url=" + url + " host=" + host);

// Plain host name (including "localhost")
if (isPlainHostName(host))
returnValue = "DIRECT";


// Return value
return returnValue;
}

function hashProxy(address)
{

var n = URLhash2(address) % 2;

if (n < 1)
return "PROXY 192.168.100.6:8080; " +
"PROXY 192.168.100.62:8080";
if (n < 2)
return "PROXY 192.168.100.62:8080; " +
"PROXY 192.168.100.6:8080";
}

function URLhash2(name)
{
var cnt=0;
var dirptr=0;

var str=name.toLowerCase(name);
if ( str.length ==0) {
return cnt;
}

/* skip filename in directory */
for(var i=str.length - 1;i >=0 ; i--) {
if ( str.substring(i,i +1) == '/' ) {
dirptr = i+1 ;
break;
}
}

for(var i=0;i < dirptr; i++) {
var ch= atoi(str.substring(i,i + 1));
cnt = cnt + ch;
}

return cnt ;
}


function atoi(charstring)
{

if ( charstring == "a" ) return 0x61; if ( charstring == "b" ) return 0x62;
if ( charstring == "c" ) return 0x63; if ( charstring == "d" ) return 0x64;
if ( charstring == "e" ) return 0x65; if ( charstring == "f" ) return 0x66;
if ( charstring == "g" ) return 0x67; if ( charstring == "h" ) return 0x68;
if ( charstring == "i" ) return 0x69; if ( charstring == "j" ) return 0x6a;
if ( charstring == "k" ) return 0x6b; if ( charstring == "l" ) return 0x6c;
if ( charstring == "m" ) return 0x6d; if ( charstring == "n" ) return 0x6e;
if ( charstring == "o" ) return 0x6f; if ( charstring == "p" ) return 0x70;
if ( charstring == "q" ) return 0x71; if ( charstring == "r" ) return 0x72;
if ( charstring == "s" ) return 0x73; if ( charstring == "t" ) return 0x74;
if ( charstring == "u" ) return 0x75; if ( charstring == "v" ) return 0x76;
if ( charstring == "w" ) return 0x77; if ( charstring == "x" ) return 0x78;
if ( charstring == "y" ) return 0x79; if ( charstring == "z" ) return 0x7a;
if ( charstring == "0" ) return 0x30; if ( charstring == "1" ) return 0x31;
if ( charstring == "2" ) return 0x32; if ( charstring == "3" ) return 0x33;
if ( charstring == "4" ) return 0x34; if ( charstring == "5" ) return 0x35;
if ( charstring == "6" ) return 0x36; if ( charstring == "7" ) return 0x37;
if ( charstring == "8" ) return 0x38; if ( charstring == "9" ) return 0x39;
if ( charstring == "." ) return 0x2e;
return 0x20;
}



This is my proxey file when it going to come at point isPlainHostName() it's showing me this function is not avaliable so can any budy help me with this.



can any budy tell me how to read .pac file using java.
13 years ago
I need to learn EJB2.0 will you please suggest me good links for examples.

Thank you in Advance