小编Vam*_*nik的帖子

错误:使用Postgres对序列cities_id_seq的权限被拒绝

我是postgres的新手(以及数据库信息系统).我在我的数据库上运行了以下sql脚本:

create table cities (
id serial primary key,
name text not null
);

create table reports (
id serial primary key,
cityid integer not null references cities(id),
reportdate date not null,
reporttext text not null
);

create user www with password 'www';

grant select on cities to www;
grant insert on cities to www;
grant delete on cities to www;

grant select on reports to www;
grant insert on reports to www;
grant delete on reports to www;

grant …
Run Code Online (Sandbox Code Playgroud)

sql postgresql permissions auto-increment

177
推荐指数
4
解决办法
12万
查看次数

无法导出和导入Oracle表

我正在使用Oracle 11,我在两个数据库之间移动表时遇到问题.我已经成功导出了一个datadumb,如下所示:

expdp.exe www/www@xe tables=TABLE1,TABLE2,TABLE3 directory=dmpdir dumpfile=tables.dmp
Run Code Online (Sandbox Code Playgroud)

当我尝试:

impdp.exe www2/www2@xe tables=TABLE1,TABLE2,TABLE3 directory=dmpdir dumpfile=tables.dmp
Run Code Online (Sandbox Code Playgroud)

结果我得到以下异常:

ORA-39002: invalid operation
ORA-39166: Object WWW2.TABLE1 was not found.
ORA-39166: Object WWW2.TABLE2 was not found.
ORA-39166: Object WWW2.TABLE3 was not found.
Run Code Online (Sandbox Code Playgroud)

如果我尝试:

impdp.exe www2/www2@xe remap_tables=WWW2:TABLE1,TABLE2,TABLE3 directory=dmpdir dumpfile=tables.dmp
Run Code Online (Sandbox Code Playgroud)

我明白了:

LRM-00101: unknown parameter name 'remap_tables'
Run Code Online (Sandbox Code Playgroud)

在我的情况下,我不能使用数据库链接.导入和导出表格时如何更改架构?我有点误解了Oracle吗?

sql database oracle impdp

3
推荐指数
1
解决办法
1万
查看次数

设置Spring Web Service时未找到端点映射

我是设置弹簧网络应用程序的初学者.我到目前为止,但现在我发现自己陷入困境.

我收到以下错误:

WARNING: No endpoint mapping found for [SaajSoapMessage {http://mycompany.com/weather/schemas}GetCities]
Run Code Online (Sandbox Code Playgroud)

主要问题是我已经没有想法查找调试信息.我修复了我见过的很多错误,但现在我甚至在日志中找不到错误.所以我有点绝望了.

这是我的web.xml

<web-app>
    <display-name>Weather report webservice</display-name>

    <servlet>
        <servlet-name>spring-ws</servlet-name>
        <servlet-class>org.springframework.ws.transport.http.MessageDispatcherServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
        <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>/WEB-INF/spring-ws-servlet.xml</param-value>
        </init-param>
        <init-param>
            <param-name>transformWsdlLocations</param-name>
            <param-value>true</param-value>
        </init-param>
    </servlet>

    <servlet-mapping>
        <servlet-name>spring-ws</servlet-name>
        <url-pattern>/weatherws</url-pattern>
    </servlet-mapping>
</web-app>
Run Code Online (Sandbox Code Playgroud)

这就是我的spring-ws-servlet.xml

<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:sws="http://www.springframework.org/schema/web-services"
   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
    http://www.springframework.org/schema/web-services http://www.springframework.org/schema/web-services/web-services-2.0.xsd
    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">

    <context:component-scan base-package="path.to.weather"/>

    <sws:annotation-driven/>

</beans>
Run Code Online (Sandbox Code Playgroud)

这就是我的端点的样子:

@Endpoint
public class WeatherEndpoint {

    private static final String NAMESPACE_URI = "http://mycompany.com/weather/schema";

    private WeatherReportManager manager;

    @Autowired
    public WeatherEndpoint(WeatherReportManager manager) throws JDOMException {
        this.manager = manager;
    }

    @PayloadRoot(namespace = NAMESPACE_URI, …
Run Code Online (Sandbox Code Playgroud)

spring web-services spring-ws endpoint

2
推荐指数
1
解决办法
2万
查看次数