Error message when creating a new order

Hello,
When I try to create a new order, I can select a supplier in the new order popup but I can not select a supplier (empty list). I have that error log message :

[WARN,JDBCExceptionReporter,http-8080-Processor23] SQL Error: 1267, SQLState: HY000
[ERROR,JDBCExceptionReporter,http-8080-Processor23] Illegal mix of collations (utf8_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '='
[ERROR,AbstractArchetypeServiceResultSet,http-8080-Processor23] org.openvpms.component.business.service.archetype.ArchetypeServiceException: Failed to execute query: {0}.
org.openvpms.component.business.service.archetype.ArchetypeServiceException: Failed to execute query: {0}.
at org.openvpms.component.business.service.archetype.ArchetypeService.get(ArchetypeService.java:373)
at sun.reflect.GeneratedMethodAccessor165.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:292)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:163)
at $Proxy2.get(Unknown Source)
at sun.reflect.GeneratedMethodAccessor165.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:292)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:155)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:122)
at org.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80)
at org.openvpms.component.business.service.security.OpenVPMSMethodSecurityInterceptor.invoke(OpenVPMSMethodSecurityInterceptor.java:54)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174)
at $Proxy3.get(Unknown Source)
at org.openvpms.component.business.service.archetype.rule.ArchetypeRuleService.get(ArchetypeRuleService.java:353)
at org.openvpms.web.component.im.query.DefaultQueryExecutor.query(DefaultQueryExecutor.java:51)
at org.openvpms.web.component.im.query.AbstractArchetypeServiceResultSet.query(AbstractArchetypeServiceResultSet.java:329)
at org.openvpms.web.component.im.query.AbstractArchetypeServiceResultSet.get(AbstractArchetypeServiceResultSet.java:304)
at org.openvpms.web.component.im.query.AbstractResultSet.getPage(AbstractResultSet.java:83)
at org.openvpms.web.component.im.table.PagedIMTableModel.setPage(PagedIMTableModel.java:129)
at org.openvpms.web.component.im.table.PagedIMTableModel.setResultSet(PagedIMTableModel.java:113)
at org.openvpms.web.component.im.table.PagedIMTable.setResultSet(PagedIMTable.java:90)
at org.openvpms.web.component.im.query.TableBrowser.query(TableBrowser.java:129)
at org.openvpms.web.component.im.query.AbstractBrowser.onQuery(AbstractBrowser.java:217)
at org.openvpms.web.component.im.query.AbstractBrowser.access$000(AbstractBrowser.java:42)
at org.openvpms.web.component.im.query.AbstractBrowser$2.actionPerformed(AbstractBrowser.java:164)
at nextapp.echo2.app.button.AbstractButton.fireActionPerformed(AbstractButton.java:135)
at echopointng.ButtonEx$1.actionPerformed(ButtonEx.java:120)
at nextapp.echo2.app.button.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:70)
at echopointng.model.DefaultButtonModelEx.doAction(DefaultButtonModelEx.java:51)
at echopointng.ButtonEx.processInput(ButtonEx.java:202)
at nextapp.echo2.app.update.ClientUpdateManager.process(ClientUpdateManager.java:116)
at nextapp.echo2.app.update.UpdateManager.processClientUpdates(UpdateManager.java:89)
at nextapp.echo2.webcontainer.ContainerSynchronizeService.renderUpdate(ContainerSynchronizeService.java:472)
at nextapp.echo2.webrender.service.SynchronizeService.service(SynchronizeService.java:279)
at nextapp.echo2.webrender.WebRenderServlet.process(WebRenderServlet.java:273)
at org.openvpms.web.servlet.SpringWebContainerServlet.process(SpringWebContainerServlet.java:148)
at nextapp.echo2.webrender.WebRenderServlet.doPost(WebRenderServlet.java:189)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:292)
at org.openvpms.web.servlet.SkipLoginFilter.doFilter(SkipLoginFilter.java:111)
at org.openvpms.web.servlet.SkipLoginFilter.doFilter(SkipLoginFilter.java:71)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:108)
at org.acegisecurity.intercept.web.SecurityEnforcementFilter.doFilter(SecurityEnforcementFilter.java:197)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:143)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:246)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:220)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:173)
at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:120)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)
Caused by: org.openvpms.component.business.dao.im.common.IMObjectDAOException: Failed to execute the query: {0}.
at org.openvpms.component.business.dao.hibernate.im.entity.IMObjectDAOHibernate.get(IMObjectDAOHibernate.java:209)
at org.openvpms.component.business.service.archetype.ArchetypeService$DefaultQueryDelegator.get(ArchetypeService.java:1090)
at org.openvpms.component.business.service.archetype.ArchetypeService$DefaultQueryDelegator.get(ArchetypeService.java:1080)
at org.openvpms.component.business.service.archetype.ArchetypeService$QueryDelegator.get(ArchetypeService.java:1035)
at org.openvpms.component.business.service.archetype.ArchetypeService.get(ArchetypeService.java:371)
... 74 more
Caused by: org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not execute query; uncategorized SQLException for SQL [select party0_.party_id as entity1_12_, party0_1_.version as version12_, party0_1_.linkId as linkId12_, party0_1_.arch_short_name as arch4_12_, party0_1_.arch_version as arch5_12_, party0_1_.name as name12_, party0_1_.description as descript7_12_, party0_1_.active as active12_ from parties party0_ inner join entities party0_1_ on party0_.party_id=party0_1_.entity_id inner join entity_relationships targetenti1_ on party0_1_.linkId=targetenti1_.target_linkId where party0_1_.arch_short_name=? and party0_1_.active=? and (targetenti1_.source_arch_short_name, targetenti1_.source_linkId)=(?, ?)]; SQL state [HY000]; error code [1267]; Illegal mix of collations (utf8_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '='; nested exception is java.sql.SQLException: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '='
at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:96)
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:257)
at org.springframework.orm.hibernate3.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:424)
at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:411)
at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:363)
at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:331)
at org.openvpms.component.business.dao.hibernate.im.entity.IMObjectDAOHibernate.execute(IMObjectDAOHibernate.java:820)
at org.openvpms.component.business.dao.hibernate.im.entity.IMObjectDAOHibernate.executeQuery(IMObjectDAOHibernate.java:501)
at org.openvpms.component.business.dao.hibernate.im.entity.IMObjectDAOHibernate.get(IMObjectDAOHibernate.java:206)
... 78 more
Caused by: java.sql.SQLException: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '='
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1056)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3376)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3308)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1837)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1961)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2543)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1737)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1888)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1778)
at org.hibernate.loader.Loader.doQuery(Loader.java:662)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.doList(Loader.java:2211)
at org.hibernate.loader.Loader.listUsingQueryCache(Loader.java:2127)
at org.hibernate.loader.Loader.list(Loader.java:2087)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at org.openvpms.component.business.dao.hibernate.im.entity.IMObjectDAOHibernate$4.doInHibernate(IMObjectDAOHibernate.java:531)
at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:358)
... 82 more

Any idea ?
Is that a known and fixed issue?
I 'm using openVPMS 1.2 now.
Thanks

Daniel

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Exception raised when search Stock Location

That exception is raised when I search for a stock location. I have no answer for that search.

But When I make the save search for product stock, I have non problem ????

Daniel Dricot

Error message when creating

Hi Daniel,

I had a look on the web and there are a number of references to this specific Mysql error and it seems to be some conflict between what the mysql driver is trying to set the character encoding to and what the database is set to.  One recent reference is here:

//confluence.atlassian.com/display/CROWDKB/Illegal+mix+of+collations+error+when+trying+to+perform+administrative+functions+in+Crowd+console">confluence.atlassian.com/display/CROWDKB/Illegal+mix+of+collations+error+when+trying+to+perform+administrative+functions+in+Crowd+console

It does mention specific Mysql connector versions so maybe first we should check what version Mysql and connector you are using.  It also suggests some changes to the database Url which is located in the hibernate.properties file.

Another older post on SugarCRM forums suggests adding the following to the [mysqld] section of the Mysql my.ini file.

skip-character-set-client-handshake 

 

Cheers

Tony

Illegal mix of collations

 

Hello,

I put the version of the connector back to mysql-connector-java-5.0.8-bin.jar

I changed the charset to latin1 in the my.ini

I had the skip-character-set-client-handshake in the my.ini

I changed the url to jdbc:mysql://localhost:3306/openvpms?autoReconnect=true&useUnicode=true&characterEncoding=latin1

But it still does work :-(

Caused by: java.sql.SQLException: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (latin1_general_ci,COERCIBLE) for operation '='

What is very strange for me it that the "Stock location" is working elsewhere .. but not for create a new order ??? Any other idea ?

Thanks. Daniel Dricot

 

hibernate.connection.url=

It works ... thanks

Hello,

I put UTF8 as default char Set and utf8_general_ci as default collation. It was not working but I did not have any error in the log and no message was displayed.

In fact, I did not define a stock location defined for my organisation. I 've added the stock location for my organisation and then it works ...

But the way, in the new install documentation, it is written "

  • Select Standard Character Set

" which select Latin1 as default char Set.

Thanks for your help.

Daniel Dricot

Syndicate content