Quantcast
Channel: MySQL Forums - Connector/J, JDBC and Java
Viewing all 884 articles
Browse latest View live

problem with the connector (no replies)

$
0
0
Hi i import the jar file mysql-connector-java-5.1.14-bin into the libraries but still the error message appears.

Couldn't connect: print out a stack trace and exit.
com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Unknown character set: 'utf8mb4'

Some help would be nice. Here is my code.

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;


public class MySQL_Connection {

public MySQL_Connection()
{
try {
Class.forName("com.mysql.jdbc.Driver");
} catch (ClassNotFoundException cnfe) {
System.err.println("Couldn't find driver class:");
cnfe.printStackTrace();
}

Connection c = null;

try {
c = DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/panos","root", "dei");

} catch (SQLException se) {
System.out.println("Couldn't connect: print out a stack trace and exit.");
se.printStackTrace();
System.exit(1);
}
/////////////////////////////////////////////////////////////////////

Statement s = null;
try {
s = c.createStatement();
} catch (SQLException se) {
System.out.println("We got an exception while creating a statement:" +
"that probably means we're no longer connected.");
se.printStackTrace();
System.exit(1);
}

ResultSet rs = null;
try {
rs = s.executeQuery("SELECT * FROM customers");
} catch (SQLException se) {
System.out.println("We got an exception while executing our query:" +
"that probably means our SQL is invalid");
se.printStackTrace();
System.exit(1);
}

int index = 0;


try {
while (rs.next()) {
System.out.println(rs.getString(1)+" "+rs.getString(2));
}
} catch (SQLException se) {
System.out.println("We got an exception while getting a result:this " +
"shouldn't happen: we've done something really bad.");
se.printStackTrace();
System.exit(1);
}
}
public static void main(String[] s)
{
new MySQL_Connection();
}
}

JConnector and Java Webstart (no replies)

$
0
0
Hello,

I am successfully deploying a standalone java application using Java Webstart. I an using the JDBC connector from "mysql-connector-java-5.1.10-bin.jar" to connect to a remote database. The application is intended to run in offline mode and go online only when updates are available. The application runs without problems when the Java Webstart server is online. Problems appear when the server is down. Because the application is started using ./javaws -offline /../myapp.jnlp, having an offline server should not make any difference.
After studying the logs from both client and server i found out that the application is requesting the MySql Driver from the server even if it already has it cached. The request is made when DriverManager.getConnection is executed. I mention that the ClassLoader given as parameter to the getConnection method is the same classloader that loaded the application.

MySQLSyntaxErrorException thrown from Field during getCollation call in cross-db view (1 reply)

$
0
0
I have 2 databases, and in one, I have a view that reads from a table in the other. The code used to read the data from the view is generic, and so reads the ResultSetMetaData to obtain information about the columns in the result set, which is generated from a simple "select * from viewname" query.

As it is processing through the columns of the resultset, the columns seem to be identified properly for the catalog from which they come. For example, if the db names are 'A' and 'B', respectively, and the view 'viewname' is in db 'B' looking at 'table1' in db 'A', then the 'getCatalogName()' method properly returns 'A' for all columns within the view coming from 'table1' in db 'A'.

However, when the code invokes the 'isCaseSensitive()' method from the ResultSetMetaData AND the column is a VARCHAR type, the driver code invokes Field.getCollation(), which evidently is generating a SQL statement attempting to get collation information for the column actually in db 'A', but is using the viewname from db 'B'.

I suspect the query is something like"

select ??? from A.viewName ....

It is using the name of the view within db 'B', but the name of the actual column's catalog, which is db 'A', and it is therefore throwing the following exception.


com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'A.viewname' doesn't exist
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3250)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3179)
at com.mysql.jdbc.Statement.executeQuery(Statement.java:1207)
at com.mysql.jdbc.Field.getCollation(Field.java:360)
at com.mysql.jdbc.ResultSetMetaData.isCaseSensitive(ResultSetMetaData.java:560)


Of course, 'viewname" doesn't exist in db 'A', but in db 'B', so the language of the exception is technically correct, but the 'getCollation' method of the Field class doesn't seem to be smart enough to know this.

Other than wrapping the isCaseSensitive call in a try/catch for this case, is there a known fix?

Having troubles connecting. (1 reply)

$
0
0
Hi,

My code is as follows, which is from http://www.kitebird.com/articles/jdbc.html but slightly modified. (My database is called "mrknowitall"):
__________________________________________________________________________________
import java.sql.*;

public class Connect
{
public static void main (String[] args)
{
Connection conn = null;

try
{
String userName = "root";
String password = "mypassword";
String url = "jdbc:mysql://localhost/mrknowitall";
Class.forName ("com.mysql.jdbc.Driver").newInstance ();
conn = DriverManager.getConnection (url, userName, password);
System.out.println ("Database connection established");
}
catch (Exception e)
{
System.err.println ("Error message: " + e.getMessage ());
}
finally
{
if (conn != null)
{
try
{
conn.close ();
System.out.println ("Database connection terminated");
}
catch (Exception e) { /* ignore close errors */ }
}
}
}
}
__________________________________________________________________________________

I am able to compile and run it like so:
__________________________________________________________________________________

CLASSPATH=mysql-connector-java-5.1.14-bin.jar
javac Connect.java
java Connect
__________________________________________________________________________________

Problem is that I get this error:
__________________________________________________________________________________

Error message: com.mysql.jdbc.Driver
__________________________________________________________________________________

Any help much appreciated.

Need help with Connector/MXJ embedded MySQL behavior (1 reply)

$
0
0
Hi all,

I am developing a simple easy to use application, where one app is embedded mysql server with Connector/MXJ and Connector/J. Another is a client program which access this server using Connector/J.
I have tested this in windows machine and it works fine. Currently I am testing it in linux machine but found that mysql (embedded) does not behave as it should.

The problem is as follows:
----------------------------
In my url string, I have 'createDatabaseIfNotExist=true'

In Windows machine, when run for the first time it creates the database and tables automatically (as expected). This doesn't happen in linux machine. It runs fine but no database is created.

I am using Connector/MXJ 5-0-11 and Connector/J 5.1.14


Thanks
Deepak

NullPoiter Exception while calling executeupdate (no replies)

$
0
0
Hi,

I have JAVA code to insert data in MySql DB. It works fine. But sometimes it throws nullpointer exception while calling executeUpdate() method.

It doesnt seems issue with connection as it is able to make connection but when calling execute update through preparedstatement it throws nullpointer.

Once error occurs it doesnt able to run without error untill i restart the whole application.

I am using driver mysql-connector-java-5.1.7-bin and DB version is mysql-5.1.48.

Is it any MySql bug?

Java code is:-

private boolean loadEventHeaderData(Connection connection, EventHeaderBean eventBean, String loadDate) throws DataLoaderException, SQLException
{
boolean insertHeaderFlag = false;
//int key=0;
java.sql.PreparedStatement cs = null;
ResultSet rs = null;

String insertEventHeader = "INSERT INTO Event_header (sequencenum, Event_name, Address, Customercode, Terminal_unique_id, Terminalid, Event_uri, Load_date, mac_address) values (?,?,?,?,?,?,?,str_to_date(?,'%d-%m-%Y %T'),?)";


try
{
cs = connection.prepareStatement(insertEventHeader);

cs.setString(1,eventBean.getSequencenum());
cs.setString(2,eventBean.getEventName());
cs.setString(3,eventBean.getAddress());
cs.setString(4,eventBean.getCustomerCode());
cs.setString(5,eventBean.getTerminalUniqueID());
cs.setString(6,eventBean.getTerminalID());
cs.setString(7,eventBean.getEventURI());
cs.setString(8,loadDate);
cs.setString(9,eventBean.getMacAddress());

logger.info("eventBean.getMacAddress()--------- "+eventBean.getMacAddress());
logger.info("insertEventHeader QUERY---- "+insertEventHeader.toString());
cs.executeUpdate();

insertHeaderFlag = true;

}catch(SQLException sqlex){
logger.error(PredUtil.getStackTrace(sqlex));
throw new DataLoaderException();
}catch (Exception ex){
logger.error(PredUtil.getStackTrace(ex));
throw new DataLoaderException();
}finally{
cs.close();
rs.close();
}
return insertHeaderFlag;
}


It throws error at line cs.executeUpdate();

Can someone please help me to understand the issue. If it is bug, which driver or DB should be used?

Thanks for your help in advance!

Regards
Archana

connection persistence for prepared statements (2 replies)

$
0
0
Hi,

I'm having trouble figuring out whether and how to use prepared statements for a system using java servlets with JDBC. Some of my queries join numerous tables so I would think that prepared statements would help a lot. However, I'm confused about costs and benefits and don't want to add complexity to the system for nothing.

1. If I prepare a query including question marks each time with a different connection from my pool, will this help performance? I have read some posts suggesting that either Java or MySql caches query optimization plans keyed by the query.

2. Alternatively, if I keep a connection associated with each prepared query, will I run into timing conflicts as multiple servlets try to execute the prepared statement at the same time?

The situation seems to be fairly confusing because Java/JDBC "emulates" prepared statements, while there are tradeoffs within MySql such as loss of caching of query results when using prepared statements. So I would also appreciate a pointer to an overall discussion of whether and how to use prepared statements with Java/JDBC and MySql.

Thanks,
Peter

Problems with connections pool in Tomcat (no replies)

$
0
0
Hi all,

I have a problem with:
Tomcat 6.0 + MySQL 5.1 + mysql-connector.

I configured the connection in tomcat like this:

<Resource driverClassName="com.mysql.jdbc.Driver"
logAbandoned="false"
maxActive="35"
maxIdle="2"
maxWait="5000"
name="jdbc/TheName"
password="password"
removeAbandoned="true"
removeAbandonedTimeout="60"
type="javax.sql.DataSource"
url="jdbc:mysql://localhost:3306/schema"
username="user"/>

In MySql I have good configured the wait_timeout and the interactive_timeout in 28800.

The problem is that the pool never removes the connection and when the mysql closes it, I got this exception:
java.sql.SQLException: Already closed

Some idea?

These configuration was worked properly in MySQL 4.1 and Tomcat 5.5..

Thanks!

Ramon Garcia

java.lang.ClassNotFoundException: com.mysql.jdbc.Driver (no replies)

$
0
0
I am getting java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
this exception,but I have already install the mysql-connector.jar file in WEB-INF/lib directory, after that also I get this exception.
plz somebody help me.
Thank you.

Record Locking InnoDB (no replies)

$
0
0
Hi there,

Does anybody know what the correct way would be in order to do the following. I'm using MYSQL since the last 4 months, and MYSQL does have a different way of processing locks than other engines I have used before.

Basically I need to read a record/s out of a table, and after getting the detail of these records, update them to a state to not allow re-use.

Now, my application is a multi-threaded environment, so concurrency is an issue. First I thought of handling mutex's in my application, but since MYSQL supports record locking, I thought I'd give it a bash.

I currently do the following on each different Thread connection:

1 - set autocommit=0;
2 - set session transaction isolation level READ COMMITTED;
3 - START TRANSACTION;
4 - SELECT * FROM Item WHERE Status = 0 AND BuyProduct = 7 LIMIT 5 FOR UPDATE;
5 - [Loop through above recordset and update] UPDATE Item SET Status = 1 WHERE id = ?
6 - COMMIT

Now imagine 1000 threads 'attacking' this table at the same time....

I get a lot of MySQLTransactionRollbackExceptions because numerous threads are attempting to update the same records, due from the select clause. Even though I specify FOR UPDATE?

Does anybody have some advice?

W

MySQL connector issue with Eclipse RCP (no replies)

$
0
0
All,

I am getting the com.mysql.jdbc.Driver exception when trying to load the Driver class using Class.forName("com.mysql.jdbc.Driver"). I have written a custom Eclipse plugin and wanted to access the database in my custom Eclipse plugin.

I have tried following 2 options, both obviously failed:
1 > Adding the mysql connection JAR file to the Eclipse plugin build path
2 > Adding the connector JAR file as library and adding to the plugin's runtime classpath

Can anyone please help me out on this?

SOURCE command and JDBC driver (no replies)

$
0
0
Hi,
I have an issue with the SOURCE command when I using it through the JDBC driver.
When I execute
ResultSet resultSet = statement.executeQuery("SOURCE c:/temp/MySQLfile.sql");
I get an exception
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SOURCE c:/temp/MySQLfile.sql' at line 1

When I execute the same query in the mysql command line it works fine.

I have tried to use phpmyadmin with the SOURCE command but with no luck.

So is it possible to use the SOURCE command through the JDBC driver?

Column Index out of range, 0 < 1 (1 reply)

$
0
0
Alright, so heres a weird one for you, when I try the following:
Statement s = c.createStatement();
ResultSet rs = s.executeQuery("SELECT * FROM usermap");
rs.next();

I get the following exception:
java.sql.SQLException: Column Index out of range, 0 < 1

Now here's where it gets weird, when I try this command:
rs.getMetaData().getColumnCount()

I get 29, and when I try this command
s.execute("SELECT * FROM usermap")

it returns true. Now here is where it gets really, really weird. When I execute the same query in the main method, if works just fine. It's just when I embed the command in the method of an object.

I have the latest versions of both mysql and the connector.

Can anyone help me with this?

Default databse transaction isolation level is hardcoded? (no replies)

$
0
0
Hi,

as far as I can see from the source code, driver's fallback isolation level if not properly resolved from db is TRANSACTION_READ_COMMITTED. Code snippets from ConnectionImpl:

{code}
/** isolation level */
private int isolationLevel = java.sql.Connection.TRANSACTION_READ_COMMITTED;

public synchronized int getTransactionIsolation() throws SQLException {
....
if (versionMeetsMinimum(4, 0, 3)) {
query = "SELECT @@session.tx_isolation";
offset = 1;
} else {
query = "SHOW VARIABLES LIKE 'transaction_isolation'";
offset = 2;
}
....
{code}


However I am curious and confused about this method within DatabaseMetaData.java:

{code}
/**
* What's the database's default transaction isolation level? The values are
* defined in java.sql.Connection.
*
* @return the default isolation level
* @throws SQLException
* if a database access error occurs
* @see Connection
*/
public int getDefaultTransactionIsolation() throws SQLException {
if (this.conn.supportsIsolationLevel()) {
return java.sql.Connection.TRANSACTION_READ_COMMITTED;
}

return java.sql.Connection.TRANSACTION_NONE;
}
{code}



Shoudn't this return the database's default since it has been resolved? Why is it hardcoded? Maybe you mean the driver's default if it cannot be resolved from the db, as implemented in ConnectionImpl.java? Maybe the method documentation is wrong?

Thanks in advance!

Unable to set up MySQL database within Jena Semantic Web Framework (no replies)

$
0
0
Hi all,

I'm attempting to use the Jena semantic web framework to set up a MYSQL database-backed RDF model, using the following code:

String DBurl = "jdbc:mysql://localhost/test"; // url of database server
String DB = "MySQL"; // database type
String className = "com.mysql.jdbc.Driver"; //i.e. driver
Class.forName(className); // load driver
String user = "root"; // database user id
String pass = "pass"; //database password
String type = "text";

// Create a database connection object
DBConnection connection = new DBConnection(DBurl, user, pass, DB);

// Get a ModelMaker for database-backed models
ModelMaker maker = ModelFactory.createModelRDBMaker(connection);

// Create a new model named "sensorNet."
Model sensorNetModel = maker.createModel("BillDB",true);

// Start a database transaction.
model.begin();

// Read and load ontology file
InputStream in = FileManager.get().open("Ontologies/sweetAll.owl");
model.read(in,null);

// Commit the database transaction
model.commit();

When I run this code using Eclipse, the following messages are provided:

ERROR [main] (RDFDefaultErrorHandler.java:40) - unknown-source: {E213} null
Exception in thread "main" java.lang.UnsupportedOperationException: this model does not support transactions
at com.hp.hpl.jena.graph.impl.SimpleTransactionHandler.notSupported(SimpleTransactionHandler.java:30)
at com.hp.hpl.jena.graph.impl.SimpleTransactionHandler.commit(SimpleTransactionHandler.java:27)
at com.hp.hpl.jena.rdf.model.impl.ModelCom.commit(ModelCom.java:1089)
at MetadataQuery.main(MetadataQuery.java:130)

Any suggestions?

Thanks, in advance, Bill

first time for the login it shows throws the exception (4 replies)

$
0
0
On the first login of the day it throws the exception

first time login shows exception as
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: FUNCTION user_identification does not exist.

Next subsequent time it does not show error. What is the problem I am unable to get;
Thanks.

WHQL (no replies)

$
0
0
I've recently been given the task of testing our software solution for Microsoft Gold Competency. One of the requirements is that the ISV have documented proof for all drivers, having passed Microsoft's WHQL tests.

Has the JDBC driver for mysql passed WHQL?

If so, how can I acquire the documentation proving this?

Any help is greatly appreciated.

MySQL java.net.SocketException: Broken pipe (no replies)

$
0
0
Hi,

I have been working around this issue for sometime now, but haven't figured out the desired results.

I have java hibernate and Mysql application. I get random stack traces:

18:28:13,163 DEBUG GooGooStatementCache:271 - checkinStatement(): com.mchange.v2.c3p0.stmt.GlobalMaxOnlyStatementCache stats -- total size: 300; checked out: 0; num connections: 3; num keys: 300
18:28:13,168 DEBUG GooGooStatementCache:697 - CULLING: select milestone0_.milestoneId as mileston1_27_, milestone0_.releaseId as releaseId27_, milestone0_.milestoneTypeId as mileston3_27_, milestone0_.milestoneDate as mileston4_27_, milestone0_.displayName as displayN5_27_, milestone0_.description as descript6_27_ from Milestone milestone0_ where milestone0_.releaseId=? and milestone0_.milestoneTypeId=?
18:28:13,168 WARN StatementUtils:48 - Statement close FAILED.
com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.net.SocketException
MESSAGE: Broken pipe

STACKTRACE:

java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2637)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1554)
at com.mysql.jdbc.ServerPreparedStatement.realClose(ServerPreparedStatement.java:908)
at com.mysql.jdbc.ServerPreparedStatement.close(ServerPreparedStatement.java:476)
at com.mchange.v1.db.sql.StatementUtils.attemptClose(StatementUtils.java:41)
at com.mchange.v2.c3p0.stmt.GooGooStatementCache$1StatementCloseTask.run(GooGooStatementCache.java:404)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)

I am trying to log the closed statements but no luck so far. I am using log4j to log c3p0 and hibernate logs.

Is there a way to log the sql connections? Also is there any other solution?

Thanks,
Priyanka

JDBC Connection Problem (1 reply)

$
0
0
My task is to read the tag number when I scan a tag in the RFID reader, and take that number to match with an identical number in the database. Then, I extract the data in the same row as that matched number.

E.g. I have scanned in the tag with tag number "4400E6EF1A57" and it matches with the attribute "usernum" in my databse.

The problem I am currently having is that I cannot connect to the database. I suspect there is a problem with "Connection con". Now I keep receiving the "no connection" exception.

Here is my code. Class Usercon is used to define the variables in the database and prints out the data. Class trying5 is for reading the RFID tag.




import java.sql.*;
import java.util.*;


public class usercon{

int usernum;
int sports;
int books;
int music;
int technology;
int food;
int fitness;
String idNum;

Connection con;

public usercon(Connection connect, String idNum){
this.con = connect;
this.idNum = idNum;
//Connection connection = null;
}

public void displayadvertuser(){
try{

ResultSet rs = con.createStatement().executeQuery("SELECT * FROM advertuser");
while(rs.next()){
if(idNum == rs.getString(usernum)){
break;
}
}

System.out.println(rs.getInt(books)+ rs.getInt(fitness)+ rs.getInt(food)+ rs.getInt(music)+ rs.getInt(sports)+ rs.getInt(technology));
con.createStatement().close();
}
catch (SQLException sq) {
sq.printStackTrace();
}
}
}




import java.io.*;
import java.util.*;
import gnu.io.*;
import java.sql.*;


public class trying5 implements Runnable, SerialPortEventListener {
static Enumeration portList;
static CommPortIdentifier portId;

SerialPort serialPort;
InputStream inputStream;
Thread readThread;
Connection con;

public static void main(String[] args) {
portList = CommPortIdentifier.getPortIdentifiers();
while (portList.hasMoreElements()) {
portId = (CommPortIdentifier) portList.nextElement();
if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) {
if (portId.getName().equals("COM3")) {
trying5 reader = new trying5();

}
}
}
}

public trying5() {
try {
// Load the JDBC driver

DriverManager.registerDriver( new oracle.jdbc.driver.OracleDriver());

con = DriverManager.getConnection(
"jdbc:oracle:thin:@localhost:1521:ug", "ora_l6k7@ug", "a16373937");

} catch (SQLException e) {
// Could not connect to the database
System.out.println("no connection");
}

try {
serialPort = (SerialPort) portId.open("trying5Application", 2000);
}
catch (PortInUseException e)

{
System.out.println(e);
}

try {
inputStream = serialPort.getInputStream();
}
catch (IOException e)

{
System.out.println(e);
}

try {
serialPort.addEventListener(this);
}
catch (TooManyListenersException e)

{
System.out.println(e);
}

serialPort.notifyOnDataAvailable(true);

try {
serialPort.setSerialPortParams(9600,
SerialPort.DATABITS_8,
SerialPort.STOPBITS_1,
SerialPort.PARITY_ODD);

}

catch (UnsupportedCommOperationException e)
{
System.out.println(e);
}

readThread = new Thread(this);
readThread.start();

}

public void run() {
try {
Thread.sleep(20000);
}
catch (InterruptedException e)
{
System.out.println(e);
}
}

public void serialEvent(SerialPortEvent event) {
switch(event.getEventType()) {
case SerialPortEvent.BI:
case SerialPortEvent.OE:
case SerialPortEvent.FE:
case SerialPortEvent.PE:
case SerialPortEvent.CD:
case SerialPortEvent.CTS:
case SerialPortEvent.DSR:
case SerialPortEvent.RI:
case SerialPortEvent.OUTPUT_BUFFER_EMPTY:
break;

case SerialPortEvent.DATA_AVAILABLE:


// print to console

try {

byte[] buf = new byte[12];

int len = inputStream.read(buf,0,buf.length);
if (len != buf.length ) {
throw new RuntimeException("the stream is closed");
}

String newtuple = new String(buf);
System.out.println();
// System.out.print(newtuple+ "\t");

if(newtuple.equals(new String("4400E6EF1A57"))){

usercon newcon = new usercon(con, newtuple);

System.out.print(newtuple);
newcon.displayadvertuser();

}

else if(newtuple.equals(new String("4400E6EB6029"))){

usercon newcon = new usercon(con, newtuple);

System.out.print(newtuple);
newcon.displayadvertuser();

}

else if(newtuple.equals(new String("4400E6ACDFD1"))){

usercon newcon = new usercon(con, newtuple);

System.out.print(newtuple);
newcon.displayadvertuser();

}

else if(newtuple.equals(new String("4400E6E6E0A4"))){

usercon newcon = new usercon(con, newtuple);

System.out.print(newtuple);
newcon.displayadvertuser();

}


else if(newtuple.equals(new String("4400E6C0FA98"))){

usercon newcon = new usercon(con, newtuple);

System.out.print(newtuple);
newcon.displayadvertuser();

}

else if(newtuple.equals(new String("4400E6FF6D30"))){

usercon newcon = new usercon(con, newtuple);

System.out.print(newtuple);
newcon.displayadvertuser();

}



} catch (IOException e)
{
System.out.println(e);
}
break;
}
}
}

Broken pipe exception (no replies)

$
0
0
java.net.SocketException: Broken pipe

in my spring webapplication i am getting this exception..,i am using hibernate and my data base is mysql...,

if any one know how to fix this problem ...,please share with me
Viewing all 884 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>