Skip to content

Commit

Permalink
Fixing Derby
Browse files Browse the repository at this point in the history
  • Loading branch information
semancik committed Mar 16, 2015
1 parent 9b9b993 commit 7d322c3
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
16 changes: 16 additions & 0 deletions build-system/pom.xml
Expand Up @@ -74,6 +74,7 @@
<xmlsec.version>2.0.1</xmlsec.version>
<connid.version>1.4.0.49</connid.version>
<jasper.version>6.0.0</jasper.version>
<derby.version>10.11.1.1</derby.version>
</properties>
<dependencyManagement>
<dependencies>
Expand Down Expand Up @@ -568,6 +569,21 @@
<artifactId>velocity</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>${derby.version}</version>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbynet</artifactId>
<version>${derby.version}</version>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbyclient</artifactId>
<version>${derby.version}</version>
</dependency>
<!-- Jasper reports -->
<dependency>
<groupId>net.sf.jasperreports</groupId>
Expand Down
3 changes: 0 additions & 3 deletions infra/test-util/pom.xml
Expand Up @@ -76,19 +76,16 @@
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>10.8.1.2</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbynet</artifactId>
<version>10.8.1.2</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbyclient</artifactId>
<version>10.8.1.2</version>
<type>jar</type>
</dependency>
<dependency>
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010-2013 Evolveum
* Copyright (c) 2010-2015 Evolveum
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -44,7 +44,7 @@ public void testStartStopDerby() throws Exception {

Connection conn = controller.getConnection();

// Check if it empty
// Check if it is empty
Statement stmt = conn.createStatement();
stmt.execute("select * from users");
ResultSet rs = stmt.getResultSet();
Expand All @@ -58,11 +58,12 @@ public void testStartStopDerby() throws Exception {
conn.commit();

// Try to connect over the "network" (localhost)
//Class.forName("org.apache.derby.jdbc.ClientDriver").newInstance();
Class.forName("org.apache.derby.jdbc.ClientDriver").newInstance();
String networkJdbcUrl = "jdbc:derby://"+controller.getListenHostname()+":"+controller.getListentPort()+"/"+controller.getDbName();
Properties props = new Properties();
props.setProperty("user",controller.getUsername());
props.setProperty("password",controller.getPassword());
System.out.println("JDBC Connecting to "+networkJdbcUrl+" as "+controller.getUsername());
Connection networkConn = DriverManager.getConnection(networkJdbcUrl,props);

// Check if it empty
Expand Down

0 comments on commit 7d322c3

Please sign in to comment.