Expand my Community achievements bar.

using JDBC service in Workbench

Avatar

Level 4
Hi,
I want to use JDBC Service in Workbench ES to insert data into a MS SQL Server 2005 database.

I defined my database in Jboss's configuration file (C:\Adobe\LiveCycle8\jboss\server\all\deploy) as:


SQL_SRV
jdbc:microsoft:sqlserver//localhost:1433/LCTest
com.microsoft.jdbc.sqlserver.SQLServerDriver
LCTest
password
10
30
20000
10
100
TRANSACTION_READ_COMMITTED


And in Workbench I specified the datasource as java:/SQL_SRV. When I try to test my connection with a simple sql statement I get the below exception:

java.lang.NullPointerException
at com.adobe.idp.dsc.jdbc.editor.sql.SqlStatementInfoContents$1.widgetSelected(SqlStatementInfoContents.java:146)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
at org.eclipse.jface.window.Window.open(Window.java:796)
at com.adobe.idp.dsc.editor.base.PopupEditorComposite$1.widgetSelected(PopupEditorComposite.java:58)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at com.adobe.lcide.rcp.Application.run(Unknown Source)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
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.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)

Finally my question is.. What am I doing wrong?
Thanks.
9 Replies

Avatar

Level 10
What sql statement are you using?



Jasmin

Avatar

Level 4
I tried just an insert statement like

insert into my_table(id, text) values (1, 'test')

Avatar

Level 4
Yes, I am using Execute SQL Statement component under Foundation-JDBC.

In addition, I executed the statement with Mysql without any problem.

Avatar

Level 10
Any error in the jboss log file?



Jasmin

Avatar

Level 4
I get the below exception in Jboss log. It seems that jdbc driver for SQLServer cannot be found. How can I locate jdbc driver for SQL Server 2005. (I installed LiveCycle, JBoss using turnkey)



Caused by: org.jboss.resource.JBossResourceException: Failed to register driver for: com.microsoft.jdbc.sqlserver.SQLServerDriver; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: com.microsoft.jdbc.sqlserver.SQLServerDriver)

at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getDriver(LocalManagedConnectionFactory.java:287)

at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:153)

... 90 more

Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: com.microsoft.jdbc.sqlserver.SQLServerDriver

at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:198)

at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:475)

at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:377)

at java.lang.ClassLoader.loadClass(ClassLoader.java:251)

at org.jboss.util.loading.DelegatingClassLoader.loadClass(DelegatingClassLoader.java:77)

at org.jboss.mx.loading.LoaderRepositoryClassLoader.loadClass(LoaderRepositoryClassLoader.java:78)

at java.lang.ClassLoader.loadClass(ClassLoader.java:251)

at org.jboss.util.loading.DelegatingClassLoader.loadClass(DelegatingClassLoader.java:77)

at java.lang.ClassLoader.loadClass(ClassLoader.java:251)

at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Class.java:242)

at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getDriver(LocalManagedConnectionFactory.java:269)

... 91 more

Avatar

Level 10
Did you put the SQL Server JDBC Driver jar file in the lib folder so that LiveCycle can use the class properly?



I would put it under C:\Adobe\LiveCycle8\jboss\server\all\lib



Jasmin

Avatar

Former Community Member
I am experiencing a very similar issue where I'm at as well. We are using SQL 2005 SP2 with LiveCycle. Originally a turnkey install was preformed and then configuration files were changed to point to the SQL database. This install was working fine for us until we developed a process that contained a gateway element. Our process would run properly until it got to the gateway, and then we would receive locking errors, and rollback exceptions. The gateway element would just randomly not execute branches. No stalls in the process, just random branches would not fire off. I have a turnkey installation on my laptop that runs through the process without any problems. We have been working with Adobe support on this, and so far have not had much luck. So far we have set up a brand new server and fresh SQL database to test with. We have tried going through the steps for configuring JBoss and LiveCycle to connect with a SQL server instead of the turnkey mySQL. In following the directions set my Adobe for this, we have not been able to make the connection with SQL work. Most recently we have been getting the error that our SQL driver was not registering properly. Adobe even supplied a specially configured JBoss set up specifically to work with SQL 2005. We are even seeing issues with this install. Adobe has said that there are some known issues with SQL 2005 and JBoss, and it looks like those could be what we are running into.



OTK80-

Are you using a clustered database structure, or anything out of the ordinary with your SQL database?



All-

Would there be any reason why we should use a SQL database to connect LiveCycle to, as opposed to the turnkey mySQL database? Does it make that much of a difference going with one database over another? We plan on saving form data to a SQL database (one separate from the one LiveCycle uses to function properly) for each process we build. Would there be any issues with having LiveCycle tied to the mySQL database to run, and within our processes write to a different SQL database?

Avatar

Level 4
I am using an ordinary SQL Server 2005 database with Lİvecycle Jboss turnkey installation.
I finally connected LiveCycle with SQL Server database (Thanks Jasmin!). I located the jdbc driver and configured Jboss for SQL Server datasource like:


MSSQLDS
jdbc:sqlserver://localhost:5356;databaseName=X
com.microsoft.sqlserver.jdbc.SQLServerDriver
Y
Z

MS SQLSERVER2005