java-server

glassfish/tomcat Java Server load class once

人走茶凉 提交于 2020-01-06 14:05:03
问题 I am using glassfish v2 but I've had the same problem in tomcat. Once the server starts, I see: sudo jmap -histo:live 14127 | grep KVStore 6222: 1 24 xxx.xxx.KVStore After a while of usage, I get: sudo jmap -histo:live 14127 | grep KVStore 7240: 1 24 xxx.xxx.KVStore 7360: 1 24 xxx.xxx.KVStore While I'm guessing this has something to do with how glassfish scales out, this is really problematic because I use the KVStore as an in memory storage class. It is a singleton class with a static

glassfish/tomcat Java Server load class once

笑着哭i 提交于 2020-01-06 14:01:45
问题 I am using glassfish v2 but I've had the same problem in tomcat. Once the server starts, I see: sudo jmap -histo:live 14127 | grep KVStore 6222: 1 24 xxx.xxx.KVStore After a while of usage, I get: sudo jmap -histo:live 14127 | grep KVStore 7240: 1 24 xxx.xxx.KVStore 7360: 1 24 xxx.xxx.KVStore While I'm guessing this has something to do with how glassfish scales out, this is really problematic because I use the KVStore as an in memory storage class. It is a singleton class with a static

BouncyCastle on the server side with Android phones as clients

本小妞迷上赌 提交于 2019-12-23 03:37:09
问题 I'm currently having some difficulties with getting BouncyCastle to work. Been searching on this for a couple of days now, so I'm hoping you can provide any helpful insights. Here's the set-up. Using REST-protocol, the Android-client sends POST-messages to the server. I made a separate project with classes representing these messages, so that I can include this as a library on both the client and the server. The message-objects are first parsed to a JSON-string and afterwards interpreted on

google cloud platform: cannot start java https server

半腔热情 提交于 2019-12-11 17:01:11
问题 The following simple program: import com.sun.net.httpserver.HttpsServer; import java.net.InetSocketAddress; class SimpleServer { public static void main(String[] pArgs) { try { HttpsServer s = HttpsServer.create(new InetSocketAddress(443), 0); System.out.println(" " + s); } catch (Exception pE) { throw new RuntimeException("Could not create HTTPS server", pE); } } } will not work inside a Debian VM hosted by google cloud platform (Google Compute Engine - IaaS): Exception in thread "main" java

ObjectInputStream exception [duplicate]

怎甘沉沦 提交于 2019-12-11 15:12:56
问题 This question already has an answer here : Closed 7 years ago . Possible Duplicate: StreamCorruptedException: invalid type code: AC Hello guys I am trying to read object from the stream over the network... I am using ReadInputObject method ... and I am implementing it inside a thread to recieve the data ... here is the while loop in the thread while((dp = (DataPackage) ois.readObject()) != null) { Ball b = new Ball(); b.setX(dp.x); b.setY(dp.y); jTextField1.setText(b.getX() + " " +b.getY());

http status 404 : the required resource is not found

你离开我真会死。 提交于 2019-12-08 13:27:29
I creat a web application using eclipse and tomcat7 I had the following code in the html file and the java servlet class in the html file: <form action="UserAccessServlet" method = "get"> in the servlet class I had @WebServlet ("/UserAccessServlet") then I just made some small changes (new println statements) but it shows no effect I changed the server name with the following peice of code html file: <form action="SQA_Servlet" method = "get"> java class: @WebServlet ("/SQA_Servlet") but it seems that no reload take place and I got the following error: HTTP Status 404 - /SQA_Learning/SQA

http status 404 : the required resource is not found

不想你离开。 提交于 2019-12-08 08:14:54
问题 I creat a web application using eclipse and tomcat7 I had the following code in the html file and the java servlet class in the html file: <form action="UserAccessServlet" method = "get"> in the servlet class I had @WebServlet ("/UserAccessServlet") then I just made some small changes (new println statements) but it shows no effect I changed the server name with the following peice of code html file: <form action="SQA_Servlet" method = "get"> java class: @WebServlet ("/SQA_Servlet") but it

BouncyCastle on the server side with Android phones as clients

不打扰是莪最后的温柔 提交于 2019-12-06 16:16:14
I'm currently having some difficulties with getting BouncyCastle to work. Been searching on this for a couple of days now, so I'm hoping you can provide any helpful insights. Here's the set-up. Using REST-protocol, the Android-client sends POST-messages to the server. I made a separate project with classes representing these messages, so that I can include this as a library on both the client and the server. The message-objects are first parsed to a JSON-string and afterwards interpreted on the server. For the sake of data-integrity, a message contains a digital signature (DSA). I asked a

Cannot launch RMI Fibonacci server

冷暖自知 提交于 2019-12-02 15:31:54
问题 I am learning Java RMI and I have created a very simple server that calculates Fibonacci numbers. The server (FibonacciServer) creates an object responsible for calculating the sequence (Fibonacci) and that object implements an interface (IFibonacci): FibonacciServer.java: package myrmifibonacciserver; import java.net.MalformedURLException; import java.rmi.Naming; import java.rmi.RemoteException; public class FibonacciServer { public static void main(String args[]){ try{ Fibonacci fib = new

Cannot launch RMI Fibonacci server

大憨熊 提交于 2019-12-02 11:26:46
I am learning Java RMI and I have created a very simple server that calculates Fibonacci numbers. The server (FibonacciServer) creates an object responsible for calculating the sequence (Fibonacci) and that object implements an interface (IFibonacci): FibonacciServer.java: package myrmifibonacciserver; import java.net.MalformedURLException; import java.rmi.Naming; import java.rmi.RemoteException; public class FibonacciServer { public static void main(String args[]){ try{ Fibonacci fib = new Fibonacci(); Naming.rebind("fibonacci", fib); System.out.println("Fibonacci Server ready."); }catch