Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update all dependencies #1

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions aspiredb/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
root = true

[production-data-source.xml]
indent_style=tab
2 changes: 1 addition & 1 deletion aspiredb/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ whatever directory CATALINA_HOME is set to).

the contents of aspiredb.properties should be as follows:

jdbc.driverClassName=com.mysql.jdbc.Driver
jdbc.driverClassName=com.mysql.cj.jdbc.Driver

# change this value to whatever the path is to your database with the aspiredb schema
jdbc.url=jdbc:mysql://localhost:3306/aspiredb
Expand Down
607 changes: 244 additions & 363 deletions aspiredb/pom.xml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public static String[] getConfigLocations( boolean testing ) {
* @param paths
*/
private static void addCommonConfig( List<String> paths ) {
paths.add( "classpath*:gemma/gsec/acl/security-bean-baseconfig.xml" );
paths.add( "classpath*:gemma/gsec/applicationContext-*.xml" );
paths.add( "classpath*:application-context.xml" );
paths.add( "classpath*:applicationContext-security.xml" );
paths.add( "classpath*:applicationContext-serviceBeans.xml" );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import ubic.basecode.ontology.model.OntologyTerm;
import ubic.basecode.ontology.providers.DiseaseOntologyService;
import ubic.basecode.ontology.providers.HumanPhenotypeOntologyService;
import ubic.basecode.ontology.search.OntologySearchException;

/**
* @author paul
Expand All @@ -35,7 +36,7 @@ public interface OntologyService extends InitializingBean {
* @param givenSearch
* @return
*/
public Collection<OntologyIndividual> findIndividuals( String givenSearch );
public Collection<OntologyIndividual> findIndividuals( String givenSearch ) throws OntologySearchException;

/**
* Given a search string will look through the loaded ontologies for terms that match the search term. this a lucene
Expand All @@ -44,7 +45,7 @@ public interface OntologyService extends InitializingBean {
* @param search
* @return returns a collection of ontologyTerm's
*/
public Collection<OntologyTerm> findTerms( String search );
public Collection<OntologyTerm> findTerms( String search ) throws OntologySearchException;

/**
* @return the diseaseOntologyService
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import ubic.basecode.ontology.providers.DiseaseOntologyService;
import ubic.basecode.ontology.providers.HumanPhenotypeOntologyService;
import ubic.basecode.ontology.search.OntologySearch;
import ubic.basecode.ontology.search.OntologySearchException;

/**
* Has a static method for finding out which ontologies are loaded into the system and a general purpose find method
Expand Down Expand Up @@ -64,7 +65,7 @@ public void afterPropertiesSet() {
}

@Override
public Collection<OntologyIndividual> findIndividuals( String givenSearch ) {
public Collection<OntologyIndividual> findIndividuals( String givenSearch ) throws OntologySearchException {

String query = OntologySearch.stripInvalidCharacters( givenSearch );
Collection<OntologyIndividual> results = new HashSet<OntologyIndividual>();
Expand All @@ -80,7 +81,7 @@ public Collection<OntologyIndividual> findIndividuals( String givenSearch ) {
}

@Override
public Collection<OntologyTerm> findTerms( String search ) {
public Collection<OntologyTerm> findTerms( String search ) throws OntologySearchException {

String query = OntologySearch.stripInvalidCharacters( search );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import ubc.pavlab.aspiredb.shared.suggestions.PhenotypeSuggestion;

import com.sencha.gxt.data.shared.loader.PagingLoadResult;
import ubic.basecode.ontology.search.OntologySearchException;

/**
* Methods for various query operations such as querying a list of subjects and variants given a list of filters,
Expand All @@ -53,7 +54,7 @@ public BoundedList<SubjectValueObject> querySubjects( Set<AspireDbFilterConfig>
public BoundedList<VariantValueObject> queryVariants( Set<AspireDbFilterConfig> filters )
throws NotLoggedInException, ExternalDependencyException;

public PagingLoadResult<OntologyTermValueObject> getOntologyTermSuggestions( String query );
public PagingLoadResult<OntologyTermValueObject> getOntologyTermSuggestions( String query ) throws OntologySearchException;

public List<String> getValuesForOntologyTerm( String ontologyTermUri );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
import ubc.pavlab.aspiredb.shared.suggestions.PhenotypeSuggestion;
import ubic.basecode.ontology.model.OntologyTerm;
import ubic.basecode.ontology.providers.HumanPhenotypeOntologyService;
import ubic.basecode.ontology.search.OntologySearchException;

/**
* Methods for various query operations such as querying a list of subjects and variants given a list of filters,
Expand Down Expand Up @@ -151,7 +152,7 @@ public PagingLoadResult<NeurocartaPhenotypeValueObject> getNeurocartaPhenotypeSu
}

@Override
public PagingLoadResult<OntologyTermValueObject> getOntologyTermSuggestions( String query ) {
public PagingLoadResult<OntologyTermValueObject> getOntologyTermSuggestions( String query ) throws OntologySearchException {
HumanPhenotypeOntologyService HPOService = ontologyService.getHumanPhenotypeOntologyService();
// if ( !HPOService.isOntologyLoaded() ) {
// HPOService.startInitializationThread( true );
Expand Down
13 changes: 6 additions & 7 deletions aspiredb/src/main/resources/application-context.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:cache="http://www.springframework.org/schema/cache" xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:cache="http://www.springframework.org/schema/cache"
xmlns:p="http://www.springframework.org/schema/p"

xsi:schemaLocation="http://www.springframework.org/schema/beans
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.2.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.2.xsd
http://www.springframework.org/schema/cache
Expand Down
14 changes: 6 additions & 8 deletions aspiredb/src/main/resources/applicationContext-security.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:s="http://www.springframework.org/schema/security" xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/aop
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:s="http://www.springframework.org/schema/security" xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.2.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.2.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-3.1.xsd
http://www.springframework.org/schema/security/spring-security-3.2.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-3.2.xsd">

Expand Down
3 changes: 1 addition & 2 deletions aspiredb/src/main/resources/database.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
jdbc.driverClassName=com.mysql.jdbc.Driver
jdbc.driverClassName=com.mysql.cj.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/aspiredb?rewriteBatchedStatements=true
jdbc.username=aspiredb_web
jdbc.password=aspiredb
#hibernate.dialect=org.hibernate.dialect.MySQLDialect
hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
2 changes: 1 addition & 1 deletion aspiredb/src/main/resources/hibernate.cfg.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<hibernate-configuration>
<session-factory>

<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="hibernate.dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property>


<!-- We shouldn't use other options (validate is ok). We should be manually updating database schema on production. It's
Expand Down
136 changes: 57 additions & 79 deletions aspiredb/src/main/resources/production-data-source.xml
Original file line number Diff line number Diff line change
@@ -1,99 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">

<bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath:default.properties</value>
<value>classpath:default.properties</value>
<value>classpath:database.properties</value>
<value>file:${user.home}/aspiredb.properties</value>
</list>
</list>
</property>
</bean>

<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="${jdbc.driverClassName}" />
<property name="url" value="${jdbc.url}" />
<property name="username" value="${jdbc.username}" />
<property name="password" value="${jdbc.password}" />
<property name="testOnBorrow" value="true" />
<property name="validationQuery" value="SELECT 1" />
<property name="validationQueryTimeout" value="2" />
<property name="maxActive" value="20" />
<property name="maxIdle" value="10" />
<property name="maxWait" value="5000" />
</bean>
<!-- Hibernate session factory -->
<bean id="dataSource" class="org.apache.commons.dbcp2.BasicDataSource">
<property name="driverClassName" value="${jdbc.driverClassName}"/>
<property name="url" value="${jdbc.url}"/>
<property name="username" value="${jdbc.username}"/>
<property name="password" value="${jdbc.password}"/>
<property name="testOnBorrow" value="true"/>
<property name="validationQuery" value="SELECT 1"/>
<property name="validationQueryTimeout" value="2"/>
<property name="maxTotal" value="20"/>
<property name="maxIdle" value="10"/>
<property name="maxWaitMillis" value="5000"/>
</bean>

<!-- Hibernate session factory -->
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">

<property name="dataSource">
<ref bean="dataSource" />
</property>
<property name="dataSource" ref="dataSource"/>

<property name="configLocation">
<value>classpath:hibernate.cfg.xml</value>
</property>
<property name="configLocation" value="classpath:hibernate.cfg.xml"/>

<property name="mappingLocations">
<list>
<value>classpath:gemma/gsec/model/AclEntry.hbm.xml</value>
<value>classpath:gemma/gsec/model/AclObjectIdentity.hbm.xml</value>
<value>classpath:gemma/gsec/model/AclSid.hbm.xml</value>
</list>
</property>

<property name="mappingLocations">
<list>
<value>classpath:gemma/gsec/model/AclEntry.hbm.xml</value>
<value>classpath:gemma/gsec/model/AclObjectIdentity.hbm.xml</value>
<value>classpath:gemma/gsec/model/AclSid.hbm.xml</value>
</list>
</property>

<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">${hibernate.dialect}</prop>
<prop key="hibernate.show_sql">false</prop>
<prop key="hibernate.cache.use_second_level_cache">true</prop>
<prop key="hibernate.cache.use_query_cache">false</prop>
<prop key="hibernate.generate_statistics">false</prop>
<prop key="hibernate.cache.use_structured_entries">false</prop>
<prop key="hibernate.cache.query_cache_factory">org.hibernate.cache.StandardQueryCacheFactory</prop>
<prop key="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</prop>

<prop key="hibernate.max_fetch_depth">3</prop>
<prop key="hibernate.jdbc.fetch_size">512</prop>
<prop key="hibernate.default_batch_fetch_size">512</prop>
<prop key="hibernate.jdbc.batch_size">256</prop>
<prop key="hibernate.order_inserts">true</prop>
<prop key="hibernate.order_updates">true</prop>



</props>
</property>
<property name="cacheRegionFactory">
<ref bean="externalCacheRegionFactory" />
</property>
<prop key="hibernate.cache.use_second_level_cache">true</prop>
<prop key="hibernate.cache.use_query_cache">false</prop>
<prop key="hibernate.generate_statistics">false</prop>
<prop key="hibernate.cache.use_structured_entries">false</prop>
<prop key="hibernate.cache.query_cache_factory">org.hibernate.cache.StandardQueryCacheFactory</prop>
<prop key="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</prop>

<prop key="hibernate.max_fetch_depth">3</prop>
<prop key="hibernate.jdbc.fetch_size">512</prop>
<prop key="hibernate.default_batch_fetch_size">512</prop>
<prop key="hibernate.jdbc.batch_size">256</prop>
<prop key="hibernate.order_inserts">true</prop>
<prop key="hibernate.order_updates">true</prop>


</props>
</property>
<property name="cacheRegionFactory" ref="externalCacheRegionFactory"/>
</bean>

<bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
<property name="host">
<value>${mail.host}</value>
</property>
<property name="username">
<value>${mail.username}</value>
</property>
<property name="password">
<value>${mail.password}</value>
</property>
</bean>


<bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
<property name="host" value="${mail.host}"/>
<property name="username" value="${mail.username}"/>
<property name="password" value="${mail.password}"/>
</bean>

</beans>
2 changes: 1 addition & 1 deletion aspiredb/src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath*:gemma/gsec/acl/security-bean-baseconfig.xml,
classpath*:gemma/gsec/applicationContext-*.xml,
classpath*:application-context.xml,
classpath*:applicationContext-security.xml,
classpath*:production-data-source.xml,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
* @version $Id: BaseSpringContextTest.java,v 1.4 2013/06/12 20:18:48 cmcdonald Exp $
*/
@ContextConfiguration(locations = { "classpath:/test-data-source.xml",
"classpath:gemma/gsec/acl/security-bean-baseconfig.xml", "classpath:/application-context.xml",
"classpath*:/gemma/gsec/applicationContext-*.xml", "classpath:/application-context.xml",
"classpath:/applicationContext-security.xml", "classpath*:applicationContext-serviceBeans.xml" })
public abstract class BaseSpringContextTest extends AbstractJUnit4SpringContextTests implements InitializingBean {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package ubc.pavlab.aspiredb.server.controller;

import static org.junit.Assert.fail;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.any;
import static org.mockito.Mockito.when;

import java.util.ArrayList;
Expand Down
3 changes: 1 addition & 2 deletions aspiredb/src/test/resources/database.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
test.jdbc.driverClassName=com.mysql.jdbc.Driver
test.jdbc.driverClassName=com.mysql.cj.jdbc.Driver
test.jdbc.url=jdbc:mysql://localhost:3306/aspiredbtest
test.jdbc.username=default_testdb_user
test.jdbc.password=default_testdb_password
#test.hibernate.dialect=org.hibernate.dialect.MySQLDialect
test.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
Loading