急死人了——时间来不急了
求解,是我数据库的问题还是我写的程序出了问题???,谢谢大家!!!
[ERROR] 2011-11-02 16:26:34,000 method:org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:206)
Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'filterInvocationInterceptor' defined in ServletContext resource [/WEB-INF/classes/spring/applicationContext-acegi-security.xml]: Invocation of init method failed; nested exception is org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [
SELECT re.ResourceString, ro.RoleName
FROM
xxxxxxxx rr , tIDCResources re, tIDCRole ro
WHERE
rr.RoleID = ro.ID and rr.ResourceId = re.ID and not (re.ResourceType
like 'menu')
ORDER BY re.ResourceString DESC
]; nested exception is java.sql.SQLException: 对象名 'xxxxxxxx' 无效。
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1362)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:540)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:485)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:170)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:413)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:735)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:369)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:251)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:190)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [
SELECT re.ResourceString, ro.RoleName
FROM
xxxxxxxx rr , tIDCResources re, tIDCRole ro
WHERE
rr.RoleID = ro.ID and rr.ResourceId = re.ID and not (re.ResourceType
like 'menu')
ORDER BY re.ResourceString DESC
]; nested exception is java.sql.SQLException: 对象名 xxxxxxxx无效。
[解决办法]
对象名 'xxxxxxxx' 你看看是不是打成双引号了
[解决办法]
你的hql语句写错了 再检查下
[解决办法]
hql的对象名没找到
是不是你写成小写了?
对象名是跟你的po一致的
[解决办法]
sql上的问题
首先查看你的sql语句
其次与之相关的配置文件检查下
[解决办法]
先试试 select * from xxxxxx;看看有没有结果呀
desc xxxxxx查看表结构
[解决办法]
没对应啊,这样的问题一般都是出现在ssh框架里面的,你在spring里面配置bean的属性id,然后在Action里面引用的时候,会不会出现了错误……
[解决办法]
nested exception is java.sql.SQLException: 对象名 xxxxxxxx无效。
check 对象名 xxxxxxxx carefully. Or update your sql as below:
SELECT re.ResourceString, ro.RoleName
FROM
xxxxxxxx rr , tIDCResources re, tIDCRole ro
WHERE
rr.RoleID = ro.ID and rr.ResourceId = re.ID and re.ResourceType not like 'menu'
ORDER BY re.ResourceString DESC
[解决办法]
SQL 语句问题
[解决办法]
xml上的名字有没有错,是否路径正确
[解决办法]
我也有遇过这样的问题,等待大家的解答
[解决办法]
[解决办法]
看下resourcesList这个对象对应的拼写,setter是否齐全
[解决办法]
悲剧看来你真是来不及咯。。。
[解决办法]
sqo语句
[解决办法]
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'resourcesList' defined in ServletContext resource [/WEB-INF/classes/spring/applicationContext-acegi-security.xml]: Invocation of init method failed; nested exception is java.lang.NullPointerException
这个就是你程序上的问题了
[解决办法]
帮顶了,楼主我尽力了!
每天回帖即可获得10分可用分!小技巧:教您如何更快获得可用分
[解决办法]
建议把sql语句拆开,逐步在查询分析器中看结果。
[解决办法]
使用框架要谨慎
[解决办法]
对象名 'xxxxxxxx' 无效这是什么情况
[解决办法]