Skip to content
Snippets Groups Projects
Commit 60b6f0b9 authored by Robert Butora's avatar Robert Butora
Browse files

bugfix (db-table-rows were not copied to VoTable)

parent d6ab2839
No related branches found
No related tags found
No related merge requests found
...@@ -143,8 +143,7 @@ public class DbObstap ...@@ -143,8 +143,7 @@ public class DbObstap
List<String> pubdidList = new ArrayList<>(); List<String> pubdidList = new ArrayList<>();
LOGGER.fine("Connecting to: " + dbConnArgs.uri() LOGGER.fine("Connecting to: " + dbConnArgs.uri() + " with user: " + dbConnArgs.userName() );
+ " with optional user/pwd: " + dbConnArgs.userName() +" / "+ dbConnArgs.password() );
try( try(
Connection conn = DriverManager.getConnection(dbConnArgs.uri(), dbConnArgs.userName(), dbConnArgs.password()); Connection conn = DriverManager.getConnection(dbConnArgs.uri(), dbConnArgs.userName(), dbConnArgs.password());
......
...@@ -32,6 +32,7 @@ public class FormatResponseFilter implements Filter ...@@ -32,6 +32,7 @@ public class FormatResponseFilter implements Filter
public void init(FilterConfig filterConfig) throws ServletException public void init(FilterConfig filterConfig) throws ServletException
{ {
LOGGER.config("Default charset: " + Charset.defaultCharset()); LOGGER.config("Default charset: " + Charset.defaultCharset());
LOGGER.config("cutout_url: " + settings.serviceUrls.cutoutUrl());
} }
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
...@@ -65,6 +66,7 @@ public class FormatResponseFilter implements Filter ...@@ -65,6 +66,7 @@ public class FormatResponseFilter implements Filter
Band band = Band.parseBand(params, DEFAULT_SPEC_SYSTEM); Band band = Band.parseBand(params, DEFAULT_SPEC_SYSTEM);
DbObstap.Obstap[] obstapArr = queryObstap(responseWrapper.getDbConnArgs(), pubdidArr, pos, band); DbObstap.Obstap[] obstapArr = queryObstap(responseWrapper.getDbConnArgs(), pubdidArr, pos, band);
LOGGER.info("collected metadata for " + obstapArr.length + " datasets");
String respFormat; String respFormat;
String respFormatReq[] = params.get("RESPONSEFORMAT"); String respFormatReq[] = params.get("RESPONSEFORMAT");
...@@ -153,8 +155,7 @@ public class FormatResponseFilter implements Filter ...@@ -153,8 +155,7 @@ public class FormatResponseFilter implements Filter
private DbObstap.Obstap[] queryObstap(DbConnArgs dbConnArgs, String[] pubdidArr, Pos pos, Band band) private DbObstap.Obstap[] queryObstap(DbConnArgs dbConnArgs, String[] pubdidArr, Pos pos, Band band)
throws Exception throws Exception
{ {
LOGGER.fine("trace " + dbConnArgs.toString());
LOGGER.fine("trace");
DbObstap dbObstap; DbObstap dbObstap;
synchronized(DbObstap.class) synchronized(DbObstap.class)
......
...@@ -26,7 +26,13 @@ final class XmlSerializer ...@@ -26,7 +26,13 @@ final class XmlSerializer
String cutoutUrl, String cutoutUrl,
boolean showDuration, long startTime_msec) throws IOException boolean showDuration, long startTime_msec) throws IOException
{ {
StarTable dstable = new RowListStarTable( VoTableObstap.OBSTAP_VLKB_COLINFO ); RowListStarTable dstable = new RowListStarTable( VoTableObstap.OBSTAP_VLKB_COLINFO );
for(DbObstap.Obstap obstap : obstapArr)
{
dstable.addRow( VoTableObstap.obstapVlkbRow(obstap) );
}
dstable.setParameter(new DescribedValue( dstable.setParameter(new DescribedValue(
new DefaultValueInfo("datacubeCount", Integer.class, "Count of all datacubes from VLKB-search" ), new DefaultValueInfo("datacubeCount", Integer.class, "Count of all datacubes from VLKB-search" ),
......
...@@ -64,6 +64,7 @@ org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = java.ut ...@@ -64,6 +64,7 @@ org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = java.ut
# vlkb-siav2 # vlkb-siav2
SearchServlet.level = CONFIG SearchServlet.level = FINEST
FormatResponseFilter.level = CONFIG FormatResponseFilter.level = FINEST
DbObstap.level = FINEST
...@@ -24,11 +24,6 @@ echo "<Context docBase=\"$WEBAPP_DIR\"/>" > $CATALINA_BASE/conf/Catalina/localho ...@@ -24,11 +24,6 @@ echo "<Context docBase=\"$WEBAPP_DIR\"/>" > $CATALINA_BASE/conf/Catalina/localho
# configure response format # configure response format
{ {
echo "db_uri=$DB_URI"
echo "db_schema=$DB_SCHEMA"
echo "db_user_name=$DB_USERNAME"
echo "db_password=$DB_PASSWORD"
echo "cutout_url=$CUTOUT_SERVICE_URL" echo "cutout_url=$CUTOUT_SERVICE_URL"
} > $WEBAPP_DIR/WEB-INF/classes/formatresponsefilter.properties } > $WEBAPP_DIR/WEB-INF/classes/formatresponsefilter.properties
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment