JDBC Error in allocating a connection
Hi,
I am trying to use an outbound jdbc eway to do a select, but the connection is not being established
Here is the log error,
java.sql.SQLException: Error in allocating a connection. Cause: com.microsoft.sqlserver.jdbc.SQLServerDriver
And here are the config settings from the log
setPortNumber = [1433]
setUser = [sa]
setServerName = [localhost]
setPassword = [xxxxx]
setDriverProperties = [setURL#jdbc:sqlserver://localhost:1433;databaseName=eamh;]
setDatabaseName = [eamh]
setClassName = [com.microsoft.sqlserver.jdbc.SQLServerDriver]
Any idea what is wrong?
Rupert
The driver classname is not correct. You need to use com.SeeBeyond.sqlserver.jdbc.sqlserver.SQLServerDataSource.
Let me know if this works.
Cheers,
Mac.
Similar Messages
-
CTS1.4.1 Samples JDBC test failing with Error in allocating a connection
Tests under CTS1.4.1 samples>>JDBC>>ee>>testConn>> are failing with the following error :
Sep 14, 2005 4:27:55 PM com.sun.gjc.spi.DSManagedConnectionFactory createManagedConnection
WARNING: RAR5113 : Error creating connection from supplied information: Reason - Error while parsing address
Sep 14, 2005 4:27:55 PM com.sun.enterprise.resource.LocalTxConnectorAllocator createResource
WARNING: RAR5038:Unexpected exception while creating resource
Sep 14, 2005 4:27:55 PM com.sun.enterprise.connectors.ConnectionManagerImpl internalGetConnection
WARNING: RAR5117 : Failed to obtain/create connection. Reason : Connection could not be allocated because: Error while parsing address
Sep 14, 2005 4:27:55 PM com.sun.gjc.spi.DataSource getConnection
WARNING: RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: Connection could not be allocated because: Error while parsing address ]
ERROR: SQL Exception : Error in allocating a connection. Cause: Connection could not be allocated because: Error while parsing address
ERROR: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: Error while parsing address
at com.sun.gjc.spi.DataSource.getConnection(DataSource.java:72)
at com.sun.ts.tests.samples.jdbc.ee.testConn.testConnClient.getConnection(testConnClient.java:252)
at com.sun.ts.tests.samples.jdbc.ee.testConn.testConnClient.setup(testConnClient.java:91)
But the mystery is that the main set of JDBC tests (outside of samples) in CTS1.4.1 are running fine.
One difference I notice is that the tests that are failing use "createManagedConnection".
The main configurations file "ts.jte" present under %TS_HOME%\bin has all the settings correct. Thats why the main JDBC tests go through fine.
I wonder where these failing tests pick up the bad "address" from.
Any help on this would be greatly appreciated.
Thanks !CTS is a paid product and any question regarding that should be answered by a Licencee Engineer. Pls contact the LE regard the setup of CTS or any TCK.
-
I'm deploying an EJB Module with a CMP in SJAS from SJSE.
I get the following exception "java.sql.SQLException: Error in allocating a connection. Cause: No PasswordCredential found" the first time a CMP tries to connect to the MS SQL Server database.
I can connect through the Admin console (PING works fine) but this error hapens in runtime.
The datasource classname i'm using is "com.sun.sql.jdbcx.sqlserver.SQLServerDataSource" which is suggested by the SJSE.
Any help will be welcome...
Nelson MarquesIf you are using Netbeans, then this link might help:
http://forum.java.sun.com/thread.jspa?forumID=136&threadID=598423
Otherwise, have you try this ?
Verify your sun-ejb-jar.xml does not use default-resource-princinpal element:
<res-ref-name>jdbc/pdisasdb</res-ref-name>
<jndi-name>jdbc/pdisasdb</jndi-name>
<default-resource-principal>
<name>myname</name>
<password>geheim</password>
</default-resource-principal>
</resource-ref> -
SQL Insert Error Error in allocating a connection. Cause: No PasswordCreden
Friends,
While testing my connection in the Sun java Application Server , I get the following error .
"SQL Insert Error Error in allocating a connection. Cause: No PasswordCredential found "
Can somebody please guide ?
regards
DhirajIf you are using Netbeans, then this link might help:
http://forum.java.sun.com/thread.jspa?forumID=136&threadID=598423
Otherwise, have you try this ?
Verify your sun-ejb-jar.xml does not use default-resource-princinpal element:
<res-ref-name>jdbc/pdisasdb</res-ref-name>
<jndi-name>jdbc/pdisasdb</jndi-name>
<default-resource-principal>
<name>myname</name>
<password>geheim</password>
</default-resource-principal>
</resource-ref> -
Java.sql.SQLException: Error in allocating a connection
hi,
I have developed enterprise application using net beans IDE 5.5.I created one enity bean using sql server database.When i tried deploy this project i am getting following error...
Internal Exception: java.sql.SQLException: Error in allocating a connection.
Cause: Class name is wrong or classpath is not set for : com.microsoft.jdbc.sqlserver.SQLServerDataSourceError
can anybody please help me.....where i went wrong...i am new to netbeans IDE
regrds
patelu need to download the three jar files.
download the following jar files and add in ur classpath.
msutil-2000.sp2-lib.jar
msbase-2000.sp2-lib.jar
mssqlserver-2000.sp2-lib.jar
This is sample program...
u can test in standalone first and do in netbeans....
import java.sql.*;
public class querybean {
public String getdata(String sql) {
try {
System.out.println("testing connection ");
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
Connection connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:1433;databaseName=master;user=sa;password=userpass;");
Statement statement = connection.createStatement();
ResultSet rs = statement.executeQuery(sql);
System.out.println("testing connection pooling");
while(rs.next()) {
System.out.println(rs.getString(1));
} catch(Exception e1) {
System.out.println("exception caught" + e1);
return "";
public static void main (String args[]) throws Exception {
querybean qb = new querybean();
qb.getdata("select * from sampletable");
I belive it will work now -
Glassfish SQLException: Error in allocating a connection in MySQL
Hi All,
I have just installed the Bundled Netbeans 6.5, Glassfish v2 and v3 Prelude (not including MySQL) that runs on top of MySQL 5.1 (separate installation) on server A, in order to mirror another similar working installation (Bundled Netbeans 6.1, Glassfish v2 including MySQL 5.0) on server B. Both Windows XP servers have got identical setups in their respective C:\Program Files\glassfish-v2ur2\domains\domain1\config\domain.xml files. However, the following error was encountered when trying to deploy the same EnterpriseApplication on server A which had no such problem on server B:
Glassfish Server Log
Server: unknown
RAR5099 : Wrong class name or classpath for Datasource Object
java.lang.ClassNotFoundException: com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1498)
at com.sun.gjc.common.DataSourceObjectBuilder.getDataSourceObject(DataSourceObjectBuilder.java:251)
at com.sun.gjc.common.DataSourceObjectBuilder.constructDataSourceObject(DataSourceObjectBuilder.java:106)
RAR5038:Unexpected exception while creating resource for pool mysqlPool. Exception : Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
RAR5117 : Failed to obtain/create connection from connection pool [ mysqlPool ]. Reason : Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource]
Exception occured in J2EEC Phase
com.sun.enterprise.deployment.backend.IASDeploymentException:
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
Error Code: 0
at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:305)
EnterpriseApplication (EJB 3.0) Deployment output
Deploying application in domain failed; Deployment Errorjava.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource --
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
Error Code: 0
C:\Documents and Settings\Jack\EnterpriseApplication\EnterpriseApplicationBean-ejb\nbproject\build-impl.xml:400: The module has not been deployed.Even manually re-creating the same project (as opposed to getting a copy of the Netbeans project folder from server B) did not make any difference. Likewise, the following jdbc connection pool definition was added possibly by Netbeans from Server Database JDBC Connection Resource setting:
<property name="URL" value="jdbc:mysql://localhost:3306/employeeDB"/>
<property name="driverClass" value="com.mysql.jdbc.Driver"/>
<property name="Password" value="abcdef"/>
<property name="portNumber" value="3306"/>
<property name="databaseName" value="employeeDB"/>
<property name="serverName" value="localhost"/>
<property name="User" value="applicationuser"/>Can anyone see where the problem lies?
Any assistance would be much appreciated.
Thanks in advance,
JackI'm new to Java and GlassFish and I get the same error message when trying to ping my created data pool for MySQL. Inside the NetBeans IDE running Java Swing Applications + MySQL connection via JDBC, it works fine (Classpath settings ok). I set the same path to the JVM settings in Glassfish but every time I try to ping it the mentioned error occurs. Any suggestions?
-
Error in allocating a connection + JPA
Hello Experts,
I am trying my first ever JPA Program.I am using netbeans 6.0.In netbeans there is a sample application for WebJPA.In that they are calling entity from servlet.I just made a different project.I have copied all files in my project.At the time of creating persistence unit I have used DB2.But now when I am compiling my project I am getting the following errors.Seems there is some problem with connection to DB2.I have also added the correct jar files during creation of persistence unit.Please help me.Many Thanx in advance.
*Deploying application in domain failed; Deployment Errorjava.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: Failure in loading T2 native library db2jcct2, reason: java.lang.UnsatisfiedLinkError: no db2jcct2 in java.library.path --*
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: Failure in loading T2 native library db2jcct2, reason: java.lang.UnsatisfiedLinkError: no db2jcct2 in java.library.path
Error Code: 0
Deployment error:
The module has not been deployed.
See the server log for details.
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:163)
at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:104)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor1068.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:277)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:460)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)
Caused by: The module has not been deployed.
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:157)Hi garava,
Thanks for the reply.I had followed the same path while creating Persistence Unit.I googled this error & I found a solution where I need to set the NativeLibraryPathPrefix in my JVM.
For this I went to Servers->Glassfish V2 -> JVM-> .There I set NativeLibraryPathPrefix = D:\Program Files\IBM\SQLLIB\BIN.
It's working now.But I can't understand what was the problem & how it got solved.
One more issue ,suppose tom I am facing the same problem for some other XYZ database.Do I need to change this path again for that database.What this path exactly means.I read it looks for "db2jcc2.dll" in this path.What is the need of this dll if I am including jar files during creation of persistence Unit.
Please help.Thanks in advance. -
Error in allocating a connection.
Hi all!
I have this problem with my sun application server version 8 and its connection to my mysql database. It works like a charm most of the time, but when I go home at night and come back in the morning I get this error message when trying to access the entity bean that has a bean managed conenction to the database :
java.rmi.RemoteException: ejbFindAllApplications: Error in allocating a connection. Cause: java.lang.RuntimeException: Got exception during XAResource.start:
com.sun.corba.ee.impl.javax.rmi.CORBA.Util.wrapException(Util.java:597)
javax.rmi.CORBA.Util.wrapException(Util.java:277)
Accedo.EntityBeans.OperatorBean._OperatorHome_Stub.findAllOperators(Unknown Source)
org.apache.jsp.customer_005fsystem.index_005fcustomerservice_jsp._jspService(index_005fcustomerservice_jsp.java:143)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:102)
javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:282)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:263)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:210)
javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
sun.reflect.GeneratedMethodAccessor1297.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:246)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
I figure it has do with some idle time-out I have forgotten to set or something, but when I log in to the server administration console I can't figure out what's wrong! Anyone else bumped into this issue that can lend a helping hand?
Yours sincerely
/tedHi again,
seems like I found the cause of the problem; the mysql system variable wait_timeout was set to 28800 (8 hours) which caused the server to stop responding. What I did is simply set it to 604800 (equals a week) and hope that it will work, which I will find out tomorrow morning... -
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 -
"Error loading native JDBC driver library" received when connecting to a DB
I recently installed 10g client onto my PC. After installation I now recieve an "Error loading native JDBC driver library" error when attempting to connect to a database.
This is a dual core Dell loaded with XP sp 2. I am attempting to connect to a 10gR2 instance. I tried the solution mentioned in another post to no avail. I am using SQL Developer v 1.2.1 build main-32.13.Hi,
I found this thread from googling and am having the same problem for four days now...
For those who can get SQL Developer to work, could you please detail what properties you have in your installation? Could you please describe what we are supposed to see in the SQL Developer Properties tab? I found this tab in Help>About>Properties but have no idea where SQL Developer picks up those attributes. And it does not seem we can change any of them within SQL Developer. How frustrating!
Even more frustrating is that I am able to access the database I want to connect to with SQL Plus (right click on the connect node in SQL Developer)...
Thanks,
Clueless -
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,
AshishHi,
refer this link.
Refer this link to solve the above error.
http://support.microsoft.com/kb/295297
Regards,
Sudheer. -
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 Message while creating connection pool
Hi all,
I got the following error message while creating connection pool for the
SQL Server thru the Application Server Admin Console.
The message is,
An error has occured.
Operation 'create.Jdbc.ConnectionPool' failed in 'resources' Config Mbean. Target exception message :
JdbcConnectionPool Already Exists: cannot add duplicate.
But the connection pool for the SQL Server was not there in the list.
What may be the possible reason for this error.
i was trying to deploy a BMP entiy bean using the Sun Application Server.
Prior deploying i just tried to create connection pool and test the connection using the Admin Console
Please help me by providing a solution.Kriti Sundar Mazumder wrote:
Hi
I am getting an following error message, while creating database connection pool
in weblogic 7.
"<Jun 18, 2004 4:52:36 AM CDT> <Error> <JDBC> <001060> <Cannot startup connection
pool "MyJDBCConnectionPool" java.sql.SQLException: [IBM][JDBC Driver] CLI0647E
Error allocating DB2 environment handle, rc=-1.>"
Can anyone help me out in this regard
Regards
KritiHi. I am no expert, but it sounds like a problem with the privileges the user
has... The best thing is to step back to a simpler environment. Can you try
connecting to DB2 with a simple program like utils.dbping? Please look at our
driver docs for the DB2 driver, because there are several variations in connect
properties depending on the type of DB2 you are connecting to...
Joe -
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 -
JDBC Driver not found when connecting to Data Federator XI 3.0 SP3
Hello,
I am trying to connect Crystal 2008 to Data Federator however I am getting the Error
Failed to open connection.
Details: JDBC Driver not found.
The JDBC Drivers are installed and working for the Universe Designer, however I am unable to get it working for Crystal. I am using the following connection parameters on Crystal:
Connection URL: jdbc:datafederator://<<servername>>:3055/<<catalog>>
Database Classname: com.businessobjects.datafederator.jdbc.DataFederatorDriver
Any Advice on what I may have missed?The issue was solved, thanks to Patric Wan:
u201CFailed to open the connection. Details: JDBC driver not found.u201D
This means Data Federator JDBC driver was not added to:
C:\Program Files\Business Objects\common\<version>\java\CRConfig.xml
How to connect the Data Federator Server using JDBC?
1. Retrieve the following files from the machine where Data Federator is installed, from the directory [data-federator-installation-dir]/JdbcDriver/lib.
- thindriver.jar
- avalon-framework-4.1.5.jar
- jacorb.jar
- log4j-1.2.8.jar
- logkit-1.2.jar
2. Copy these files to a directory of your choice ([your-jdbc-driverdirectory]).
3. Add [your-jdbc-driver-directory]/thindriver.jar to CRConfig.xml <Add to Classpath tag, you can refer to original sample.CRConfig.xml should be at: C:\Program Files\Business Objects\Common\4.0\java\CRConfig.xml, or search your BOBJ products install to find this file>
4. URL: jdbc:leselect://<host>[:<port>][/[<catalog>]][[;param-name=value]*]
Class Name : LeSelect.ThinDriver.ThinDriver
Edited by: Craig Sander on Feb 12, 2011 8:22 PM
Maybe you are looking for
-
All of a sudden out of the blue I get a message that Firefox has crashed. With several options, which pretty much make me start over. Quite frankly I am a bit P's and will remove Firefox from my system and find another more reliable App.
-
How best to organise family apple ids with one master ID for procurement
Im interested in thoughts of how to best organise multiple IDs and one family ID so I can control the procurement for my childrens accounts on their devices
-
Like clause in PreparedStatement not working
Hi I need to create a PreparedStatement that selects using a like where clause. I do the following: String param0 = "ABC%"; PreparedStatement pstmt = conn.prepareStatement("select ISSUEID from DMFI_ISSUE where ISIN like ?"); setObject(pstmt,1,param0,
-
All the details are below
-
CS4 document window not showing
I have been running Indesign CS happily for the past year on a 13" macbook pro with Leopard. I just bought a brand new 15" macbook pro with Snow Leopard. Now if I open a file I need to minimize or expand the window to see a document. Also if I want t