Posts

Java Networking Connection Refused: Connect

Java Networking “Connection Refused: Connect” problem will get in normal production environments. Here, we are mentioning our best to problem with answer and steps to solve the problem. In the below mentioned source code what it is running in the client and server instances. Server: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 import java.io.* ; import java.net.* ; public class Test { public static void main ( String [] args ) { final int PORT_NUMBER = 44574 ; while ( true ) { try { //Listen on port ServerSocket serverSock = new ServerSocket ( PORT_NUMBER ); System . out . println ( "Listening..." ); //Get connection Socket clientSock = serverSock . accept (); System . out . println ( "Connected client" ); //Get input BufferedReader br = new BufferedReader ( new InputStreamReader ( clientSock...

Exception in thread "main" java.lang.NoClassDefFoundError: javax/transaction/SystemException

Exception in thread "main" java.lang.NoClassDefFoundError: javax/transaction/SystemException error we got in Hibernate 4.3 to work with my MySQL database. We are using hibernate code generation tool in Eclipse and we are able to connect to the database using the Hibernate configuration file. When we try to run code in my Main class application is connecting to the database, but transaction is failing and we got the following error: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Exception in thread "main" java . lang . NoClassDefFoundError : javax / transaction / SystemException at java . lang . Class . forName0 ( Native Method ) at java . lang . Class . forName ( Unknown Source ) at org . jboss . logging . Logger . getMessageLogger ( Logger . java : 2248 ) at org . jboss . logging . Logger . getMessageLogger ( Logger . java : 2214 ) at org . hibernate . cfg . Configuration .< clinit >( Configuration . java : 184 ) at be . comp . permanenti...

Caused by: org.hibernate.exception.SQLGrammarException: could not execute query

Caused by: org.hibernate.exception.SQLGrammarException: could not execute query exception we also got in the process of improving application performance. Because, we have upgraded MySQL-connector-java-3.1.10.jar to MySQL-connector-java-5.1.36.jar. After upgrading to the higher version, my application not at all connecting with the Data Base Schema. Because, In my application we are using JNDI data source connection. As per JNDI, MySQL connector jar will not support after MySQL-connector-java-5.1.6.jar. We are using MySQL server version as 5.1. So, I downgraded from MySQL-connector-java-5.1.36.jar to MySQL-connector-java-5.1.6.jar version. Now, Application getting loading Database Schema and started running the application. But, still I am getting the problem in some scenarios where query is not matching with proper MySQL version. Hence, I am again downgraded MySQL jar from MySQL-connector-java-5.1.6.jar to MySQL-connector-java-5.0.8.jar. Now, there are no issues in my applicat...

ERROR - The value ie10 was not previously defined

Error: The value IE6 / IE10 was not previously defined error we will get while trying to build the GWT application with different set of jar versions. There is also the sub exception while processing element 'set-property'. Loading inherited module ' com . sencha . gxt . ui . GXT ' [ java ] Loading inherited module ' com . sencha . gxt . data . Data ' [ java ] Loading inherited module ' com . sencha . gxt . core . Core ' [ java ] [ ERROR ] The value ie10 was not previously defined . [ java ] [ ERROR ] Line 76 : Unexpected exception while processing element ' set - property ' [ java ] com . google . gwt . core . ext . UnableToCompleteException : ( see previous log entries ) [ java ] at com . google . gwt . dev . cfg . ModuleDefSchema $BodySchema . __set_property_end ( ModuleDefSchema . java : 669 ) [ java ] at sun . reflect . GeneratedMethodAccessor10 . invoke ( ...