Помогите(HELP)!!!

Vladimir September 17, 2018

Пытаюсь написать плагин, который при выполнении подключается к другой базе данных.

При выполнении возникает исключение 

java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver

Подскажите как решить проблему. Заранее благодарен) 

2 answers

1 vote
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 17, 2018

Привет,

Добавь в свой плагин этот драйвер.

<!-- https://mvnrepository.com/artifact/com.microsoft.sqlserver/mssql-jdbc -->
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>7.1.0.jre10-preview</version>
<scope>compile</scope>
</dependency>

Vladimir September 19, 2018

Добавил в pom.xml(1 скриншот) . После этого снова выполнил atlas-run . Плагин отключился(2 и 3 скриншот). Пытаюсь включить, не подключается.(4 скриншот).1.jpg2.jpg3.jpg4.jpg

Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 19, 2018

Try to enable this plugin again. There must be a more meaningful error in the logs. Usually before this countdown or after.

Vladimir September 19, 2018

Создал новый плагин. Пришел к выводу, что плагин не подключается после добавления зависимости для jdbc в pom.xml. "[INFO] [talledLocalContainer] 2018-09-20 09: 24: 41,776 http-nio-2990-exec-9 ОШИБКА 
admin 564x386x1 ejidwm 192.168.2.212 /rest/plugins/1.0/t.kok-key [caposgi.fa ctory 
. OsgiPluginInstalledHelper] Невозможно определить необходимые плагины, не может разрешить пакет «t.kok»."

Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 19, 2018

Понятно. Открой свой jar файл и посмотри есть ли там эта зависимость. Если нет, то смотри как ее достать в maven и тоже запакуй в jar.

<scope>compile</scope>

пакует в jar.

Vladimir September 20, 2018

Да, она там есть. И в pom.xml тоже.12.jpg13.jpg

0 votes
Grigory Salnikov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 17, 2018
Gonchik Tsymzhitov
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 9, 2019

Прикольно :)

Like Grigory Salnikov likes this

Suggest an answer

Log in or Sign up to answer