SQL Server SQLJDBC4 Driver won't connect from Browser.
Hello,
First I hope I have selected the correct Category and Forum for this, please move if required and my apologies.
We have a (Digitally Signed) Java Applet that resides on a HTTPS enabled server usinng a EV Digital Certificate. Having made a simple tweak to the Java's source I rebuilt the project and tested it in Eclipse Luna, all went well with this and a SQL connection
made. Running the jar file via a DOS CLI using java -jar applet.jar also works and a connection is made to the remote SQL server.
However, if I browse to the URL I get a dialog warning me about the SQLJDBC jar file and asks if I am willing to accept the risk, which I am. However, the applet instantly fails while trying to connect and simply dumps "SEVERE: com.microsoft.sqlserver.jdbc.SQLServerDriver"
to the Java console.
This is all the information I get not even a StackTrace, to say I am confused is an understatement and I would be obliged if anyone can help me resolve this.
The same happens on Windows 7 x64, Windows 8.1 x64 regardless of the browser used.
Thanks.
OK, I've tweaked the code and the stacktrace output was being suppressed by the logger, so I now have
Missing Application-Name manifest attribute for: https://redacted/jars/sqljdbc4.jar
Then I get:
java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at cut.out.UI.connectSQL(UI.java:691)
at cut.out.UI.init(UI.java:677)
at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter.init(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Which I suspect is a consequence of the missing attribute from the jar file, is the source available for this Jar so I can include this and digitally sign it myself?
Bob
Similar Messages
-
SQL Server 2000 Driver. No connection to Database
I'm using VisualAge 4.0 with JDK 1.2.2
This is the command:
Connection con = DriverManager.getConnection ( "jdbc:microsoft:sqlserver://192.111.0.18:1020;DatabaseName=Test","sa","");
This error occures: Cannot open database requested in login'Test'
Why do I get the error: Error open/loading com.microsoft.util.transliteration.properties if i don't write DatabaseName = Test in the url????
Do I have to change the ODBC Data Source/system DSN ??Your example is OK. You use "direct driver", so you don't need to change DSN. Check URL, database name, user_name....
But - default port for MSSQL is 1433, not 1020. -
Need help with MS SQL server JDBC driver
Anyone has experience getting ACS working with SQL2005? We keep getting ‘com.adobe.adept.persist.DatabaseException: java.sql.SQLException: No suitable driver’
We’re using sqljdbc.jar and sqljdbc4.jar that downloaded from Microsoft website. We added this to every library folder under tomcat, JRE and SDK but it did not help. Any suggestion will be helpful.
Thanks-Hi,
We have ACS with SQL Server 2005 Std correctly working.
We have this settings:
############ SQL Server Connection ############
com.adobe.adept.persist.sql.driverClass=com.microsoft.sqlserver.jdbc.SQLServerDriver
com.adobe.adept.persist.sql.connection=jdbc:sqlserver://ip-addressSQL:PortSQL;databaseName =Adept
com.adobe.adept.persist.sql.dialect=microsoft
com.adobe.adept.persist.sql.user=userSQL
com.adobe.adept.persist.sql.password=passSQL
Wi use Microsoft SQL Server JDBC Driver 3.0 downloaded from Microsoft website (http://www.microsoft.com/download/en/details.aspx?id=21599)
Good luck, -
Connecting Oracle to MS SqlServer using Microsoft SQL Server ODBC Driver
Hello,
I have just downloaded the newly released Microsoft® SQL Server® ODBC Driver for Linux and trying to configure it to connect to SqlServer Database from Oracle using DG4ODBC
Below are my config files:
# odbcinst -j
unixODBC 2.3.1
DRIVERS............: /etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
FILE DATA SOURCES..: /etc/ODBCDataSources
USER DATA SOURCES..: /usr/oracle/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8
cat /etc/odbcinst.ini
[SQL Server Native Client 11.0]
Description = Microsoft SQL Server ODBC Driver V1.0 for Linux
Driver = /opt/microsoft/sqlncli/lib64/libsqlncli-11.0.so.1720.0
#UsageCount = 1
Fileusage = 1
Dontdlclose = 1
[ODBC]
Trace = ON
Tracefile = /tmp/mstestodbc.log
cat /usr/oracle/.odbc.ini
[DEFAULT]
Driver = SQL Server Native Client 11.0
[MSTEST]
Driver = SQL Server Native Client 11.0
Description = Microsoft SQL Server ODBC Driver V1.0 for Linux
Servername = ret2axxx
Database = testdb
Port = xxxx
And when I am trying to do an ODBC test using isql I am getting the below error.
# iusql -v MSTEST username password
[unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_DBC failed
[ISQL]ERROR: Could not SQLDriverConnect
Any help is much appreciated!!
Thanks,
Steve.Thanks Kgronau for your response.
I have made changes to the ODBC.ini file still getting the same error
[MSTEST]
Driver = /opt/microsoft/sqlncli/lib64/libsqlncli-11.0.so.1720.0
#Driver = SQL Server Native Client 11.0
Description = Microsoft SQL Server ODBC Driver V1.0 for Linux
#Address = ret2axxx
Server = ret2axxx, <port>
Database = testdb
and when I am trying to export odbcinst.ini export ODBCINSTINI=/etc/odbcinst.ini
in odbcinst -j output it shows the wrong information.
:~ $ odbcinst -j
unixODBC 2.3.1
DRIVERS............: /etc//etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
FILE DATA SOURCES..: /etc/ODBCDataSources
USER DATA SOURCES..: /usr/oracle/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8
And when export odbcinst.ini as export ODBCINSTINI=odbcinst.ini it shows the correct path.
:~ $ odbcinst -j
unixODBC 2.3.1
DRIVERS............: /etc/odbcinst.ini
isql -v mstest username password
[IM005][unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_DBC failed
[ISQL]ERROR: Could not SQLConnect
Thanks,
Steve. -
How can I Connect to SQL Server or other RDBMS like Sybase from Form 6i
I want to connect Connect to SQL Server or other RDBMS like Sybase from Form 6i. I kniow that I need some gateway product but I don't know the name of the product?Can i use some other technology to do the same like client software etc.
I need this help urgently?Check the following link.
http://www.oracle.com/technology/products/gateways/index.html -
2 questions come to mind.
will it work
will TAC support you ?
available here
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a737000d-68d0-4531-b65d-da0f2a735707&displaylang=en
Brief Description
Download the SQL Server JDBC Driver 3.0, a Type 4 JDBC driver that provides database connectivity through the standard JDBC application program interfaces (APIs) available in Java Platform, Enterprise Edition 5 and above.You can test it using DBvisualizer. If you can make it work in that (actually it gives you more information about connection errors etc.), it should working in UCCX also.
-
Microsoft SQL Server JDBC Driver problem
Hi all,
I've downloaded the JDBC driver for SQL Server 2000 from Microsoft website and I
tried creating connection pool in Weblogic (WL 6.1 SP2).
Following are the configuration from the admin console,
Name - SQL2K
URL - jdbc:microsoft:sqlserver://127.0.0.1:1433
Driver Classname - com.microsoft.jdbc.sqlserver.SQLServerDriver
ACLName - sa
Password - tonypet
After creating the config, I select to chose the target server from the Servers tab
in Targets main tab in the admin console and when I click on Apply I saw in the WL
server command prompt the following error,
<16/07/2002 11:22:55> <Error> <JDBC> <Cannot startup connection pool "SQL2K" Cannot
load driver class: com.microsoft.jdbc.sqlserver.SQLServerDriver>
I have assigned the classpath env var as follows,
CLASSPATH=;.;C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib\msbase.jar;C:\Program
Files\Microsoft SQL Server 2000 Driver for JDBC\lib\msutil.jar;
C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib\mssqlserver.jar;c:\bea\wlserver6.1\lib\weblogic.jar
I've tried even copying the .JAR files to the ext and lib directory of bea directory
but I'm getting the same error.
Can anyone help me please.
Thanks a lot for your help
Cheers
NanikHi. You will also be wanting to add this property for the pool to apply to that driver:
SelectMethod=cursor
Joe
Nanik Tolaram wrote:
Hi all,
After fiddling around I found a solution (hope this will help those who are having
the same problem),
1. Make sure you add the complete directory of the library of the .JAR files in the
classpath in the STARTWEBLOGIC.CMD, I made a mistake of specifying the path in the
CLASSPATH and NOT IN the STARTWEBLOGIC.CMD as the classpath is overriden in the STARTWEBLOGIC.CMD
file.
2. The other thing I found was the configuration setting. I put the full settings
in the URL in admin console as follows,
jdbc:microsoft:sqlserver://127.0.0.1:1433;user=nanik;password=tonypet;databasename=scriptbuilder
When I put it individually in the Properties filed it won't work as it is not picking
it up from there but when I moved it to the URL and put it all together it worked
fine.
Whew !!! it's been a looong day, hope the info will help.
Cheers
Nanik
"Nanik Tolaram" <[email protected]> wrote:
Hi all,
I've downloaded the JDBC driver for SQL Server 2000 from Microsoft website
and I
tried creating connection pool in Weblogic (WL 6.1 SP2).
Following are the configuration from the admin console,
Name - SQL2K
URL - jdbc:microsoft:sqlserver://127.0.0.1:1433
Driver Classname - com.microsoft.jdbc.sqlserver.SQLServerDriver
ACLName - sa
Password - tonypet
After creating the config, I select to chose the target server from the
Servers tab
in Targets main tab in the admin console and when I click on Apply I saw
in the WL
server command prompt the following error,
<16/07/2002 11:22:55> <Error> <JDBC> <Cannot startup connection pool "SQL2K"
Cannot
load driver class: com.microsoft.jdbc.sqlserver.SQLServerDriver>
I have assigned the classpath env var as follows,
CLASSPATH=;.;C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib\msbase.jar;C:\Program
Files\Microsoft SQL Server 2000 Driver for JDBC\lib\msutil.jar;
C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib\mssqlserver.jar;c:\bea\wlserver6.1\lib\weblogic.jar
I've tried even copying the .JAR files to the ext and lib directory of bea
directory
but I'm getting the same error.
Can anyone help me please.
Thanks a lot for your help
Cheers
Nanik -
Sql Exception on Testing Configuration with SQL Server JDBC driver for XA
I have a requirement of analyzing the behavior of SQL Server JDBC data sources for XA transactions in our application.We have been using Non-XA drivers for both Oracle and SQL Server as we had no requirement for transactions spanning across multiple databases in past.I have setup and tested the XA driver for Oracle (Oracle Driver (Thin XA) for Instance Connections 9.0.1,9.2.0,10,11) in Weblogic 11g and its working perfectly for transactions spanning across two databases.No when I am trying to configure weblogic 11g R1 for Sql server JDBC driver to support XA transactions with driver details as follows,
Server:Weblogic 11g R1
Driver Type: MS Sql Server
Database Driver :Oracle's MS SQL Server Driver(Type 4 XA) Version:7.0,2000,2005)
Database:SQL Server 2005(Single Instance)
and try to create a new data source and select "Test Configuration" and following error is thrown ,
<Mar 17, 2011 4:49:49 PM GMT+05:30> <Error> <Console> <BEA-240003> <Console encountered the following error java.sql.SQLException: [OWLS][SQLServer JDBC Driver][SQLServer]xa_open (0) returns -3
at weblogic.jdbc.sqlserverbase.BaseExceptions40.createAppropriateSQLExceptionInstance(Unknown Source)
at weblogic.jdbc.sqlserverbase.BaseExceptions40.createSQLException(Unknown Source)
at weblogic.jdbc.sqlserverbase.BaseExceptions.createException(Unknown Source)
at weblogic.jdbc.sqlserverbase.BaseExceptions.getException(Unknown Source)
at weblogic.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source)
at weblogic.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source)
at weblogic.jdbc.sqlserver.tds.TDSRPCRequest.processReplyToken(Unknown Source)
at weblogic.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source)
at weblogic.jdbc.sqlserver.SQLServerImplStatement.getNextResultType(Unknown Source)
at weblogic.jdbc.sqlserverbase.BaseStatement.commonTransitionToState(Unknown Source)
at weblogic.jdbc.sqlserverbase.BaseStatement.postImplExecute(Unknown Source)
at weblogic.jdbc.sqlserverbase.BasePreparedStatement.postImplExecute(Unknown Source)
at weblogic.jdbc.sqlserverbase.BaseStatement.commonExecute(Unknown Source)
at weblogic.jdbc.sqlserverbase.BaseStatement.executeUpdateInternal(Unknown Source)
at weblogic.jdbc.sqlserverbase.BasePreparedStatement.executeUpdate(Unknown Source)
at weblogic.jdbcx.sqlserver.SQLServerImplXAResource.executeXaRpc(Unknown Source)
at weblogic.jdbcx.sqlserver.SQLServerImplXAResource.executeXaRpc(Unknown Source)
at weblogic.jdbcx.sqlserver.SQLServerImplXAResource.open(Unknown Source)
at weblogic.jdbcx.sqlserverbase.BaseXAConnection.init(Unknown Source)
at weblogic.jdbcx.sqlserverbase.BaseXAConnection40.init(Unknown Source)
at weblogic.jdbc.sqlserverbase.BaseClassCreatorForJDBC40.createXaConnection(Unknown Source)
at weblogic.jdbcx.sqlserverbase.BaseXADataSource.getXAConnection(Unknown Source)
at com.bea.console.utils.jdbc.JDBCUtils.testConnection(JDBCUtils.java:550)
at com.bea.console.actions.jdbc.datasources.createjdbcdatasource.CreateJDBCDataSource.testConnectionConfiguration(CreateJDBCDataSource.java:450)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.beehive.netui.pageflow.FlowController.invokeActionMethod(FlowController.java:870)
at org.apache.beehive.netui.pageflow.FlowController.getActionMethodForward(FlowController.java:809)
at org.apache.beehive.netui.pageflow.FlowController.internalExecute(FlowController.java:478)
at org.apache.beehive.netui.pageflow.PageFlowController.internalExecute(PageFlowController.java:306)
at org.apache.beehive.netui.pageflow.FlowController.execute(FlowController.java:336)
at org.apache.beehive.netui.pageflow.internal.FlowControllerAction.execute(FlowControllerAction.java:52)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.access$201(PageFlowRequestProcessor.java:97)
at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor$ActionRunner.execute(PageFlowRequestProcessor.java:2044)
at org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors$WrapActionInterceptorChain.continueChain(ActionInterceptors.java:64)
at org.apache.beehive.netui.pageflow.interceptor.action.ActionInterceptor.wrapAction(ActionInterceptor.java:184)
at org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors$WrapActionInterceptorChain.invoke(ActionInterceptors.java:50)
at org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors$WrapActionInterceptorChain.continueChain(ActionInterceptors.java:58)
at org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors.wrapAction(ActionInterceptors.java:87)
at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processActionPerform(PageFlowRequestProcessor.java:2116)
at com.bea.console.internal.ConsolePageFlowRequestProcessor.processActionPerform(ConsolePageFlowRequestProcessor.java:261)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processInternal(PageFlowRequestProcessor.java:556)
at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:853)
at org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:631)
at org.apache.beehive.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:158)
at com.bea.console.internal.ConsoleActionServlet.process(ConsoleActionServlet.java:256)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at com.bea.console.internal.ConsoleActionServlet.doGet(ConsoleActionServlet.java:133)
at org.apache.beehive.netui.pageflow.PageFlowUtils.strutsLookup(PageFlowUtils.java:1199)
at com.bea.portlet.adapter.scopedcontent.ScopedContentCommonSupport.executeAction(ScopedContentCommonSupport.java:686)
at com.bea.portlet.adapter.scopedcontent.ScopedContentCommonSupport.processActionInternal(ScopedContentCommonSupport.java:142)
at com.bea.portlet.adapter.scopedcontent.PageFlowStubImpl.processAction(PageFlowStubImpl.java:106)
at com.bea.portlet.adapter.NetuiActionHandler.raiseScopedAction(NetuiActionHandler.java:111)
at com.bea.netuix.servlets.controls.content.NetuiContent.raiseScopedAction(NetuiContent.java:181)
at com.bea.netuix.servlets.controls.content.NetuiContent.raiseScopedAction(NetuiContent.java:167)
at com.bea.netuix.servlets.controls.content.NetuiContent.handlePostbackData(NetuiContent.java:225)
at com.bea.netuix.nf.ControlLifecycle$2.visit(ControlLifecycle.java:180)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:324)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:130)
at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:395)
at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361)
at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:352)
at com.bea.netuix.nf.Lifecycle.runInbound(Lifecycle.java:184)
at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:159)
at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:388)
at com.bea.netuix.servlets.manager.UIServlet.doPost(UIServlet.java:258)
at com.bea.netuix.servlets.manager.UIServlet.service(UIServlet.java:199)
at com.bea.netuix.servlets.manager.SingleFileServlet.service(SingleFileServlet.java:251)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at com.bea.console.utils.MBeanUtilsInitSingleFileServlet.service(MBeanUtilsInitSingleFileServlet.java:47)
at weblogic.servlet.AsyncInitServlet.service(AsyncInitServlet.java:130)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
I followed the instruction in weblogic jdbc drivers guide to configure the JTA Transactions to support XA on SQL Server machine and weblogic server which included,
1.Copying sqljdbc.dll copied to SQL_Server_Root/bin directory from WL_HOME\server\lib.
2.Copied instjdbc.sql to sql server machine and executed the script with following output,
Changed database context to 'master'.
Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
Cannot drop the procedure 'xp_jdbc_open', because it does not exist or you do not have permission.
Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
Cannot drop the procedure 'xp_jdbc_open2', because it does not exist or you do not have permission.
Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
Cannot drop the procedure 'xp_jdbc_close', because it does not exist or you do not have permission.
Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
Cannot drop the procedure 'xp_jdbc_close2', because it does not exist or you do not have permission.
Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
Cannot drop the procedure 'xp_jdbc_start', because it does not exist or you do not have permission.
Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
Cannot drop the procedure 'xp_jdbc_start2', because it does not exist or you do not have permission.
Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
Cannot drop the procedure 'xp_jdbc_end', because it does not exist or you do not have permission.
Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
Cannot drop the procedure 'xp_jdbc_end2', because it does not exist or you do not have permission.
Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
Cannot drop the procedure 'xp_jdbc_prepare', because it does not exist or you do not have permission.
Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
Cannot drop the procedure 'xp_jdbc_prepare2', because it does not exist or you do not have permission.
Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
Cannot drop the procedure 'xp_jdbc_commit', because it does not exist or you do not have permission.
Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
Cannot drop the procedure 'xp_jdbc_commit2', because it does not exist or you do not have permission.
Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
Cannot drop the procedure 'xp_jdbc_rollback', because it does not exist or you do not have permission.
Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
Cannot drop the procedure 'xp_jdbc_rollback2', because it does not exist or you do not have permission.
Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
Cannot drop the procedure 'xp_jdbc_forget', because it does not exist or you do not have permission.
Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
Cannot drop the procedure 'xp_jdbc_forget2', because it does not exist or you do not have permission.
Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
Cannot drop the procedure 'xp_jdbc_recover', because it does not exist or you do not have permission.
Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
Cannot drop the procedure 'xp_jdbc_recover2', because it does not exist or you do not have permission.
creating JDBC XA procedures
instxa.sql completed successfully.
3.Verified that MSDTC service is running on both SQL Server and weblogic machines with XA Transaction enabled and DTC option enabled for both inbound and outbound connections.
4.Copied sqljdbc.jar (version 3.0 downloaded from msdn portal) to "C:\Oracle\Middleware\wlserver_10.3\server\ext\jdbc\sqlserver" directory and updated weblogic_classpth variable in commEnv.cmd file.
set WEBLOGIC_CLASSPATH=%JAVA_HOME%\lib\tools.jar;%BEA_HOME%\utils\config\10.3\config-launch.jar;%WL_HOME%\server\lib\weblogic_sp.jar;%WL_HOME%\server\lib\weblogic.jar;%FEATURES_DIR%\weblogic.server.modules_10.3.2.0.jar;%WL_HOME%\server\lib\webservices.jar;%ANT_HOME%/lib/ant-all.jar;%ANT_CONTRIB%/lib/ant-contrib.jar;C:\Oracle\Middleware\wlserver_10.3\server\ext\jdbc\sqlserver\server\ext\jdbc\sqlserver\sqljdbc.jar
Can some one please provide some input on whats causing this and any other steps needs to be followed to implement XA support using SQL Server JDBC driver.You seem to have done everything correctly and diligently. I would ask that you open
an official support case. -
Accessing MS Sql Server with Java classes - problem connecting to socket
I found an example at this location which uses java classes to connected to MS Sql Server.
http://search400.techtarget.com/tip/1,289483,sid3_gci1065992,00.html
--bummer - it is a login location - so I will include the article
Anyway, the example is using Websphere, but I am still on Jbuilder (will get wsad soon). So I planted the classes from the example in
C:\Borland\JBuilder\jkd1.4\jre\lib\ext\...the classes
Then I copied the code from the example to my jpx project and got an error that it could not connect to the socket. The only thing I changed in the code was the connection string:
--original string from example:
Connection connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://1433", "");
I was getting an error with the 2 argument version of DriverManager - and the second argument here was empty (properties argument). Here was my connection string:
Connection connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://Myserver:1433;User=sa;Password=");
I am only using the 1 argument version of DriverManager. Note that the password=" is blank because my RnD workstation is standalone - no one accesses the sql server except me - so no password. I also left out the last semicolon I noticed. Any suggestions appreciated how I could fix this.
Thanks
source of article:
http://search400.techtarget.com/tip/1,289483,sid3_gci1065992,00.html
iSeries 400 Tips:
TIPS & NEWSLETTERS TOPICS SUBMIT A TIP HALL OF FAME
Search for: in All Tips All search400 Full TargetSearch with Google
PROGRAMMER
Sample code: Accessing MS SQL Server database from the iSeries
Eitan Rosenberg
09 Mar 2005
Rating: --- (out of 5)
Nowadays with the help of Java the iSeries can be integrated with other databases quite easy. This tip shows you how. The code included here uses the free Microsoft driver that can be downloaded from here. (SQL Server 2000 Driver for JDBC Service Pack 3)
If your SQL server does not include the Northwind Sample Database you can find it here.
http://www.microsoft.com/downloads/details.aspx?familyid=07287b11-0502-461a-b138-2aa54bfdc03a&displaylang=en
The download contains the following files:
msbase.jar
mssqlserver.jar
msutil.jar
Those files needs to be copied to the iSeries directories (/home/r_eitan/ExternalJARs).
Here's the directory structure (on the iSeries) for this sample:
/home/r_eitan/ExternalJARs - Microsoft files (msbase.jar,mssqlserver.jar,msutil.jar)
/home/r_eitan/JdbcTest02 - My code (Main.java,Main.class)
The Java code
import java.sql.*;
import java.io.*;
class Main {
* Connect to Microsoft SQL server and download file northWind.products as tab
* seperated file. (products.txt)
public static void main(String args[]) {
try {
PrintStream outPut = new PrintStream(new BufferedOutputStream(new FileOutputStream("products.txt")));
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
//Connection connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://1433", "");
Connection connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://Myserver:1433;User=sa;Password=");
System.out.println("Connection Done");
connection.setCatalog("northWind");
String sqlCmdString = "select * from products";
Statement statement = connection.createStatement();
ResultSet resultSet = statement.executeQuery(sqlCmdString);
ResultSetMetaData resultSetMetaData = resultSet.getMetaData();
int columnCount = resultSetMetaData.getColumnCount();
// Iterate throught the rows in resultSet and
// output the columns for each row.
while (resultSet.next()) {
for (int index = 1; index <=columnCount; ++index)
String value;
switch(resultSetMetaData.getColumnType(index))
case 2 :
case 3 :
value = resultSet.getString(index);
break;
default :
value = """ + resultSet.getString(index) + """;
break;
outPut.print(value + (index < columnCount ? "t" : ""));
outPut.println();
outPut.close();
resultSet.close();
connection.close();
System.out.println("Done");
catch (SQLException exception)
exception.printStackTrace();
catch (Exception exception)
exception.printStackTrace();
--------------------------------------------------------------------------------------------------My guess is that the server's host name isn't right. It necessarily (or even usually) the "windows name" of the computer. Try with the numeric IP address instead (type "ipconfig" to see it).
First aid check list for "connection refused":
- Check host name in connect string.
- Check port number in connect string.
- Try numeric IP address of server host in connect string, in case name server is hosed.
- Are there any firewalls between client and server blocking the port.
- Check that the db server is running.
- Check that the db server is listening to the port. On the server, try: "telnet localhost the-port-number". Or "netstat -an", there should be a listening entry for the port.
- Try "telnet serverhost the-port-number" from the client, to see if firewalls are blocking it.
- If "telnet" fails: try it with the numeric ip address.
- If "telnet" fails: does it fail immediately or after an obvious timeout? How long is the timeout?
- Does the server respond to "ping serverhost" or "telnet serverhost" or "ssh serverhost"? -
BEA MS Sql server which driver to use?
We have BEA weblogic 8.1 and want to work with sql server Which driver
shoudl we use ?
i believe driver is deprecated
Bea talks about the new driver
"WebLogic Server 8.1 SP1 includes a new JDBC driver from BEA for connecting
to a Microsoft SQL Server database. The BEA WebLogic Type 4 JDBC MS SQL
Server driver replaces the WebLogic jDriver for Microsoft SQL Server, which
is deprecated. The new driver offers JDBC
3.0 compliance, support for some JDBC 2.0 extensions, and better
performance. BEA recommends that you use the new BEA WebLogic Type 4 JDBC MS
SQL Server driver in place of the WebLogic jDriver for Microsoft SQL
Server."
Do we have to install sp1 or sp2 to work with this driver. How can we get
sp1 ,
Thanks,Where did the Driver file place?
You can copy the driver file to the JAVA_HOME/lib
folderDo not put that JDBC JAR in JAVA_HOME/lib.
You should put it someplace close to your app and add it to the CLASSPATH when you compile and run?
Geez, doesn't anybody think about a standard directory structure to use for their apps? Put it in a /lib directory with the rest of your app stuff. - MOD -
Microsoft SQL Server JDBC driver and WLS JMS problem?
Greetings,
I'm using the Microsoft SQL Server JDBC driver with WLS with JMS
persisted to SQL Server, during WLS startup the JMS attempts to
read the JMSStore and JMSState tables in the db, if they are
already present (say, from a previous run) the driver kicks out:
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]ResultSet can
not re-read row data for column 1.
If the tables are not present, then WLS creates them and
everything proceeds fine. Now, its not a good thing to attempt
to reread row data for a ResultSet, especially for portability. Why is WLS JMS
doing this? is there some config I can use to adjust JMS startup behavior for
persisted JMS stores?
Jay Houghton
Centiv
[email protected]
long exception trace follows:
<Oct 1, 2002 8:29:11 AM EDT> <Info> <JMS> <User connection factory "BroadcastTopicFactory"
is started.>
<Oct 1, 2002 8:29:18 AM EDT> <Info> <JMS> <JMSServer "EnergizerJMSServer", Opening
JDBC store tables "JMSStore
" and "JMSState" using connection pool "JMSConnectionPool".>
<Oct 1, 2002 8:29:20 AM EDT> <Alert> <JMS> <JMSServer "EnergizerJMSServer", store
failed to open, java.io.IOEx
ception: JMS JDBC store, connection pool = <JMSConnectionPool>, prefix = <null>:
recover
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]ResultSet can
not re-read row data for colum
n 1.
at com.microsoft.jdbc.base.BaseResultSet.getLong(Unknown Source)
at com.microsoft.jdbc.base.BaseResultSet.getLong(Unknown Source)
at weblogic.jdbc.pool.ResultSet.getLong(ResultSet.java:304)
at weblogic.jms.store.JDBCIOStream.doRecover(JDBCIOStream.java:618)
at weblogic.jms.store.JDBCIOStream.recover(JDBCIOStream.java:728)
at weblogic.jms.store.JMSStore.recover(JMSStore.java:112)
at weblogic.jms.backend.BEStore.open(BEStore.java:179)
at weblogic.jms.backend.BackEnd.initialize(BackEnd.java:330)
at weblogic.jms.JMSService.createBackEnd(JMSService.java:923)
at weblogic.jms.JMSService.addJMSServer(JMSService.java:1277)
at weblogic.jms.JMSService.addDeployment(JMSService.java:1174)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:279)
at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:23
3)
at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:193)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:608)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:592)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:352)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:449)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:190)
at $Proxy40.updateDeployments(Unknown Source)
at weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(ServerMBean_CachingStub
.java:2734)
at weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(ApplicationManager.java:362
at weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManager.java:154)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:608)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:592)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:352)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:449)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:190)
at $Proxy57.start(Unknown Source)
at weblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(ApplicationManagerMBean
_CachingStub.java:480)
at weblogic.management.Admin.startApplicationManager(Admin.java:1151)
at weblogic.management.Admin.finish(Admin.java:571)
at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:508)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:203)
at weblogic.Server.main(Server.java:35)
Tom,
thanks for the info, I'll bring this to support.
I did try the weblogic jDriver for SQL Server and it works fine, so i think it
must be the way JMS is interacting with the MS driver.
here are my components:
WLS 6.1sp1
Microsoft® SQL Server™ 2000 Driver for JDBC™ is a (Type 4 JDBC) which provides
partial JDBC 2 support (no blobs, clobs, etc)
MS SQL Server 2000 (sp2?)
thanks!
Jay Houghton
[email protected]
Tom Barnes <[email protected]> wrote:
>Hi Jay,
>
>This is not a known issue at BEA as far as I know, perhaps it is the
>result
>of a new driver/database combination. Try using a different driver,
>or a different
>version of the current driver. Meanwhile, use a file store (just as
>reliable but faster) and log a case with customer support, including
>information on your version, service-pack, and what driver you are using.
>
>Tom, BEA
>
>Jay Houghton wrote:
>
>> Greetings,
>>
>> I'm using the Microsoft SQL Server JDBC driver with WLS with JMS
>> persisted to SQL Server, during WLS startup the JMS attempts to
>> read the JMSStore and JMSState tables in the db, if they are
>> already present (say, from a previous run) the driver kicks out:
>>
>> java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]ResultSet
>can
>> not re-read row data for column 1.
>>
>> If the tables are not present, then WLS creates them and
>> everything proceeds fine. Now, its not a good thing to attempt
>> to reread row data for a ResultSet, especially for portability. Why
>is WLS JMS
>> doing this? is there some config I can use to adjust JMS startup behavior
>for
>> persisted JMS stores?
>>
>> Jay Houghton
>> Centiv
>> [email protected]
>>
>> long exception trace follows:
>>
>> <Oct 1, 2002 8:29:11 AM EDT> <Info> <JMS> <User connection factory
>"BroadcastTopicFactory"
>> is started.>
>> <Oct 1, 2002 8:29:18 AM EDT> <Info> <JMS> <JMSServer "EnergizerJMSServer",
>Opening
>> JDBC store tables "JMSStore
>> " and "JMSState" using connection pool "JMSConnectionPool".>
>> <Oct 1, 2002 8:29:20 AM EDT> <Alert> <JMS> <JMSServer "EnergizerJMSServer",
>store
>> failed to open, java.io.IOEx
>> ception: JMS JDBC store, connection pool = <JMSConnectionPool>, prefix
>= <null>:
>> recover
>> java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]ResultSet
>can
>> not re-read row data for colum
>> n 1.
>> at com.microsoft.jdbc.base.BaseResultSet.getLong(Unknown Source)
>> at com.microsoft.jdbc.base.BaseResultSet.getLong(Unknown Source)
>> at weblogic.jdbc.pool.ResultSet.getLong(ResultSet.java:304)
>> at weblogic.jms.store.JDBCIOStream.doRecover(JDBCIOStream.java:618)
>> at weblogic.jms.store.JDBCIOStream.recover(JDBCIOStream.java:728)
>> at weblogic.jms.store.JMSStore.recover(JMSStore.java:112)
>> at weblogic.jms.backend.BEStore.open(BEStore.java:179)
>> at weblogic.jms.backend.BackEnd.initialize(BackEnd.java:330)
>> at weblogic.jms.JMSService.createBackEnd(JMSService.java:923)
>> at weblogic.jms.JMSService.addJMSServer(JMSService.java:1277)
>> at weblogic.jms.JMSService.addDeployment(JMSService.java:1174)
>> at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
>> at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:279)
>> at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:23
>> 3)
>> at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:193)
>> at java.lang.reflect.Method.invoke(Native Method)
>> at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:608)
>> at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:592)
>> at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:352)
>> at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
>> at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
>> at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:449)
>> at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:190)
>> at $Proxy40.updateDeployments(Unknown Source)
>> at weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(ServerMBean_CachingStub
>> java:2734)
>> at weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(ApplicationManager.java:362
>> )
>> at weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManager.java:154)
>> at java.lang.reflect.Method.invoke(Native Method)
>> at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:608)
>> at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:592)
>> at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:352)
>> at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
>> at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
>> at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:449)
>> at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:190)
>> at $Proxy57.start(Unknown Source)
>> at weblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(ApplicationManagerMBean
>> _CachingStub.java:480)
>> at weblogic.management.Admin.startApplicationManager(Admin.java:1151)
>> at weblogic.management.Admin.finish(Admin.java:571)
>> at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:508)
>> at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:203)
>> at weblogic.Server.main(Server.java:35)
>
-
JSP, Sql Server 2000 Driver, classpath
Hello All,
I've got a really weird problem here.
I want to connect a JSP page to a SQL Server 2000 database.
I downloaded the SQL Server 2000 Driver for JDBC, and it seems to have installed fine.
Next I write a regular java program to test the connection. It works fine, I get a "Connection Successful message". Here' the code:
import java.sql.*;
public class MSSqlServerJDBCTest {
public static void main( String args[] ) {
Connection conn;
if ( args.length != 3 ) {
System.out.println( "Usage: java MSSqlServerJDBCTest "
+ "<server> <username> <password>" );
} else {
try {
String serverName = args[ 0 ];
String userName = args[ 1 ];
String password = args[ 2 ];
String connStr = "jdbc:microsoft:sqlserver://"
+ serverName + ":1433";
Class.forName( "com.microsoft.jdbc.sqlserver.SQLServerDriver" );
conn = DriverManager.getConnection(
connStr, userName, password );
System.out.println( "Connection successful" );
conn.close();
catch ( SQLException e ) {
System.err.println( "SQL Exception: " + e.getMessage() );
catch( ClassNotFoundException e ) {
System.err.println( "SQL Server JDBC Driver Not Found!!" );
}Now, when I include similar into a JavaBean, which is used in a JSP, I get a classNotFound exception:
Exception occured: java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriverSo then I checked out the classpath a few times using echo %classpath%
Everything seemed okay, the driver jars are in the path, but the JSP can't find the driver.
I looked at the System.out file in the j2sdkee1.3.1\logs..... directory.
The start of the file contains this stuff:
Logging for J2EE Server Version: 1.3.1-b17 started at: Fri Nov 08 17:31:53 GMT 2002..
Using the Java HotSpot(TM) Client VM and the version number 1.3.1_02 from Sun Microsystems Inc..
VM is using the classpath: c:\j2sdkee1.3.1\lib\system\cloudscape.jar;c:\j2sdkee1.3.1\lib\system\tools.jar;c:\j2sdkee1.3.1\lib\cloudscape\RmiJdbc.jar;c:\j2sdkee1.3.1\lib\cloudscape\cloudclient.jar;c:\j2sdkee1.3.1\lib\classes;c:\j2sdkee1.3.1\classes;c:\j2sdkee1.3.1\lib\j2ee.jar;c:\j2sdkee1.3.1\lib\toolclasses;c:\j2sdkee1.3.1\lib\j2eetools.jar;c:\j2sdkee1.3.1\lib\locale;;c:\jdk1.3.1_02\lib\tools.jar;c:\j2sdkee1.3.1\lib\jhall.jar .
J2EE Home Directory has been set to: c:\j2sdkee1.3.1.Look at the classpath - its different from when I do an echo %classpath% from the command line. Notice also it DOESN'T contain the driver jars that I need. This is probably why I can connect from a regular java program, but not from within J2EE.
So where does this leave me? How can I change the classpath so that the changes are seen from within the J2EE container?
Please help,
Thanks in advance,
RuzerI modified the C:\j2sdkee1.3.1\bin\userconfig.bat file with the line:
set J2EE_CLASSPATH=c:\sqldriver\msutil.jar;c:\sqldriver\mssqlserver.jar;c:\sqldriver\msbase.jarI had to change the location of the MS SQLServer 2000 driver cos J2EE.bat wouldn't start with the original location. I don't think it liked the spaces.
Now I get a different exception:
java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThreadGroup)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:272)
at java.security.AccessController.checkPermission(AccessController.java:399)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
at com.sun.enterprise.J2EESecurityManager.checkAccess(J2EESecurityManager.java:46)
at java.lang.ThreadGroup.checkAccess(ThreadGroup.java:279)
at java.lang.Thread.init(Thread.java:265)
at java.lang.Thread.(Thread.java:330)
at com.microsoft.jdbc.base.BaseGarbageThread.(Unknown Source)
at com.microsoft.jdbc.base.BaseGarbageThread.EnsureRunning(Unknown Source)
at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)
at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:517)
at java.sql.DriverManager.getConnection(DriverManager.java:177)
at org.apache.jsp.databaseJSP$jsp._jspService(databaseJSP$jsp.java:70)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)not sure why!
Ruadhan -
Error Using the SQL Server 2000 Driver for JDBC Service Pack 3
Hi,
I�m using the SQL Server 2000 Driver for JDBC Service Pack 3. The connection is succesfully, but when I use de statement.executequery() method, there is the follow exception:
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Invalid object name 'PEC_COUNTRY'.
This is my code:
ResultSet resultSet;
Statement statement;
Connection connection;
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://S0MALMUERTA:1433;user=sa;password=");
statement = connection.createStatement();
resultSet = statement.executeQuery("SELECT COY_INX, COY_NAME, COY_ICO FROM PEC_COUNTRY
");When I make the last instruction, occurs the above exception
Thanks in advance
LuijaThe way you are connecting, the default database used will be 'master' and i guess that the table PEC_COUNTRY was defined in another database.
If it is the case you need to specify the database name.
connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://S0MALMUERTA:1433;DatabaseName=yourdb;user=sa;password="); -
MS SQL Server jdbc Driver installation on XI
Hi,
I am running XI 3 on sp11 patch 1.
We need to install the MS SQL Server jdbc driver on the XI box to connect to a SQL Server 2000 SP3 Database server.
We tried installing the driver from the MS downloads website:
http://www.microsoft.com/downloads/details.aspx?familyid=07287b11-0502-461a-b138-2aa54bfdc03a&displaylang=en
But this is giving us problems while installation as SDM does not like the format.
Can someone please tell us how do we install this driver?
Thanks
AshishHi Ashish,
i assume that u already have the drivers (msbase.jar,mssqlserver.jar,msutil.jar). All u have to do is deploy them.
The procedure is:
1.Add all jars to the archive <b>aii_af_jmsproviderlib.sda</b>, modify the <b>provider.xml</b> file and WinZip the .sda file again.
a)Copy the file: aii_af_jmsproviderlib.sda from the path ..\usr\sap\SID\DVEBMGS00\SDM\root\origin\sap.com\com.sap.aii.af.jmsproviderlib\SAP AG\3.0.20040112154003.0000. to any other drive on the server.
b)Unzip it. After Unzipping the archive there are 2 folders created under the provided directory
\META-INF
\server
c) Edit the file provider.xml
Add the vendor specific jar file names to the provider.xml file in between the tags <jars> </jars> and Save it.
For you it will be
<jars>
<jar-name>msbase.jar</jar-name>
<jar-name>mssqlserver.jar</jar-name>
<jar-name>msutil.jar</jar-name>
</jars>
d)Copy the specific driver files to the same dirctory where u have unzipped the .sda
e)Now ZIP the following files/folders from the drive/dirctory.
Vendor driver files
META-INF folder
Server folder
The name of the zip file should be the same i.e aii_af_jmsproviderlib.sda
2.Deploy the archive aii_af_jmsproviderlib.sda on to the J2ee Engine using SDM tool.
This will solve ur problem.
Regards
Sunita -
Microsoft SQL Server JDBC Driver
Hi everyone,
I know it's a bit off topic but I couldn't find a related group.
Does anyone know of the best way to access SQL Server via JDBC. I have tried
the JDBC-ODBC bridge but it does not seem to support all types of queries
(e.g. using a PreparedStatement).
I have looked at Microsoft's JDBC driver but I'm not allowed to implement it
as it is a Beta version.
I would be very grateful if anyone could help me.
Thanks,
Nick.Neil Pike wrote:
Nick - there are plenty of other jdbc drivers :-
Q. Where can I get a JDBC driver for SQL Server? Do Microsoft write one?
Which is the best one?
A. Microsoft doesn't supply a native JDBC driver for SQL Server,Actually, yes it does, now. This is a recent thing. It is a type-4 driver built by
DataDirect/Merant.
It is free, now in beta, will be GA soon, and is available for download from MS's sqlserver support
pages.
but it does
offer a JDBC-to-ODBC bridge that allows Java programmers to access back-end
data sources using available ODBC drivers. The Microsoft JDBC-ODBC bridge is
part of the core set of classes that come with the Microsoft Virtual Machine
(Microsoft VM) for Java. For more information, see
http://www.microsoft.com/java/.
Avoid the jdbc-odbc bridge for use with weblogic. The JDBC-ODBC bridge is buggy,
unsupported, and not thread-safe.
You can get 3rd party drivers, servers, and bridges from a variety of vendors
and some free open-source ones as well.
Which is the best one? As I don't use any of them I can't comment from
personal experience. The two most commonly used seem to be WebLogic and
OpenLink - and feedback on them seems good.
Some of the sites listed below maintain up to date lists of all vendors.
The full list that I know of are :-
1. WebLogic : http://weblogic.beasys.com and http://www.weblogic.com. (type
2, 3 or 4. SQL 6.5 and 7.0). Download type-4 driver direct from
http://www.weblogic.com/download/downloadkona.html
2. http://www.inetsoftware.de. JDBC Type 4 drivers for the Microsoft
SQLServer 6.5, 7.0, and 2000. JDBC 1.22 driver to use with JDK 1.1x and a JDBC
2.0 driver (i-net Sprinta) to use with Java 2 (JKD 1.2x).
JDBC 1.22 : http://www.inetsoftware.de/English/produkte/jdbctreiber/Default.htm
JDBC 2.0 : http://www.inetsoftware.de/English/produkte/jdbc2/Default.htm.
3. http://www.openlinksw.com (http://www.openlinksw.co.uk)
4. http://www.easysoft.com and http://beta.easysoft.com. JDBC/ODBC bridge.
5. ftp://freetds.internetcds.com/pub/freetds_jdbc. Type 4 open-source driver
that is designed to work with SQL Server 6.5 and Sybase 11.x
6. http://java.sun.com/products/jdbc From this page you may search or browse
the database of JDBC technology drivers that support the JDBC 2.x and JDBC 1.x
APIs.
7. http://lpv.home.texas.net (LpVodbc is a multi-threaded JDBC-ODBC database
server that runs on Windows 95, 98, and NT platforms)
8. http://www.avenir.net/products/jdbcdrivers.htm
9. http://www.jturbo.com
10. http://ourworld.compuserve.com/homepages/Ken_North/jdbcvend.htm is another
list of JDBC drivers, servers, and vendors compiled by Ken North.
11. http://www.sco.com/java/
12. Merant. http://www.merant.com/datadirect/products/jdbc/sl50/overview.asp
===
v1.19 2000.06.13
Applies to SQL Server versions : All
FAQ Categories : Connectivity
Related FAQ articles : odbcunix
Related Microsoft Kb articles : n/a
Other related information : n/a
Authors : Neil Pike
Maybe you are looking for
-
Export to pdf filename (can of worms?)
I know this is probably a perenial post, but I'm trying to unserstand the logic of not picking up the filename in PDF exports. Anyone know if this behaviour can be changed in CS4. Adobe: Can you please give us a button in the export dialogue to chose
-
Location of printing templates
I just moved to a new PC with better performance. I copied all LR files under User(I think) but I lost all my printing templates. How can I restore my printing templates? I am running Vista Ultimate. Lennart
-
Ship To location is not merging with the Shipment address in Purchasing 11.
As we can see in the attachment, the "Ship To" location is not merging from the "Ship To" on the Oracle PO, it appears it's merging from the field on the Shipments tab/button (red boxes). We'd like to change that to have the "Ship To" on the PDF pull
-
The app is always inverted in landscape mode on Fire OS
Hello. I've recently submitted several apps made in AIR on the Amazon Store, but they were rejected because of the following problem : "App is always inverted in landscape mode". This problem appears only on the Amazon devices which use Fire OS. What
-
Tax value difference...urgent..
Hi guru's I created 1 PO with Tax code as 18 (12.5% RM Deductible). In print priview it is showing 12.5% deductible & 4% non deductible.. But in PO item details - invoice column- Taxes -- it is showing only 12.5% deductible.. please send me solution