JDBC Error in Connection string
Hi Guys,
I am trying to implement File to JDBC scenario
I get checked flag in the SXMB_MONI
but in communication Channel monitoring i get the error message
: <i><b>Error during database connection to the database URL 'jdbc:odbc:Driver={Microsoft Access Driver (.mdb)};DBQ=//D/JDBC/XI.mdb;' using the JDBC driver 'jdbc.odbc.JdbcOdbcDriver': 'com.sap.aii.adapter.jdbc.sql.DriverManagerException: Cannot establish connection to URL 'jdbc:odbc:Driver={Microsoft Access Driver (.mdb)};DBQ=//D/JDBC/XI.mdb;': SQLException: [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xde8 Thread 0x96b0 DBC 0x5336024 Jet'.'</b></i>
The message going into Receiver JDBC adapter is :
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:JDBC_Vendor xmlns:ns0="http://Ashish_File_To_JDBC">
- <Data_DB>
- <XI action="INSERT">
<TABLE>XI</TABLE>
- <Access>
<Vendor_Number>320475</Vendor_Number>
<Last_Name>Yahoo</Last_Name>
<Search_term>House</Search_term>
<Currency>AUD</Currency>
<Street>Anthony</Street>
</Access>
</XI>
</Data_DB>
</ns0:JDBC_Vendor>
Pls advice:
regards,
Ashish
Hi,
refer this link.
Refer this link to solve the above error.
http://support.microsoft.com/kb/295297
Regards,
Sudheer.
Similar Messages
-
Error: java.sql.SQLException: Internal Error Invalid Connect String
hi,
facing errror while deploying the process
A problem occured while connecting to server "sfhyd1.softforce.com" using port "8888": bpel_getCustomerAccounts_1.0.jar failed to deploy. Exception message is: java.sql.SQLException: Internal Error:Invalid Connect String
at com.collaxa.cube.engine.util.DBUtils.checkIfFatalConnectionError(DBUtils.java:920)
at com.collaxa.cube.ejb.impl.BaseCubeSessionBean.checkIfFatalConnectionError(BaseCubeSessionBean.java:153)
at com.collaxa.cube.ejb.impl.BPELDomainManagerBean.deploySuitcase(BPELDomainManagerBean.java:462)
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:585)
at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.JAASInterceptor$1.run(JAASInterceptor.java:31)
at com.evermind.server.ThreadState.runAs(ThreadState.java:693)
at com.evermind.server.ejb.interceptor.system.JAASInterceptor.invoke(JAASInterceptor.java:34)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:50)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
at DomainManagerBean_RemoteProxy_4bin6i8.deploySuitcase(Unknown Source)
at com.oracle.bpel.client.BPELDomainHandle.deploySuitcase(BPELDomainHandle.java:319)
at com.oracle.bpel.client.BPELDomainHandle.deployProcess(BPELDomainHandle.java:341)
at deployHttpClientProcess.jspService(_deployHttpClientProcess.java:376)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
at oracle.security.jazn.oc4j.JAZNFilter$1.run(JAZNFilter.java:400)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:414)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:623)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:234)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:29)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:879)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.sql.SQLException: Internal Error:Invalid Connect String
at oracle.lite.poljdbc.POLJDBCErrMsg.throwSQLException(Unknown Source)
at oracle.lite.poljdbc.LiteThinJDBCConnection.<init>(Unknown Source)
at oracle.lite.poljdbc.LiteThinJDBCFactory.createConnection(Unknown Source)
at oracle.lite.poljdbc.POLJDBCConnection.<init>(Unknown Source)
at oracle.lite.poljdbc.OracleConnection.<init>(Unknown Source)
at oracle.lite.poljdbc.POLJDBCDriver.connect(Unknown Source)
at oracle.oc4j.sql.DriverDataSource.getConnection(DriverDataSource.java:116)
at oracle.oc4j.sql.DriverDataSource.getConnection(DriverDataSource.java:75)
at oracle.oc4j.sql.DataSourceConnectionPoolDataSource.getPooledConnection(DataSourceConnectionPoolDataSource.java:57)
at oracle.oc4j.sql.xa.EmulatedXADataSource.getXAConnection(EmulatedXADataSource.java:92)
at oracle.oc4j.sql.spi.ManagedConnectionFactoryImpl.createXAConnection(ManagedConnectionFactoryImpl.java:211)
at oracle.oc4j.sql.spi.ManagedConnectionFactoryImpl.createManagedConnection(ManagedConnectionFactoryImpl.java:170)
at com.evermind.server.connector.ApplicationConnectionManager.createManagedConnection(ApplicationConnectionManager.java:1398)
at oracle.j2ee.connector.ConnectionPoolImpl.createManagedConnectionFromFactory(ConnectionPoolImpl.java:327)
at oracle.j2ee.connector.ConnectionPoolImpl.access$800(ConnectionPoolImpl.java:98)
at oracle.j2ee.connector.ConnectionPoolImpl$FixedWaitPoolingScheme.getManagedConnection(ConnectionPoolImpl.java:1455)
at oracle.j2ee.connector.ConnectionPoolImpl.getManagedConnection(ConnectionPoolImpl.java:785)
at oracle.oc4j.sql.ConnectionPoolImpl.getManagedConnection(ConnectionPoolImpl.java:45)
at com.evermind.server.connector.ApplicationConnectionManager.getConnectionFromPool(ApplicationConnectionManager.java:1596)
at com.evermind.server.connector.ApplicationConnectionManager.acquireConnectionContext(ApplicationConnectionManager.java:1541)
at com.evermind.server.connector.ApplicationConnectionManager.allocateConnection(ApplicationConnectionManager.java:1486)
at oracle.j2ee.connector.OracleConnectionManager.unprivileged_allocateConnection(OracleConnectionManager.java:238)
at oracle.j2ee.connector.OracleConnectionManager.allocateConnection(OracleConnectionManager.java:192)
at oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:272)
at oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:200)
at oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:142)
at oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:127)
at com.collaxa.cube.engine.data.ConnectionFactory$ConnectionFactoryImpl.getConnection(ConnectionFactory.java:336)
at com.collaxa.cube.engine.data.ConnectionFactory.getConnection(ConnectionFactory.java:140)
at com.collaxa.cube.engine.adaptors.common.BaseProcessPersistenceAdaptor.storeProcess(BaseProcessPersistenceAdaptor.java:361)
at com.collaxa.cube.engine.adaptors.olite.ProcessPersistenceAdaptor.storeProcess(ProcessPersistenceAdaptor.java:52)
at com.collaxa.cube.engine.data.ProcessPersistenceMgr.storeProcess(ProcessPersistenceMgr.java:76)
at com.collaxa.cube.engine.deployment.DeploymentManager.deployProcess(DeploymentManager.java:937)
at com.collaxa.cube.engine.deployment.DeploymentManager.deploySuitcase(DeploymentManager.java:792)
at com.collaxa.cube.ejb.impl.BPELDomainManagerBean.deploySuitcase(BPELDomainManagerBean.java:455)
... 45 moreYou may possibly modified the oc4j-ra.xml file in the stand-alone directory instead of the file under the OC4J_BPEL directory in midtier.
Currently, we are seeing some issues with the sample in midtier. So you may like to wait for the GA release [ mid May] for trying out this sample.
Otherwise please send a mail to [email protected], you need any early drop of this sample.
HTH.
Thanks,
Rakesh -
Problem in JDBC-SQL Server connection string
Anyone could help me to write proper connection string using JDBC with SQL Server 2000. The descp:
Server name: CD
databaseName: songs
Using Window NT authentication.
I dont know whether to include username and password.
When I executed the statement below:
DriverManager.getConnection("jdbc:microsoft:sqlserver://CD:1433;databaseName=songs");
Recieved error: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket
Plz help!! Thank you very much.Look at the URl below:
How to connect to Microsoft SQL server with Type 4 JDBC driver
http://www.java-tips.org/content/view/615/29/ -
ODBC Error in connect string?
I am running 8i 8.1.6 oracle, forms 6i, and am trying to connect to a AS400 DB2 database. I have the ODBC driver for the AS400 setup properly.
When I try to connect in Forms 6i or SQL*Plus with the connect string odbc:datasource_name (ie. odbc:AS400) I get an error ORA-03121 error saying "No interface driver connected - function not performed".
Any ideas? I have searched all over reguarding this error but none are specific to this. Is there something specific you need to run outside of a typical database setup to get ODBC going?
This also happens when I specify the Oracle8i ODBC driver, or any ODBC for that matter. I am able to access the ODBC data sources in my other programming environments, ie. VC++6, and Borland Builder.
Net8 is up and running fine as well....
Thanks in advance,
Jeff
nullFirst, thank you very much for the response. Reguarding the SQL*plus connection, I thought is was possible to use oracle tools (like SQL*plus and Forms) to open odbc connections using other ODBC drivers (for example Client Access ODBC driver for the AS400).
In fact, I know this is true because I actually did it with a test DB using 8.1.5. For example, I would open SQL*plus in Win98 and enter in a valid user name and pword for the AS400 and the odbc connect string. Then I was able to run ad hoc queries against the AS400 data. But now that I upgraded to 8.1.6 and have not used ODBC in a while, I cannot remember the connect string and am getting this error.
I can actually connect to multiple ODBC data sources at the same time in my C++ environment, Oracle and AS400, and copy tables back and forth. This can also be accomplished in Excel and other programs. Even the ODBC test utility that ships with 8.1.6 lets me connect to the AS400 and run queries against it. This utility however just lets you pick a datasource and doen't require a connect string.
My ultimate goal here is to be able to use the Oracle tools in the same fashion. Or just use PL/SQL to connect to an ODBC data souce other than Oracle because I want to set up timed data transfer through OEM.
When I type in the connect string "odbc:data_source_name" it gives me the ora-03121 error no matter what I put in for the data source name, even if I leave the data source blank. Is my syntax incorrect? Or do I have to set something up to access ODBC drivers through the Oracle tools. I don't remeber have to before.
Thanks very much for your help on this.
Jeff -
JDBC: Error while connecting to MS SQL using JDBC adapter
Hi All,
Does anybody know what the error below mean and how to resolve it:
- 2007-04-10 14:10:26 PDT: Processing started
- 2007-04-10 14:05:57 PDT: Error: Accessing database connection 'jdbc:sqlserver://DBServer:1433;DatabaseName=name' failed: DriverManagerException: Cannot establish connection to URL 'jdbc:sqlserver://DBServer:1433;DatabaseName=name' : com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host has failed. java.net.UnknownHostException:
Thx
NavinHi,
Looks like it cannot connect to the database because the host or port number is not correct.
Verify if DBServer is valid. Can you ping it from XI server? You may also have to verify the port number of the database instance using the administrator tool.
Regards,
Bill -
Error in connection string...
Hi All,
When I try to connect with Database(10g) through SQL*Plus, I generally login with sysdba user (like sqlplus "/as sysdba") there could be number of ways we can login to sql tool.
normally I follow this ...
sqlplus "/as sysdba"
but for my application's user I used :
sqlplus "testuser/testuser@orcl"
this is perfectly work...
but it surprising me when I try to connect with
sqplus "sys/<syspwd>@orcl as sysdba"
ORA-01031: insufficient privileges
again if I login this way
sqlplus "orcl"
SP2-0310: unable to open file "orcl.sql"
Enter user-name: sys as sysdba
Enter password:
it work with this error (SP2-0310)...
I am not getting why its not working with sys along with proper sid.
pl. inform me...
Thanks....Two things off the top of my head:
1. Don't use double quotes.
2. You could also be missing the password file or the sys password is incorrect in the password file.
Steve
Message was edited by:
smccull -
Hi
While making a connection to OLite database i gave the url as
" jdbc:polite4@localhost:100:orabpel" and the same is available in oc4j-ra.xml file as connection string but while testing connection it displays the error message as
Internal error : invalid connection string. please advice
thanks
parthaThis is the connect string I have which works:
"jdbc:polite4@localhost:100:orabpel"
using driver class
"oracle.lite.poljdbc.POLJDBCDriver"
I notice you have a leading space in the url you quote in your post, is this causing the problem?
Toby -
Hi expert,Incorrect connection string for addon
hi expert
I am getting error when connect my addon in client pc.
my addon working fine in server at client side.
but in client i m getting error "Incorrect connection string for addon".in my addon i am using crystal report and two sap b1 user form. thanks in adva.
regards
Rajkumar Gupta
Edited by: Rajkumar Gupta on May 23, 2009 12:49 PMHi Rajkumar,
Sometimes this error message is related to the UI server. Please see note 808354 or 852031 and see if this has any effect.
If not, please post up a code sample so we can take a look,
Regards,
Niall -
I have developed Java web application which uses Crystal Report 2013 , java 1.6 , Windows 32 bit System, All the reports are loading fine in the Following environment
Development Environment
Windows7 Professional Service pack 1 -32 bit
Java - 1.6
Internet Explorer 11
Oracle Client 10g 32 bit ODBC driver
Testing Environment
Windows Server 2008 R2 Enterprise - 64 bit
java 1.6
Internet Explorer 9
Oracle Client 11g 62 bit ODBC driver
While loading reports in the 64 bit server the error occurs
ERROR reports.reportdefinition : com.crystaldecisions.reports.queryengine.driverImpl.m: JDBC Error: [Microsoft][ODBC Driver Manager] Invalid string or buffer length
ERROR dataengine.datasource : Failed to read next recurring database record: database row set error.
com.crystaldecisions.reports.reportdefinition.datainterface.j: JDBC Error: [Microsoft][ODBC Driver Manager] Invalid string or buffer length
at com.crystaldecisions.reports.reportdefinition.datainterface.q.a(Unknown Source)
at com.crystaldecisions.reports.dataengine.n.m(Unknown Source)
at com.crystaldecisions.reports.dataengine.n.l(Unknown Source)
at com.crystaldecisions.reports.dataengine.n.bn(Unknown Source)
at com.crystaldecisions.reports.dataengine.n.bp(Unknown Source)
at com.crystaldecisions.reports.dataengine.n.else(Unknown Source)
at com.crystaldecisions.reports.dataengine.s.a(Unknown Source)
at com.crystaldecisions.reports.dataengine.bk.a(Unknown Source)
at com.crystaldecisions.reports.dataengine.bk.ab(Unknown Source)
at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
at com.crystaldecisions.reports.dataengine.bk.if(Unknown Source)
at com.crystaldecisions.reports.dataengine.bk.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.be.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.be.h(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.i.h(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.be.for(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.bt.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.bf.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.cd.for(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.cd.for(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.b3.for(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.bt.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.cd.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.cd.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.cd.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.ca.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.a9.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.e.m.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.cd.for(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.cd.for(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.b3.for(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.e.m.for(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.bt.a(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.e.p.l(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.e.p.void(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.e.p.l(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.e.p.aE(Unknown Source)
at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
at com.crystaldecisions.reports.formatter.a.c.if(Unknown Source)
at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
at com.businessobjects.reports.sdk.b.b.int(Unknown Source)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
at com.crystaldecisions.reports.sdk.PrintOutputController.export(Unknown Source)
at com.erm.controller.ALMReportsController.queryDll(ALMReportsController.java:1681)
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.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java:471)
at org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java:408)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:838)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.erm.authentication.HttpSecurityFilter.doFilter(HttpSecurityFilter.java:658)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
Caused by: com.crystaldecisions.reports.queryengine.driverImpl.m: JDBC Error: [Microsoft][ODBC Driver Manager] Invalid string or buffer length
at com.crystaldecisions.reports.queryengine.driverImpl.o.if(Unknown Source)
at com.crystaldecisions.reports.queryengine.ap.if(Unknown Source)
at com.crystaldecisions.reports.queryengine.l.bN(Unknown Source)
at com.crystaldecisions.reports.queryengine.ap.eg(Unknown Source)
at com.crystaldecisions.reports.queryengine.ap.e(Unknown Source)
at com.crystaldecisions.reports.queryengine.b2.f(Unknown Source)
at com.crystaldecisions.reports.queryengine.b2.dy(Unknown Source)
... 89 more
Caused by: java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid string or buffer length
at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.SQLGetDataString(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcResultSet.getDataString(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcResultSet.getBigDecimal(Unknown Source)A few things to note:
1) Crystal Report 2013 doe snot install any SDK. Thus the assumption is that you are using CR from teh following link:
SAP BusinessObjects - SAP Crystal Reports, Version For Eclipse Download
2) Since you are using a 64 bit connection (Oracle Client 11g 62 bit ODBC driver) you will have to make sure you are using 64 bit JVM. Otherwise, follow Dell's advice and use a 32 bit ODBC datasource.
3) On one test you are using Oracle Client 10g 32 bit ODBC driver and the other you are using Oracle Client 11g 64 bit ODBC driver. You might want to see if you can run your app using Client 11g 32 bit ODBC driver.
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada -
Connection mysql jdbc error ?
I have program java likes this :
import java.sql.*;
public class LoadDriver {
// Define the JDBC Driver and the database connection URL
public static final String DRIVER = "com.mysql.jdbc.Driver";
public static final String URL = "jdbc:mysql://localhost/java?user=test&password=test";
public static void main(String args[]) {
Connection conn = null;
Statement select = null;
ResultSet result = null;
try {
// load the driver dynamically
Class.forName(DRIVER);
// connect to the database
conn = DriverManager.getConnection(URL);
// perform a query. first create a Statement object from the connection
select = conn.createStatement();
// next execute a query (SQL string) and return the results in a ResultSet object
result = select.executeQuery("select fname, lname from names order by lname, fname");
// print out the results
while(result.next()) {
String fname = result.getString("fname"); // note these match the columns in the
String lname = result.getString("lname"); // SELECT statement (fname, lname)
System.out.println(fname+" "+lname);
// check if there was a problem executing the SQL statement
catch (SQLException e) {
System.err.println("SQL Exception: "+e.getMessage());
System.exit(1);
// if the JDBC driver is not in the CLASSPATH
catch (ClassNotFoundException e) {
System.err.println("Class not found: "+e.getMessage());
System.exit(1);
// catch any other exceptions
catch (Exception e) {
System.err.println("Other Exception: ");
System.err.println(e.getMessage());
System.exit(1);
// You want to close the connections no matter what happens!
finally {
try {
// close the result, query, and database connection
if (result != null) result.close();
if (select != null) select.close();
if (conn != null) conn.close();
catch (SQLException e) {
// one of the new cases where it's OK to just eat exceptions or at the most log them
System.err.println("Error closing connection: "+e.getMessage());
but i get errror likes this :
D:\Program Files\Java\jdk1.5.0_03\bin>javac LoadDriver.java
D:\Program Files\Java\jdk1.5.0_03\bin>java LoadDriver
Exception in thread "main" java.lang.NoClassDefFoundError: org/aspectj/lang/Sign
ature
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at LoadDriver.main(LoadDriver.java:20)
D:\Program Files\Java\jdk1.5.0_03\bin>
I place mysql.jar in
- D:\Program Files\Java\jdk1.5.0_03\jre\lib\ext
- D:\Program Files\Java\jdk1.5.0_03\lib
- D:\Program Files\Java\jdk1.5.0_03\jre\lib
and i make classpath to D:\Program Files\Java\jdk1.5.0_03\bin;D:\Program Files\Java\jdk1.5.0_03\jre\lib\ext\
but it still doesn't work
What must I do ?
Thx 4 your replyHello!
I'm getting this same error message and i followed the code example as close as i could:
Thanks for any help on this!
bk
set oldpath=%PATH%
set JAVA_HOME=C:\jdk1.5.0_02
set ANT_HOME=C:\ANT\apache-ant-1.6.5
set PATH=C:\jdk1.5.0_02\bin;%ANT_HOME%\bin
set CLASSPATH=.;C:\jdk1.5.0_02\lib;C:\MYSQL\mysql-connector-java-3.1.10\src\com\;C:\MYSQL\mysql-connector-java-3.1.10\src\org\;C:\MYSQL\mysql-connector-java-3.1.10\mysql-connector-java-3.1.10-bin-g.jar;
http://www.developer.com/java/data/article.php/3417381#Critical_steps_in_using_JDBC
import java.sql.*;
public class Jdbc11 {
public static void main(String args[]){
System.out.println(
"Copyright 2004, R.G.Baldwin");
try {
Statement stmt;
//Register the JDBC driver for MySQL.
Class.forName("com.mysql.jdbc.Driver");
//Define URL of database server for
// database named mysql on the localhost
// with the default port number 3306.
String url =
"jdbc:mysql://localhost:3306/mysql";
//Get a connection to the database for a
// user named root with a blank password.
// This user is the default administrator
// having full privileges to do anything.
Connection con =
DriverManager.getConnection(
url,"root", "");
//Display URL and connection information
System.out.println("URL: " + url);
System.out.println("Connection: " + con);
//Get a Statement object
stmt = con.createStatement();
//Create the new database
stmt.executeUpdate(
"CREATE DATABASE JunkDB");
//Register a new user named auser on the
// database named JunkDB with a password
// drowssap enabling several different
// privileges.
stmt.executeUpdate(
"GRANT SELECT,INSERT,UPDATE,DELETE," +
"CREATE,DROP " +
"ON JunkDB.* TO 'auser'@'localhost' " +
"IDENTIFIED BY 'drowssap';");
con.close();
}catch( Exception e ) {
e.printStackTrace();
}//end catch
}//end main
}//end class Jdbc11
Exception in thread "main" java.lang.NoClassDefFoundError: org/aspectj/lang/Signature -
Tomcat JDBC Realm Database Connection Error
Hello all,
I am trying to edit the server.xml file on Tomcat so I can use the JDBC Realm instead of the MemoryRealm. Hence, I will be able to read users, passwords and roles from a relational database instead of from the tomcat-users.xml.
I have tried following all the guides on the net I can find, my server.xml looks as follows (after making changes to allow it to use JDBC realm). The only problem is, when I try to run the application the server outputs the following: (after all of these errors have been kicked up a pop-up box then appears titled "Tomcat Manager Application", it asks for a User Name and Password. I have tried the standard user name of "ide" and the password next to it in tomcat-users.xml but it won't accept it. (I am using the netbeans IDE)).
Please could someone suggest any ideas of how I can get the server.xml to work with JDBC realm?
Using CATALINA_BASE: C:\Documents and Settings\Administrator\.netbeans\5.0beta\jakarta-tomcat-5.5.7_base
Using CATALINA_HOME: C:\Program Files\netbeans-5.0beta\enterprise2\jakarta-tomcat-5.5.7
Using CATALINA_TMPDIR: C:\Documents and Settings\Administrator\.netbeans\5.0beta\jakarta-tomcat-5.5.7_base\temp
Using JAVA_HOME: C:\j2sdk1.4.2_08
Created MBeanServer with ID: 1f934ad:107444b1d2b:-8000:ravinder-rdnzoa:1
31-Oct-2005 01:29:33 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8084
31-Oct-2005 01:29:34 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8443
31-Oct-2005 01:29:34 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2174 ms
31-Oct-2005 01:29:34 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
31-Oct-2005 01:29:34 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.7
31-Oct-2005 01:29:34 org.apache.catalina.realm.JDBCRealm start
SEVERE: Exception opening database connection
java.sql.SQLException: org.gjt.mm.mysql.Driver
at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:646)
at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:720)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1003)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:440)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
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:324)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
31-Oct-2005 01:29:34 org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
31-Oct-2005 01:29:36 org.apache.catalina.startup.ContextConfig validateSecurityRoles
INFO: WARNING: Security role name IBM used in an <auth-constraint> without being defined in a <security-role>
31-Oct-2005 01:29:36 org.apache.catalina.startup.ContextConfig validateSecurityRoles
INFO: WARNING: Security role name Auditor used in an <auth-constraint> without being defined in a <security-role>
31-Oct-2005 01:29:37 org.apache.struts.tiles.TilesPlugin initDefinitionsFactory
INFO: Tiles definition factory loaded for module ''.
31-Oct-2005 01:29:37 org.apache.struts.validator.ValidatorPlugIn initResources
INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml'
31-Oct-2005 01:29:37 org.apache.struts.validator.ValidatorPlugIn initResources
INFO: Loading validation rules file from '/WEB-INF/validation.xml'
31-Oct-2005 01:29:38 org.apache.catalina.startup.ContextConfig validateSecurityRoles
INFO: WARNING: Security role name IBM used in an <auth-constraint> without being defined in a <security-role>
31-Oct-2005 01:29:38 org.apache.struts.tiles.TilesPlugin initDefinitionsFactory
INFO: Tiles definition factory loaded for module ''.
31-Oct-2005 01:29:38 org.apache.struts.validator.ValidatorPlugIn initResources
INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml'
31-Oct-2005 01:29:38 org.apache.struts.validator.ValidatorPlugIn initResources
INFO: Loading validation rules file from '/WEB-INF/validation.xml'
31-Oct-2005 01:29:39 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8084
31-Oct-2005 01:29:39 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8443
31-Oct-2005 01:29:40 org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
31-Oct-2005 01:29:40 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/60 config=null
31-Oct-2005 01:29:40 org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
31-Oct-2005 01:29:40 org.apache.catalina.startup.Catalina start
INFO: Server startup in 5738 ms
31-Oct-2005 01:29:40 org.apache.catalina.realm.JDBCRealm authenticate
SEVERE: Exception performing authentication
java.sql.SQLException: org.gjt.mm.mysql.Driver
at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:646)
at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:344)
at org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:181)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:446)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:738)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:534)
31-Oct-2005 01:29:40 org.apache.catalina.realm.JDBCRealm authenticate
SEVERE: Exception performing authentication
java.sql.SQLException: org.gjt.mm.mysql.Driver
at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:646)
at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:344)
at org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:181)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:446)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:738)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:534)The server.xml looks as follows:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Example Server Configuration File -->
<!-- Note that component elements are nested corresponding to their
parent-child relationships with each other -->
<!-- A "Server" is a singleton element that represents the entire JVM,
which may contain one or more "Service" instances. The Server
listens for a shutdown command on the indicated port.
Note: A "Server" is not itself a "Container", so you may not
define subcomponents such as "Valves" or "Loggers" at this level.
-->
<Server port="8025" shutdown="SHUTDOWN">
<!-- Comment these entries out to disable JMX MBeans support used for the
administration web application -->
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"/>
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
<Listener className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>
<!-- Global JNDI resources -->
<GlobalNamingResources>
<!-- Test entry for demonstration purposes -->
<Environment name="simpleValue" type="java.lang.Integer" value="30"/>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users -->
<!-- RAV
<Resource name="UserDatabase" auth="Container" type="org.apache.catalina.UserDatabase" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" pathname="conf/tomcat-users.xml"/>
-->
</GlobalNamingResources>
<!-- A "Service" is a collection of one or more "Connectors" that share
a single "Container" (and therefore the web applications visible
within that Container). Normally, that Container is an "Engine",
but this is not required.
Note: A "Service" is not itself a "Container", so you may not
define subcomponents such as "Valves" or "Loggers" at this level.
-->
<!-- Define the Tomcat Stand-Alone Service -->
<Service name="Catalina">
<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Each Connector passes requests on to the
associated "Container" (normally an Engine) for processing.
By default, a non-SSL HTTP/1.1 Connector is established on port 8080.
You can also enable an SSL HTTP/1.1 Connector on port 8443 by
following the instructions below and uncommenting the second Connector
entry. SSL support requires the following steps (see the SSL Config
HOWTO in the Tomcat 5 documentation bundle for more detailed
instructions):
* If your JDK version 1.3 or prior, download and install JSSE 1.0.2 or
later, and put the JAR files into "$JAVA_HOME/jre/lib/ext".
* Execute:
%JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)
$JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix)
with a password value of "changeit" for both the certificate and
the keystore itself.
By default, DNS lookups are enabled when a web application calls
request.getRemoteHost(). This can have an adverse impact on
performance, so you can disable it by setting the
"enableLookups" attribute to "false". When DNS lookups are disabled,
request.getRemoteHost() will return the String version of the
IP address of the remote client.
-->
<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
<Connector port="8084" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="utf-8"/>
<!-- Note : To disable connection timeouts, set connectionTimeout value
to 0 -->
<!-- Note : To use gzip compression you could set the following properties :
compression="on"
compressionMinSize="2048"
noCompressionUserAgents="gozilla, traviata"
compressableMimeType="text/html,text/xml"
-->
<!-- Define a SSL HTTP/1.1 Connector on port 8443 -->
<Connector port="8443"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009" enableLookups="false" redirectPort="8443" protocol="AJP/1.3"/>
<!-- Define a Proxied HTTP/1.1 Connector on port 8082 -->
<!-- See proxy documentation for more information about using this. -->
<!--
<Connector port="8082"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" acceptCount="100" connectionTimeout="20000"
proxyPort="80" disableUploadTimeout="true" />
-->
<!-- An Engine represents the entry point (within Catalina) that processes
every request. The Engine implementation for Tomcat stand alone
analyzes the HTTP headers included with the request, and passes them
on to the appropriate Host (virtual host). -->
<!-- You should set jvmRoute to support load-balancing via AJP ie :
<Engine name="Standalone" defaultHost="localhost" jvmRoute="jvm1">
-->
<!-- Define the top level container in our container hierarchy -->
<Engine name="Catalina" defaultHost="localhost">
<!-- The request dumper valve dumps useful debugging information about
the request headers and cookies that were received, and the response
headers and cookies that were sent, for all requests received by
this instance of Tomcat. If you care only about requests to a
particular virtual host, or a particular application, nest this
element inside the corresponding <Host> or <Context> entry instead.
For a similar mechanism that is portable to all Servlet 2.4
containers, check out the "RequestDumperFilter" Filter in the
example application (the source for this filter may be found in
"$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters").
Request dumping is disabled by default. Uncomment the following
element to enable it. -->
<!--
<Valve className="org.apache.catalina.valves.RequestDumperValve"/>
-->
<!-- Because this Realm is here, an instance will be shared globally -->
<!-- This Realm uses the UserDatabase configured in the global JNDI
resources under the key "UserDatabase". Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
<!-- RAV
<Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
-->
<!-- Comment out the old realm but leave here for now in case we
need to go back quickly -->
<!--
<Realm className="org.apache.catalina.realm.MemoryRealm" />
-->
<!-- Replace the above Realm with one of the following to get a Realm
stored in a database and accessed via JDBC -->
<Realm className="org.apache.catalina.realm.JDBCRealm"
driverName="org.gjt.mm.mysql.Driver"
connectionURL="jdbc:mysql://localhost:3306/tomcatusers"
connectionName="root" connectionPassword="sikhism1"
userTable="users" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name" />
<!--
<Realm className="org.apache.catalina.realm.JDBCRealm"
driverName="oracle.jdbc.driver.OracleDriver"
connectionURL="jdbc:oracle:thin:@ntserver:1521:ORCL"
connectionName="scott" connectionPassword="tiger"
userTable="users" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name" />
-->
<!--
<Realm className="org.apache.catalina.realm.JDBCRealm"
driverName="sun.jdbc.odbc.JdbcOdbcDriver"
connectionURL="jdbc:odbc:CATALINA"
userTable="users" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name" />
-->
<!-- Define the default virtual host
Note: XML Schema validation will not work with Xerces 2.2.
-->
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="false" xmlValidation="false" xmlNamespaceAware="false">
<!-- Defines a cluster for this node,
By defining this element, means that every manager will be changed.
So when running a cluster, only make sure that you have webapps in there
that need to be clustered and remove the other ones.
A cluster has the following parameters:
className = the fully qualified name of the cluster class
name = a descriptive name for your cluster, can be anything
mcastAddr = the multicast address, has to be the same for all the nodes
mcastPort = the multicast port, has to be the same for all the nodes
mcastBindAddr = bind the multicast socket to a specific address
mcastTTL = the multicast TTL if you want to limit your broadcast
mcastSoTimeout = the multicast readtimeout
mcastFrequency = the number of milliseconds in between sending a "I'm alive" heartbeat
mcastDropTime = the number a milliseconds before a node is considered "dead" if no heartbeat is received
tcpThreadCount = the number of threads to handle incoming replication requests, optimal would be the same amount of threads as nodes
tcpListenAddress = the listen address (bind address) for TCP cluster request on this host,
in case of multiple ethernet cards.
auto means that address becomes
InetAddress.getLocalHost().getHostAddress()
tcpListenPort = the tcp listen port
tcpSelectorTimeout = the timeout (ms) for the Selector.select() method in case the OS
has a wakup bug in java.nio. Set to 0 for no timeout
printToScreen = true means that managers will also print to std.out
expireSessionsOnShutdown = true means that
useDirtyFlag = true means that we only replicate a session after setAttribute,removeAttribute has been called.
false means to replicate the session after each request.
false means that replication would work for the following piece of code: (only for SimpleTcpReplicationManager)
<%
HashMap map = (HashMap)session.getAttribute("map");
map.put("key","value");
%>
replicationMode = can be either 'pooled', 'synchronous' or 'asynchronous'.
* Pooled means that the replication happens using several sockets in a synchronous way. Ie, the data gets replicated, then the request return. This is the same as the 'synchronous' setting except it uses a pool of sockets, hence it is multithreaded. This is the fastest and safest configuration. To use this, also increase the nr of tcp threads that you have dealing with replication.
* Synchronous means that the thread that executes the request, is also the
thread the replicates the data to the other nodes, and will not return until all
nodes have received the information.
* Asynchronous means that there is a specific 'sender' thread for each cluster node,
so the request thread will queue the replication request into a "smart" queue,
and then return to the client.
The "smart" queue is a queue where when a session is added to the queue, and the same session
already exists in the queue from a previous request, that session will be replaced
in the queue instead of replicating two requests. This almost never happens, unless there is a
large network delay.
-->
<!--
When configuring for clustering, you also add in a valve to catch all the requests
coming in, at the end of the request, the session may or may not be replicated.
A session is replicated if and only if all the conditions are met:
1. useDirtyFlag is true or setAttribute or removeAttribute has been called AND
2. a session exists (has been created)
3. the request is not trapped by the "filter" attribute
The filter attribute is to filter out requests that could not modify the session,
hence we don't replicate the session after the end of this request.
The filter is negative, ie, anything you put in the filter, you mean to filter out,
ie, no replication will be done on requests that match one of the filters.
The filter attribute is delimited by ;, so you can't escape out ; even if you wanted to.
filter=".*\.gif;.*\.js;" means that we will not replicate the session after requests with the URI
ending with .gif and .js are intercepted.
The deployer element can be used to deploy apps cluster wide.
Currently the deployment only deploys/undeploys to working members in the cluster
so no WARs are copied upons startup of a broken node.
The deployer watches a directory (watchDir) for WAR files when watchEnabled="true"
When a new war file is added the war gets deployed to the local instance,
and then deployed to the other instances in the cluster.
When a war file is deleted from the watchDir the war is undeployed locally
and cluster wide
-->
<!--
<Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
managerClassName="org.apache.catalina.cluster.session.DeltaManager"
expireSessionsOnShutdown="false"
useDirtyFlag="true"
notifyListenersOnReplication="true">
<Membership
className="org.apache.catalina.cluster.mcast.McastService"
mcastAddr="228.0.0.4"
mcastPort="45564"
mcastFrequency="500"
mcastDropTime="3000"/>
<Receiver
className="org.apache.catalina.cluster.tcp.ReplicationListener"
tcpListenAddress="auto"
tcpListenPort="4001"
tcpSelectorTimeout="100"
tcpThreadCount="6"/>
<Sender
className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
replicationMode="pooled"
ackTimeout="15000"/>
<Valve className="org.apache.catalina.cluster.tcp.ReplicationValve"
filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;"/>
<Deployer className="org.apache.catalina.cluster.deploy.FarmWarDeployer"
tempDir="/tmp/war-temp/"
deployDir="/tmp/war-deploy/"
watchDir="/tmp/war-listen/"
watchEnabled="false"/>
</Cluster>
-->
<!-- Normally, users must authenticate themselves to each web app
individually. Uncomment the following entry if you would like
a user to be authenticated the first time they encounter a
resource protected by a security constraint, and then have that
user identity maintained across *all* web applications contained
in this virtual host. -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->
<!-- Access log processes all requests for this virtual host. By
default, log files are created in the "logs" directory relative to
$CATALINA_HOME. If you wish, you can specify a different
directory with the "directory" attribute. Specify either a relative
(to $CATALINA_HOME) or absolute path to the desired directory.
-->
<!--
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs" prefix="localhost_access_log." suffix=".txt"
pattern="common" resolveHosts="false"/>
-->
<!-- Access log processes all requests for this virtual host. By
default, log files are created in the "logs" directory relative to
$CATALINA_HOME. If you wish, you can specify a different
directory with the "directory" attribute. Specify either a relative
(to $CATALINA_HOME) or absolute path to the desired directory.
This access log implementation is optimized for maximum performance,
but is hardcoded to support only the "common" and "combined" patterns.
-->
<!--
<Valve className="org.apache.catalina.valves.FastCommonAccessLogValve"
directory="logs" prefix="localhost_access_log." suffix=".txt"
pattern="common" resolveHosts="false"/>
-->
<!-- Access log processes all requests for this virtual host. By
default, log files are created in the "logs" directory relative to
$CATALINA_HOME. If you wish, you can specify a different
directory with the "directory" attribute. Specify either a relative
(to $CATALINA_HOME) or absolute path to the desired directory.
This access log implementation is optimized for maximum performance,
but is hardcoded to support only the "common" and "combined" patterns.
This valve use NIO direct Byte Buffer to asynchornously store the
log.
-->
<!--
<Valve className="org.apache.catalina.valves.ByteBufferAccessLogValve"
directory="logs" prefix="localhost_access_log." suffix=".txt"
pattern="common" resolveHosts="false"/>
-->
</Host>
</Engine>
</Service>
</Server>Many thanks, and apologies for "dumping" all of the code here.So looking through the java api docs, I found that the tcUtilJDBCOperations has a connect string for the database. Below is the info it outlines. The questions I have it this. How do you specify the psdriver and URL along with do I need to do this as a persistent instance then add my selectstatement as a part of this or can I just specify this and the select statement will use this connection? Any help you can give would be appreciated.
tcUtilJDBCOperations
public tcUtilJDBCOperations(java.lang.String psDriver,
java.lang.String psUrl,
java.lang.String psUsername,
java.lang.String psPassword)Contructor that sets the parameters for connecting to a database
Parameters:
psDriver - The class name of the jdbc driver
psUrl - The URL of the database
psUsername - The username required to access the database
psPassword - The password for the above username
Nick -
I wrote a JAVA program to test the connection with Oracle. It worked in NT environment, but it did not in Linux Environment. I got the error message: "IO exception: The Network Adapter could not establish the connection."
Here is JAVA code:
import java.sql.*;
class Employee1
public static void main (String args [])
throws SQLException
try{
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection conn =
DriverManager.getConnection ("jdbc:oracle:thin:@203.149.143.1:1521:ora1",
"dxhub", "manager");
Statement stmt = conn.createStatement ();
ResultSet rset = stmt.executeQuery ("select user_id from user_info");
while (rset.next ())
System.out.println (rset.getString ("user_id"));
catch(Exception e)
System.out.println(e.getMessage());
I think there is nothing wrong with JAVA code. There must be something wrong in the Linux environment. I appreciate your help if someone can give me a little advice.
Tony
nullPerhaps you have't listener
Do you sure what your port 1521 - is open?
I recieve this message only if in my "NMAP <myhost> don't have port 1521 is open
- $ORACLE_HOME/bin/lsnrctl
- start
- exit
And everything - ok
null -
Server name problem-jdbc connection string
hi..
my server name is SERKANPROX\LOCALHOST .. i couldn't connect to this server with this server name . how can i write the server name in connection string?. this is the part my code:
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
Connection con = DriverManager.getConnection("jdbc:microsoft:sqlserver://serkanprox//localhost:1 433;DatabaseName=NorthWind","serkan","serkan");
the exception is : [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
i can connect to the server which name is "serkan" . but when there is a '\' character ,i couldn't..
how can i can change the connection string for connecting to this server ..
thankssshi..
my server name is SERKANPROX\LOCALHOST No it isn't. Get the right server name. This problem has nothing to do with your username and password and such. -
Hi All,
I am trying to connect to sysbase tables with
Connection String: <b>jdbc:sybase:TDS5:DB110:3400:falud002</b>
JDBC Driver: <b>com.sybase.jdbc3.jdbc.SybDriver</b>
But it gives me error in RWB as:
<b>Error during database connection to the database URL 'jdbc:sybase:TDS:DB110:3400:falud002' using the JDBC driver 'com.sybase.jdbc3.jdbc.SybDriver': 'com.sap.aii.adapter.jdbc.sql.DriverManagerException: Cannot establish connection to URL 'jdbc:sybase:TDS:DB110:3400:falud002': SQLException: JZ0D5: Error loading protocol com.sybase.jdbc3.tds.TDS.'</b>
Please advice....
XierHey
i know you might have done it but just want to make sure whether u have installed the proper drivers for Sybase or not?
Thanx
Aamir -
We're having a problem connecting to one of our databases using JDBC thin. There seem to be two formats for the connection strings:
jdbc:oracle:thin:@opctest.deq.state.ms.us:1522:TEST8131
jdbc:oracle:thin:@//opctest.deq.state.ms.us:1522/TEST8131
From a java app, the first throws an "Io exception: Invalid connection string format, a valid format is: "//host:port/service_name" " error; the second throws a TNS-12514: TNS:listener does not currently know of service requested in connect descriptor error.
What confuses me more is that if I test this string from a JSP page:
jdbc:oracle:thin:@opctest.deq.state.ms.us:1522:test8131
it connects fine.
The environment is Oracle9i on Red Hat, running MTS. Java app is running on WinXP. Anyone have an idea what's going on?
Thanks,
HarryI can see a couple of issues in your connect string:
1. I see you are using the sid in uppercase, TEST8131 instead of test8131. If you are working on a unix environment this makes a difference, so use the lower case instead.
2. You are using the 1522 port, check with your database administrator if the instance is registered against the 1522 port, otherwise the error TNS-12514 will show up. I will assume it currently works fine since you have declared the jsp using the same address works fine with this port.
3. Ensure the hostname can be solved just exactly the way you have declared it (fully qualified domain) from the perspective where the jdbc program is running.
4. the format described here: opctest.deq.state.ms.us:1522/TEST8131 is known as the EZConnect, and it is a 10g feature.
~ Madrid
Maybe you are looking for
-
If I have multiple email accounts, how can I prevent one of them from sending email?
If set up multiple email accounts in Thunderbird, how can I prevent one of them from sending email, while allowing others to send?
-
Unknown error code during application install: "-2...
Skype stopped working about 2 months ago on my HTC One, Android version 4.4.2. It had been working for some months, but it started giving an error code that I have long forgotten. I de-installed Skype and then tried to re-install from the Play Store.
-
Hiii friends! how attached output type to a transaction
Hi gurus! how to attached output type to a transaction. for eg - i have created a outout type zexpt and i have to assigned to transaction VF01. Regards, Rahul
-
Using sql expressions in interfaces
Hi All, I have created an interface that works very fine when used with constants. But when i am using a sql case expression for populating a target column, the target column value is updated as null. The expression that i have written is: CASE WHEN
-
Remove default context in Tomcat 5.5
Hi Can anyone tell me how to get rid of the default context in Tomcat 5.5 (Linux)? I want to make my own webapp the default context (which is easy in all previous releases) but no matter what I try, it doesn't work. I've tried editing: 1) conf/server