Start a new topic

DbVisualizer Pro 9.5.5: error when exporting function

When I right click on a schema, choose export, choose "functions" and then this function:

CREATE OR REPLACE FUNCTION "public"."weeknum" (d date)  RETURNS integer
AS $dbvis$
select extract(week from d)::int
$dbvis$ LANGUAGE sql

I get the following error when clicking on "export": 

2017-01-10 09:34:09.976 WARN   419 [ExecutorRunner-pool-2-thread-38 - C.ᅣチ] Internal error while executing: @ddl function="public.weeknum (date)" drop="true" native="true"
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
	at java.lang.String.substring(
	at com.onseven.dbvis.Z.B.L.ᅣヨ(Z:650)
	at com.onseven.dbvis.Z.B.L.ᅣツ(Z:426)
	at com.onseven.dbvis.K.B.P.ᅣツ(Z:708)
	at com.onseven.dbvis.K.B.P.ᅣᄀ(Z:1101)
	at com.onseven.dbvis.K.B._.ᅣワ(Z:2717)
	at com.onseven.dbvis.K.B._.ᅣホ(Z:2518)
	at com.onseven.dbvis.K.B.C.ᅣチ(Z:2034)
	at com.onseven.dbvis.K.B.C.ᅣツ(Z:2384)
	at com.onseven.dbvis.K.B.C.ᅣᄀ(Z:700)
	at com.onseven.dbvis.K.B._.ᅣワ(Z:2717)
	at com.onseven.dbvis.K.B.L.ᅣツ(Z:1374)
	at com.onseven.dbvis.K.B.L.doInBackground(Z:1521)
	at javax.swing.SwingWorker$
	at java.util.concurrent.ThreadPoolExecutor.runWorker(
	at java.util.concurrent.ThreadPoolExecutor$

 I'm running DbVisualizer Pro 9.5.5

Hi Terje,

Thanks for reporting this. I am able to reproduce it and will look for a solution.

Best Regards,



Just to inform you that DbVisualizer 9.5.6 has just been released with a fix for the issue you reported.. 


Easiest is that you open Help->Check for Update in DbVisualizer to perform the upgrade. 

An alternative is that you download from our web site:



Login or Signup to post a comment