Page 1 of 1

Webservice logging table missing

Posted: Fri Jan 24, 2020 7:22 pm
by atnetws
Hi,

each WS-Api call generates an error message like this:

Code: Select all

2020-01-24 18:54:04,768: WARN  [http-nio-8080-exec-7] com.agnitas.emm.springws.usage.UsageInterceptor - Error logging webservice usage
org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [INSERT INTO webservice_usage_log_tbl (timestamp, endpoint, company_id, username) VALUES (?, ?, ?, ?)]; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorExcept
ion: Table 'emm.webservice_usage_log_tbl' doesn't exist
The installer did not create the mentioned table and I cannot find it in any of the sql files.
Could you please provide a proper create statement for it?

Re: Webservice logging table missing

Posted: Mon Jan 27, 2020 9:34 am
by mdoerschmidt
To fix this, remove these lines from spring-ws-common.xml (somewhere near lines 52 to 58):

Code: Select all

    <bean id="usageInterceptor" class="com.agnitas.emm.springws.usage.UsageInterceptor">
    	<property name="usageLogger">
    		<bean class="com.agnitas.emm.springws.usage.DatabaseBasedUsageLogger">
    			<property name="dataSource" ref="dataSource" />
    		</bean>
    	</property>
    </bean>
 
and remove this line from spring-ws-servlet.xml (near line 55):

Code: Select all

				<ref bean="usageInterceptor" />

Re: Webservice logging table missing

Posted: Tue Jan 28, 2020 1:52 pm
by atnetws
Hi mdoerschmidt,

do you have a functioning set of these XML files ready?
I assume the installer failed to create all these properly.

Cheers
Marcus