i encounter an error after hitting the Button "upgrade Database".
Error
Subsonic encountered an internal error. You can report this error in the Subsonic Forum. Please include the information below.
Exception org.springframework.jdbc.BadSqlGrammarException
Message StatementCallback; bad SQL grammar [create or replace function load_1000() returns int as $$ begin -- Util schema: meta functionality for database create schema util; create table util.musiccabinet_version (update_id integer not null, insert_time timestamp not null default now()); -- Music schema: abstract information on artist, tracks, (global) ratings and relations create schema music; create table music.tag (id serial primary key, tag_name text not null); create table music.artist (id serial primary key, artist_name text); create table music.track (artist_id integer references music.artist (id), id serial primary key, track_name text); create table music.trackrelation (source_id integer references music.track (id) not null, target_id integer references music.track (id) not null, weight float not null); create table music.trackrelation_import (source_id integer not null, target_id integer references music.track (id), target_artist_name text not null, target_track_name text not null, target_artist_id integer references music.artist (id), weight float not null); create table music.artistrelation (source_id integer references music.artist (id) not null, target_id integer references music.artist (id) not null, weight float not null); create table music.artistrelation_import (source_id integer not null, target_id integer references music.artist (id), target_artist_name text not null, weight float not null); create table music.artisttoptrack (artist_id integer references music.artist (id) not null, track_id integer references music.track (id) not null, rank smallint not null); create table music.artisttoptrack_import (artist_id integer references music.artist (id) not null, track_id integer references music.track (id), track_name text not null, rank smallint not null); create table music.artisttoptag (artist_id integer references music.artist (id) not null, tag_id integer references music.tag (id) not null, tag_count smallint not null); create table music.artisttoptag_import (artist_id integer references music.artist (id) not null, tag_id integer references music.tag (id), tag_name text not null, tag_count smallint not null); create unique index artistrelation_sourceid_targetid on music.artistrelation (source_id, target_id); create unique index tag_tagname_id on music.tag (tag_name, id); create unique index artisttoptag_tagid_artistid_tagcount on music.artisttoptag (tag_id, artist_id, tag_count); -- Library schema: personal information, such as local music files, personal ratings, invoked web service calls create schema library; create table library.musicfile (track_id integer references music.track (id) not null, id serial primary key, path text, created timestamp, last_modified timestamp, external_id text); create table library.musicfile_import (artist_name text, artist_id integer references music.artist (id), track_name text, track_id integer references music.track (id), path text, created timestamp, last_modified timestamp, external_id text); create table library.musicdirectory (artist_id integer references music.artist (id) not null, id serial primary key, path text, root boolean); create table library.musicdirectory_import (artist_id integer references music.artist (id), artist_name text not null, path text, root boolean); create table library.trackplaycount (track_id integer references music.track (id) not null, play_count integer); create table library.trackplaycount_import (artist_name text, artist_id integer references music.artist (id), track_name text, track_id integer references music.track (id), play_count integer); create table library.webservice_calltype (id smallint primary key, description text); create table library.webservice_history (artist_id integer references music.artist (id), track_id integer references music.track (id), calltype_id smallint references library.webservice_calltype (id), page smallint, invocation_time timestamp default now()); create table library.artisttoptrackplaycount (music_file_id integer references library.musicfile (id) not null, artist_id integer not null references music.artist (id), rank smallint not null, play_count integer not null); insert into library.webservice_calltype (id, description) values (0, 'Last.fm library.getTracks (used for track playcount)'); insert into library.webservice_calltype (id, description) values (1, 'Last.fm artist.getSimilar'); insert into library.webservice_calltype (id, description) values (2, 'Last.fm artist.getTopTracks'); insert into library.webservice_calltype (id, description) values (3, 'Last.fm track.getSimilar'); insert into library.webservice_calltype (id, description) values (4, 'Last.fm artist.getTopTags'); create unique index musicfile_path_trackid on library.musicfile (path, track_id); create unique index musicdirectory_path_artistid on library.musicdirectory (path, artist_id); insert into util.musiccabinet_version (update_id) values (1000); return 0; end; $$ language plpgsql;]; nested exception is org.postgresql.util.PSQLException: FEHLER: Sprache »plpgsql« existiert nicht Hinweis: Sie müssen CREATE LANGUAGE verwenden, um die Sprache in die Datenbank zu laden.
Java version Oracle Corporation 1.7.0_15
Operating system Linux 2.6.32-279.22.1.el6.x86_64
Server Apache Tomcat/7.0.37
Memory Used 56 of 109 MB
Stack trace org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [create or replace function load_1000() returns int as $$ begin
-- Util schema: meta functionality for database
create schema util;
create table util.musiccabinet_version (update_id integer not null, insert_time timestamp not null default now());
-- Music schema: abstract information on artist, tracks, (global) ratings and relations
create schema music;
create table music.tag (id serial primary key, tag_name text not null);
create table music.artist (id serial primary key, artist_name text);
create table music.track (artist_id integer references music.artist (id), id serial primary key, track_name text);
create table music.trackrelation (source_id integer references music.track (id) not null, target_id integer references music.track (id) not null, weight float not null);
create table music.trackrelation_import (source_id integer not null, target_id integer references music.track (id), target_artist_name text not null, target_track_name text not null, target_artist_id integer references music.artist (id), weight float not null);
create table music.artistrelation (source_id integer references music.artist (id) not null, target_id integer references music.artist (id) not null, weight float not null);
create table music.artistrelation_import (source_id integer not null, target_id integer references music.artist (id), target_artist_name text not null, weight float not null);
create table music.artisttoptrack (artist_id integer references music.artist (id) not null, track_id integer references music.track (id) not null, rank smallint not null);
create table music.artisttoptrack_import (artist_id integer references music.artist (id) not null, track_id integer references music.track (id), track_name text not null, rank smallint not null);
create table music.artisttoptag (artist_id integer references music.artist (id) not null, tag_id integer references music.tag (id) not null, tag_count smallint not null);
create table music.artisttoptag_import (artist_id integer references music.artist (id) not null, tag_id integer references music.tag (id), tag_name text not null, tag_count smallint not null);
create unique index artistrelation_sourceid_targetid on music.artistrelation (source_id, target_id);
create unique index tag_tagname_id on music.tag (tag_name, id);
create unique index artisttoptag_tagid_artistid_tagcount on music.artisttoptag (tag_id, artist_id, tag_count);
-- Library schema: personal information, such as local music files, personal ratings, invoked web service calls
create schema library;
create table library.musicfile (track_id integer references music.track (id) not null, id serial primary key, path text, created timestamp, last_modified timestamp, external_id text);
create table library.musicfile_import (artist_name text, artist_id integer references music.artist (id), track_name text, track_id integer references music.track (id), path text, created timestamp, last_modified timestamp, external_id text);
create table library.musicdirectory (artist_id integer references music.artist (id) not null, id serial primary key, path text, root boolean);
create table library.musicdirectory_import (artist_id integer references music.artist (id), artist_name text not null, path text, root boolean);
create table library.trackplaycount (track_id integer references music.track (id) not null, play_count integer);
create table library.trackplaycount_import (artist_name text, artist_id integer references music.artist (id), track_name text, track_id integer references music.track (id), play_count integer);
create table library.webservice_calltype (id smallint primary key, description text);
create table library.webservice_history (artist_id integer references music.artist (id), track_id integer references music.track (id), calltype_id smallint references library.webservice_calltype (id), page smallint, invocation_time timestamp default now());
create table library.artisttoptrackplaycount (music_file_id integer references library.musicfile (id) not null, artist_id integer not null references music.artist (id), rank smallint not null, play_count integer not null);
insert into library.webservice_calltype (id, description) values (0, 'Last.fm library.getTracks (used for track playcount)');
insert into library.webservice_calltype (id, description) values (1, 'Last.fm artist.getSimilar');
insert into library.webservice_calltype (id, description) values (2, 'Last.fm artist.getTopTracks');
insert into library.webservice_calltype (id, description) values (3, 'Last.fm track.getSimilar');
insert into library.webservice_calltype (id, description) values (4, 'Last.fm artist.getTopTags');
create unique index musicfile_path_trackid on library.musicfile (path, track_id);
create unique index musicdirectory_path_artistid on library.musicdirectory (path, artist_id);
insert into util.musiccabinet_version (update_id) values (1000);
return 0;
end; $$ language plpgsql;]; nested exception is org.postgresql.util.PSQLException: FEHLER: Sprache »plpgsql« existiert nicht
Hinweis: Sie müssen CREATE LANGUAGE verwenden, um die Sprache in die Datenbank zu laden.
at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:98)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:407)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:428)
at com.github.hakko.musiccabinet.dao.jdbc.JdbcDatabaseAdministrationDao.loadDatabaseUpdate(JdbcDatabaseAdministrationDao.java:208)
at com.github.hakko.musiccabinet.service.DatabaseAdministrationService.loadNewDatabaseUpdates(DatabaseAdministrationService.java:105)
at net.sourceforge.subsonic.controller.MusicCabinetSettingsController.doSubmitAction(MusicCabinetSettingsController.java:98)
at org.springframework.web.servlet.mvc.SimpleFormController.onSubmit(SimpleFormController.java:449)
at org.springframework.web.servlet.mvc.SimpleFormController.onSubmit(SimpleFormController.java:415)
at org.springframework.web.servlet.mvc.SimpleFormController.onSubmit(SimpleFormController.java:387)
at org.springframework.web.servlet.mvc.SimpleFormController.processFormSubmission(SimpleFormController.java:272)
at org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:268)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:900)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:827)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:101)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:146)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:182)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at net.sourceforge.subsonic.filter.RequestEncodingFilter.doFilter(RequestEncodingFilter.java:43)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at net.sourceforge.subsonic.filter.ParameterDecodingFilter.doFilter(ParameterDecodingFilter.java:54)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at net.sourceforge.subsonic.filter.BootstrapVerificationFilter.doFilter(BootstrapVerificationFilter.java:54)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.postgresql.util.PSQLException: FEHLER: Sprache »plpgsql« existiert nicht
Hinweis: Sie müssen CREATE LANGUAGE verwenden, um die Sprache in die Datenbank zu laden.
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:374)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:366)
at com.mchange.v2.c3p0.impl.NewProxyStatement.execute(NewProxyStatement.java:108)
at org.springframework.jdbc.core.JdbcTemplate$1ExecuteStatementCallback.doInStatement(JdbcTemplate.java:421)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:396)
... 71 more