源码编译好以后,运行提示站点不存在,后台也是404
ERROR 29700 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is com.jspxcms.core.support.CmsException: site.error.siteNotFound] with root cause
这是抛出的异常
一般是因为数据没有正确导入到数据库
谢谢您,我用的是mysql5.7.37,用source导入了mysql.sql,期间确实报了一些错误,这个有解决方法吗
navicat新建数据库jspxcms,导入mysql.sql,报错如下: [SQL] Query mysql start [ERR] 1050 - Table 'cms_ad' already exists [ERR] /==============================================================/ /* Table: cms_ad / /==============================================================*/ create table cms_ad ( f_ad_id int not null, f_site_id int not null, f_adslot_id int not null, f_name varchar(150) not null comment '名称', f_begin_date datetime comment '开始时间', f_end_date datetime comment '结束时间', f_url varchar(255) comment '广告url', f_text varchar(255) comment '文字', f_script mediumtext comment '代码', f_image varchar(255) comment '图片', f_flash varchar(255) comment 'flash', f_seq int not null default 1 comment '排序', primary key (f_ad_id) ) engine = innodb;
alter table cms_ad comment '广告表';
/==============================================================/ /* Table: cms_ad_slot / /==============================================================*/ create table cms_ad_slot ( f_adslot_id int not null, f_site_id int not null, f_name varchar(100) not null comment '名称', f_number varchar(100) comment '编码', f_description varchar(255) comment '描述', f_type int not null comment '类型(1:文字,2:图片,3:FLASH,4:代码)', f_template varchar(255) not null comment '模板', f_width int not null comment '宽度', f_height int not null comment '高度', primary key (f_adslot_id) ) engine = innodb;
alter table cms_ad_slot comment '广告版位表';
/==============================================================/ /* Table: cms_attachment / /==============================================================*/ create table cms_attachment ( f_attachment_id int not null, f_site_id int not null comment '站点', f_user_id int not null comment '上传人', f_name varchar(150) not null comment '文件名', f_length bigint comment '文件长度', f_ip varchar(100) comment 'IP', f_time datetime not null comment '时间', primary key (f_attachment_id) ) engine = innodb;
alter table cms_attachment comment '附件表';
/==============================================================/ /* Table: cms_attachment_ref / /==============================================================*/ create table cms_attachment_ref ( f_attachementref_id int not null, f_site_id int not null, f_attachment_id int not null, f_ftype varchar(100) not null comment '外表标识', f_fid int not null comment '外表ID', primary key (f_attachementref_id) ) engine = innodb;
/==============================================================/ /* Table: cms_attribute / /==============================================================*/ create table cms_attribute ( f_attribute_id int not null, f_site_id int not null comment '站点', f_number varchar(20) not null comment '代码', f_name varchar(50) not null comment '名称', f_seq int not null default 2147483647 comment '排序', f_is_with_image char(1) not null default '0' comment '是否包含图片', f_is_scale char(1) not null default '0' comment '是否图片压缩', f_is_exact char(1) not null default '0' comment '是否图片拉伸', f_is_watermark char(1) not null default '0' comment '是否图片水印', f_image_width int comment '图片宽度', f_image_height int comment '图片高度', primary key (f_attribute_id) ) engine = innodb;
alter table cms_attribute comment '属性表';
/==============================================================/
/* Table: cms_collect
[SQL] Finished with error
这里的报错是因为已经存在表。可以删掉数据库,重新建一个库。数据库导入出错的原因一般是因为编码问题。
保险的做法是将sql文件里的内容复制到数据库客户端工具的窗口里执行。
解决了,感谢!