SAP Knowledge Base Article - Public

1219417 - Error: 'Invalid Argument provided. Java Server startup failure.' when creating or refreshing a report using a JDBC or XML connection in Crystal Reports

Symptom

  • Error: Invalid Argument provided.
  • Error: Java Server startup failure.
  • When creating or refreshing a report using a JDBC or XML connection, it fails.
  • When attempting to connect to a database via a JDBC or XML connection in Crystal Reports, it fails with the error:

    "Invalid Argument provided.
     Details: Java Server startup failure.
     Verify the PATH (JDK), CLASSPATH, and IORFileLocation properties in the CRConfig.xml file.
     In addition, verify that you are using JDK 1.5."
      
     
    Java Server Error.png

Environment

  • SAP Crystal Reports 2013
  • SAP Crystal Reports 2016
  • SAP Crystal Reports 2020 

Reproducing the Issue

  1. In Crystal Reports, create a new report.
  2. In the "Database Expert", under "New Connection", select JDBC, or XML
  3. Enter the connection information to the database, and it then fails with the error: 'Java Server startup failure...' 

Cause

  • JDBC and XML uses Java to connect to data sources. The error indicate the Java Virtual Machine cannot be started because of an invalid path to the Java Virtual Machine.

Resolution

  • Add a valid path to a Java Virtual Machine, to the Crystal Reports configuration file: crconfig.xml:
        
    1. On the computer where Crystal Reports is installed, find the path where the Java Virtual Machine (JVM) is installed. ( java.exe )
            
    2. To update the path of the Java Virtual Machine (JVM) in the Crystal Reports configuration file, navigate to:
          
         C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\java
        
    3. In a Text Editor, open the file: crconfig.xml
         
    4. Under: <DataDriverCommon>, add the path of the Java Virtual Machine to the tag corresponding to the version of Crystal Reports used

           - For Crystal Reports 2013, 2016 :  <JavaDir32> 
           - For Crystal Reports 2020          :  <JavaDir64>  

      For example: If the path to the JVM is located at: C:\myJavaFolder\bin, and you are using Crystal Reports 2016, then updated crconfig.xml will look like:
         
      <DataDriverCommon>

         <JavaDir32>C:\myJavaFolder\bin</JavaDir32>
         ...

    5. Restart Crystal Reports.
         
    6. If after performing the above steps you are still experiencingt the same error, then verify the correct information exists for the following elements in the crconfig.xml file:
         
      <IORFileLocation> to ensure the 'temp' directory exists.
      <Classpath> to ensure all the JAR references are accurate.
        
         
  • Note:
    It is also possible to set the MS Windows Environment Variable: JAVA_HOME, to point to a valid Java Vitual Machine (JVM), but Crystal Reports first look in the crconfig.xml file to find the path to the JVM to start.  

Keywords

CR, CLASSPATH, CLASS PATH, START JAVA SERVER, Classpath Error starting Java Server , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem

Product

SAP Crystal Reports 2013 ; SAP Crystal Reports 2016 ; SAP Crystal Reports 2020