Hi all,I have TCP code which works fine on Linux, but fails on Mac OS X (java 1.5.0_07-87). In particular, the setTrafficClass below (the hex number is IPTOS_THROUGHPUT) throws a IOException with the following error: upload: Invalid argument[java] java.net.SocketException: Invalid argument[java]at ...
1939 byte By
ardmorea at 2007-11-27 10:14:54
hi, I am reading binary data from a binary file. Now I have no idea of it.I have some question to ask.1) Are the strings ZeroStrings or FixedZeroStrings?2)How to position the position of each strings?My binary input is space delimited with fixed width data fields.All integers are 4 bytes, floats ...
Hi All,i am attempting to perform a JDBC commit and an update to a log file, ie. i am recording the updates in a log file so i can use for recovery, however from the point of the transaction is commited to the point at which it is updated into the file the system can be exited thus the database and ...
4815 byte By
kokorokoa at 2007-11-27 10:15:46
sory guys, i ve read hundreds of posts here and elsewhere but none solution worked for me.. sory for pasting all this stuff here but i guess without it nobody could help me.so again:i'm running tomcat 6.0-EXCEPTION:org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class ...
152 byte By
iGurua at 2007-11-27 10:15:52
<p>Can anyone give insight into Ajax. </p><p>Q: Also does Ajax use caching mechanism along with dynamic processing of the data using xmlHttprequest?</p>
322 byte By
4tha at 2007-11-27 10:16:22
Hello,of course i could remove the position 0-2 from the String "cn=Klaus" to get a substring like "Klaus" but i don`t wanna use an extra "for loop" if there maybe exists another possibility to get a clean output like "Klaus"someone knows an ldap method to get ONLY the pure value of the cn ...
I am getting very slow socket initialization. Here is sample code to clarify the issue. I suspect is has to do with reverse lookups or some such thing - is there a way to disable all of that? I tried using the security manager but that is a bad solution because it does not seem doable from within ...
7082 byte By
lokiea at 2007-11-27 10:17:02
Hello everyone. Currently my program will create a new thread everytime a person connects to my server. Once they connect they can send me events, and once they send me the events I parse the events and store them in a Map.Now if someone wants to recieve all those parsed events, but don't want to ...
Hello everyone ,I have to do a program that captures traffic from a client and sends it to a server and gets the traffic from the server and sends it back to the client... it's a intermediate Java program between a server and a client ( i need it in order to analyze a protocol ) .In more concrete ...
3336 byte By
xolotla at 2007-11-27 10:18:06
We are all familiar with the idiom of delegating the execution of a loosely typed method to a more precise one where the type is made explicit, e.g., public interface Foo<B extends Bar><?>> { }public interface Bar<F extends Foo><?>> { }public void test1(Foo<?> foo) { doTest1(foo); ...
557 byte By
sirynxa at 2007-11-27 10:18:15
I'm using JBoss connecting with RMI. I'm trying to connect from the outiside of my LAN but I cannot. I have configured NAT to use Jboss but the connection from the outside is impossible. I have passed this arguments to my JBoss-Djava.rmi.server.hostname = ...
4826 byte By
cjba at 2007-11-27 10:18:54
Hi all,I'm trying to write a very simple TCP/IP server, to provide XML data to a web browser. This should be dead easy, but I'm encountering something weird. I hope you can help me.I can successfully create a ServerSocket on a given port, and accept connections. The problem arises when I try to ...
5000 byte By
lokiea at 2007-11-27 10:18:57
Hello everyone I wasn't sure if this was thread safe or not. I'm going to have more than 1 client connecting to my server, and sending me events I'm storing these events in this Map. But I wasn't sure if it was thread safe or not. I was looking at the sun collections and i saw somthing ...
Hi,My Property file:base.dir=D:/Testsrc=${base.dir}/srcclasses=${base.dir}/classesI am using the following code to read it:Properties properties = new Properties();FileInputStream fis = new FileInputStream(propertiesFile);properties.load(fis);Enumeration keys = properties.propertyNames();while ...
Hello,I have an app running on jboss 304 server that make calls to a corba gateway with jacORB library.The follow exception occured when it tries to resolve the object name.org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0May I ask if anyone can tell ...
2485 byte By
lokiea at 2007-11-27 10:19:26
Hello everyone.I'm not sure what I should be trying to use here but I looked in the API and I think this is the closet thing to what I need.What i'm trying to do is the following:Everytime I send somthing from a client to a socket or vice versa I want to do the following:Open the socket to send ...
156 byte By
Danza at 2007-11-27 10:19:30
<p>i can get the MBean's name attribute name type descrep in JBOSS but i cannot get the Value of MBean's Attribute. Who can tell me how to get it.....</p>
Hi,I wrote a socket client program that connects to a socket server. This is what I'm doing:-I'm opening a socket connection-I'm writing an initial request to the output stream of that socket-Then, while true, I create an input stream of that socket and get information off that streamIt all ...
Hi , i have a java policy file (Mypolicy.policy), now i want to load it at runtime.without using command prompt.means i dont want to use java -Djava.security.policy=Mypolicy.policy command can anybody have any idea.thanks in advansRegardsBrajesh ...
2029 byte By
sim085a at 2007-11-27 10:20:35
Hi,Basically I am new to building server applications and I was wondering whether there are any good books that can show good design patterns that can be used when building a server application.I am mostly interested in building a server for online reservation systems. I thought of this scenario ...
As Serializable interface is an MARKER interface and does not have any methods or field. Then how does a class implementing Serializable interface is automatically serialized(or the object is converted into bytestream). Is it that, JVM does know what to do with a serialized object. If this is the ...
***I POSTED THIS BEFORE BUT I THINK I PUT IT IN THE WRONG FORUM***Hello,I am running a java process standalone (no EJB container / servlet container or anything), just a standalone JVM. The process is run via a shell script whcih executes it in the background then exits (leaving JAVA running). The ...
Hi, I got the following exception message when i run the given JNDI example on Sun Java Application Server8.1.Please help me in resolving this issue;Exception:javax.naming.CommunicationException: localhost:389 [Root exception is java.net.ConnectException: Connection refused: connect]import ...
368 byte By
CGambaa at 2007-11-27 10:21:45
Hi,I need to write a file on a NAS. I have the share path (suppose \\share\dir). How can I create a file on it? Do I need to know the physical path and use it to create a file? Can I obtain the physical path having the NAS path?I'm talking about Java 1.4.03 (and Websphere).Sorry for my english but ...
315 byte By
sri_sua at 2007-11-27 10:22:04
I want to retrieve a configuration file into my application. I can get that file in byte array format. I want that to be converted into java.util.Properties object so that I can retrieve the contents of it. Is it possible to convert that into some other object and then to Properties object? How can ...
<p>Hai guys,</p><p> I need to know about NIO package. Please give some useful url(S) for understanding basics.</p>
<p>Hello Everyone, </p><p>I am new to RMI technique. Can you please brief me about the uses of RMIs. Also, I am in a doubt that RMI is used only when using EJBs.</p><p>Thanks!!</p>
As I understand, java sockets are able to send strings only.I was wondering if java api have a class or something that allow me to send structured data.Is there a native way in java api to send structured data over a network, i.e. without the need to parse myself string messages ...
Hello,I got a big problem with serializing EventListeners. The problem is:I want to send Java-Swing Elements via RMI. If the Swing Components dont have Listeners its no problem, but if there is a listener at a Component I always get the following exception: java.lang.ClassCastException: ...
16480 byte By
ScottS.a at 2007-11-27 10:26:35
When I run javadoc on the class below, the HTML pages being generated don't include the methods I've written. Can anyone tell me what I'm doing wrong? Note that this source code was actually generated by a decompiler, as I somehow managed to lose the original source code I wrote. Thanks.import ...
HiI am trying to serialize simple binary suffix trie of medium sizeI got an exception: likeException in thread "main" java.lang.StackOverflowErrorat sun.misc.SoftCache.processQueue(Unknown Source)at sun.misc.SoftCache.get(Unknown Source)at java.io.ObjectStreamClass.lookup(Unknown Source)at ...
Hi!I am developing Java application using ZipFile API. Platform is Windows XP. I am facing following problem.Basically, this application pools the Zip files from one source folder and unzip it into another folder. Everything is working fine,But the only problem is while deleting original zip file ...
Hello,I am using Microsoft Active Directory 2003, Java 1.4, and JNDIHas anybody tried using Microsoft's LDAP_SERVER_DOMAIN_SCOPE_OID control with JNDI? http://www.google.com/search?q=microsoft+LDAP_SERVER_DOMAIN_SCOPE_OIDAccording to MSDN: "The LDAP_SERVER_DOMAIN_SCOPE_OID control is used to ...
Normally I'm not completely clueless with generics, but this one has me stumped. Consider the following code, which compiles and runs cleanly without generics:public class Foo implements Comparable{public int bar;public int getBar(){return bar;}public int compareTo(Object obj){return getBar() - ...
<p>hi,</p><p>I want to get operating system ,ip infomation from the remote machine while in internet.If it is possible in java.if yes, plz let me the details.thanks in advance</p>
6998 byte By
lokiea at 2007-11-27 10:28:04
Hello everyone.My mentor wanted me to write a class that would do the following:open a connection to the passed in port and hostsend a messagereceive a messageclose the connectionSounds easy enough and I wrote a program that does just that but when I put it into a class it stopped working.Here's ...
<p>Hi,</p><p>Please let me know in which release of JDK the fix for year-2038 bug is included. Also is this problem resolved in JDK1.5 release.</p><p>[ problem : year-2038 bug is described as here in this web site.. </p><p> http://www.2038bug.com/ </p><p>]</p><p>thanks in advance..</p>
Hi, I got a quick question:Is there a chance to send JComponents which come with an ActionListener over the net for example via RMI?I always get the following Exception:java.lang.ClassCastException: server.ActionTryImpl_Stub cannot be cast to java.util.EventListenerjava.lang.ClassCastException: ...
803 byte By
T01deva at 2007-11-27 10:29:32
Hi!I am developing a client/server project in Java (client/server - THE tundra for Java) and I (of course) use RMI. My quesion is: is RMI inherantjy multi-user or do I need to go the extra mile to allow multi use.The set-up is as follows: ther is one server with a database. Clinets can access the ...
676 byte By
Bledara at 2007-11-27 10:29:33
Hi.I need to make a number of connections to a server from the computer my application will run to. Suppose that I can have a very good computer and resources is not a limit, is it possible to have a number of sockets (namely 20) opened on the same port and ip address.for example:ipAddress = "IP ...
Hi,I have this ldapsearch command that I want to convert to use with Java.ldapsearch -h HOSTNAME -p PORT -b "" -s base "(objectclass=*)" namingContextsI want to use the ctx.search(); but I have no idea how to convert this method in to a valid search so i can get the naming contexts.Ive ...
620 byte By
Rak123a at 2007-11-27 10:31:11
Hi,I have a requirement wherein i want to read javadoc docs from source code and replace it with my own custom java 5 annotation.For example say i have a file A.java with following javadoc in it:/* * @param some parameter */I have to access the compile code as part of build and update the code to ...
Hey all,I'm creating my socket connection in a program that i am running in a cmd window. For what i need in my prog, i have a loop that tries to connect every 5 seconds, and even after that, I need to continue looping to check and try to connect.The only way i can end the program is to cntrl-c or ...
355 byte By
Carraa at 2007-11-27 10:32:40
I was wondering if the rmi - server calls are synchronized.Example:A remote server with this method:int number;public int getNumber() throws RemoteException{ number++; return number;}If multiple clients call the server, can they get the same number?Or should I synchronize the ...
Hello everybody, I am new to these forums so please bear with me :)I've recently been attempting at setting up a file transfer protocal in java, but I don't think the packages in the api docs that I downloaded from this site have the specific package with the classes I need in order to do one. Is ...
1934 byte By
bearwiga at 2007-11-27 10:33:33
Is there any good documention on ClassLoaders?I want to understand ClassLoaders because of an issue I am having, but I cannot find any good documentation on the subject.Here is my issue, but please understand I am somewhat ignorant regarding ClassLoaders.I have a set of JARs that are frequently ...
<p>Hi!</p><p>I have Java application where I wanted to allow user to make changes in configuration file (text file). Can I open Microsoft Notepad from My Java Application and make the changes/save the files?</p>
553 byte By
kmhosnya at 2007-11-27 10:34:00
hi every body,i am trying to make a simple chat program and in the network implementation i have made a server/client connection but when i run it and try to send a message from the client to server a sudden error occur it says "stream closed" when trying to send a data using the server's socket ...
Hello allI have successfully compiled files using javac. The path is set, so I just need to open a command prompt and simply type javac AddServerImpl.java and it compiles with out errors. I do not have to specify any path at all. But when I try to compile using rmic, that is where I have the ...
591 byte By
EvanDa at 2007-11-27 10:34:45
Hello, On the website NetLibrary-- you can access and read books-- but only one page a time and there is a time limit.After looking at the source code I found out that the general link is something like this: http://netlibrary.com/nlreader/nlreader.dll?bookid=7373&filename=Page_9.htmlThat site ...