- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我一直在尝试在我的新网络应用程序中执行登录过程,它曾经有效,但自从我创建了由 UserData 和 Profile 子类组成的 User 模型后,Tomcat 向我显示了一个未映射的 UserData :
Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: UserData is not mapped [from UserData u where u.username = :Username]
用户登录 DAO:
public UserData getUsername(String username) {
List<UserData> userList = new ArrayList<UserData>();
Query query = openSession().createQuery("from UserData u where u.username = :Username");
query.setParameter("Username", username);
userList = query.list();
if (userList.size() > 0)
return userList.get(0);
else
return null;
}
型号:
public class Usermanager {
@Entity
@Table(name="USER")
public class UserData implements Serializable {
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
int iduser;
String username;
String password;
int idprofile;
int accountstatus;
public int getIduser() {
return iduser;
}
public void setIduser(int iduser) {
this.iduser = iduser;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public int getIdprofile() {
return idprofile;
}
public void setIdprofile(int idprofile) {
this.idprofile = idprofile;
}
public int getAccountstatus() {
return accountstatus;
}
public void setAccountstatus(int accountstatus) {
this.accountstatus = accountstatus;
}
}
@Entity
@Table(name="PROFILE")
public class Profile implements Serializable { ... }
}
完整的堆栈跟踪:
sept. 07, 2015 6:53:07 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
AVERTISSEMENT: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:empsuite' did not find a matching property.
sept. 07, 2015 6:53:07 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: Server version: Apache Tomcat/8.0.20
sept. 07, 2015 6:53:07 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: Server built: Feb 15 2015 18:10:42 UTC
sept. 07, 2015 6:53:07 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: Server number: 8.0.20.0
sept. 07, 2015 6:53:07 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: OS Name: Windows 10
sept. 07, 2015 6:53:07 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: OS Version: 10.0
sept. 07, 2015 6:53:07 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: Architecture: amd64
sept. 07, 2015 6:53:07 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: Java Home: C:\Program Files\Java\jdk1.8.0_60\jre
sept. 07, 2015 6:53:07 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: JVM Version: 1.8.0_60-b27
sept. 07, 2015 6:53:07 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: JVM Vendor: Oracle Corporation
sept. 07, 2015 6:53:07 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: CATALINA_BASE: C:\Users\ceo\Desktop\BluePen Labs\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
sept. 07, 2015 6:53:07 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: CATALINA_HOME: C:\Program Files\Apache Software Foundation\Apache Tomcat 8.0.20
sept. 07, 2015 6:53:07 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: Command line argument: -Dcatalina.base=C:\Users\ceo\Desktop\BluePen Labs\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
sept. 07, 2015 6:53:07 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: Command line argument: -Dcatalina.home=C:\Program Files\Apache Software Foundation\Apache Tomcat 8.0.20
sept. 07, 2015 6:53:07 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: Command line argument: -Dwtp.deploy=C:\Users\ceo\Desktop\BluePen Labs\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
sept. 07, 2015 6:53:07 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: Command line argument: -Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Apache Tomcat 8.0.20\endorsed
sept. 07, 2015 6:53:07 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: Command line argument: -Dfile.encoding=Cp1252
sept. 07, 2015 6:53:07 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFOS: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.8.0_60\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre1.8.0_60/bin/server;C:/Program Files/Java/jre1.8.0_60/bin;C:/Program Files/Java/jre1.8.0_60/lib/amd64;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\Program Files\Java\jdk1.8.0_60\bin;C:\Maven\bin;C:\eclipse;;.
sept. 07, 2015 6:53:09 PM org.apache.coyote.AbstractProtocol init
INFOS: Initializing ProtocolHandler ["http-nio-8080"]
sept. 07, 2015 6:53:09 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFOS: Using a shared selector for servlet write/read
sept. 07, 2015 6:53:09 PM org.apache.coyote.AbstractProtocol init
INFOS: Initializing ProtocolHandler ["ajp-nio-8009"]
sept. 07, 2015 6:53:09 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFOS: Using a shared selector for servlet write/read
sept. 07, 2015 6:53:09 PM org.apache.catalina.startup.Catalina load
INFOS: Initialization processed in 4009 ms
sept. 07, 2015 6:53:09 PM org.apache.catalina.core.StandardService startInternal
INFOS: Démarrage du service Catalina
sept. 07, 2015 6:53:09 PM org.apache.catalina.core.StandardEngine startInternal
INFOS: Starting Servlet Engine: Apache Tomcat/8.0.20
sept. 07, 2015 6:53:11 PM org.apache.jasper.servlet.TldScanner scanJars
INFOS: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
sept. 07, 2015 6:53:12 PM org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
INFOS: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [179] milliseconds.
sept. 07, 2015 6:53:25 PM org.apache.catalina.core.ApplicationContext log
INFOS: No Spring WebApplicationInitializer types detected on classpath
sept. 07, 2015 6:53:25 PM org.apache.catalina.core.ApplicationContext log
INFOS: Initializing Spring root WebApplicationContext
sept. 07, 2015 6:53:25 PM org.springframework.web.context.ContextLoader initWebApplicationContext
INFOS: Root WebApplicationContext: initialization started
sept. 07, 2015 6:53:26 PM org.springframework.web.context.support.XmlWebApplicationContext prepareRefresh
INFOS: Refreshing Root WebApplicationContext: startup date [Mon Sep 07 18:53:26 WAT 2015]; root of context hierarchy
sept. 07, 2015 6:53:26 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFOS: Loading XML bean definitions from ServletContext resource [/WEB-INF/application-context.xml]
sept. 07, 2015 6:53:27 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFOS: Loading XML bean definitions from ServletContext resource [/WEB-INF/security-context.xml]
sept. 07, 2015 6:53:28 PM org.springframework.security.core.SpringSecurityCoreVersion performVersionChecks
INFOS: You are running with Spring Security Core 3.2.0.RELEASE
sept. 07, 2015 6:53:28 PM org.springframework.security.config.SecurityNamespaceHandler <init>
INFOS: Spring Security 'config' module version is 3.2.0.RELEASE
sept. 07, 2015 6:53:29 PM com.mchange.v2.log.MLog <clinit>
INFOS: MLog clients using java 1.4+ standard logging.
sept. 07, 2015 6:53:29 PM com.mchange.v2.c3p0.C3P0Registry banner
INFOS: Initializing c3p0-0.9.1.2 [built 21-May-2007 15:04:56; debug? true; trace: 10]
sept. 07, 2015 6:53:31 PM org.hibernate.annotations.common.Version <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {4.0.1.Final}
sept. 07, 2015 6:53:31 PM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {4.0.1.Final}
sept. 07, 2015 6:53:31 PM org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
sept. 07, 2015 6:53:31 PM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist
sept. 07, 2015 6:53:32 PM com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource getPoolManager
INFOS: Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 1hge1369b1aviaj8nw80g0|405f41fb, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> com.mysql.jdbc.Driver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1hge1369b1aviaj8nw80g0|405f41fb, idleConnectionTestPeriod -> 0, initialPoolSize -> 3, jdbcUrl -> jdbc:mysql://localhost/empsdb, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 2, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 1, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> null, properties -> {user=******, password=******}, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ]
sept. 07, 2015 6:53:33 PM org.hibernate.dialect.Dialect <init>
INFO: HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect
sept. 07, 2015 6:53:33 PM org.hibernate.engine.jdbc.internal.LobCreatorBuilder useContextualLobCreation
INFO: HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException
sept. 07, 2015 6:53:33 PM org.hibernate.engine.transaction.internal.TransactionFactoryInitiator initiateService
INFO: HHH000399: Using default transaction strategy (direct JDBC transactions)
sept. 07, 2015 6:53:33 PM org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory <init>
INFO: HHH000397: Using ASTQueryTranslatorFactory
sept. 07, 2015 6:53:34 PM org.hibernate.tuple.PojoInstantiator <init>
INFO: HHH000182: No default (no-argument) constructor for class: empsuite.model.Usermanager$UserData (class must be instantiated by Interceptor)
sept. 07, 2015 6:53:34 PM org.hibernate.tuple.PojoInstantiator <init>
INFO: HHH000182: No default (no-argument) constructor for class: empsuite.model.Usermanager$Profile (class must be instantiated by Interceptor)
sept. 07, 2015 6:53:35 PM org.springframework.orm.hibernate4.HibernateTransactionManager afterPropertiesSet
INFOS: Using DataSource [com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 1hge1369b1aviaj8nw80g0|405f41fb, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> com.mysql.jdbc.Driver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1hge1369b1aviaj8nw80g0|405f41fb, idleConnectionTestPeriod -> 0, initialPoolSize -> 3, jdbcUrl -> jdbc:mysql://localhost/empsdb, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 2, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 1, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> null, properties -> {user=******, password=******}, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ]] of Hibernate SessionFactory for HibernateTransactionManager
sept. 07, 2015 6:53:35 PM org.springframework.web.context.ContextLoader initWebApplicationContext
INFOS: Root WebApplicationContext: initialization completed in 10320 ms
sept. 07, 2015 6:53:35 PM com.sun.faces.config.ConfigureListener contextInitialized
INFOS: Initialisation de Mojarra 2.2.12 ( 20150720-0848 https://svn.java.net/svn/mojarra~svn/tags/2.2.12@14885) pour le contexte «/empsuite»
sept. 07, 2015 6:53:36 PM com.sun.faces.spi.InjectionProviderFactory createInstance
INFOS: JSF1048 : Présence d’annotations PostConstruct/PreDestroy Les méthodes de beans gérés marquées avec ces annotations auront des annotations dites traitées.
sept. 07, 2015 6:53:39 PM com.sun.faces.config.ConfigureListener$WebConfigResourceMonitor$Monitor <init>
INFOS: Monitoring file:/C:/Users/ceo/Desktop/BluePen%20Labs/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/empsuite/WEB-INF/faces-config.xml for modifications
sept. 07, 2015 6:53:39 PM org.primefaces.webapp.PostConstructApplicationEventListener processEvent
INFOS: Running on PrimeFaces 4.0
sept. 07, 2015 6:53:39 PM org.apache.coyote.AbstractProtocol start
INFOS: Starting ProtocolHandler ["http-nio-8080"]
sept. 07, 2015 6:53:39 PM org.apache.coyote.AbstractProtocol start
INFOS: Starting ProtocolHandler ["ajp-nio-8009"]
sept. 07, 2015 6:53:39 PM org.apache.catalina.startup.Catalina start
INFOS: Server startup in 29484 ms
sept. 07, 2015 6:53:44 PM com.sun.faces.context.SessionMap put
AVERTISSEMENT: JSF1063 : AVERTISSEMENT ! Définition d’une valeur d’attribut non-sérialisable dans HttpSession (clé : UserloginMB, classe de la valeur : empsuite.managedbean.UserloginManagedBean).
org.springframework.security.authentication.AuthenticationServiceException: UserData is not mapped [from UserData u where u.username = :Username]
at org.springframework.security.authentication.dao.DaoAuthenticationProvider.retrieveUser(DaoAuthenticationProvider.java:109)
at org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider.authenticate(AbstractUserDetailsAuthenticationProvider.java:132)
at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:156)
at empsuite.managedbean.UserloginManagedBean.login(UserloginManagedBean.java:25)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.el.parser.AstValue.invoke(AstValue.java:245)
at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:267)
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:87)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
at org.springframework.faces.webflow.FlowActionListener.processAction(FlowActionListener.java:71)
at org.springframework.faces.model.SelectionTrackingActionListener.processAction(SelectionTrackingActionListener.java:64)
at javax.faces.component.UICommand.broadcast(UICommand.java:315)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:790)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1282)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:658)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:516)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1086)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:659)
at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1558)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1515)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: UserData is not mapped [from UserData u where u.username = :Username]
at org.hibernate.hql.internal.ast.util.SessionFactoryHelper.requireClassPersister(SessionFactoryHelper.java:180)
at org.hibernate.hql.internal.ast.tree.FromElementFactory.addFromElement(FromElementFactory.java:110)
at org.hibernate.hql.internal.ast.tree.FromClause.addFromElement(FromClause.java:93)
at org.hibernate.hql.internal.ast.HqlSqlWalker.createFromElement(HqlSqlWalker.java:326)
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.fromElement(HqlSqlBaseWalker.java:3252)
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.fromElementList(HqlSqlBaseWalker.java:3141)
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.fromClause(HqlSqlBaseWalker.java:694)
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:550)
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:287)
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:235)
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:248)
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:183)
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:136)
at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:101)
at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:80)
at org.hibernate.engine.query.spi.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:119)
at org.hibernate.internal.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:214)
at org.hibernate.internal.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:192)
at org.hibernate.internal.SessionImpl.createQuery(SessionImpl.java:1537)
at empsuite.dao.UserloginDAOImpl.getUsername(UserloginDAOImpl.java:24)
at empsuite.service.UserloginService.loadUserByUsername(UserloginService.java:20)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
at com.sun.proxy.$Proxy24.loadUserByUsername(Unknown Source)
at org.springframework.security.authentication.dao.DaoAuthenticationProvider.retrieveUser(DaoAuthenticationProvider.java:101)
... 43 more
最佳答案
你所做的不是子类,而是内部类。我不完全确定你计划在你自己的类之间建立什么关系,但是 UserManager.java 文件不应包含您的实体的定义。
如果你想扩展 UserManager(看起来不是一个好的解决方案,但仍然如此):你需要一个 UserManager.java 和另外两个用于你的实体的 .java 文件,它们都标记为“extends Usermanager”并且带有@Entity注释。
如果您希望 UserManager 类包含这些元素,只需简单地声明两个具有这些类型的变量并使用 @Entity 注释创建另外两个 java 类即可。
关于java - 在 Spring Hibernate 中映射子类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32443404/
我需要将文本放在 中在一个 Div 中,在另一个 Div 中,在另一个 Div 中。所以这是它的样子: #document Change PIN
奇怪的事情发生了。 我有一个基本的 html 代码。 html,头部, body 。(因为我收到了一些反对票,这里是完整的代码) 这是我的CSS: html { backgroun
我正在尝试将 Assets 中的一组图像加载到 UICollectionview 中存在的 ImageView 中,但每当我运行应用程序时它都会显示错误。而且也没有显示图像。 我在ViewDidLoa
我需要根据带参数的 perl 脚本的输出更改一些环境变量。在 tcsh 中,我可以使用别名命令来评估 perl 脚本的输出。 tcsh: alias setsdk 'eval `/localhome/
我使用 Windows 身份验证创建了一个新的 Blazor(服务器端)应用程序,并使用 IIS Express 运行它。它将显示一条消息“Hello Domain\User!”来自右上方的以下 Ra
这是我的方法 void login(Event event);我想知道 Kotlin 中应该如何 最佳答案 在 Kotlin 中通配符运算符是 * 。它指示编译器它是未知的,但一旦知道,就不会有其他类
看下面的代码 for story in book if story.title.length < 140 - var story
我正在尝试用 C 语言学习字符串处理。我写了一个程序,它存储了一些音乐轨道,并帮助用户检查他/她想到的歌曲是否存在于存储的轨道中。这是通过要求用户输入一串字符来完成的。然后程序使用 strstr()
我正在学习 sscanf 并遇到如下格式字符串: sscanf("%[^:]:%[^*=]%*[*=]%n",a,b,&c); 我理解 %[^:] 部分意味着扫描直到遇到 ':' 并将其分配给 a。:
def char_check(x,y): if (str(x) in y or x.find(y) > -1) or (str(y) in x or y.find(x) > -1):
我有一种情况,我想将文本文件中的现有行包含到一个新 block 中。 line 1 line 2 line in block line 3 line 4 应该变成 line 1 line 2 line
我有一个新项目,我正在尝试设置 Django 调试工具栏。首先,我尝试了快速设置,它只涉及将 'debug_toolbar' 添加到我的已安装应用程序列表中。有了这个,当我转到我的根 URL 时,调试
在 Matlab 中,如果我有一个函数 f,例如签名是 f(a,b,c),我可以创建一个只有一个变量 b 的函数,它将使用固定的 a=a1 和 c=c1 调用 f: g = @(b) f(a1, b,
我不明白为什么 ForEach 中的元素之间有多余的垂直间距在 VStack 里面在 ScrollView 里面使用 GeometryReader 时渲染自定义水平分隔线。 Scrol
我想知道,是否有关于何时使用 session 和 cookie 的指南或最佳实践? 什么应该和什么不应该存储在其中?谢谢! 最佳答案 这些文档很好地了解了 session cookie 的安全问题以及
我在 scipy/numpy 中有一个 Nx3 矩阵,我想用它制作一个 3 维条形图,其中 X 轴和 Y 轴由矩阵的第一列和第二列的值、高度确定每个条形的 是矩阵中的第三列,条形的数量由 N 确定。
假设我用两种不同的方式初始化信号量 sem_init(&randomsem,0,1) sem_init(&randomsem,0,0) 现在, sem_wait(&randomsem) 在这两种情况下
我怀疑该值如何存储在“WORD”中,因为 PStr 包含实际输出。? 既然Pstr中存储的是小写到大写的字母,那么在printf中如何将其给出为“WORD”。有人可以吗?解释一下? #include
我有一个 3x3 数组: var my_array = [[0,1,2], [3,4,5], [6,7,8]]; 并想获得它的第一个 2
我意识到您可以使用如下方式轻松检查焦点: var hasFocus = true; $(window).blur(function(){ hasFocus = false; }); $(win
我是一名优秀的程序员,十分优秀!