Skip to content
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

Question on system-config.xml for SQL Server #280

Open
mistarheeOG opened this issue Aug 13, 2020 · 2 comments
Open

Question on system-config.xml for SQL Server #280

mistarheeOG opened this issue Aug 13, 2020 · 2 comments

Comments

@mistarheeOG
Copy link
Contributor

mistarheeOG commented Aug 13, 2020

Hey guys, I'm experimenting with Obevo as an option to track and deploy SQL Server objects. I'm trying to have it work locally on my workstation and I can't seem to connect to my local instance properly. I've tried a couple of variations and the closest I get to something that provides some feedback without failing is to use the jdbcUrl attribute:

<dbSystemConfig type="MSSQL">
  <schemas>
      <schema name="ObevoTest" />
  </schemas>
  <environments>
    <dbEnvironment name="jdbc"
        jdbcUrl="jdbc:sqlserver://localhost;integratedSecurity=true;">
    </dbEnvironment>
  </environments>
</dbSystemConfig>

I run the following command:
deploy.bat DEPLOY -sourcePath c:\ObevoTest\system-config.xml -env jdbc

That prompts me for my credentials which I enter and then I get the following:

Starting action at time [Thu Aug 13 01:07:21 EDT 2020]
Arguments parsed: DeployerArgs [envNames=[jdbc], , setupEnvInfraOnly=false, cleanFirst=false, cleanOnly=false, noPrompt=false, useBaseline=false, onboardingMode=false, useKerberosAuth=false, sourcePath=c:\ObevoTest\system-config.xml, deployUserId=[redacted], performInitOnly=false, preview=false, rollback=false, ]
Using "[redacted]\vfs_cache" as temporary files store.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.eclipse.collections.impl.utility.ArrayListIterate (file:/C:/Projects/obevo-cli-8.1.1-dist/lib/eclipse-collections-7.0.2.jar) to field java.util.ArrayList.elementData
WARNING: Please consider reporting this to the maintainers of org.eclipse.collections.impl.utility.ArrayListIterate
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Checker for environment type w/ enricher XmlFileConfigReader here
Error when creating PropertyDescriptor for public final void org.apache.commons.configuration2.AbstractConfiguration.setProperty(java.lang.String,java.lang.Object)! Ignoring this property.
Using working directory for env jdbc as: [redacted]
Running deployment as user [redacted]
Setting up the the environment infrastructure for jdbc; will warn on setup exception

Action completed with errors at Thu Aug 13 01:07:22 EDT 2020, took 1 seconds.

*** Exception stack trace ***
java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerConnection.java:4128)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:3188)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$100(SQLServerConnection.java:61)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:3151)

        at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7535)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2438)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1973)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:1616)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:1447)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:788)
        at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1187)
        at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
        at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
        at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
        at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
        at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
        at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
        at com.gs.obevo.db.impl.core.envinfrasetup.AbstractEnvironmentInfraSetup.setupEnvInfra(AbstractEnvironmentInfraSetup.kt:55)
        at com.gs.obevo.db.impl.core.DbDeployerAppContextImpl.setupEnvInfra(DbDeployerAppContextImpl.kt:348)
        at com.gs.obevo.db.impl.core.DbDeployerAppContextImpl.setupEnvInfra(DbDeployerAppContextImpl.kt:343)
        at com.gs.obevo.db.impl.core.DbDeployerAppContextImpl.setupEnvInfra(DbDeployerAppContextImpl.kt:67)
        at com.gs.obevo.db.cmdline.DbDeployerMain.start(DbDeployerMain.java:44)
        at com.gs.obevo.cmdline.AbstractMain.start(AbstractMain.java:129)
        at com.gs.obevo.dist.Main$5.value(Main.java:185)
        at com.gs.obevo.dist.Main$5.value(Main.java:182)
        at com.gs.obevo.dist.Main.execute(Main.java:119)
        at com.gs.obevo.dist.Main.execute(Main.java:87)
        at com.gs.obevo.dist.Main.main(Main.java:69)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
        ... 28 common frames omitted

Detailed Log File is available at: [redacted]

Exiting with errors!

What am I missing or doing wrong? I've downloaded JDBC files from Microsoft and added them into directories in the PATH. I've tried with integrated and SQL Auth and same results. Suggestions?

@mohrezaei
Copy link

Looks like something (likely the MS driver?) is dependent on JAXB, which has an odd history with the JDK versions. Depending on what version of the JDK you're using, there are different recipes for getting it to work. This stackoverflow answer is reasonably comprehensive.

@mistarheeOG
Copy link
Contributor Author

Looks like something (likely the MS driver?) is dependent on JAXB, which has an odd history with the JDK versions. Depending on what version of the JDK you're using, there are different recipes for getting it to work. This stackoverflow answer is reasonably comprehensive.

Sounds good @mohrezaei, I'll check that out and report back - thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants