Implementing versioning with a Java SDK

I have an SDK that I supply to vendors who want to develop custom classes that extend the classes in my SDK .jar (the specifics of the SDK is unimportant). I am trying to devise a way find out what version of the SDK the vendor compiled their class against without requiring the vendor to make code changes.
In my first attempt, I included a final method in the SDK called getVersion() that returned "1.0". The problem with this approach is that when I instantiate the vendor's class (that extended the class in the SDK), and call getVersion() on the vendor's class, I get the value "1.0" from the base class, not the vendor class. Therefore, if the vendor compiles his .class file with the "1.0" version of the SDK, and I later upgrade my SDK to "2.0", whenever I call getVersion() from the vendor's .class file, I always get the version from the base class (i.e. "2.0") and not the version that they used originally ("1.0").
What I am trying to do is figure out a way to mark a vendor's class in a manner that is independent of the SDK. Obviously, I could tell the vendor to implement getVersion() and return the number that the SDK is at, or I could have the vendor implement another class called "SDKVersion" and change this to "SDKVersion2_0"..."SDKVersion3_0" as needed, but these require the vendor to take specific action to identify what version they compiled against. I would rather the vendor be unaware of the versioning if possible.
Is there some way to "mark" the class when it is compiled with a number or name? That's all I need to do to accomplish my versioning goals.
Thanks for any help you have,
Michael

You mean, some option of the javac command that would automatically add a getVersion() method to your code? Or a constant containing the version number? When you put it that way, the answer is obviously NO. If you want to require your vendors to implement getVersion(), then declare your class as abstract and define an abstract getVersion() method.

Similar Messages

  • Latest supported version of the Java SDK for XI R3.1

    Hi all,
                Does anyone have any ideas or views on the latest supported version of the Java SDK for 3.1 on windows ?
    We are using Tomcat which ships with SDK version 1.5.0_12, I know that updating this to a later version can result in a considerable performance boost for Infoview and its supported applications especially webintelligence.

    Hi Bashir, That's interesting  you're using a relatively up to date version of the java SDK. Business Objects documentation states that versions up to 1.5.0_xx are supported. Did you notice any improvements in performance of the system by using the later version 1.6.0_17 ?. There are generally very significant improvements in successive updates of the SDK in term of memory management, reliability and other general bug fixes, so it's something that we will take into consideration.
          Thanks

  • Mac Version of Java SDK?

    I was on Sun's website looking for a Mac version of their Java SDK. I am having a hard time finding it. My professor told us we needed Java 2 SDK, Standard Edition, v 1.4.2_05 (J2SE) for our CS class. Is this what is downloaded through software update or am I looking for something else? Does it exist?

    Type this into the Terminal.app's window:
    java -version
    and find out what's set as the default. See
    http://www.apple.com/support/downloads/java131and142release2.html and
    http://www.apple.com/support/downloads/java2se50release3.html for details.

  • Error with JPR(Java Proxy Runtime) in Adapter Monitor of RWB

    Dear Experts,
                 I am implementing scenario with Client Java Proxy(Outbound) and Server ABAP Proxy(Inbound). We have done all the designing in IR and configurations in ID. We have deployed the EAR successfully. But when we go to RWB(Runtime Work Bench) to monitor the inital status of JPR in RWB->Adapter Monitor. It shows the following error.
    Status     Name                                Text
    Error        SLD Access                     SLD host:port = yhsapi01.yashsap.com:50000
    Error getting JPR configuration from SLD. Exception: Connect to SAP gateway failed
    Connect_PM TYPE=A ASHOST=yhsapi01 SYSNR=00 GWHOST=yhsapi01 GWSERV=sapgw00 PCS=1
    LOCATION CPIC (TCP/IP) on local host with Unicode
    ERROR max no of 100 conversations exceeded
    TIME Wed Jun 03 19:42:45 200
    RELEASE 700
    COMPONENT CPIC (TCP/IP) with Unicode
    VERSION 3
    RC 466
    MODULE r3cpic.c
    LINE 10713
    COUNTER 5521
    No access to get JPR configuration

    Hi!
    Obviously there are more than 100 connections opened in your system.
    ERROR max no of 100 conversations exceeded
    Please check your gateway settings (in ABAP you can check the parameters using transaction SMGW).
    Regards,
    Volker

  • Report call failing from JAVA SDK

    Hi All,
    I am getting strange issue. Report works fine in BO InfoView when we ran the report by using java SDK it is getting some formula error.
    Here are the details
    1. Report is working fine in DEV, QA and PROD InfoView
    2. Report is not working with PROD JAVA SDK
    3. Finding below errors when we ran through Java SDK.
    Errors :
    Error1:
    2014-07-01 10:51:47 com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: Error in File Cardholder Activity Fleet_Account: Error in formula Acct Code: '//If({?acctCD} = "%") then "ALL" ' A subscript must be between 1 and the length of the string. Details: errorKind---- Error code:-2147215357 Error code name:internal at com.crystaldecisions.sdk.occa.report.lib.ReportSDKException.throwReportSDKException(Unknown Source) at com.crystaldecisions.sdk.occa.managedreports.ps.internal.f.a(Unknown Source) at com.crystaldecisions.sdk.occa.managedreports.ps.internal.f.getPage(Unknown Source) at com.businessobjects.report.web.event.q.a(Unknown Source) at com.businessobjects.report.web.event.q.a(Unknown Source) at com.businessobjects.report.web.event.bq.a(Unknown Source) at com.businessobjects.report.web.event.bt.broadcast(Unknown Source) at com.businessobjects.report.web.event.ak.a(Unknown Source) at com.businessobjects.report.web.a.p.if(Unknown Source) at com.businessobjects.report.web.e.a(Unknown Source) at com.businessobjects.report.web.e.a(Unknown Source) at com.businessobjects.report.web.e.if(Unknown Source) at com.crystaldecisions.report.web.viewer.CrystalReportViewerUpdater.a(Unknown Source) at com.crystaldecisions.report.web.ServerControl.processHttpRequest(Unknown Source) at com.crystaldecisions.report.web.viewer.CrystalReportViewerServlet.do(Unknown Source) at com.crystaldecisions.report.web.viewer.CrystalReportViewerServlet.doPost(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:763) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.ibm.ws.cache.servlet.ServletWrapper.serviceProxied(ServletWrapper.java:282) at com.ibm.ws.cache.servlet.CacheHook.handleFragment(CacheHook.java:459) at com.ibm.ws.cache.servlet.CacheHook.handleServlet(CacheHook.java:265) at com.ibm.ws.cache.servlet.ServletWrapper.service(ServletWrapper.java:262) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1146) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:592) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:481) at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:748) at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1466) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:122) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387) at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196) at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751) at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497)
    Error 2:
    2014-07-01 08:07:37
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: Error in File Transaction Listing_Account:
    Error in formula Prompt Date:
    '(Propercase({?dtTyp}) & " between ") &
    Bad date format string.
    Details: errorKind---- Error code:-2147215357 Error code name:internal
    at com.crystaldecisions.sdk.occa.report.lib.ReportSDKException.throwReportSDKException(Unknown Source)
    at com.crystaldecisions.sdk.occa.managedreports.ps.internal.f.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.managedreports.ps.internal.f.getPage(Unknown Source)
    at com.businessobjects.report.web.event.q.a(Unknown Source)
    at com.businessobjects.report.web.event.q.a(Unknown Source)
    at com.businessobjects.report.web.event.bq.a(Unknown Source)
    at com.businessobjects.report.web.event.bt.broadcast(Unknown Source)
    at com.businessobjects.report.web.event.ak.a(Unknown Source)
    at com.businessobjects.report.web.a.p.if(Unknown Source)
    at com.businessobjects.report.web.e.a(Unknown Source)
    at com.businessobjects.report.web.e.a(Unknown Source)
    at com.businessobjects.report.web.e.if(Unknown Source)
    at com.crystaldecisions.report.web.viewer.CrystalReportViewerUpdater.a(Unknown Source)
    at com.crystaldecisions.report.web.ServerControl.processHttpRequest(Unknown Source)
    at com.crystaldecisions.report.web.viewer.CrystalReportViewerServlet.do(Unknown Source)
    at com.crystaldecisions.report.web.viewer.CrystalReportViewerServlet.doPost(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.ibm.ws.cache.servlet.ServletWrapper.serviceProxied(ServletWrapper.java:282)
    at com.ibm.ws.cache.servlet.CacheHook.handleFragment(CacheHook.java:459)
    at com.ibm.ws.cache.servlet.CacheHook.handleServlet(CacheHook.java:265)
    at com.ibm.ws.cache.servlet.ServletWrapper.service(ServletWrapper.java:262)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1146)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:592)
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:481)
    at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:748)
    at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1466)
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:122)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:267)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
    at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
    at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
    at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
    at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)
    at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:792)
    at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497)
    Anyone having similar issue
    Thanks
    Satish

    It is giving error in formula  even though formula is correct.

  • How to Uninstall Java SDK Eval Package?

    First, some background info: I am not a Java programmer, but I need to have the Java SDK v1.4.1 (or later) installed on my Solaris 8 Sparc platform in order to be able to run some 3rd-party web-based database software tools.
    I accidentally installed the 'evaluation' Enterprise version of the Java SDK v1.4.1. I did not uninstall the underlying 1.2.1_04 JDK, so that still shows up when I run the "java -version" command, probably because I did not use the 'pkgadd' utility to add the eval SDK. Now I want to erase the evalware, but I'm afraid I might clobber something else in the process. How do I go about uninstalling the eval SDK?

    Thx for your answer...
    I want to have the installation of Java SDK 1.5.0_14 in a different location ?
    Can I just move the folder ?
    But I guess it's better to do uninstall and re-install it ?
    Right ?
    Thx in advance guys... (I'm not yet worked in in this stuff...)

  • Question about SAP BI Java SDK

    Hello @ all,
    I´m new to this topic and I want to ask, if its possible to draw charts with BI Java SDK?
    Please help, its urgent!
    Thank you!

    Hi Mehmet,
             Have a look at this thread reporting on the same issue.
    Re: Charts  using BI SDK
             Hope it helps u in solving ur problem.
             Assign points if this link is helpful
    Cheers,
    Aravindhan

  • USB Portable Java SDK?

    Has anyone made a USB portable version of the Java SDK for compiling on the go? Windows version only. If somone has not, how could I go about doing this?

    Not sure about a completely portable one, but I run Eclipse off my USB and it works fine. The occasional cough-up and screen freeze, but it all works.
    However - not sure about it being completely portable. I run it on my school's lab computers, which have Netbeans and the JDK already installed on it. Haven't tried it on any computers without a JDK.

  • Java SDK version 5 update 5 incompatible with J2ME WTK1.0.4_02? Help!

    Hi guys,
    Total newb here, and frustrated beyond measure at my own ignorance. I'm trying to write some basic java apps for a cellphone.
    I have downloaded the latest Java SDK from Sun, and the Wireless Development Toolkit.
    Sadly, following the instructions to the letter, the demos all fail to compile with an error
    javac: target release 1.1 conflicts with default source release 1.5I've spent the last three hours combing this forum and the web for a solution and I'm stumped. The best advice I've found is to download the 1.4.2 SDK (but that doesn't appear to be available any more... anyone?) or to some command line arguments like -source or -target. Problem there is that the WTK doesn't seem to provide the option of passing arguments to the compiler.
    Could somebody please put me out of my misery and advise me what the best way past problem is?
    Thanks
    -A

    Download 1.4.2 SDK here:
    http://java.sun.com/j2se/1.4.2/download.html

  • Having trouble with creation of a cloud service with multiple virtual machines using java sdk.

    I am creating a cloud service on azure with 2 virtual machines using java sdk API. Service created successfully.
    My input endpoint details are as follows.
    INPUT ENDPOINTS
    Head : 191.238.144.47:2400
    Head : 191.238.144.47:22
    Node0 : 191.238.144.47:43211
    For Head instance port 2400 is for HTTPS and port 22 is for SSH and for Node0 instance port 43211 is for SSH.
    But I am having problem with doing a ssh on Head instance. Sometimes it works sometimes doesn't. Same problem with HTTPS also.
    I have some application running over there but when i try to access it thru browser sometimes it works but most of the time doesn't. When I restart the instances from azure portal, its works after
    that(not always but most of the time). 
    Now I am confused what is going on there. I am creating cloud service and virtual machines using java sdk and setting input endpoints also. After creation of all instances i restart every instance programmatically .
    I am not sure whether restart is required or not. It must be something to do with input endpoints only but not able to get the right thing i guess. When i do the same thing thru azure portal(creation of cloud service with virtual machines and setting up input
    end points) everything works fine but not achieving the result when implementing it by java sdk API. Please help me.

    HI Nithin,
    Thanks for your reply. I am setting the endpoints after creating my instances using update call. Here's the code snippet.
    AzureService aServ = new AzureService(session);
     if(aServ.checkNameAvailability(clusterName)) {
               aServ.createHostedService(clusterName, "dbX cluster");         
             // Creating head instance
             aServ.createHead(clusterName, imgName, headType, userName, pswd);  
            // Setting end points for head node
             String name = "ssh";
             int port = 22;
             aServ.updateVMInputEndpoint(clusterName, "Head", name, port);
             // Restarting head instance
             aServ.restartVM(clusterName, "Head");
           String roleName = "Node";
           String tmpRoleName = "";
           for(int i=0; i<noi; i++) {
                      port = 43210+(i+1);
                      tmpRoleName = roleName + i;
                   // Creating node instance
                    aServ.createVM(clusterName, tmpRoleName, imgName, nodeType, userName, pswd);
                  // Setting end points for node instance
                   aServ.updateVMInputEndpoint(clusterName, tmpRoleName, name, port);
                  // Restarting node instance
                 aServ.restartVM(clusterName, tmpRoleName);
          // Method to update the input endpoint details 
          public void updateVMInputEndpoint(String clusterName, String vmName, String name, int port)
            throws Exception {
                    VirtualMachineGetResponse resp = computeManagementClient.getVirtualMachinesOperations().
                                                            get(clusterName, clusterName, vmName);
                    VirtualMachineUpdateParameters updateParameters = new VirtualMachineUpdateParameters();
                    //get the configuration list
                    ArrayList<ConfigurationSet> configlist = resp.getConfigurationSets();
                    //get inputendpoint list and update it
                    ArrayList<InputEndpoint> endpointlist = configlist.get(0).getInputEndpoints();
                    InputEndpoint inputEndpoint = new InputEndpoint();
                    inputEndpoint.setEnableDirectServerReturn(false);
                    inputEndpoint.setPort(port);
                    inputEndpoint.setLocalPort(port);
                    inputEndpoint.setName(name);
                    inputEndpoint.setProtocol(InputEndpointTransportProtocol.TCP);
                    endpointlist.add(inputEndpoint);
                    // Open port for https on head node
                    if(vmName.equals("Head")) {
                            inputEndpoint = new InputEndpoint();
                            inputEndpoint.setEnableDirectServerReturn(false);
                            inputEndpoint.setPort(2400);
                            inputEndpoint.setLocalPort(2400);
                            inputEndpoint.setName("https");
                            inputEndpoint.setProtocol(InputEndpointTransportProtocol.TCP);
                            endpointlist.add(inputEndpoint);
                    updateParameters.setConfigurationSets(configlist);
                    //required for update
                    OSVirtualHardDisk osVirtualHardDisk = resp.getOSVirtualHardDisk();
                    updateParameters.setOSVirtualHardDisk(osVirtualHardDisk);
                    updateParameters.setRoleName(resp.getRoleName());
                    OperationResponse updtResp = computeManagementClient.getVirtualMachinesOperations().update(clusterName, clusterName, resp.getRoleName(), updateParameters);
    And every time i am creating a new cloud service along with head and node instances. Region is "South Central US".
    I am setting ProvisionGuestAgent field to true at instance creation time. Thank you.

  • "Official ArchLinux" way to override version with java-runtime-common

    Since the latest update to java-runtime-common it's no longer possible to override the default Java version using the JAVA_HOME environment variable. This means that to use a different version you have two options:
    * Change the default version each time you want a different version, thus forcing every Java app to use that other version
    * Edit the PATH such that the $JAVA_HOME/bin of the desired overriding Java environment is ahead of the wrapper, thus bypassing java-runtime-common altogether
    Is there some "official" way to run with the non-default version while still using the ARchLinux official tool?
    How should this be implemented in packages/AUR that require a specific version or versions of the JRE/JDK?
    Thanks!

    nomorewindows wrote:Sure, it's a command called archlinux-java
    I already know about that command, it's nothing to do with running java in a particular version as a once-off thing. It's used to set the default java version, and to retrieve a list of versions.
    To explain again, I need to have a default version set, but sometimes I want to run a different version. Previously I could just do something like this:
    env JAVA_HOME=/usr/lib/jvm/java-7-oracle INSERT_COMMAND_HERE
    Now that doesn't work anymore. How are we "officially" meant to be doing it now, as the only way I can see now is to just bypass the wrapper by inserting the new JAVA_HOME in the PATH before everything else.
    Last edited by Phreakazoid (2014-10-13 02:05:24)

  • How to create a report with data using the Crystal Reports for Java SDK

    Hi,
    How do I create a report with data that can be displayed via the Crystal Report for Java SDK and the Viewers API?
    I am writing my own report designer, and would like to use the Crystal Runtime Engine to display my report in DHTML, PDF, and Excel formats.  I can create my own report through the following code snippet:
    ReportClientDocument boReportClientDocument = new ReportClientDocument();
    boReportClientDocument.newDocument();
    However, I cannot find a way to add data elements to the report without specifying an RPT file.  Is this possible?  I seems like it is since the Eclipse Plug In allows you to specify your database parameters when creating an RPT file.
    is there a way to do this through these packages?
    com.crystaldecisions.sdk.occa.report.data
    com.crystaldecisions.sdk.occa.report.definition
    Am I forced to create a RPT file for the different table and column structures I have? 
    Thank you in advance for any insights.
    Ted Jenney

    Hi Rameez,
    After working through the example code some more, and doing some more research, I remain unable to populate a report with my own data and view the report in a browser.  I realize this is a long post, but there are multiple errors I am receiving, and these are the seemingly essential ones that I am hitting.
    Modeling the Sample code from Create_Report_From_Scratch.zip to add a database table, using the following code:
    <%@ page import="com.crystaldecisions.sdk.occa.report.application.*"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.data.*"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.document.*"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.definition.*"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.lib.*" %>
    <%@ page import = "com.crystaldecisions.report.web.viewer.*"%>
    <%
    try { 
                ReportClientDocument rcd = new ReportClientDocument();
                rcd.newDocument();
    // Setup the DB connection
                String database_dll = "Sqlsrv32.dll";
                String db = "qa_start_2012";
                String dsn = "SQL Server";
                String userName = "sa";
                String pwd = "sa";
                // Create the DB connection
                ConnectionInfo oConnectionInfo = new ConnectionInfo();
                PropertyBag oPropertyBag1 = oConnectionInfo.getAttributes();
                // Set new table logon properties
                PropertyBag oPropertyBag2 = new PropertyBag();
                oPropertyBag2.put("DSN", dsn);
                oPropertyBag2.put("Data Source", db);
                // Set the connection info objects members
                // 1. Pass the Logon Properties to the main PropertyBag
                // 2. Set the Server Description to the new **System DSN**
                oPropertyBag1.put(PropertyBagHelper.CONNINFO_CRQE_LOGONPROPERTIES, oPropertyBag2);
                oPropertyBag1.put(PropertyBagHelper.CONNINFO_CRQE_SERVERDESCRIPTION, dsn);
                oPropertyBag1.put("Database DLL", database_dll);
                oConnectionInfo.setAttributes(oPropertyBag1);
                oConnectionInfo.setUserName(userName);
                oConnectionInfo.setPassword(pwd);
                // The Kind of connectionInfos is CRQE (Crystal Reports Query Engine).
                oConnectionInfo.setKind(ConnectionInfoKind.CRQE);
    // Add a Database table
              String tableName = "Building";
                Table oTable = new Table();
                oTable.setName(tableName);
                oTable.setConnectionInfo(oConnectionInfo);
                rcd.getDatabaseController().addTable(oTable, null);
        catch(ReportSDKException RsdkEx) {
                out.println(RsdkEx);  
        catch (Exception ex) {
              out.println(ex);  
    %>
    Throws the exception
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: java.lang.NullPointerException---- Error code:-2147467259 Error code name:failed
    There was other sample code on SDN which suggested the following - adding the table after calling table.setDataFields() as in:
              String tableName = "Building";
                String fieldname = "Building_Name";
                Table oTable = new Table();
                oTable.setName(tableName);
                oTable.setAlias(tableName);
                oTable.setQualifiedName(tableName);
                oTable.setDescription(tableName) ;
                Fields fields = new Fields();
                DBField field = new DBField();
                field.setDescription(fieldname);
                field.setHeadingText(fieldname);
                field.setName(fieldname);
                field.setType(FieldValueType.stringField);
                field.setLength(40);
                fields.add(field);
                oTable.setDataFields(fields);
                oTable.setConnectionInfo(oConnectionInfo);
                rcd.getDatabaseController().addTable(oTable, null);
    This code succeeds, but it is not clear how to add that database field to a section.  If I attempt to call the following:
    FieldObject oFieldObject = new FieldObject();
                oFieldObject.setDataSourceName(field.getFormulaForm());
                oFieldObject.setFieldValueType(field.getType());
                // Now add it to the section
                oFieldObject.setLeft(3120);
                oFieldObject.setTop(120);
                oFieldObject.setWidth(1911);
                oFieldObject.setHeight(226);
                rcd.getReportDefController().getReportObjectController().add(oFieldObject, rcd.getReportDefController().getReportDefinition().getDetailArea().getSections().getSection(0), -1);
    Then I get an error (which is not unexpected)
    com.crystaldecisions.sdk.occa.report.lib.ReportDefControllerException: The field was not found.---- Error code:-2147213283 Error code name:invalidFieldObject
    How do I add one of the table.SetDataFields()  to my report to be displayed?
    Are there any other pointers or suggestions you may have?
    Thank you

  • Implementing SQL Server Reporting Services with a Java EE Application

    Hi All,
    I need to find some tutorial on
    "Implementing SQL Server Reporting Services with a Java EE Application"
    for my j2EE application.
    Until now i have searched a lot of sites but have not any thing related to this topic.
    I am using apache axis along with SQL Server Report Manager for creating the sql server reports.
    I have done upto :
    Creating the webservice with the help of report manager.
    Now i want to connect it through my j2EE application and want to retrieve some data from that web service.
    I have got stuck on the following BOLD lines in my code .
    code:
    public CatalogItem[] getData(String res, String searchStr) throws RemoteException     {
                  ReportingService2005Soap port = null;
                  ReportingService2005Locator loc = new ReportingService2005Locator();
                  // Retrieve a port from the service locator
                  try {
                       port = loc.getReportingService2005Soap(new java.net.URL(res));
                  } catch (MalformedURLException e) {
                       // TODO Auto-generated catch block
                       e.printStackTrace();
                  } catch (ServiceException e) {
                       // TODO Auto-generated catch block
                       e.printStackTrace();
                  org.apache.axis.client.Stub stub = (org.apache.axis.client.Stub) port;
                  stub.setUsername("localhost\\Administrator");
                  stub.setPassword("servWIN@2007");
                  // Retrieve a port from the service locator
                  SearchCondition condition = new SearchCondition();
                  condition.setCondition(ConditionEnum.Contains);
                  condition.setName("Name");
                  if (searchStr != null)
                  condition.setValue(searchStr);
                  else
                  condition.setValue("");
        //           Create an array of SearchConditions which will contain our single search condition
                  SearchCondition[] conditions;
                  conditions = new SearchCondition[1];
                  conditions[0] = condition;
        //           Call the Web service with the appropriate CatalogItem[] returnedItems;
                  CatalogItem[] returnedItems = null;
                  port.findItems("foldername",BooleanOperatorEnum.Or, conditions);
                  return returnedItems;
             }i.e. while executing the findItems() method i got the following exception :
    System.Web.Services.Protocols.SoapException: The item '/reportingservices' cannot be found. ---> Microsoft.ReportingServices.Diagnostics.Utilities.ItemNotFoundException: The item '/reportingservices' cannot be found.
    at Microsoft.ReportingServices.Library.RSService.FindItems(String folder, String operation, SearchCondition[] properties)
    at Microsoft.ReportingServices.WebServer.ReportingService2005Impl.FindItems(String Folder, BooleanOperatorEnum BooleanOperator, SearchCondition[] Conditions, CatalogItem[]& Items)
    Any any body has any idea please help me.
    I need it urgently.
    Regards.

    The above example is mentioned in msdn virtual lab that teaches how to connect to reporting services from a j2ee application.
    I have done the same thing .. but i am not able to render the report programmatically .. if anybody knows pls let me know the solution.

  • Problems with stacked bar chart in Java SDK and CRDesigner

    Hi @ll,
    I have an issue with the rendering of stacked bar charts through the Java SDK and the CRDesigner. unfortunately, my research in this forum and with the help of aunt google didn't lead to success.
    These are my problems:
    I have a  stacked bar chart which, when datasets/stacks increase in number per bar, displays errors:
    1.)  the single stacks of the bar merge together randomly and form bigger stacks with the sum of the singles. the information of  single stacks gets lost in the bar.
    2.)  the total sum of all singles is bigger than the maximum value on the y-axis displays. thus, the scaling is wrong.
    1.) appears in the CRDesigner as well as in the Java SDK
    2.) only occurs in the Java SDK
    Is there any trick to turn the random merging of slices off?
    Is the false scaling a known issue and is there a bugfix/workaround?
    many thanks for all advice
    Tom

    hi folks,
    i found the answer to the above problems:
    when you specify the recordfields that are responsible for the change to the next stack or bar, the 'stack' fields have to be unique.
    in my case i evaluated durations in msec (as stacks) from different devices (as bars). randomly i had the same durations for one device. what happens is, that CR does not notice a change and accumulates to the first stack with the same duration.
    surprisingly this also seems to derange the axis scaling. fix the problem by simply using an overall unique recordfield like rownum or a formula that forms the current timestamp to text as identifier for the stacking.
    cheers
    .t

  • Error With SCORM Content W Latest Version of Sun Java (1.6.0_10)

    We're getting an error with users running the more recent version of Sun Java 1.6.0_10, but not with previous versions. This happens for all our SCORM content.
    The Java logs are showing a lot of data, but the main symptoms seem to be:
    network: CrossDomainXML: connection to host <our LMS server address> denied
    LMS Error: 304 - Security exception
    and
    Error stack trace:
    oracle.apps.ota.lms.LMSException: java.security.AccessControlException: access denied (java.net.SocketPermission <our LMS server address> connect,resolve)
    and
    Returned: "false"
    *** LMSGetLastError() [Thu Oct 09 10:56:35 EDT 2008]
    Returned: "304"
    *** LMSGetErrorString("304") [Thu Oct 09 10:56:35 EDT 2008]
    Returned: "Security exception"
    Our crossdomain.xml fille is configured correctly, and also previous versions of JRE are not having the problem (the Java logs look clean).
    Does anyone have any thoughts?
    Thanks.

    Hi All
    Got a similar issue with the tracking / bookmarking of sessions - when on sun Java update 7 all is well however when update 10 or 11 is installed then SCROM session start on page 1 not the page you were on, also as expected they do not get marked as complete.
    Two things happen
    1) A small window is left for - [http://riti04.cornwall.nhs.uk:7780/ilearn/en/learner/jsp/relogin.jsp] - URL
    2) We get an Error on page - [http://riti04.cornwall.nhs.uk:7780/ilearn/en/learner/jsp/lms.jsp] - URL
    Looked for the Plugin section as per a pervious within the Java Control panel - but I'm not seeing it.
    We use iLearn 5.0 and I am begining to think we need a patch but unsure which.
    Thanks
    Stephen

Maybe you are looking for

  • Transferring content from Ipod Touch Generation 1 to Ipod Touch generation4

    I would like to transfer all my apps,songs and pictures and video content to my ipod touch generation 4. What is the best way to do this. Any help would be appreciated.

  • 10.9 (Mavericks) External Display Problem

    Recently I made the upgrade to OS X 10.9 and now I start to having problems with the resolution of my sceen. I have a LG Flatron E2250V and it work perfectly in OS X 10.8.3, the recomend resolution for this display is 1920x1084 but right now the syst

  • Archiving Error

    Hi All, I am facing a problem in archiving the PO by using the object MM_EKKO. After having done the regular process while checking the status in the spool System throws the error - Ariciving cannot be done - No entry for tolerance limits made in Cus

  • Why are things deleting from my calendar

    Everything keeps disappearing from my calendar. Not sure why

  • What is a "strictfp"???

    -- after reading this site: http://java.boot.by/scjp-tiger/ch01.html i found this: strictfp- it says that it's a kind of class modifier... -- what does it do? thanks!