Traccar Server in MS SQLSERVER 2008 - ERROR

medreis9 years ago

The server start OK.

I use SQL SERVER 2008

If start the browse, show the error

NullPointerException (JsonConverter:102 < ServerServlet:42 < *:30 < BaseServlet:53 < ...)

Thanks

Marcio Eduardo
Brazil

Anton Tananaev9 years ago

Looks like server table is empty. Try to insert one record there.

wagnerlouzada9 years ago

Hello,

I am programmer VB .NET / ASP NET (not very experienced)

Due to design requirements, need to use the Traccar with SQL SERVER.

I got success when running traccar H2 manager.

To test with SQL SERVER, I downloaded the JDBC drivers from microsoft (versions 4, 4.1 and 4.2), and follow the steps specified in Traccar site. I did this several times.

But when running Traccar.bat, the log has several lines:

"could not load driverclass con.microsoft.sqlserver.jdbc.sqlserverdriver" and several lines with errros related to access to the database

And at the end of the log appears:

"wrapper | <-- Wrapper Stopped" "

And nothing worked.

The BD tb was not created in SQL SERVER. (Previously adjusted the creation commands in tracar.xml file, and tested the commands in SQL SEVER to confirm whether they were correct)
What should I do? what's up?

I appreciate the help.

Anton Tananaev9 years ago

@wagnerlouzada, there must be some problem with configuration. Seems like Traccar can't find JDBC driver.

wagnerlouzada9 years ago

Yeah, .

but as I already follow all specified steps, what should I look to correct?

Anton Tananaev9 years ago

Can I see the config file (the database connection parameters part)?

wagnerlouzada9 years ago
<entry key='web.enable'>true</entry>
<entry key='web.port'>8082</entry>
<entry key='web.path'>C:\Program Files (x86)\Traccar\web</entry>

<entry key='geocoder.enable'>true</entry>
<entry key='geocoder.type'>google</entry>

<entry key='logger.enable'>true</entry>
<entry key='logger.level'>all</entry>
<entry key='logger.file'>C:\Program Files (x86)\Traccar\logs\tracker-server.log</entry>

<!-- DATABASE CONFIG -->

<entry key='database.driverFile'>c:\Program Files (x86)\Traccar\lib\sqljdbc41.jar</entry>
<entry key='database.driver'>com.microsoft.sqlserver.jdbc.SQLServerDriver</entry>
<entry key='database.url'>jdbc:sqlserver://ASUS;user=sa;password=;</entry>
<entry key='database.user'>sa</entry>
<entry key='database.password'></entry>

<entry key='database.checkTable'>traccar</entry>

notes:
i copy sqljdbc41.jar to "c:\Program Files (x86)\Traccar\lib"

the driver is intalled at: "C:\Program Files (x86)\Microsoft JDBC Driver 4.1 for SQL Server\sqljdbc_4.1\ptb"

wagnerlouzada9 years ago

i use windows 8.1
and SQLSERVER 12

Anton Tananaev9 years ago

Database driver parameters look fine, but URL and password are most likely incorrect.

wagnerlouzada9 years ago

server name is ASUS.

there are a user sa without password (i clear the sa password for tests)

any sugestion?

Anton Tananaev9 years ago

Can you share the log error as well please.

wagnerlouzada9 years ago
STATUS | wrapper  | 2015/12/17 14:04:34 | --> Wrapper Started as Service
STATUS | wrapper  | 2015/12/17 14:04:34 | Java Service Wrapper Community Edition 64-bit 3.5.27
STATUS | wrapper  | 2015/12/17 14:04:34 |   Copyright (C) 1999-2015 Tanuki Software, Ltd. All Rights Reserved.
STATUS | wrapper  | 2015/12/17 14:04:34 |     http://wrapper.tanukisoftware.com
STATUS | wrapper  | 2015/12/17 14:04:34 | 
STATUS | wrapper  | 2015/12/17 14:04:35 | Launching a JVM...
...
INFO   | jvm 1    | 2015/12/17 14:04:37 | [C3P0PooledConnectionPoolManager[identityToken->1hge15u9d1d0v7bl1qke0o1|116f8bb9]-HelperThread-#0] WARN com.mchange.v2.c3p0.DriverManagerDataSource - Could not load driverClass com.microsoft.sqlserver.jdbc.SQLServerDriver
INFO   | jvm 1    | 2015/12/17 14:04:37 | java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at java.net.URLClassLoader$1.run(Unknown Source)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at java.net.URLClassLoader$1.run(Unknown Source)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at java.security.AccessController.doPrivileged(Native Method)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at java.net.URLClassLoader.findClass(Unknown Source)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at java.lang.ClassLoader.loadClass(Unknown Source)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at java.lang.ClassLoader.loadClass(Unknown Source)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at java.lang.Class.forName0(Native Method)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at java.lang.Class.forName(Unknown Source)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at com.mchange.v2.c3p0.DriverManagerDataSource.ensureDriverLoaded(DriverManagerDataSource.java:143)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:173)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:220)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:206)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:203)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1138)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1125)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1870)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
INFO   | jvm 1    | 2015/12/17 14:04:37 | [C3P0PooledConnectionPoolManager[identityToken->1hge15u9d1d0v7bl1qke0o1|116f8bb9]-HelperThread-#1] WARN com.mchange.v2.c3p0.DriverManagerDataSource - Could not load driverClass com.microsoft.sqlserver.jdbc.SQLServerDriver
INFO   | jvm 1    | 2015/12/17 14:04:37 | java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at java.net.URLClassLoader$1.run(Unknown Source)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at java.net.URLClassLoader$1.run(Unknown Source)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at java.security.AccessController.doPrivileged(Native Method)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at java.net.URLClassLoader.findClass(Unknown Source)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at java.lang.ClassLoader.loadClass(Unknown Source)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at java.lang.ClassLoader.loadClass(Unknown Source)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at java.lang.Class.forName0(Native Method)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at java.lang.Class.forName(Unknown Source)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at com.mchange.v2.c3p0.DriverManagerDataSource.ensureDriverLoaded(DriverManagerDataSource.java:143)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:173)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:220)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:206)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:203)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1138)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1125)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1870)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
INFO   | jvm 1    | 2015/12/17 14:04:37 | [C3P0PooledConnectionPoolManager[identityToken->1hge15u9d1d0v7bl1qke0o1|116f8bb9]-HelperThread-#2] WARN com.mchange.v2.c3p0.DriverManagerDataSource - Could not load driverClass com.microsoft.sqlserver.jdbc.SQLServerDriver
INFO   | jvm 1    | 2015/12/17 14:04:37 | java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at java.net.URLClassLoader$1.run(Unknown Source)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at java.net.URLClassLoader$1.run(Unknown Source)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at java.security.AccessController.doPrivileged(Native Method)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at java.net.URLClassLoader.findClass(Unknown Source)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at java.lang.ClassLoader.loadClass(Unknown Source)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at java.lang.ClassLoader.loadClass(Unknown Source)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at java.lang.Class.forName0(Native Method)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at java.lang.Class.forName(Unknown Source)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at com.mchange.v2.c3p0.DriverManagerDataSource.ensureDriverLoaded(DriverManagerDataSource.java:143)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:173)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:220)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:206)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:203)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1138)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1125)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1870)
INFO   | jvm 1    | 2015/12/17 14:04:37 | 	at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
INFO   | jvm 1    | 2015/12/17 14:04:38 | [WrapperSimpleAppMain] INFO org.eclipse.jetty.util.log - Logging initialized @3003ms
INFO   | jvm 1    | 2015/12/17 14:04:39 | WrapperSimpleApp: 
INFO   | jvm 1    | 2015/12/17 14:04:39 | WrapperSimpleApp Error: Encountered an error running main:
INFO   | jvm 1    | 2015/12/17 14:04:39 | WrapperSimpleApp Error: org.jboss.netty.channel.ChannelException: Failed to bind to: 0.0.0.0/0.0.0.0:5004
INFO   | jvm 1    | 2015/12/17 14:04:39 | WrapperSimpleApp Error: 	at org.jboss.netty.bootstrap.ConnectionlessBootstrap.bind(ConnectionlessBootstrap.java:204)
INFO   | jvm 1    | 2015/12/17 14:04:39 | WrapperSimpleApp Error: 	at org.traccar.TrackerServer.start(TrackerServer.java:133)
INFO   | jvm 1    | 2015/12/17 14:04:39 | WrapperSimpleApp Error: 	at org.traccar.ServerManager.start(ServerManager.java:76)
INFO   | jvm 1    | 2015/12/17 14:04:39 | WrapperSimpleApp Error: 	at org.traccar.Main.main(Main.java:32)
INFO   | jvm 1    | 2015/12/17 14:04:39 | WrapperSimpleApp Error: 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO   | jvm 1    | 2015/12/17 14:04:39 | WrapperSimpleApp Error: 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
INFO   | jvm 1    | 2015/12/17 14:04:39 | WrapperSimpleApp Error: 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
INFO   | jvm 1    | 2015/12/17 14:04:39 | WrapperSimpleApp Error: 	at java.lang.reflect.Method.invoke(Unknown Source)
INFO   | jvm 1    | 2015/12/17 14:04:39 | WrapperSimpleApp Error: 	at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:325)
INFO   | jvm 1    | 2015/12/17 14:04:39 | WrapperSimpleApp Error: 	at java.lang.Thread.run(Unknown Source)
INFO   | jvm 1    | 2015/12/17 14:04:39 | WrapperSimpleApp Error: Caused by: java.net.BindException: Address already in use: bind
INFO   | jvm 1    | 2015/12/17 14:04:39 | WrapperSimpleApp Error: 	at sun.nio.ch.Net.bind0(Native Method)
INFO   | jvm 1    | 2015/12/17 14:04:39 | WrapperSimpleApp Error: 	at sun.nio.ch.Net.bind(Unknown Source)
INFO   | jvm 1    | 2015/12/17 14:04:39 | WrapperSimpleApp Error: 	at sun.nio.ch.DatagramChannelImpl.bind(Unknown Source)
INFO   | jvm 1    | 2015/12/17 14:04:39 | WrapperSimpleApp Error: 	at sun.nio.ch.DatagramSocketAdaptor.bind(Unknown Source)
INFO   | jvm 1    | 2015/12/17 14:04:39 | WrapperSimpleApp Error: 	at org.jboss.netty.channel.socket.nio.NioDatagramPipelineSink.bind(NioDatagramPipelineSink.java:129)
INFO   | jvm 1    | 2015/12/17 14:04:39 | WrapperSimpleApp Error: 	at org.jboss.netty.channel.socket.nio.NioDatagramPipelineSink.eventSunk(NioDatagramPipelineSink.java:77)
INFO   | jvm 1    | 2015/12/17 14:04:39 | WrapperSimpleApp Error: 	at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendDownstream(DefaultChannelPipeline.java:779)
INFO   | jvm 1    | 2015/12/17 14:04:39 | WrapperSimpleApp Error: 	at org.jboss.netty.channel.SimpleChannelHandler.bindRequested(SimpleChannelHandler.java:299)
INFO   | jvm 1    | 2015/12/17 14:04:39 | WrapperSimpleApp Error: 	at org.jboss.netty.channel.SimpleChannelHandler.handleDownstream(SimpleChannelHandler.java:265)
INFO   | jvm 1    | 2015/12/17 14:04:39 | WrapperSimpleApp Error: 	at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:591)
INFO   | jvm 1    | 2015/12/17 14:04:39 | WrapperSimpleApp Error: 	at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendDownstream(DefaultChannelPipeline.java:784)
INFO   | jvm 1    | 2015/12/17 14:04:39 | WrapperSimpleApp Error: 	at org.jboss.netty.handler.logging.LoggingHandler.handleDownstream(LoggingHandler.java:338)
INFO   | jvm 1    | 2015/12/17 14:04:39 | WrapperSimpleApp Error: 	at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:591)
INFO   | jvm 1    | 2015/12/17 14:04:39 | WrapperSimpleApp Error: 	at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendDownstream(DefaultChannelPipeline.java:784)
INFO   | jvm 1    | 2015/12/17 14:04:39 | WrapperSimpleApp Error: 	at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:54)
INFO   | jvm 1    | 2015/12/17 14:04:39 | WrapperSimpleApp Error: 	at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:591)
INFO   | jvm 1    | 2015/12/17 14:04:39 | WrapperSimpleApp Error: 	at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendDownstream(DefaultChannelPipeline.java:784)
INFO   | jvm 1    | 2015/12/17 14:04:39 | WrapperSimpleApp Error: 	at org.jboss.netty.channel.SimpleChannelHandler.bindRequested(SimpleChannelHandler.java:299)
INFO   | jvm 1    | 2015/12/17 14:04:39 | WrapperSimpleApp Error: 	at org.jboss.netty.channel.SimpleChannelHandler.handleDownstream(SimpleChannelHandler.java:265)
INFO   | jvm 1    | 2015/12/17 14:04:39 | WrapperSimpleApp Error: 	at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:591)
INFO   | jvm 1    | 2015/12/17 14:04:39 | WrapperSimpleApp Error: 	at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:582)
INFO   | jvm 1    | 2015/12/17 14:04:39 | WrapperSimpleApp Error: 	at org.jboss.netty.channel.Channels.bind(Channels.java:561)
INFO   | jvm 1    | 2015/12/17 14:04:39 | WrapperSimpleApp Error: 	at org.jboss.netty.channel.AbstractChannel.bind(AbstractChannel.java:198)
INFO   | jvm 1    | 2015/12/17 14:04:39 | WrapperSimpleApp Error: 	at org.jboss.netty.bootstrap.ConnectionlessBootstrap.bind(ConnectionlessBootstrap.java:198)
INFO   | jvm 1    | 2015/12/17 14:04:39 | WrapperSimpleApp Error: 	... 9 more
Anton Tananaev9 years ago

In addition to driver issue there seems to be the problem with port. You have some other process using port 5004 (possibly another instance of Traccar).

Note that you should start Traccar as a windows service, not manually via ".bat" file.

wagnerlouzada9 years ago

I will check carefully

wagnerlouzada9 years ago

The port usage

5000/tcp filtered upnp
5001/tcp filtered commplex-link
5002/tcp filtered rfe
5003/tcp filtered filemaker
5004/tcp filtered avt-profile-1 (Stream SERVER)
5005/tcp filtered avt-profile-2
5006/tcp filtered unknown
5007/tcp filtered unknown
5008/tcp filtered unknown
5009/tcp filtered airport-admin
5010/tcp filtered telelpathstart

Is possible change traccar port?