is dom serializable

219 byte By sabbyna at 2007-11-27 8:23:10
hii've found in so many articles that DOM is not serializable. but once i made a DOM document and passed that document object to client thru rmi. is document object of DOM really serializable?thanx

JNDI with PROXY HELP!!!!

703 byte By indigeno314a at 2007-11-27 8:23:55
Good morning,i have a j2ee client (swing) and server (EJB and JBoss A.S. ) application and have set up jndi.properties so that rmi works via http modifying this two ...

LDAP: error code 21 - Invalid Attribute Syntax

1518 byte By vinod.shivharea at 2007-11-27 8:24:31
I have written a java program to create an LDAP user. Sometime it works fine but sometimes it gives error. Detailed error is given below:--createLDAPAgencyUser() : Inside Exception - javax.naming.directory.InvalidAttributeValueException: [LDAP: error code 21 - Invalid Attribute Syntax]; ...

Is it possible to get Audio and text from a single socket.

190 byte By java_tiroa at 2007-11-27 8:26:03
Is it possible to read and write both audio and text into a socket i.e is to possible to differentiate between text and audio from the socket ? Please help me with code snippet

Problem with custom connection pool

775 byte By lee.boehma at 2007-11-27 8:26:09
Hi everyone,I have a problem with my custom connection pool, please give me your advice as you can.I'm developing a connection pool service at each client. Whenever the service start up, based on its configuration, it'll make a certain connections to servers in server clusters, and keep those ...

parse file

266 byte By indictransa at 2007-11-27 8:26:30
Hello,I want to Parse a doc/odt file and extract text with a particular font tag, convert this text using our converter and then put back the converted unicode text into o/p file in place of the extracted fileand rest of the file remains intact.

FTP Help

717 byte By vinothkpa at 2007-11-27 8:26:36
I m trying to write an FTP code. I got a sample code from the java forums. It has an upload method with ftpServer, user, password, filename and source as parameters that have to be passed to it. It also has a download method with ftpServer, user, password, filename and destination as parameters ...

Variation on Producer / Consumer

2990 byte By skalvia at 2007-11-27 8:26:58
Here is a variation on the Producer / Consumer with 4 puts and 4 gets. I don't understand why the notifyall is not causing the Saver thread to awake. I would appreciate any suggestions.import java.util.*;public class SpendnSave {Float Balance = new Float(0); // Account Balanceboolean ...

HttpConnection not working through a proxy

804 byte By guidolxa at 2007-11-27 8:27:04
Hello,I have some problems running an applet using a proxy.The applet loads a serialized java object in the init method.Everything works fine when not passing through a proxy.Now I have some users that must use a proxy.I have tried to set the proxy programmatically, by configuration through the ...

Updating Coordinates to All Clients

1836 byte By PaRlOaGna at 2007-11-27 8:27:32
Hey all. I was just wondering if someone could give me an outline, or a VERY general explanation of how i should organize this. What I am doing is whenever a client connects to my server (via an applet) they will be able to move a box around with the arrow keys, and they will be able to see ...

convert multiarray to arraylist

595 byte By brisJavaa at 2007-11-27 8:27:33
Hi all!Can anyone please advise me on how should i convert a multiarray to an arraylist. each array in the multiarray is of various lengths.i cannot create arraylist manually because the number of ti as in the code might varies. The existing code goes like this:public static void ...

Delay when reading output from process from Runtime.getRuntime().exec()

1782 byte By jmbouffarda at 2007-11-27 8:28:11
I want to read the stdout from a process that I am starting with exec(). My code does:p = Runtime.getRuntime().exec(command, null, dir);stdOut = new BufferedReader(new InputStreamReader(p.getInputStream()));while (stop_called == false) {if (stdOut != null) {int readBytes = 0;try {if ...

client Socket not detecting when ServerSocket is closed

1317 byte By ricoatl3a at 2007-11-27 8:28:17
// Simple server application:ServerSocket serverSocket = new ServerSocket(port);Socket clientSocket = serverSocket.accept();InputStreamReader isr = clientSocket.getInputStream();//... read inputs from client...isr.close();clientSocket.close();serverSocket.close();// Simple client ...

retain order in ArrayList

797 byte By JavaPowera at 2007-11-27 8:28:46
Hi,I am trying to retain order if a list in which user enters values. So, I am using ArrayList. Here is my implementation -myclass has two members - private String name;private List<Person> plist;//In my mainList<myClass> mlist = new ArrayList<myClass>();for (myClass mcl : ...

vector trouble.

5114 byte By kothari_neerava at 2007-11-27 8:29:49
hi. i am making a messenger program. in the server side i have created a vector which is supposed to store all the Printwriter objects in it and then after each message sent by the client it is supposed to iterate through the vector objects and send all the clients the messengs. like in a chat ...

Diference from delegate and elementData attributes of ArrayList

283 byte By neuquinoa at 2007-11-27 8:29:55
Why the array has the size atribute in 0 and the size() method returns 1?Which is de difference from delegate and elementData attributes?How is it works? http://img399.imageshack.us/my.php?image=pantallazova1.pngThanks,Regards.Neuquino

Freeze on InputStream creation

575 byte By PaRlOaGna at 2007-11-27 8:29:57
Ok, i fixed the freezing problem, but another problem has arisen.All i want to do is send an integer from the server... to the client. It's very simple. But all the methods from the StreamReaders... that are all like "read()" and "readLine()" Are they waiting for input? because i don't want ...

Java network programming

1028 byte By AlienXa at 2007-11-27 8:30:20
hi,Im building a network tool, where Im invoking the native methods in windows to get command prompt to "tracert <ip>".I get an output like this,Tracing route to [10.0.2.2]over a maximum of 3 hops: 1<1 ms<1 ms<1 ms 192.168.1.1 2822 ms809 ms 1383 ms 220.247.232.7 3 1049 ms 1203 ...

Should I ever synchronize for visibility of updates?

5832 byte By sgourosa at 2007-11-27 8:30:21
Up until now, I knew that if two threads use the same variable and one of them updates it, the other thread might not see the updated value for an extended period of time. Therefore there is the need to synchronize the access to this variable OR make the variable volatile (visibility of ...

How to get the source of a web page

197 byte By java_tiroa at 2007-11-27 8:30:22
Is it possible to get the html source of a web page without using URL or URLConnection classes. can we establish a socket with the webserver and get the content ? If so help me with the code

RMI - Design of the application

6143 byte By soroscha at 2007-11-27 8:31:05
Hello,i have created a Server-Client application with RMI. But there are many questions:I want, that only clients could connect to the server who have authenticate at the server. By this reason i only bind the Login-Method at the registry. In the Login-Method i check the Name and Password. If ...

Compiler errors with bounded wildcard

2153 byte By jsaiza at 2007-11-27 8:31:07
Hi.Given the following classes A and generic B:class A{ public void method(Class<? extends Number> c) {}}class B<T>{ public void method(Class<? extends Number> c) {}}The following lines produce compiler errors, as expected:A a = new ...

InetAddress.getAllByName- the order of ip addresses

2349 byte By sachin.agrawala at 2007-11-27 8:31:56
I have a dns server such configured that it returns the ip addresses in a loop i.e.if u first hit the dns it will return Adresses: first-ip , second-ip and if hit again wil return secondip,firstip. To get this try nslookup voiceservices.mcleodusa.com on command prompt twice in succession.Now ...

static HashMap Issue

838 byte By Adeea at 2007-11-27 8:32:27
Hi , Actually i am fetching data from client after 2 or 3 seconds. i am trying to store all the information in a HashMap. I want this hashmap to be static so i have declared it static so that it can save All the values i recieve. Problem is that it saves only 7 Values and then i think Revised ...

Cannot Retrieve from Hashtable to Create a List

4540 byte By jiapei_jena at 2007-11-27 8:33:01
I receive a Hashtable from people working on the back end of the application. I am trying to convert the Hashtable with key/value pairs into an ArrayList, which is an array of a bean class with two properties: country code and country name.I do not have compilation error nor runtime error. But, ...

Parse Expires HTTP Header

1750 byte By Johannesa at 2007-11-27 8:33:55
Hello,I'm writing a HTTP-Proxyserver and I want to compare the cached Expires-Header with the actual date, so I need to convert the Header Object which I get from "httpclient" (jakarta) to a date Object. I tried the following:/** Expires Header format. */private final static DateFormat ...

Why is this allowable?

1387 byte By DejasPerPera at 2007-11-27 8:33:56
abstract class VertexSetGraph<T> implements Graph<T> { ... private Set<Vertex><? extends T>> _verticies;... public boolean addVertex(Vertex<? extends T> vertex) {_verticies.add(vertex);... }}I don't understand why the compiler allows this. Lets say I ...

Pausing/Resuming of Threads

223 byte By wpr101a at 2007-11-27 8:34:44
Hi, I've noticed that the resume and suspend functions are depracated for the Thread class. It there an easy way to pause threads and restart them? Sorry, If this is really basic... still kind of new to Java.

Tracking threads in an application

645 byte By Suhasaa at 2007-11-27 8:35:17
Hi,My current application consists of a main thread which spawns multiple threads on startup. The main thread is like a daemon thread which is supposed to continuously run and monitor the threads it had spawned. As long as the main thread is running it has the handle of all the threads it had ...

Java Telnet client crashes TCP stack

1121 byte By hbquikcomjamesla at 2007-11-27 8:35:53
We have a problem in which, on certain machines, a Java Telnet client connected to a specific host will lock up, and crash the TCP stack of the machine it's running on.On the test box we're running it on (Win2k running SE 1.6.0_01-b06), the problem occurs during initial negotiations: after ...

Circumventing certificate checks

1168 byte By wtta at 2007-11-27 8:37:06
Hello everyone,Short version: I would like to hard-code into the application the self-signed certificate of an internal-only HTTPS server, so that I don't have to install and maintain special keystores on hundreds of users' machines.Long version:I'm working on a simple application that will ...

Simple program - need help :/

5783 byte By AdrianSosialuka at 2007-11-27 8:37:57
Hi everyone,I wanted to write a very simple program: it is supposed to count how manythreads are accessing the same array field at the same time. Here is the code:import java.util.*;class MyRunnable implements Runnable {private static int[] count=new int[10]; // the real counts of threads at ...

Why Object.wait() should always be in a while loop ?

596 byte By AdrianSosialuka at 2007-11-27 8:38:23
There is a lot of information on the web that waiting thread can be awaken by JVM orsome other code (not written by you anyway ...). How is it possible ? And secondly, if that can happen, why can't it happen to Thread.sleep() ? It ceases the thread and puts it into - and here another question: ...

Run multiple servers on one machine

374 byte By Winptora at 2007-11-27 8:38:47
Hi there.I hope somebody can give me some direction about running multiple servers on one machine. The requirement is that there is only one IP address for the machine and only one port number can be used, although there is more than one server.I am new to network programming and have no clue ...

Weired behavior of Threadpool under Linux

2225 byte By okssa at 2007-11-27 8:38:49
I am writing a multithreading web page fetcher under windows with jdk1.5.0-09. I have a task dispatcher like this:public void run() {while (true) {try { if(_fetcherPool.getActiveCount()<_config.numThreads){_fetcherPool.execute(new RobotstxtFetcher(_crawler, getURLQueue().take())); } else ...

Storing a range of ipAddresses?

314 byte By anamupotaa at 2007-11-27 8:39:21
Hi all, I would like to know if there is a class that would store a range of IP's once the range is specified. E.g.,Say i allot the range 202.79.36.25 to 202.79.37.112. Is there a class that could keep all ipAddresses lying between the above mentioned extreme ...

Reflection E ParametrizedType

1088 byte By skioppettoa at 2007-11-27 8:39:26
public class GenericHibernateDAO<T,ID extends Serializable> implements GenericoDAO<T,ID> {private Class<T> persistentClass;private Session session;public GenericHibernateDAO() {this.persistentClass = (Class<T> ) ((ParameterizedType) ...

Collection vs map

172 byte By kalpanava at 2007-11-27 8:40:06
When do we go for collections and when do we go for maps?map store key/value pairs,do collection use keys?If so,wat is the diff b/w map key and coll. key internally?

Socket, thread and Corrupted ObjectInputStream

6982 byte By Voldora at 2007-11-27 8:40:27
Hello,i'm trying to implement a client/server code where the clients can send serialized Objects while reading incoming ones from a server.To simplify the example i only serialize String (But i plan to serailze more complez object, so i want to use Object serialisation)here is what i've ...

Chat prob..

546 byte By Reona at 2007-11-27 8:40:28
I created a program for chat using rmi..I extends UnicastRemoteObject in both server and client sides...And after compliling the server is running smoothly but client is holding the following errors...error:java.rmi.ServerException: RemoteException occurred in server thread; nested exception ...

Error SocketChannel receive multiple messages at once?

4459 byte By javaweirda at 2007-11-27 8:40:45
Hello,I use Java NIO, non blocking for my client-server program.Everything works ok, until there are many clients that sending messages at the same time to the server.The server can identify all the clients, and begin reading, but the reading of those multiple clients are always the same ...

Get method in the Attribute class. in JNDI

464 byte By AdrianHBKa at 2007-11-27 8:41:21
I had connected to the AD // Create the initial directory contextDirContext ctx = new InitialDirContext(env);Attributes attrs = ctx.getAttribute("DC=DomainDnsZones,DC=testing,DC=local");but I had no idea wat to get from the attrs.get method.as in, I don't know what kind of attributes ID are ...

Managing Multiple threads accessing a single instance of a class

1919 byte By kittykat13a at 2007-11-27 8:41:50
Hi,i have to redesign a class, say X, in such a way that i manage multiple threads accessing a single instance of the class, we cannot create multiple instances of X. The class looks like this:Class X{boolean isACalled=false;boolean isInitCalled=false;boolean ...

exception handling

3152 byte By noobs_will_rulea at 2007-11-27 8:42:13
i have a datagram client which checks how many servers are alive on the network now i get these two excpetions "help "datagramsocket is the name of main() class>at java.net.PlainDatagramSocketImpl.receive(PlainDatagramSocketImpl.java:136)>at ...

Doing what netcat does

547 byte By sri1025a at 2007-11-27 8:42:37
Hi,There's an application that is pushing some data to my local computer on some port, say 6666. I am using netcat to read from this port and I'm pushing this data into a file.like:-$ nc -l -p 6666 > output.txtNow I want to do what netcat is doing in Java, that is read from port 6666 and ...

Communication b/w C and Java thru Socket programming

382 byte By snehaa at 2007-11-27 8:42:52
Hi All,I've to write code which communicates between java code and C code through Socket programming. I've to read some information given by C program and to show that information through a Java GUI application. So I need to use Socket programming for that.Can anyone suggest how is it ...

TCP/IP Framework

236 byte By RooKeea at 2007-11-27 8:42:54
Hello,I plan to develop a multithreading tcp/ip server. But it is necessary to use the SocketServer and Socket class? Does anybody know a nice framework that support developing a network server?regards,Rookee

Serialize and Deserialize

935 byte By giovinazzoa at 2007-11-27 8:43:15
Serialize and Deserialize with Oracle 9 and Oracle 10We have developed a client/server application. Client is a Java application and Server is written in C-Language; link between Java and C is RPC/JRPC.We have to serialize and then deserialize a stream in a clob field in Oracle DB. When we ...

UnMarshallException, ClassNotFoundException: HelloImpl_Stub

2265 byte By kayala at 2007-11-27 8:43:41
Hi friends,I wrote a small HelloWorld application using RMI. I listed all the files below.Hello.javaimport java.rmi.*;public interface Hello extends Remote {public abstract String sayHello() throws RemoteException;}HelloImpl.javaimport java.rmi.RemoteException;public class HelloImpl implements ...

Class

119 byte By kalpanava at 2007-11-27 8:43:44
Emp e=new Emp();Class.forName("Emp").newInstance();can anyone explain the diff b/w two statements?