I'm trying to store the following tweet into MySQL database and it fails with the following exception. How do I fix it? Any help is appreciated. I am using utf8 charset database and I am thinking that !??? in the message is being problematic here.
tweet=I'm forbidden by a ride # USS due to my height, I'm suppose to sit in the mid, incase there's an accident, but I still love my height!???
Caused by: java.sql.SQLException: Incorrect string value: '\xF0\x9F\x91\x8D\xF0\x9F...' for column 'message' at row 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3609)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3541)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2002)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2163)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2624)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2127)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2427)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2345)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2330)
at org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.executeAndExtract(IdentityGenerator.java:94)
at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:57)
In your driver url path use the following parameters
jdbc:mysql://<host>:<port>/<db>?useUnicode=true&characterEncoding=UTF-8
Related
I have been trying to run my project which is a web application that takes excel sheet as input and processes the data. Up until recently the execution was taking place smoothly but only today morning that i am getting the below error,do help
Exception in PoolingDAO ==> insertClass() :
com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'item_codes' at row 1
at com.mysql.jdbc.PreparedStatement.executeInternal
at com.mysql.jdbc.PreparedStatement.executeUpdate
at com.mysql.jdbc.PreparedStatement.executeUpdate
at com.Fidoop.DAOFactory.PoolingDAO.insert_to_mbill(PoolingDAO.java:471)
at com.Fidoop.util.GetInvoiceRead.Itemlistread(GetInvoiceRead.java:63)
at com.action.user.UploadFileMaster.doPost(UploadFileMaster.java:291)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
at org.apache.catalina.core.ApplicationFilterChain.doFilter
at org.apache.catalina.core.StandardWrapperValve.invoke
at org.apache.catalina.core.StandardContextValve.invoke
at org.apache.catalina.authenticator.AuthenticatorBase.invoke
at org.apache.catalina.core.StandardHostValve.invoke
at org.apache.catalina.valves.ErrorReportValve.invoke
at org.apache.catalina.valves.AccessLogValve.invoke
at org.apache.catalina.core.StandardEngineValve.invoke
at org.apache.catalina.connector.CoyoteAdapter.service
at org.apache.coyote.http11.AbstractHttp11Processor.process
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3489)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542)
at java.lang.Thread.run(Unknown Source)
NEW CONNECTION CREATED
Vector :[com.mysql.jdbc.JDBC4Connection#75c5a4]
Destroy Connection
Removing Duplicate words:
com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'item_codes' at row 1
This error is coming from MySQL because whatever you're trying to persist is too large for the given field item_codes. You have several options to mitigate this
field length on that table *
adjust the character length in the spreadsheet
programatically trim the length of the input.
I am trying to read an Access database using UCanAccess.
The code is working but is tremendously slow due to the database being large. As the database rarely changes, I am trying to use the keepMirror suggestion in
Slow initial connection to MS access database; .
connection = DriverManager.getConnection(UcanaccessDriver.URL_PREFIX + databaseFile + ";keepMirror=/some/dir/test/resources/db-mirror/mirror");
On the first run, the application works perfectly and creates the mirror files in the directory above. On subsequent runs, however, I get the following exception:
Exception in thread "main" java.lang.RuntimeException:
net.ucanaccess.jdbc.UcanaccessSQLException: UCAExc:::3.0.6 error in
script file line: 289
/some/dir/test/resources/db-mirror/mirror-783471167 a UNIQUE
constraint already exists on the set of columns in statement [CREATE
CACHED TABLE <TABLE DEF> ON DELETE CASCADE ON UPDATE CASCADE)] at
de.gdfsuezenergie.stromnev.enet.ENETConnector.init(ENETConnector.java:69)
at de.gdfsuezenergie.stromnev.Main.setUp(Main.java:374) at
de.gdfsuezenergie.stromnev.Main.main(Main.java:165) at
de.gdfsuezenergie.stromnev.MainTest.main(MainTest.java:9) 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
com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Caused by: net.ucanaccess.jdbc.UcanaccessSQLException: UCAExc:::3.0.6
error in script file line: 289
/some/dir/test/resources/db-mirror/mirror-783471167 a UNIQUE
constraint already exists on the set of columns in statement [CREATE
CACHED TABLE <TABLE DEF> ON DELETE CASCADE ON UPDATE CASCADE)] at
net.ucanaccess.jdbc.UcanaccessDriver.connect(UcanaccessDriver.java:264)
at java.sql.DriverManager.getConnection(DriverManager.java:664) at
java.sql.DriverManager.getConnection(DriverManager.java:270) at
de.gdfsuezenergie.stromnev.enet.ENETConnector.createConnection(ENETConnector.java:86)
at
de.gdfsuezenergie.stromnev.enet.ENETConnector.init(ENETConnector.java:57)
... 8 more Caused by: java.sql.SQLException: error in script file
line: 289 /some/dir/test/resources/db-mirror/mirror-783471167 a UNIQUE
constraint already exists on the set of columns in statement [CREATE
CACHED TABLE <TABLE DEF> ON DELETE CASCADE ON UPDATE CASCADE)] at
org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source) at
org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source) at
org.hsqldb.jdbc.JDBCConnection.(Unknown Source) at
org.hsqldb.jdbc.JDBCDriver.getConnection(Unknown Source) at
org.hsqldb.jdbc.JDBCDriver.connect(Unknown Source) at
java.sql.DriverManager.getConnection(DriverManager.java:664) at
java.sql.DriverManager.getConnection(DriverManager.java:247) at
net.ucanaccess.jdbc.DBReference.getHSQLDBConnection(DBReference.java:440)
at
net.ucanaccess.jdbc.UcanaccessDriver.connect(UcanaccessDriver.java:231)
... 12 more Caused by: org.hsqldb.HsqlException: error in script file
line: 289 /some/dir/test/resources/db-mirror/mirror-783471167 a UNIQUE
constraint already exists on the set of columns in statement [CREATE
CACHED TABLE <TABLE DEF> ON DELETE CASCADE ON UPDATE CASCADE)] at
org.hsqldb.error.Error.error(Unknown Source) at
org.hsqldb.scriptio.ScriptReaderText.readDDL(Unknown Source) at
org.hsqldb.scriptio.ScriptReaderBase.readAll(Unknown Source) at
org.hsqldb.persist.Log.processScript(Unknown Source) at
org.hsqldb.persist.Log.open(Unknown Source) at
org.hsqldb.persist.Logger.open(Unknown Source) at
org.hsqldb.Database.reopen(Unknown Source) at
org.hsqldb.Database.open(Unknown Source) at
org.hsqldb.DatabaseManager.getDatabase(Unknown Source) at
org.hsqldb.DatabaseManager.newSession(Unknown Source) ... 19 more
Caused by: org.hsqldb.HsqlException: a UNIQUE constraint already
exists on the set of columns at org.hsqldb.error.Error.error(Unknown
Source) at org.hsqldb.error.Error.error(Unknown Source) at
org.hsqldb.ParserTable.addTableConstraintDefinitions(Unknown Source)
at org.hsqldb.StatementSchema.getResult(Unknown Source) at
org.hsqldb.StatementSchema.execute(Unknown Source) at
org.hsqldb.Session.executeCompiledStatement(Unknown Source) ... 28
more
I understand that this is therefore violating some constraint on this cached table, what I don't understand is why it is running this script. I thought the whole point of creating the mirror was that I wouldn't need to reapply any scripts?
Does someone know how to read the mirror properly?
Note: <TABLE DEF> => I haves skipped the table definition for brevity.
This issue is known to occur when a table in the Access database has more than one unique index defined for a given column, e.g., a Primary Key index (Primary=Yes, Unique=Yes) and another separate Unique index (Primary=No, Unique=Yes).
Access itself does not have any problem with this, but HSQLDB (which UCanAccess uses for its backing database) does not permit more than one unique constraint on a set of columns.
The best solution is to open the .accdb or .mdb database in Access and remove the redundant non-Primary unique index.
I managed to get it to work but it's a bit hacky. Basically by removing the Unique Constraints from the mirror script it finally managed to get through. Sadly I don't have knowledge of the data, so need to work out if its still correct, but I believe it is.
Thanks for the pointers everyone! Very much appreciated.
Having trouble installing SonarQube 3.7 with Oracle - always getting ORA-01435: User does not exist.
Before pasting the stack trace here are the steps I followed to verify
Was able to connect to the same user using SQL Plus and SQL Developer.
Was able to create a table and insert some dummy data for the same user to make sure it is working fine.
Change in Oracle thin JDBC URL throws error saying that URL is malformed.
Here is my sonar.properties file
sonar.jdbc.username: test_sonar
sonar.jdbc.password: test_sonar
sonar.jdbc.dialect: oracle
sonar.jdbc.schema: test_sonar
sonar.jdbc.url: jdbc:oracle:thin:#(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=HOST)(PORT=MYPORT))(failover=yes))(CONNECT_DATA=(service_name=MYSERVICE)(SERVER=DEDICATED)))
sonar.jdbc.driverClassName: oracle.jdbc.driver.OracleDriver
sonar.jdbc.validationQuery: select 1 from dual
sonar.hibernate.default_schema: test_sonar
Using the above properties I was able to run SolarQube 2.8 successfully with out any errors but couldn't run any other version from 3.0.
Appreciate your help.
Stacktrace
2013.09.03 16:09:46 INFO o.s.s.p.ServerImpl SonarQube Server / 3.7 / 7c385c2c648967302cf69e08f56c0da135b3e5e9
2013.09.03 16:09:46 INFO o.s.c.p.Database Create JDBC datasource for jdbc:oracle:thin:#(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)
(HOST=MYHOST)(PORT=MYPORT))(failover=yes))(CONNECT_DATA=(service_name=MYSERVICE)(SERVER=DEDICATED)))
2013.09.03 16:09:47 ERROR o.s.c.p.Database Can not connect to database. Please check connectivity and settings (see the properties prefixe
d by 'sonar.jdbc.').
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (ORA-01435: user does not exist
)
at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549) ~[commons-dbcp-1.4.jar:1.4]
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388) ~[commons-dbcp-1.4.jar:1.4]
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044) ~[commons-dbcp-1.4.jar:1.4]
at org.sonar.core.persistence.DefaultDatabase.checkConnection(DefaultDatabase.java:141) [sonar-core-3.7.jar:na]
at org.sonar.core.persistence.DefaultDatabase.start(DefaultDatabase.java:70) [sonar-core-3.7.jar:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_37]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_37]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_37]
at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_37]
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110) [picocontainer-2.14.3
.jar:na]
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89) [picocontainer-2.14.3.jar:na]
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84) [picocontainer-2.1
4.3.jar:na]
at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169) [picocontainer-2.14.3.jar:na]
at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132) [picocontainer-2.14.3.jar:na]
at org.picocontainer.behaviors.Stored.start(Stored.java:110) [picocontainer-2.14.3.jar:na]
at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1015) [picocontainer-2.14.3.jar:na]
at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1008) [picocontainer-2.14.3.jar:na]
at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:766) [picocontainer-2.14.3.jar:na]
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:87) [sonar-plugin-api-3.7.jar:na]
at org.sonar.server.platform.Platform.startDatabaseConnectors(Platform.java:193) [classes/:na]
at org.sonar.server.platform.Platform.init(Platform.java:134) [classes/:na]
at org.sonar.server.platform.PlatformLifecycleListener.contextInitialized(PlatformLifecycleListener.java:33) [classes/:na]
at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:746) [jetty-server-7.6.11.v20130520.jar:7.6.11.
v20130520]
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:238) [jetty-servlet-7.6.11.v20130520.jar
:7.6.11.v20130520]
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1240) [jetty-webapp-7.6.11.v20130520.jar:7.6.11.v20130520
]
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:689) [jetty-server-7.6.11.v20130520.jar:7.6.11.v2013
0520]
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:482) [jetty-webapp-7.6.11.v20130520.jar:7.6.11.v20130520]
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) [jetty-util-7.6.11.v20130520.jar:7.6.11.v201
30520]
at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229) [jetty-server-7.6.11.v20130520.jar:7.6.11
.v20130520]
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) [jetty-util-7.6.11.v20130520.jar:7.6.11.v201
30520]
I just had this issue, and managed to solve it but setting the schema name to uppercase, like this:
sonar.jdbc.schema: TEST_SONAR
Also, there's no need to have both sonar.jdbc.schema and sonar.hibernate.default_schema, as the second property actually overrides the first one.
We are using Spring 2.5.6 and the Hibernate that comes with it.
As part of our architecture, we have a service and a manager. The service calls the manager to provide a unit of work. We place an AOP interceptor around the manager to manage the transaction.
In our case, the manager is creating an image and a note that links that image to a person, then returning back to the service. These are brand new functions.
When I run this I get the following stack trace:
2013-07-11 08:06:52,969 3773870 ERROR org.hibernate.event.def.AbstractFlushingEventListener | Could not synchronize database state with session
org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:90)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:365)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:137)
at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:655)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:732)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:701)
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:321)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:116)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy50.attachImage(Unknown Source)
at com.acs.gs.juror.service.person.impl.PersonServiceImpl$1.retry(PersonServiceImpl.java:557)
at com.acs.gs.juror.service.Service.withRetry(Service.java:362)
at com.acs.gs.juror.service.person.impl.PersonServiceImpl.attachImage(PersonServiceImpl.java:562)
at com.xerox.tclg.juror.servlet.StoreImageServlet.handleRequestInternal(StoreImageServlet.java:73)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:879)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:600)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1703)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.sql.BatchUpdateException: ORA-00932: inconsistent datatypes: expected NUMBER got BINARY
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10345)
at oracle.jdbc.driver.OracleStatementWrapper.executeBatch(OracleStatementWrapper.java:230)
at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
... 41 more
When I searched on the error, I found a lot entries about queries with null values. The thing is that I've already done the inserts and that worked fine. It's throwing this exception during the commit.
Both image and note are existing fields that I've used in the past. I have recently put a link on note to image so that a note may reference an image.
Just because of the error message, I'm suspicious of the image. Here is the definition of the image data field on the image:
#Column( name = "IMAGE_DATA" )
#Lob()
private byte[ ] imageData;
I'd appreciate any advice as to how to proceed.
The key to the answer is in the lower part of the stacktrace:
ORA-00932: inconsistent datatypes: expected NUMBER got BINARY
Hard to say which field this is about, but since you're working with images there may be something wrong in how you configured persistence for that class / field.
Maybe you should hint Hibernate how to store the field by annotating it with
#Lob(type = LobType.BLOB)
The problem ended up involving a missing annotation.
I had just added an image to note entry and set it up to point to the UUID of the image, but left off #OneToOne. As such, it appeared to be trying to store the image data in a field for UUID.
I Added the #OneToOne and the problem went away. Nathan was also correct in saying that it wasn't actually getting inserted until the commit. To find the issue, I moved these inserts outside of the transaction so that they got inserted immediately. This helped me track down the issue.
I want to get the osm data and put it in a mysql database but the error indicated below is raised by osmosis.
I need the data of an osm file to convert int to matrix then put a depot area and treat user's selected nodes as nodes like graph and i will get the fastest o efficient path to route a vehicle with capacity to get some things in the nodes and if the vehicle is full then it will return to the starting area and unload it's current loads then go back to the remaining nodes to get their loads.
20-Nov-2011 15:42:45 org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskMa
nager waitForCompletion
SEVERE: Thread for task 2-buffer failed
org.openstreetmap.osmosis.core.OsmosisRuntimeException: Unable to bulk insert re
lation members into the database.
at org.openstreetmap.osmosis.apidb.v0_6.ApidbWriter.flushRelationMembers
(ApidbWriter.java:895)
at org.openstreetmap.osmosis.apidb.v0_6.ApidbWriter.addRelationMembers(A
pidbWriter.java:1229)
at org.openstreetmap.osmosis.apidb.v0_6.ApidbWriter.flushRelations(Apidb
Writer.java:829)
at org.openstreetmap.osmosis.apidb.v0_6.ApidbWriter.complete(ApidbWriter
.java:1044)
at org.openstreetmap.osmosis.core.buffer.v0_6.EntityBuffer.run(EntityBuf
fer.java:77)
at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLException: Incorrect integer value: 'Way' for column 'mem
ber_type' at row 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3558)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3490)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2109)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2648)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.ja
va:2077)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java
:2362)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java
:2280)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java
:2265)
at org.openstreetmap.osmosis.apidb.v0_6.ApidbWriter.flushRelationMembers
(ApidbWriter.java:893)
... 5 more
20-Nov-2011 15:42:45 org.openstreetmap.osmosis.core.Osmosis main
SEVERE: Execution aborted.
org.openstreetmap.osmosis.core.OsmosisRuntimeException: One or more tasks failed
.
at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.waitForComple
tion(Pipeline.java:146)
at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:92)
at org.openstreetmap.osmosis.core.Osmosis.main(Osmosis.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Laun
cher.java:329)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:239)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
352)
at org.codehaus.classworlds.Launcher.main(Launcher.java:31)
C:\Users\home\Desktop>
Well, the stacktrace is quite obvious:
Caused by: java.sql.SQLException: Incorrect integer value:
'Way' for column 'member_type' at row 1
You are trying to pass a string "Way" to the integer-column "member_type".