db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trejkaz <trej...@trypticon.org>
Subject Derby and database names containing a semicolon
Date Fri, 02 Sep 2011 07:01:42 GMT
Hi all.

I am getting an error like this when the database directory has a
semicolon in it:

java.sql.SQLException: The URL
'jdbc:derby:C:\Users\Me\Desktop\one;two' is not properly formed.
	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:98)
	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:142)
	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:148)
	at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:227)
	at org.apache.derby.jdbc.InternalDriver.getAttributes(InternalDriver.java:376)
	at org.apache.derby.jdbc.InternalDriver.connect(InternalDriver.java:190)
	at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(EmbeddedDataSource.java:480)
	at org.apache.derby.jdbc.EmbedPooledConnection.openRealConnection(EmbedPooledConnection.java:178)
	at org.apache.derby.jdbc.EmbedPooledConnection.<init>(EmbedPooledConnection.java:119)
	at org.apache.derby.jdbc.EmbedPooledConnection40.<init>(EmbedPooledConnection40.java:54)
	at org.apache.derby.jdbc.Driver40.getNewPooledConnection(Driver40.java:178)
	at org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource.createPooledConnection(EmbeddedConnectionPoolDataSource.java:129)
	at org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource.getPooledConnection(EmbeddedConnectionPoolDataSource.java:75)


However, I am using EmbeddedConnectionPoolDataSource, so I am not the
one providing the URL.  It seems like Derby is generating a URL which
it subsequently decides is invalid.

Q1. Shouldn't it be escaping it or something?

Q2. Is there some way to get around this?

TX

Mime
View raw message