3893 byte By
lifesuna at 2007-11-27 5:52:42
hi, I have this exception : java.net.ConnectException: Connection refused: connectat java.net.PlainSocketImpl.socketConnect(Native Method)at java.net.PlainSocketImpl.doConnect(Unknown Source)at java.net.PlainSocketImpl.connectToAddress(Unknown Source)at java.net.PlainSocketImpl.connect(Unknown ...
842 byte By
christoa at 2007-11-27 5:53:03
My program is compiled with JDK 1.5 or 1.6 and retroweaved to 1.4.If I do not take care I may typeint i=65;Character.isDigit(i); instead of Character.isDigit(char)i);Without casting to char it uses a method that exists only since 1.5 but notyet in 1.4.There are a few other methods that had been ...
196 byte By
msnma at 2007-11-27 5:53:06
There are 100000 records in a table and i need to sort them.But retrieving of this data is happening in batch mode say 10 .so how to sort 100000 records.please suggest.
Hi everybody while reading xml file by this.getClass().getClassLoader().getResourceAsStream(joe/log4j.xml). getting following error java.net.MalformedURLExceptionjava.net.URL.<init>(URL.java:571)at java.net.URL.<init>(URL.java:434)at java.net.URL.<init>(URL.java:383)(1) where ...
Hi guys, i'm trying to downcast an Object type back to its original type but i cant seem to get it to work. I am accepting an undefined number of variables as a method parameter. I am receiving it as an Object array(using the basic method(Object args[]) method descriptor). When i come to use ...
196 byte By
msnma at 2007-11-27 5:53:47
There are 100000 records in a table and i need to sort them.But retrieving of this data is happening in batch mode say 10 .so how to sort 100000 records.please suggest.
I created a counter as a remote object.Multiple clients are displaying the counter value.If one of the clients increments the counter, I want the displayed counter value on every client to be updated to the new value (of the counter on the server).Therefore every client starts a new thread to ...
Hiya, I tried searching for this, but it's so difficult to figure what the subject is. Anyway the following fails to compile on 1.6 U1 and I can't figure out why?interface Foo<T> {}interface FooListener<T> {void fooArrived(Foo<T> theFoo);}class ...
707 byte By
wigoea at 2007-11-27 5:55:20
I recently update a large multi client COBRA application from Visibroker to Sun COBRA Object Broker.As you know Sun's ORB uses NIO for its communication from client to server. A problem arises if one client should drop communication and the NIO Selector routinelocks up all the other clients. ...
1544 byte By
dawuada at 2007-11-27 5:56:21
We need to create a web application that needs to work with various companies. We would like to work with these companies simultaneously so that we can reduce the time taken. The situation would be the following: A client requests something then we would go to the various companies and make the ...
Hi All,How to retreive the time for the GMT-5 timezone with the DST applied. Below is the sample code to convert the date to a specific timezone. SimpleDateFormat sdf = null; Date date = null; sdf = new SimpleDateFormat("M/d/y h:m:s a"); date = sdf.parse("5/1/2007 10:30:00 AM"); ...
I am currently refactoring some legacy code to make use of Java 5's generics, and I ran into a problem.Foo extends Parent and implements Comparable. Bar is a sibling of Foo and does not implement Comparable. Now, in the legacy code, Foo is Comparable to both Foo and Bar, and in order to use ...
My programme has 2 parts:Server and Client.In the Client,it contains a security.policy file,which is produced by the RMI plug-in.The Server is Ok,and when run the Client in the eclipse environment,it's OK too,but the problem is when compress the Client to a jar file,it doesn't work.I think it ...
Hi,Is it possible to set the default printer setting to "1 page wide" and "landscape" whenever the user clicks print in Excel? I am trying to create an Excel report using XML and XSL. Though the report is created, I am not sure if I can control the printer page setting for MS Excel. Kindly let ...
Hi,We have a web application the applicaiton works fine in unit testing but in production it gives aproblem. One user data is being served to another user whole of the session seems to be replicating for another user.We have no staic variables defined anywhere in the application. so, i want ot ...
I am calling a Java executable from a C++ program.I need to communicate some ints and doubles from Java to C++.I am trying to make a file of them and in C++ I wait until the file has been made.However if I convert them to strings and make a file of chars, the problem is that in Java chars are 2 ...
hi, i am new to java networking. Can anyone tell me, whether I can download the images those are visible in a web page and save them in a desired location, on my system? If we can do this, how can this be done? plz help me out!
I'm getting confused about the RMI registry and the ports...Here's the scenario:I have a machine running a firewall. It blocks every ports by default unless I explicitly open them. I start rmiregistry using "rmiregistry 1099", just to be sure it is running on port 1099, so far so good.I ...
Hi all,I am using JProfiler for our application. If i take a heap snapshot, the recorded objects are not at all displaying in the heap walker tab. and in the memory view nothing is displaying in "All Objects" tab. And in the backend, it's throwing "error iterating over heap".Any help would be ...
hihow to break this invoked method's action from other threads ?Method met = servlet.getClass().getMethod(mname,new Class[] { this.getClass() });met.invoke(servlet, new Object[] { this });Like Other thread's content:met.break();Notes:i cant change invoked method's source ...
Hi frnds,i have compile my application with j2sdk1.4.0_01.when i compile with jdk1.5.0_01 i got following warning[unchecked] unchecked call to addElement(E) as a member of the raw type java.util.vectorso please any one help me,why this warning came and what is solution for that.thanks ...
Hello!I'd like to start a process which will run a C executable.The C executable named dbc is placed in the folder /home/swkm/services/rul_hyb/rul-1.0/bin and accepts as an argument the name of a database, for example, myDB I tried the following code: File f = new File(filePath);Process ...
301 byte By
lalbabua at 2007-11-27 6:01:56
What do you expect the output of the following Java statement?System.out.println(((double) ((long) (Double.parseDouble("4.56") * 100)))/100);Ans: 4.56, right? But it is not like that. Can anyone give a valid reason why JRE returns 4.55 for ...
hi....i get a connection refused error in my java program.... this program is being run from the command prompt on a win 2003 machine.... the same program works perfectly fine when run on a win 2000 machine.... i try to connect onto the same ldap server, which is on port 3268, in both ...
I'm only just getting started on converting my code to use Generics, and have some questions. Although this is Spring/Hibernate code, the problem just seems to be in extending the classes.First, here is the GenericDao interface:public interface GenericDao <T, ID extends ...
hello friends,i'm trying group chat kinda thing in Java.. i think i can do it using UDP sockets etc.. which has MultiCastSocket class...but as UDP is not that reliable, i'm trying to do it using TCP .. but i'm not able to find such analogous classes.in TCP, i've a Server class which will ...
1682 byte By
aakturea at 2007-11-27 6:05:19
Is it possible in a standard mbean to control the case of the attribute name? For example, I have a simple MBean:public interface EJBMBean { public Stats getstats(); public void setstats(Stats stats);}public class EJB implements EJBMBean { public Stats stats; public EJB(Stats stats) {this.stats ...
Ref: http://java.sun.com/docs/books/tutorial/jndi/software/content.htmlI am having problems using ldapmodify when loading the configuration file "tutorial.ldif".$ ldapmodify -a -c -v -h backbone.seamonkey.bigfish.lan -p 389 -D "cn=admin, dc=seamonkey, dc=bigfish, dc=lan" -w xxxxx -f ...
I am new to both JNDI and LDAP, and I am having a problem with the following basic JNDI code sample. When trying to create a rootContext with ctx.createSubcontext, an exception is thrown stating:javax.naming.OperationNotSupportedException: [LDAP: error code 53 - no global superior knowledge]; ...
142 byte By
leon_wa at 2007-11-27 6:05:52
i am quit confused about the implementation in jdk, does it try to establisha TCP connection on port 7 (Echo). thanks in advance
I was able to import tutorial.ldif using LDAP Browser/Editor without incident: http://www-unix.mcs.anl.gov/~gawor/ldap/ My LDAP now has the following tree:o=JNDITutorial ou=Groups5 cn entries ou=People10+ cn entriesHowever, when calling DirContext::list("ou=People"), it throws the following ...
i have 10 components in a panel but when i tried to align using gridbaglayout its not getting positioned in specified instruction when i apply north for 2nd component its applied to all components ..can anyone pls help me
765 byte By
JonBa at 2007-11-27 6:07:15
Is the JAR file format based on the ZIP64 file format or original ZIP file format?I'm creating large JAR files, greater than 4GB and some around 25GB. I've been able to create them OK and extract them OK through my code but almost everything I read (forums & bugs) says the JAR file format ...
1948 byte By
ibanna at 2007-11-27 6:07:34
Hi, I encountered a problem while using generics.Here is the code that dont compile using javac (but does using eclipse compiler).public interface MyThing {}public interface MyObject<S extends MyThing>{public S getMyThing();}public class MyObjectHandler{private MyObject<?> c;public ...
712 byte By
JDvlpra at 2007-11-27 6:07:37
Hi,I am developing client and server using NIO...My client will send a file to the server... but the server doesn't know the size of the file it has to receive... So i could not allocate size to the ByteBuffer directly...So i m sending another bytebuffer from client, which has the size of the ...
Hi all,I am new to java. When I looked into the API, I found that both Serializable and Cloneable interfaces don't have any methods. My question is: Shouldn't both of them be a keyword(just like abstract, final, synchronized, etc.) instead of a dummy interface? What is the need for going for ...
Just when I thought I was beginning to get a handle on the wildcards...List<?> is a List of objects of "some unknown type" List<List><?>> is a List of (child) Lists of objects of some unknown type, each child list being a list of the same type.List<String> can be ...
hi frnds,i have to delete bunch of record from vector for a specific range.i use removeRange() from java.util.vector but it give following compile time errorremoveRange() has protected access in java.utl.Vector and void type not allowedso please anyone one tell me,how i can solve my problem and ...
Hi all,Ive got this problem which is killing me.I generated a file public.dat and put a key in it...The code is as[ObjectOutputStream f = new ObjectOutputStream(new FileOutputStream("public.dat"));System.out.println("\nStart generating RSA key");KeyPairGenerator keyGen = ...
Hi all java's guru I hope that you guys can help me. I,ve been trying to develop custom protocol handler that handles this kind of url:jdbc://driver_type/database_url/statementI have override the URLConnection class but i get confused where to set the input stream and output stream.Your guys ...
The API states that when a list is created using: List<String> sList = Collections.synchronizedList(new ArrayList<String>());that iterations over the list must be synchronized as well by usingsynchronized(sList) { Iterator<String> i = sList.iterator(); while (i.hasNext()) ...
Is -XX:+HeapDumpOnCtrlBreak available on JDK 1.5? It works on jdk1.4.2_13 but it is not recognized in jdk1.5.0_12. I tested on Linux.
hi all ,i am using a program in which i m getting live data from e-signal account i m retrieving data from server usiing socket then parsing and storing it into hashtable now my problem is that each moment the data is changing how can i store the data in hashtable since for i have to generate ...
suppose a server listening to a port ( say 4444 ) wants to multicast a msg to a group of clients on internet.. then what should b d common group id( Class D ) and port number which all the clients have..
I'm writing a client/server for sending files. Both client and server classes have the following fields:BufferedInputStream isb;BufferedOutputStream osb;BufferedReader isc;BufferedWriter osc;And their constructors do:isb = new BufferedInputStream(socket.getInputStream());osb = new ...
1761 byte By
Japhetha at 2007-11-27 6:11:42
I have a client and server that communicate using tcp and send strings to each other using printwriter and bufferedreader.the server has a loop for receiving messages that waits until bufferedreader.readLine() doesn't return null. On the server, calling bufferedreader.readLine() when there is ...
//@Compiled with javac -version 1.6.0_01-ea//@Executed with the details as below:/*java version "1.6.0_01-ea"Java(TM) SE Runtime Environment (build 1.6.0_01-ea-b01)Java HotSpot(TM) Client VM (build 1.6.0_01-ea-b01, mixed mode, sharing)on Microsoft Windows XP PC over Intel Celeron ...
139 byte By
somlia at 2007-11-27 6:12:25
I m trying out to convert dat file whose content is in binary form to text file.so that this dat can be inserted into the data base.
3885 byte By
hOOkDKa at 2007-11-27 6:12:46
Hello you :)I've ran into a mind bugging problem - of which I thought was simple - it might still be - just I may be overseeing things..I want to do the following (of which the sql works fine - I've tested it outside java developer):Lock a table, select records (for investigation) - if ...
i found NoSuchMethodErrorfor each classcan some body help me?