gemfire自定义序列化无济于事

我使用gemfire作为我的缓存。 缓存堆大小远高于100GB。 我发现当我们从客户端将数据放入gemfire缓存时,它会将数据序列化并发送到服务器,而在服务器上,数据以序列化forms存储。 问题: 当我尝试执行任何on-server函数调用时,它会开始反序列化数据并且它非常耗时,有时需要一个多小时来迭代缓存中的对象。 (对象数量接近600万)。 我尝试使用gemfire自定义序列化(DataSerializer类)。 并且所有数据在缓存中所占用的内存量大约为60GB,如果我使用Java默认序列化则相同。 我尝试使用一个名为Kryo https://github.com/EsotericSoftware/kryo的库,这确实有很大帮助,但我仍然不明白为什么gemfire序列化对我没有帮助,因为我正在单独序列化该类的每个属性因此编写类标题和任何其他元数据不应该有任何负担。 任何帮助将非常感激。

为什么java中的processBuilder会在5分钟后挂起?

我hava命令行处理超过5分钟。 当我使用ProcessBuilder调用命令行时,它可以在5分钟内完成作业。 如果流程耗时超过5分钟并且流程没有改进,直到我退出流程,流程就会挂起。 p = new ProcessBuilder(“myprogram”,”with”,”parameter”).start(); p.waitFor(); 如果您不理解上述问题,请告诉我?

创建向导Swing

我想使用swing制作一个向导。 我注意到JOptionPane就像向导一样工作,只有输入的数量和组织的方式是有限的。 有没有人知道JOptionPane如何“等待”,直到给出所需的输入并在最后返回值之前按下右键? 有谁知道如何使用JOptionPane,以便可以创建向导的典型cardLayout?

java.time YearMonth作为实体内的类型

你如何在一个实体中使用YearMonth? 我看过很多关于转换器的堆栈溢出答案? 这还需要,如果是这样的话怎么样? @Basic(optional = false) @NotNull @Column(name = “cc_exp_date”) private YearMonth ccExpDate; 我得到的例外情况如下。 我可以将其转换为set方法中的日期,并在实体的get方法中转换回YearMonth作为解决方法吗? MysqlDataTruncation: Data truncation: Incorrect date value: ‘\xAC\xED\x00\x05sr\x00\x0Djava.time.Ser\x95]\x84\xBA\x1B”H\xB2\x0C\x00\x00xpw\x06\x0C\x00\x00\x07\xE2\x02x’ for column ‘cc_exp_date’ at row 1

ActionError消息未在UI中显示

该应用程序是在Struts 1.2上完成的。 我有一个登录表单,所有与登录相关的validation都会正确显示。 对于validation,我使用的是Validator框架。 validation成功但用户身份validation失败后,我无法正确显示登录失败消息。 我在Action中设置ActionError消息,如下所示: Login loginDetails = validateUser(loginForm); if(loginDetails == null){ errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(“error.invalidCredentials”)); return mapping.findForward(“failure”); } 下面是ApplicationResources.properties文件中的条目: error.invalidCredentials=User Name and Password does not match. 当loginDetails为null时,错误被正确添加(我通过调试代码validation了这一点)。 但是消息没有显示在UI中。 这是我在UI中添加的内容: 下面是struts-config文件中的条目: 对于身份validation失败,我将路径指定为具有登录屏幕的同一页面,并将redirect为false 。 请让我知道我错过了什么:) 编辑 完整代码: LoginForm loginForm = (LoginForm)form; HttpSession session = request.getSession(); ActionErrors errors=new ActionErrors(); if(loginForm.getAction().equalsIgnoreCase(“Login”)){ // Provide the NUll Check Login loginDetails […]

Java-Missing WS-Addressing标题:“{http://www.w3.org/2005/08/addressing}Action”

我尝试在java 7中使用客户端到Web服务。我得到它: 警告:表示消息寻址属性的必需标头不存在,问题标题:{ http://www.w3.org/2005/08/addressing }操作com.sun.xml.internal.ws.addressing.model.MissingAddressingHeaderException :缺少WS-Addressing标题:“{ http://www.w3.org/2005/08/addressing } Action” 我该如何解决这个错误? 非常感谢。 –web服务安全性看起来像SOAPUI中的以下部分 – gelistirici gelistirme12 NT357!!_ 2016-05-07T11:57:03.821Z –Web服务接口 – @WebMethod(action = “getRequestDetail”) @WebResult(name = “requestDetail”, targetNamespace = “”) @RequestWrapper(localName = “getRequestDetail”, targetNamespace = “http://xmlns.oracle.com/scheduler”, className = “tr.com.service.soap.client.oracle.ess.beans.GetRequestDetail”) @ResponseWrapper(localName = “getRequestDetailResponse”, targetNamespace = “http://xmlns.oracle.com/scheduler”, className = “tr.com.service.soap.client.oracle.ess.beans.GetRequestDetailResponse”) public RequestDetail getRequestDetail( @WebParam(name = “requestId”, targetNamespace = “http://xmlns.oracle.com/scheduler”) […]

org.hibernate.hql.internal.ast.QuerySyntaxException:意外令牌:*靠近第1行

我必须登录我的网站 Login 在控制器中我有 @RequestMapping(value=”/login”,method=RequestMethod.POST) public String loginUser(@RequestParam(“email”) String email, @RequestParam(“password”) String password,Model model,HttpSession session){ User persistedUser = userService.getUserByEmail(email); if(persistedUser!=null && persistedUser.getPassword().equals(password)){ session.setAttribute(“user”, persistedUser); return “home”; }else{ model.addAttribute(“error”, “Incorrect username or password, Please try again!”); return “login”; } } 在UserService中我将getUserByEmail()作为 public User getUserByEmail(String email) { return (User) em.createQuery(“SELECT * FROM User u WHERE u.email = :email”).setParameter(email, […]

将动态数据源路由与spring-data-rest相结合

我正在使用动态数据源路由,如本博客文章中所示: http : //spring.io/blog/2007/01/23/dynamic-datasource-routing/ 这很好用,但是当我将它与spring-data-rest并浏览我生成的存储库时,我(正确地)得到了一个exception,我的查找键没有定义(我没有设置默认值)。 在与数据库建立任何连接之前,如何以及在何处可以挂钩Spring数据rest请求处理以基于’x’(用户授权,路径前缀或其他)设置lookup-key? 代码方面我的数据源配置主要匹配顶部的博客post,一些基本的实体类,生成的存储库和Spring Boot将所有内容组合在一起。 如果需要我可以发布一些代码,但没有什么可以看到的。

集成了spring 3,hibernate 3,maven和mysql

我在applicationContext.xml中尝试了不同的sessionFactory。 它有同样的问题。 任何建议都会得到提升! applicationContext.xml中 ${jdbc.dialect} ${hibernate.show_sql} ${hibernate.format_sql} 这是pom.xml。 4.0.0 org.peterhuang myweb war 0.0.1-SNAPSHOT myweb Maven Webapp http://maven.apache.org junit junit 3.8.1 test org.springframework spring-core 3.2.4.RELEASE org.springframework spring-webmvc 3.2.4.RELEASE org.springframework spring-context 3.2.4.RELEASE org.springframework spring-orm 3.2.4.RELEASE org.springframework spring-hibernate3 2.0.8 org.springframework spring-tx 3.2.4.RELEASE org.hibernate hibernate-core 4.2.6.Final jstl jstl 1.2 javax.transaction jta 1.1 mysql mysql-connector-java 5.1.26 myweb 这是错误的轨道。 我在eclipse中运行它,在tomcat 7服务器上 […]

读取()时BufferedReader阻塞

我试图创建一个简单的聊天程序,与“服务器”和客户端,现在我的问题是程序阻止从服务器读取消息到客户端,反之亦然。 此示例解决了从客户端到服务器的消息问题。 我在服务器端的示例: private Reader input; private Writer output; try { server = new ServerSocket(this.port); while (true) { Socket connection = server.accept(); serverDisplay(“We have a connection”); input = new BufferedReader(new InputStreamReader( connection.getInputStream())); output = new BufferedWriter(new OutputStreamWriter( connection.getOutputStream())); int c; StringBuffer sb = new StringBuffer(); // This is where it blocks, the input stream should […]