新增自定义数据源 保存提示新增失败

JAVA菜鸟初学 发布于 2014/04/03 12:08
阅读 2K+
收藏 0

OSC年度开源问卷新鲜出炉,你的回答对我们很重要,参与开源可以从这份问卷开始>>>

4月2号下载的源码,根据群里Koala从零开始 之 快速搭建Koala源码(v0.1).pdf 生成了插件,创建了项目,在父项目pom.xml改了一下dddlib的maven依赖版本为4.1.2-SNAPSHOT,数据源改成MYSQL,H2改成false了.重新clean install,通过run as -->maven build-->gobal jetty:run启动项目,用firefox成功登录系统.然后配置通用查询模块,通用查询菜单标识为/pages/gqc/generalQueryList.jsp,数据源配置菜单标识为/pages/gqc/dataSourceList.jsp,添加自定义数据源参照父项目POM里面MYSQL数据源配置,点击测试显示数据源可用.,点保存,出现新增失败的提示,后台出现错误,菜鸟伤不起啊,捣鼓半天,连问题出在哪里都不知道.求指导啊.
加载中
0
小人物_Amor
小人物_Amor

把错误贴出来~你的id有没有生成策略?如果没有则需要自己写,比如用UUID

0
J
JAVA菜鸟初学

18:50:27,218 DEBUG [AntPathRequestMatcher] Checking match of request : '/datasource/add.koala'; against '/login.koala*'
18:50:27,218 DEBUG [AntPathRequestMatcher] Checking match of request : '/datasource/add.koala'; against '/denied.koala*'
18:50:27,218 DEBUG [AntPathRequestMatcher] Checking match of request : '/datasource/add.koala'; against '/login.jsp*'
18:50:27,218 DEBUG [AntPathRequestMatcher] Checking match of request : '/datasource/add.koala'; against '/*.ico'
18:50:27,218 DEBUG [AntPathRequestMatcher] Checking match of request : '/datasource/add.koala'; against '/'
18:50:27,218 DEBUG [AntPathRequestMatcher] Checking match of request : '/datasource/add.koala'; against '/lib/**'
18:50:27,218 DEBUG [AntPathRequestMatcher] Checking match of request : '/datasource/add.koala'; against '/common/**'
18:50:27,218 DEBUG [AntPathRequestMatcher] Checking match of request : '/datasource/add.koala'; against '/login.jsp'
18:50:27,218 DEBUG [AntPathRequestMatcher] Checking match of request : '/datasource/add.koala'; against '/favicon.ico'
18:50:27,218 DEBUG [AntPathRequestMatcher] Checking match of request : '/datasource/add.koala'; against '/**/*.css'
18:50:27,218 DEBUG [AntPathRequestMatcher] Checking match of request : '/datasource/add.koala'; against '/**/*.js'
18:50:27,218 DEBUG [AntPathRequestMatcher] Checking match of request : '/datasource/add.koala'; against '/**/*.jpg'
18:50:27,218 DEBUG [AntPathRequestMatcher] Checking match of request : '/datasource/add.koala'; against '/**/*.png'
18:50:27,218 DEBUG [AntPathRequestMatcher] Checking match of request : '/datasource/add.koala'; against '/**/*.gif'
18:50:27,218 DEBUG [FilterChainProxy] /dataSource/add.koala at position 1 of 14 in additional filter chain; firing Filter: 'SecurityContextPersistenceFilter'
18:50:27,218 DEBUG [HttpSessionSecurityContextRepository] Obtained a valid SecurityContext from SPRING_SECURITY_CONTEXT: 'org.springframework.security.core.context.SecurityContextImpl@1209e26: Authentication: org.springframework.security.authentication.UsernamePasswordAuthenticationToken@1209e26: Principal: org.openkoala.koala.auth.ss3adapter.CustomUserDetails@1231eee; Credentials: [PROTECTED]; Authenticated: true; Details: org.springframework.security.web.authentication.WebAuthenticationDetails@fffc7f0c: RemoteIpAddress: 127.0.0.1; SessionId: 1adk5qzrlwkrajsxq4q8qfiea; Not granted any authorities'
18:50:27,218 DEBUG [FilterChainProxy] /dataSource/add.koala at position 2 of 14 in additional filter chain; firing Filter: 'WebAsyncManagerIntegrationFilter'
18:50:27,218 DEBUG [FilterChainProxy] /dataSource/add.koala at position 3 of 14 in additional filter chain; firing Filter: 'LogoutFilter'
18:50:27,218 DEBUG [FilterChainProxy] /dataSource/add.koala at position 4 of 14 in additional filter chain; firing Filter: 'AuthenticationFilter'
18:50:27,218 DEBUG [FilterChainProxy] /dataSource/add.koala at position 5 of 14 in additional filter chain; firing Filter: 'UsernamePasswordAuthenticationFilter'
18:50:27,218 DEBUG [FilterChainProxy] /dataSource/add.koala at position 6 of 14 in additional filter chain; firing Filter: 'BasicAuthenticationFilter'
18:50:27,218 DEBUG [FilterChainProxy] /dataSource/add.koala at position 7 of 14 in additional filter chain; firing Filter: 'RequestCacheAwareFilter'
18:50:27,218 DEBUG [FilterChainProxy] /dataSource/add.koala at position 8 of 14 in additional filter chain; firing Filter: 'SecurityContextHolderAwareRequestFilter'
18:50:27,218 DEBUG [FilterChainProxy] /dataSource/add.koala at position 9 of 14 in additional filter chain; firing Filter: 'AnonymousAuthenticationFilter'
18:50:27,218 DEBUG [AnonymousAuthenticationFilter] SecurityContextHolder not populated with anonymous token, as it already contained: 'org.springframework.security.authentication.UsernamePasswordAuthenticationToken@1209e26: Principal: org.openkoala.koala.auth.ss3adapter.CustomUserDetails@1231eee; Credentials: [PROTECTED]; Authenticated: true; Details: org.springframework.security.web.authentication.WebAuthenticationDetails@fffc7f0c: RemoteIpAddress: 127.0.0.1; SessionId: 1adk5qzrlwkrajsxq4q8qfiea; Not granted any authorities'
18:50:27,218 DEBUG [FilterChainProxy] /dataSource/add.koala at position 10 of 14 in additional filter chain; firing Filter: 'SessionTimeoutFilter'
18:50:27,218 DEBUG [FilterChainProxy] /dataSource/add.koala at position 11 of 14 in additional filter chain; firing Filter: 'SessionManagementFilter'
18:50:27,218 DEBUG [FilterChainProxy] /dataSource/add.koala at position 12 of 14 in additional filter chain; firing Filter: 'ExceptionTranslationFilter'
18:50:27,218 DEBUG [FilterChainProxy] /dataSource/add.koala at position 13 of 14 in additional filter chain; firing Filter: 'SecurityFilter'
18:50:27,218 DEBUG [SecurityFilter] Public object - authentication not attempted
18:50:27,218 DEBUG [FilterChainProxy] /dataSource/add.koala at position 14 of 14 in additional filter chain; firing Filter: 'FilterSecurityInterceptor'
18:50:27,218 DEBUG [FilterSecurityInterceptor] Secure object: FilterInvocation: URL: /dataSource/add.koala; Attributes: [IS_AUTHENTICATED_FULLY]
18:50:27,218 DEBUG [FilterSecurityInterceptor] Previously Authenticated: org.springframework.security.authentication.UsernamePasswordAuthenticationToken@1209e26: Principal: org.openkoala.koala.auth.ss3adapter.CustomUserDetails@1231eee; Credentials: [PROTECTED]; Authenticated: true; Details: org.springframework.security.web.authentication.WebAuthenticationDetails@fffc7f0c: RemoteIpAddress: 127.0.0.1; SessionId: 1adk5qzrlwkrajsxq4q8qfiea; Not granted any authorities
18:50:27,218 DEBUG [AffirmativeBased] Voter: org.springframework.security.access.vote.RoleVoter@16efb1, returned: 0
18:50:27,218 DEBUG [AffirmativeBased] Voter: org.springframework.security.access.vote.AuthenticatedVoter@1d2768b, returned: 1
18:50:27,218 DEBUG [FilterSecurityInterceptor] Authorization successful
18:50:27,218 DEBUG [FilterSecurityInterceptor] RunAsManager did not change Authentication object
18:50:27,218 DEBUG [FilterChainProxy] /dataSource/add.koala reached end of additional filter chain; proceeding with original chain
18:50:27,218 DEBUG [DispatcherServlet] DispatcherServlet with name 'spring' processing POST request for [/dataSource/add.koala]
18:50:27,218 DEBUG [RequestMappingHandlerMapping] Looking up handler method for path /dataSource/add.koala
18:50:27,218 DEBUG [RequestMappingHandlerMapping] Returning handler method [public java.util.Map<java.lang.String, java.lang.Object> org.openkoala.gqc.controller.datasource.DataSourceController.add(org.openkoala.gqc.vo.DataSourceVO)]
18:50:27,218 DEBUG [DefaultListableBeanFactory] Returning cached instance of singleton bean 'dataSourceController'
18:50:27,218 DEBUG [DefaultListableBeanFactory] Returning cached instance of singleton bean 'transactionManager'
18:50:27,218 DEBUG [DefaultListableBeanFactory] Returning cached instance of singleton bean 'transactionManager_security'
18:50:27,218 DEBUG [DefaultListableBeanFactory] Returning cached instance of singleton bean 'km_transactionManager'
18:50:27,218 DEBUG [DefaultListableBeanFactory] Returning cached instance of singleton bean 'transactionManager_gqc'
18:50:27,218 DEBUG [DefaultListableBeanFactory] Returning cached instance of singleton bean 'transactionManager_org'
18:50:27,218 DEBUG [JpaTransactionManager] Creating new transaction with name [org.openkoala.gqc.application.impl.DataSourceApplicationImpl.saveDataSource]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT; 'transactionManager_gqc'
18:50:27,218 DEBUG [SessionImpl] Opened session at timestamp: 13965222272
18:50:27,218 DEBUG [JpaTransactionManager] Opened new EntityManager [org.hibernate.ejb.EntityManagerImpl@63cc8] for JPA transaction
18:50:27,218 DEBUG [AbstractTransactionImpl] begin
18:50:27,218 DEBUG [LogicalConnectionImpl] Obtaining JDBC connection
18:50:27,218 DEBUG [LogicalConnectionImpl] Obtained JDBC connection
18:50:27,218 DEBUG [JdbcTransaction] initial autocommit status: true
18:50:27,218 DEBUG [JdbcTransaction] disabling autocommit
18:50:27,218 DEBUG [JpaTransactionManager] Exposing JPA transaction as JDBC transaction [org.springframework.orm.jpa.vendor.HibernateJpaDialect$HibernateConnectionHandle@1a2c8fa]
18:50:27,218 DEBUG [DefaultListableBeanFactory] Creating instance of bean 'gqcEntityManager'
18:50:27,218 DEBUG [DefaultListableBeanFactory] Returning cached instance of singleton bean 'entityManagerFactory'
18:50:27,250 DEBUG [DefaultListableBeanFactory] Invoking afterPropertiesSet() on bean with name 'gqcEntityManager'
18:50:27,250 DEBUG [DefaultListableBeanFactory] Finished creating instance of bean 'gqcEntityManager'
18:50:27,250 DEBUG [SQL] select datasource0_.ID as ID15_, datasource0_.VERSION as VERSION15_, datasource0_.CONNECT_URL as CONNECT3_15_, datasource0_.DATA_SOURCE_DESCRIPTION as DATA4_15_, datasource0_.DATA_SOURCE_ID as DATA5_15_, datasource0_.DATA_SOURCE_TYPE as DATA6_15_, datasource0_.JDBC_DRIVER as JDBC7_15_, datasource0_.PASSWORD as PASSWORD15_, datasource0_.USERNAME as USERNAME15_ from KG_DATA_SOURCES datasource0_ where datasource0_.DATA_SOURCE_ID=?
Hibernate: select datasource0_.ID as ID15_, datasource0_.VERSION as VERSION15_, datasource0_.CONNECT_URL as CONNECT3_15_, datasource0_.DATA_SOURCE_DESCRIPTION as DATA4_15_, datasource0_.DATA_SOURCE_ID as DATA5_15_, datasource0_.DATA_SOURCE_TYPE as DATA6_15_, datasource0_.JDBC_DRIVER as JDBC7_15_, datasource0_.PASSWORD as PASSWORD15_, datasource0_.USERNAME as USERNAME15_ from KG_DATA_SOURCES datasource0_ where datasource0_.DATA_SOURCE_ID=?
18:50:27,250 DEBUG [StatefulPersistenceContext] Initializing non-lazy collections
18:50:27,250 DEBUG [DefaultListableBeanFactory] Creating instance of bean 'gqcEntityManager'
18:50:27,250 DEBUG [DefaultListableBeanFactory] Returning cached instance of singleton bean 'entityManagerFactory'
18:50:27,250 DEBUG [DefaultListableBeanFactory] Invoking afterPropertiesSet() on bean with name 'gqcEntityManager'
18:50:27,250 DEBUG [DefaultListableBeanFactory] Finished creating instance of bean 'gqcEntityManager'
18:50:27,250 DEBUG [AbstractEntityManagerImpl] Mark transaction for rollback
18:50:27,250 DEBUG [JpaTransactionManager] Initiating transaction commit
18:50:27,250 DEBUG [JpaTransactionManager] Committing JPA transaction on EntityManager [org.hibernate.ejb.EntityManagerImpl@63cc8]
18:50:27,250 DEBUG [AbstractTransactionImpl] rolling back
18:50:27,250 DEBUG [JdbcTransaction] rolled JDBC Connection
18:50:27,250 DEBUG [JdbcTransaction] re-enabling autocommit
18:50:27,250 DEBUG [JpaTransactionManager] Closing JPA EntityManager [org.hibernate.ejb.EntityManagerImpl@63cc8] after transaction
18:50:27,250 DEBUG [EntityManagerFactoryUtils] Closing JPA EntityManager
18:50:27,250 DEBUG [LogicalConnectionImpl] Releasing JDBC connection
18:50:27,250 DEBUG [LogicalConnectionImpl] Released JDBC connection
18:50:27,250 DEBUG [ConnectionProxyHandler] HHH000163: Logical connection releasing its physical connection
18:50:27,250 DEBUG [RequestResponseBodyMethodProcessor] Written [{result=新增失败!}] as "application/json;charset=UTF-8" using [org.springframework.http.converter.json.MappingJacksonHttpMessageConverter@10a7f80]
18:50:27,250 DEBUG [DispatcherServlet] Null ModelAndView returned to DispatcherServlet with name 'spring': assuming HandlerAdapter completed request handling
18:50:27,250 DEBUG [DispatcherServlet] Successfully completed request
18:50:27,250 DEBUG [ExceptionTranslationFilter] Chain processed normally
18:50:27,250 DEBUG [SecurityContextPersistenceFilter] SecurityContextHolder now cleared, as request processing completed

18:50:27,296 DEBUG [QuartzSchedulerThread] batch acquisition of 0 triggers

这是后台信息 帮忙看一下 UUID网上的教程没有提及这一点哦

0
yanick
yanick

HHH000163: Logical connection releasing its physical connection 

这个产生的原因知道吗?

0
yanick
yanick
HHH000163: Logical connection releasing its physical connection 
OSCHINA
登录后可查看更多优质内容
返回顶部
顶部