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

Not create and load new User for Apache Derby #2

Open
svininykh opened this issue Jan 6, 2015 · 3 comments
Open

Not create and load new User for Apache Derby #2

svininykh opened this issue Jan 6, 2015 · 3 comments
Labels

Comments

@svininykh
Copy link
Contributor

Exception after qb.queryForFirst() launch.

06-Jan-2015 17:50:19.503 SEVERE [http-nio-8084-exec-186] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [default] in context with path [/product-catalog] threw exception [ActionBean execution threw an exception.] with root cause
 ERROR XJ217: The locator that was supplied for this CLOB/BLOB is invalid
    at org.apache.derby.client.am.ClientStatement.completeExecute(Unknown Source)
    at org.apache.derby.client.net.NetStatementReply.parseEXCSQLSTTreply(Unknown Source)
    at org.apache.derby.client.net.NetStatementReply.readExecuteCall(Unknown Source)
    at org.apache.derby.client.net.StatementReply.readExecuteCall(Unknown Source)
    at org.apache.derby.client.net.NetStatement.readExecuteCall_(Unknown Source)
    at org.apache.derby.client.am.ClientStatement.readExecuteCall(Unknown Source)
    at org.apache.derby.client.am.ClientPreparedStatement.flowExecute(Unknown Source)
    at org.apache.derby.client.am.ClientPreparedStatement.executeX(Unknown Source)
    at org.apache.derby.client.am.CallableLocatorProcedures.blobGetLength(Unknown Source)
    at org.apache.derby.client.am.ClientBlob.getLocatorLength(Unknown Source)
    at org.apache.derby.client.am.Lob.sqlLength(Unknown Source)
    at org.apache.derby.client.am.ClientBlob.length(Unknown Source)
    at org.apache.derby.client.am.Cursor.getBytes(Unknown Source)
    at org.apache.derby.client.am.ClientResultSet.getBytes(Unknown Source)
    at com.j256.ormlite.jdbc.JdbcDatabaseResults.getBytes(JdbcDatabaseResults.java:122)
    at com.j256.ormlite.field.types.ByteArrayType.resultToSqlArg(ByteArrayType.java:41)
    at com.j256.ormlite.field.BaseFieldConverter.resultToJava(BaseFieldConverter.java:24)
    at com.j256.ormlite.field.FieldType.resultToJava(FieldType.java:819)
    at com.j256.ormlite.stmt.mapped.BaseMappedQuery.mapRow(BaseMappedQuery.java:60)
    at com.j256.ormlite.stmt.StatementExecutor.queryForFirst(StatementExecutor.java:99)
    at com.j256.ormlite.dao.BaseDaoImpl.queryForFirst(BaseDaoImpl.java:233)
    at com.j256.ormlite.stmt.QueryBuilder.queryForFirst(QueryBuilder.java:375)
    at mobi.nordpos.dao.ormlite.UserPersist.find(UserPersist.java:69)
    at mobi.nordpos.catalog.action.UserAuthorizationActionBean.login(UserAuthorizationActionBean.java:88)
    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:483)
    at net.sourceforge.stripes.controller.DispatcherHelper$6.intercept(DispatcherHelper.java:456)
    at net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:158)
    at net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor.intercept(BeforeAfterMethodInterceptor.java:113)
    at net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:155)
    at net.sourceforge.stripes.controller.ExecutionContext.wrap(ExecutionContext.java:74)
    at net.sourceforge.stripes.controller.DispatcherHelper.invokeEventHandler(DispatcherHelper.java:454)
    at net.sourceforge.stripes.controller.DispatcherServlet.invokeEventHandler(DispatcherServlet.java:278)
    at net.sourceforge.stripes.controller.DispatcherServlet.service(DispatcherServlet.java:160)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
    at net.sourceforge.stripes.controller.DynamicMappingFilter$2.doFilter(DynamicMappingFilter.java:453)
    at net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter.java:260)
    at net.sourceforge.stripes.controller.DynamicMappingFilter.doFilter(DynamicMappingFilter.java:440)
    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:503)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:74)
    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:1015)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:652)
    at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1575)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1533)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
@svininykh svininykh added the bug label Jan 6, 2015
@svininykh svininykh changed the title Not load Role foreign for User Not create and load new User for Apache Derby Jan 7, 2015
@svininykh
Copy link
Contributor Author

Similar bug in Eclipse https://bugs.eclipse.org/bugs/show_bug.cgi?id=286206

@svininykh
Copy link
Contributor Author

If you want registration new user, also throw exception:

07-Jan-2015 21:01:37.196 SEVERE [http-nio-8084-exec-11] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [default] in context with path [/product-catalog] threw exception [ActionBean execution threw an exception.] with root cause
 org.apache.derby.client.am.SqlException: An attempt was made to get a data value of type 'VARBINARY' from a data value of type 'BLOB'.
    at org.apache.derby.client.am.PreparedStatement$PossibleTypes.throw22005Exception(Unknown Source)
    at org.apache.derby.client.am.PreparedStatement.setNull(Unknown Source)
    at com.j256.ormlite.jdbc.JdbcDatabaseConnection.statementSetArgs(JdbcDatabaseConnection.java:323)
    at com.j256.ormlite.jdbc.JdbcDatabaseConnection.insert(JdbcDatabaseConnection.java:169)
    at com.j256.ormlite.stmt.mapped.MappedCreate.insert(MappedCreate.java:91)
    at com.j256.ormlite.stmt.StatementExecutor.create(StatementExecutor.java:450)
    at com.j256.ormlite.dao.BaseDaoImpl.create(BaseDaoImpl.java:310)
    at com.j256.ormlite.dao.BaseDaoImpl.createIfNotExists(BaseDaoImpl.java:322)
    at mobi.nordpos.dao.ormlite.UserPersist.add(UserPersist.java:80)
    at mobi.nordpos.catalog.action.UserRegistrationActionBean.accept(UserRegistrationActionBean.java:61)
    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:606)
    at net.sourceforge.stripes.controller.DispatcherHelper$6.intercept(DispatcherHelper.java:456)
    at net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:158)
    at net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor.intercept(BeforeAfterMethodInterceptor.java:113)
    at net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:155)
    at net.sourceforge.stripes.controller.ExecutionContext.wrap(ExecutionContext.java:74)
    at net.sourceforge.stripes.controller.DispatcherHelper.invokeEventHandler(DispatcherHelper.java:454)
    at net.sourceforge.stripes.controller.DispatcherServlet.invokeEventHandler(DispatcherServlet.java:278)
    at net.sourceforge.stripes.controller.DispatcherServlet.service(DispatcherServlet.java:160)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
    at net.sourceforge.stripes.controller.DynamicMappingFilter$2.doFilter(DynamicMappingFilter.java:453)
    at net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter.java:260)
    at net.sourceforge.stripes.controller.DynamicMappingFilter.doFilter(DynamicMappingFilter.java:440)
    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:503)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:74)
    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:1015)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:652)
    at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1575)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1533)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

Error only Apache Derby, if you connect to MySQL, you don`t have exception.

@svininykh
Copy link
Contributor Author

I remove byte[] image from User class until the found a solution.

svininykh added a commit to nordpos-mobi/product-catalog that referenced this issue Jan 7, 2015
svininykh added a commit to nordpos-mobi/restaurant-service that referenced this issue Jan 7, 2015
denis554 added a commit to denis554/restaurant-service that referenced this issue Apr 8, 2019
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

1 participant