Why is the url form is Bad URL format?

0

URL:

jdbc:hive://atlas-ch2-66.sys.comcast.net:10000/default (what is wrong with URL?)

Error:
net.sf.jasperreports.engine.JRException: java.lang.IllegalArgumentException: Bad URL format
at com.jaspersoft.connectors.hive.adapter.HiveDataAdapterService.test(HiveDataAdapterService.java:92)
at com.jaspersoft.studio.data.wizard.AbstractDataAdapterWizard$3.run(AbstractDataAdapterWizard.java:163)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: java.lang.IllegalArgumentException: Bad URL format
at org.apache.hive.jdbc.Utils.parseURL(Utils.java:185)
at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:84)
at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:104)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at com.jaspersoft.connectors.hive.connection.HiveConnection.createConnection(HiveConnection.java:175)
at com.jaspersoft.connectors.hive.connection.HiveConnection.<init>(HiveConnection.java:81)
at com.jaspersoft.connectors.hive.adapter.HiveDataAdapterService.createConnection(HiveDataAdapterService.java:68)
at com.jaspersoft.connectors.hive.adapter.HiveDataAdapterService.test(HiveDataAdapterService.java:89)
... 2 more
 
polubothusatish's picture
Joined: Jul 23 2013 - 6:10am
Last seen: 5 years 7 months ago

What version of JasperServer are you using?

marianol - 5 years 8 months ago

im using the lastet vesersion 5.51 

polubothusatish - 5 years 7 months ago

2 Answers:

0

Is it possible that you're trying to use hive2?

Snippets from the Hivesever2 Utils.jar:

  public static final String URL_PREFIX = "jdbc:hive2://";
...
  public static JdbcConnectionParams parseURL(String uri) throws IllegalArgumentException {
    JdbcConnectionParams connParams = new JdbcConnectionParams();
    if (!uri.startsWith(URL_PREFIX)) {
      throw new IllegalArgumentException("Bad URL format");    (This is line 185)
    }

The bigger problem is that hive2 is not supported in v5.5. It will be in v5.6.

djohnson53's picture
73707
Joined: May 25 2012 - 11:10am
Last seen: 7 hours 11 min ago

Thank You!!

polubothusatish - 5 years 7 months ago
0

Because the format should be

jdbc:/hive://hostname:port/

hozawa's picture
51078
Joined: Apr 24 2010 - 4:31pm
Last seen: 4 months 1 week ago

Hi,

I did pass in the url as this jdbc:hive://atlas-ch2-66.sys.comcast.net:10000/ but still getting the same error. Did I write it properly?

polubothusatish - 5 years 7 months ago
Feedback