gpt4 book ai didi

java - ejb远程方法在本地工作但在远程给出错误

转载 作者:太空宇宙 更新时间:2023-11-04 07:36:34 25 4
gpt4 key购买 nike

我创建了一个ejb远程接口(interface),将其部署在glassfish应用程序服务器上的本地计算机上,并且运行良好,但是在远程服务器上测试它时,它部署成功,但在验证登录表单时无法访问远程方法,出现以下错误:

javax.ejb.EJBException

at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:5215)

at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:5113)

at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4901)

at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2045)

at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1994)

at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandl er.java:222)

at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocat ionHandlerDelegate.java:89) at $Proxy206.findStudentByFirstName(Unknown Source)

at pac.Serve.processRequest(Serve.java:46) at pac.Serve.doPost(Serve.java:124)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)

at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)

at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)

at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)

at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)

at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)

at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)

at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)

at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)

at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)

at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)

at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)

at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)

at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)

at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)

at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)

at com.sun.grizzly.ContextTask.run(ContextTask.java:71)

at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)

at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)

at java.lang.Thread.run(Thread.java:722) Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'schooldb.Jss_Student_Details' doesn't exist Error Code: 1146 Call: SELECT firstName, lastName FROM schooldb.Jss_Student_Details WHERE (email = ?) bind => [1 parameter bound] Query: ReportQuery(name="JssStudentDetails.findByEmail1" referenceClass=JssStudentDetails sql="SELECT firstName, lastName FROM schooldb.Jss_Student_Details WHERE (email = ?)")

at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:333)

at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:644)

at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:535)

at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:1717)

at org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:566)

at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:207)

at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:193)

at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:264)

at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:646)

at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2611)

at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllReportQueryRows(ExpressionQueryMechanism.java:2554)

at org.eclipse.persistence.queries.ReportQuery.executeDatabaseQuery(ReportQuery.java:846)

at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:844)

at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1040)

at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:392)

at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1128)

at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2871)

at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1516)

at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1498)

at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1463)

at org.eclipse.persistence.internal.jpa.EJBQueryImpl.executeReadQuery(EJBQueryImpl.java:485)

at org.eclipse.persistence.internal.jpa.EJBQueryImpl.getResultList(EJBQueryImpl.java:742)

at wak.capableDoa.findStudentByFirstName(capableDoa.java:34)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:601)

at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)

at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)

at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5388)

at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:619)

at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800) at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)

at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:42)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:601)

at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:861)

at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800) at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)

at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:162)

at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:144) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:601)

at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:861)

at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)

at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:370) at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5360)

at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5348)

at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:214) ... 30 more Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'schooldb.Jss_Student_Details' doesn't exist

at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)

at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)

at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)

at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)

at com.mysql.jdbc.Connection.execSQL(Connection.java:3283)

at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1332)

at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1467)

at com.sun.gjc.spi.jdbc40.PreparedStatementWrapper40.executeQuery(PreparedStatementWrapper40.java:642)

at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeSelect(DatabaseAccessor.java:931)

at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:607) ... 81 more

请有人帮忙解决这个错误,提前致谢。

最佳答案

这与远程/本地 ejbs 无关...这是一个 SQL 错误:

com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'schooldb.Jss_Student_Details'     doesn't exist

关于java - ejb远程方法在本地工作但在远程给出错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16776299/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com