Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

项目运行问题集 #55

Closed
taolive opened this issue Mar 22, 2014 · 3 comments
Closed

项目运行问题集 #55

taolive opened this issue Mar 22, 2014 · 3 comments
Labels

Comments

@taolive
Copy link

taolive commented Mar 22, 2014

启动APDPlat_Web问题如下:
1、实体无法映射:
java.lang.IllegalArgumentException: org.hibernate.hql.ast.QuerySyntaxException: IndexScheduleConfig is not mapped [select o from IndexScheduleConfig o order by o.id desc]
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1201)
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1147)
at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:275)
at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:366)
at com.sun.proxy.$Proxy106.createQuery(Unknown Source)
at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)

2、读取不到文件
项目里有data/init/.xml等文件,但是代码却读取的路径是:data/.xml,少了init
详见:org.apdplat.module.security.service.register.RegistePosition.java类的代码

3、读取classes下的配置文件问题
项目里硬编码文件路径,如:APDPlat_Web\src\main\webapp\WEB-INF\classes\licences\apdplat.licence
其实在maven下,根本没这个文件,正确的应该是读取当前运行环境下的classes目录
如:Thread.currentThread()
.getContextClassLoader()
.getResource(“licences\apdplat.licence”).getPath()

希望作者可以帮忙解答(断断续续的调试这个项目几天,依然没让我看到庐山真面目,痛苦),谢谢!

@ysc
Copy link
Owner

ysc commented Mar 22, 2014

你自己调试了几天,却不看入门指南,让我说什么好呢?
......
如果你按照入门指南来操作,几分钟就搞定。

@ysc ysc closed this as completed Mar 22, 2014
@ysc ysc added invalid and removed invalid labels Mar 22, 2014
@taolive
Copy link
Author

taolive commented Mar 23, 2014

今天再尝试了下,后面有对照你说的入门指南,
发现操作只有一个区别,
我一般平常都是使用:jetty:run 运行项目
但是APDPlat却必须要求jetty:run-war

痛苦。。。

------------------ 原始邮件 ------------------
发件人: "杨尚川";notifications@github.com;
发送时间: 2014年3月23日(星期天) 凌晨2:05
收件人: "ysc/APDPlat"APDPlat@noreply.github.com;
抄送: "拖拉机闯高速"860008288@qq.com;
主题: Re: [APDPlat] 项目运行问题集 (#55)

Closed #55.


Reply to this email directly or view it on GitHub.

@ysc ysc added faq and removed faq labels Mar 23, 2014
@ysc
Copy link
Owner

ysc commented Mar 23, 2014

对,你的问题就是因为mvn jetty:run引起的,必须要mvn jetty:run-war。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants