---
title: "java.lang.ArrayIndexOutOfBoundsException"
author: "etongg"
date: "2009-03-30T19:15:19Z"
tags: ["Java", "MySQL", "SQL"]
slug: "java-lang-arrayindexoutofboundsexception"
draft: false
lastmod: "2009-03-30T19:15:19Z"
id: 357875
url: "https://etongg.iteye.com/blog/357875"
---

```
java.sql.SQLException: Unable to connect to any 
hosts due to exception: java.lang.ArrayIndexOutOfBoundsException:
```

 

原来是mysql的驱动版本有问题，最后使用5.1.6版本就OK了