-
Notifications
You must be signed in to change notification settings - Fork 435
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
Using mssql-jdbc cause project build problems #429
Comments
Hello @Anjytka , from my investigation, I am not able to reproduce the same error with OSGI framework... it works on my OSGI test code. Can I ask you a few more questions to narrow down my investigation? How do you add the driver as dependency? For example, via maven ? How do you use the driver in your code? Do you use any particular feature of the driver ? Also want to confirm with you, you are using version 6.2.1, right? |
Hello @v-xiangs
There is the code, which interact with driver:
And maybe it'll help you to reproduce the issue, there are bamboo dependensies' specifications below:
Hope my answer will be helpfull. |
Thanks for the details! @Anjytka the information you provided is very useful ! Give me some time and I will get back to you. Thank you! |
Hello @Anjytka from my investigation, if we look at the MANIFEST.MF in the driver, we can see the 2 dependencies, Is it possible the OSGI framework on bamboo does not support keyword Also, could you please try one thing?
I want to see if adding the driver as optional dependency will make a difference or not. Thank you very much for trying this for us! |
Hello @v-xiangs. I tried to add
|
Hello @Anjytka , thank you very much for testing this for us! I am glad to know adding Regarding to your question, when you say "leave exclusions in OSGI |
Hello @Anjytka please let us know if there is anything else we can help you with. Otherwise we will close this issue soon :) |
Hello @v-xiangs Sorry for delaying with the answer. In both situations:
and
I have to keep exclusions. In other way installation of my plugin on Bamboo fails. |
Hello @Anjytka thank you for getting back to us. It looks like those packages are required by other projects, I dont think they are related to the driver. For example, |
I'm not sure about an origin of the dependencies. The only one thing I know, that I need to exclude them after mssql-jdbc dependency adding. I'll research it when I'll have more time. Anyway, @v-xiangs, thanks for help! |
@Anjytka Thank you for explaining it to us. We very appreciate your time and helps. I am glad to know there is at least one solution for you to make it work. I am closing this issue for now. Please free feel to re-open it. Thank you. |
Hi Team,
Can you please help me know what is the solution to fix this issue. WARN | -redhat-00001/deploy | e.j.e.i.JdbcEnvironmentInitiator | 327 - org.jboss.logging.jboss-logging - 3.3.2.Final-redhat-00001 | HHH000342: Could not obtain connection to query metadata : Cannot load JDBC driver class 'com.microsoft.sqlserver.jdbc.SQLServerDriver' Thanks, |
The driver is not in your classpath. I'd google this online to find a solution for this. |
Hi Peterbae,
393 | Active | 80 | 1.0.1.RELEASE | EGov-Fuse-Datasource Microsoft JDBC Driver for SQL Server (395)Bnd-LastModified = 1533057440087 Bundle-Description = Microsoft JDBC Driver for SQL Server. Require-Capability = Export-Package = karaf@root()> --
|
Driver version or jar name
6.2.1.jre8
SQL Server version
13.0.4001.0
Client operating system
Windows 7
Java/JVM version
Example: java version "1.8.0_131", Java HotSpot(TM) 64-Bit Server VM
Problem description
3 problems occured when dependency mssql-jdbc was added.
Expected behavior and actual behavior
Expected:
Including dependency mssql-jdbc cause no promlem.
Actual:
I work on project that require connection to MS SQL Server. Main part of project is Bamboo plugin for bamboo 5.13.2 version, which use OSGI. When I have added mssql-jdbc dependency to my lib, which was used in main project, I've faced problems.
First of all, I have had to add two dependencies to lib, cos they haven't been recieved transitively.
Error (the same one occured for azure-keyvault):
2017-08-02 10:22:28,452 ERROR [localhost-startStop-1] [OsgiPlugin] Detected an error (BundleException) enabling the plugin 'blabla.plugin.name' : Unresolved constraint in bundle blabla.plugin.name [19]: Unable to resolve 19.0: missing requirement [19.0] osgi.wiring.package; (osgi.wiring.package=com.microsoft.aad.adal4j).
Solution:
Moreover, I have had to exclude packets below at OSGI config section :
Error (the same one for others):
2017-08-02 10:36:24,750 ERROR [localhost-startStop-1] [OsgiPlugin] Detected an error (BundleException) enabling the plugin 'blabla.plugin.name' : Unresolved constraint in bundle blabla.plugin.name [19]: Unable to resolve 19.0: missing requirement [19.0] osgi.wiring.package; (osgi.wiring.package=org.apache.avalon.framework.logger).
Solution:
Furthermore error with dependencies correlation have occured. I've resolved it using section in dependency azure-keyvault, which have been added as a solution of first error.
Error:
[INFO] [talledLocalContainer] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'activator' defined in URL [bundle://93.0:0/META-INF/spring/atlassian-plugins-components.xml]: Invocation of init method failed; nested exception is com.sun.jersey.spi.service.ServiceConfigurationError: com.sun.jersey.spi.HeaderDelegateProvider: The class com.sun.jersey.core.impl.provider.header.LocaleProvider implementing provider interface com.sun.jersey.spi.HeaderDelegateProvider could not be instantiated: Cannot cast com.sun.jersey.core.impl.provider.header.LocaleProvider to com.sun.jersey.spi.HeaderDelegateProvider
Solution:
I'm thinking where are too much exclusions and I'm fearing it can lead to more problems later. Is there clearer way to resolve that three errors?
The text was updated successfully, but these errors were encountered: