I just installed Ubuntu 64Bit on my VServer and JRE build 1.7.0_67-b01. If I want to run a java jar-file it says Invalid maximum heap size: -Xmx Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. java -help says java version “1.7.0_67” Java(TM) SE Runtime Environment (build 1.7.0_67-b01) Java HotSpot(TM) 64-Bit Server
Tag: java
Java POS printer error
I’m novice to Java, and I’m developing POS application using java. I bought an Epson POS printer for this project. Printer model is EPSON TM-U220. I’ve installed JavaPos and, my code snippet as follows. but when running I get this error. Appreciate if anyone could help me with this problem. Here is the jpos.xml file Answer I’ve solved it my
Hibernate – automatically delete children when updating parent
I have two tables. Site have a lot of Sectors. When I try to edit the list of sectors of a site, for example I have 3 sectors initially, so I delete one sector and I update the site. in the database are three sectors of the Site. Is it possible that the sectors are automatically deleted when I update
Unwanted quotes in substituted freemarker template fields
I’m generating contents out of a Freemarker template but I get quoted values in my substituted fields. For JSON object In template: I get While I want The Object I feed it with is a JsonNode-tree obtained by Mapping my object with Jackson annotations: Processor: I have the feeling I’m missing some kind of configuration? Answer FreeMarker doesn’t add the
The object-oriented approach to a many-to-many relationship
I’m battling at the moment in trying to understand how to approach this issue in an object-oriented way. With a many-to-many relationship such as Students-Subjects, where each student gets a mark for a certain subject, assuming the following: I want to be able to display all the marks for a given student. I want to display all the marks from
Java XML serialization error: Invalid UTF-16 Surrogate detected
I have an org.w3c.dom.Document and want to serialize it with this function, but I get an SAXException. How could I fix this? This results in the following error: Answer The Document contained invalid Unicode characters like http://www.fileformat.info/info/unicode/char/d835/index.htm I fixed it with the solution from removing invalid XML characters from a string in java
Thymeleaf: how to use conditionals to dynamically add/remove a CSS class
By using Thymeleaf as template engine, is it possible to add/remove dynamically a CSS class to/from a simple div with the th:if clause? Normally, I could use the conditional clause as follows: We will be creating a link to the lorem ipsum page, but only if condition clause is true. I’m looking for something different: I’d like the block to
java.security.cert.CertPathValidatorException: Trust anchor for certification path not found. Android 2.3
In my server (production server), I have a goDaddy ssl certificate. I have both iOS and Android apps connecting with the server, iOS connecting with no problems, android with versions 4.* everything is good, but with devices with 2.3.* I always get a SSLHandshakeException. I did exactly like on Android Developers page (https://developer.android.com/training/articles/security-ssl.html). I already saw similar threads here in
Spring JMS(ActiveMQ) delayed delivery of messages
We’re trying to set a delay on some JMS messages, so that a message will only be added to the queue/ received by the listener after x time. So far we’ve tried 2 approaches that didn’t work. 1) According to the spring documentation, we can set the delivery delay on the JMSTemplate. This is the sample code we tried: However,
Removing values from a custom LinkedList class
This custom class mimics the functionality of Java’s LinkedList Class except it only takes integers and obviously lacks most of the functionality. For this one method, removeAll(), I am to go through each node for the list and remove all nodes with that value. My problem is that when the first node in the list contains the value to be