ANN: MicroOLAP Database Designer for MySQL 2.1.1 is available!

2013-10-23 Thread Aleksander Andreev
This release introduces support for one of the most long-awaited
functionality - MySQL Spatial types! A couple of serious bugs were
fixed.  Everybody should consider upgrading to this version as soon as
possible.

Full changelog:

[!] Spatial types support added!
[+] Sample files are copied on the first run to the My Documents\MicroOLAP
Database Designer for MySQL folder
[-] Cannot open model with views where backquotes (`) used bug fixed
[-] ERangeError occurs when mouse selection area leaves model bounds bug
fixed
[*] Subject corrected for exception tracer messages

You're welcome to download the Database Designer for MySQL 2.1.1 right now
at:
http://microolap.com/products/database/mysql-designer/download/

Login to your private area on our site at http://microolap.com/my/keys/ to
obtain your key if you have a license.

Please don't hesitate to ask any questions or report bugs with our Support
Ticketing system available at
http://www.microolap.com/support/


Query

2013-10-23 Thread Mia Smith
Hi,

My name is Mia Smith and I manage the website Lacartes.com. We are expanding our
online marketplace in your area and I was wondering if you'd like to add your
business to our website for free? Our website is helping 400,000+ people every
month find the businesses, products and services they need. We'd like to invite
you to create a free business page on our website so our users will be able to
find you and share your offerings with their friends and families.

Your business page lets you publish photos, prices, videos, news announcements
and communicate directly with customers. It will appear on all major search
engines like Google so you will benefit from instant online exposure to a large
audience looking for the products and services you offer. It will also feature a
permanent link to send visitors to your own website. We make money through
thirdparty ad banners so we do not charge businesses anything to use our
website. Our goal is to grow our user base and help more people connect with the
products and services they need. It is a win-win situation. 

To set up your free business page, please follow this link:
http://www.lacartes.com/business/add

Please let me know if you encounter any problems or if there is anything you
need. If this email has reached you by mistake or if you do not wish to take
advantage of this free advertising opportunity, please accept my apology for any
inconvenience caused and rest assured that you will not be contacted again.

Many thanks for your time and consideration,

Mia Smith
mi...@lacartes.com
Business Manager
www.lacartes.com



NPE in ResultSetImpl.next()

2013-10-23 Thread Henning Rohlfs
Hello,

I've been trying to figure this problem out for some time now and I'm
totally stuck. The Exception in question is the following:
Caused by: java.lang.NullPointerException
at com.mysql.jdbc.ResultSetImpl.next(ResultSetImpl.java:7009)
at
com.server.persistence.state.connectors.jdbc.JDBCCleanupStateConnector.getUUIDsByTable(JDBCCleanupStateConnector.java:140)
... 8 more

It occurs very infrequently (and unfortunately I have not been able to
reproduce it yet). I have also checked all occurences of getConnection().
Every one of them is wrapped (like below) by try {} finally {if (con !=
null) con.close();}. Connections are not stored locally and used by other
threads later as far as I can tell either.
The last time this problem occured, the thread in question was actually
stuck for 10 minutes (as far as I reconstruct) before the NPE was thrown.
During this time, the thread was seemingly stuck on
SocketInputStream.socketRead0 (see below for stack trace), even though I
set the sockettimeout when creating the db pool.

We're using MySQL Connector/J 5.1.24 (but there are no changes regarding
anything like this problem in 5.1.25 or 5.1.26 - and this problem has
persisted for some versions already) and Tomcat's JDBC Pool 7.0.42.

Best regards
 Henning Rohlfs


@Override
public ListString getUUIDsByTable( final String table) throws
TableNotFoundException {
Connection connection = null;
try {
connection = stateDbIo.getConnection();
final PreparedStatement ps = connection.prepareStatement(
SELECT uuid FROM ` + table+ ` GROUP BY uuid );
final ResultSet rs = ps.executeQuery();
final ListString result = new ArrayListString();
while ( rs.next() ) { //this is where the exception is thrown
result.add( rs.getString( UUID_COLUMN ) );
}
return result;
} catch ( final Exception e ) {
throw new TableNotFoundException( table, e );
} finally {
if ( connection != null ) {
try {
connection.close();
} catch ( final SQLException e ) {
// ignore
}
}
}
}


I'm using the tomcat jdbc database pool (7.0.42) to get the connections.

stateDbIo.getConnection():
public Connection getConnection() throws SQLException {
if ( dataSource != null ) {
final Connection connection = dataSource.getConnection();
connection.setReadOnly( readOnly );
connection.setAutoCommit( true );
return connection;
}
return null;
}


Connection pool settings:
protected String initialSize = 0;
protected String maxActive = 8;
protected String maxIdle = 8;
protected String minIdle = 0;
protected String timeBetweenEvictionRunsMillis = 3;
protected String minEvictableIdleTimeMillis = 6;
protected String validationQuery = SELECT 1;
protected String validationInterval = 3;
protected String testOnBorrow = true;
protected String removeAbandoned = true;
protected String removeAbandonedTimeout = 60;
protected String logAbandoned = true;
protected String jdbcInterceptors =
org.apache.tomcat.jdbc.pool.interceptor.ConnectionState; +
org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer; +
org.apache.tomcat.jdbc.pool.interceptor.ResetAbandonedTimer;
protected String connectionProperties =
[connectTimeout=9;socketTimeout=9;];

props = new Properties();
props.put( url, url );
props.put( driverClassName, driverClass );
props.put( username, username );
props.put( password, password );
props.put( initialSize, initialSize );
props.put( maxActive, maxActive );
props.put( maxIdle, maxIdle );
props.put( minIdle, minIdle );
props.put( timeBetweenEvictionRunsMillis,
timeBetweenEvictionRunsMillis );
props.put( minEvictableIdleTimeMillis, minEvictableIdleTimeMillis
);
props.put( validationQuery, validationQuery );
props.put( validationInterval, validationInterval );
props.put( testOnBorrow, testOnBorrow );
props.put( removeAbandoned, removeAbandoned );
props.put( removeAbandonedTimeout, removeAbandonedTimeout ); //
seconds
props.put( logAbandoned, logAbandoned );
props.put( connectionProperties, connectionProperties );
props.put( jdbcInterceptors, jdbcInterceptors );
return new DataSourceFactory().createDataSource( props );


Stack trace of stuck thread before it threw the exception:
   java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.
socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:150)
at java.net.SocketInputStream.read(SocketInputStream.java:121)
at