Jump to content
  • In 'JasperReports Server Access Configuration' UI, the 'Workspace Folder' value is set incorrectly when a default workspace folder is generated


    aneace
    Assigned User chicuslavic
    CategoryBug report
    PriorityNormal
    ReproducibilityAlways
    ResolutionFixed
    SeverityMinor
    StatusResolved
    Versionv6.2.2

    In 'JasperReports Server Access Configuration' UI, the 'Workspace Folder' value is set incorrectly when a default workspace folder is generated. I've reproduced this reliably in Jaspersoft Studio 6.2.2 on Windows 7 and Windows 10.

     

    Steps to reproduce:

     

    From repository explorer, right-click Servers and select 'Create JasperReports Server Connection'. Create a new connection to a server that already has some established reports. Leave Workspace Folder under the Advanced Options UI blank.

     

    From Repository Explorer, expand the new server's directory structure and open Reports. Select the jrxml associated with any report and double-click it to open it. This action:

     

    1) triggers the creation of a new directory at C:\Users\%username%\JaspersoftWorkspace\MyReports\{ServerName}-1\ containing all files related to the report that was just opened. This part is OK.

     

    2) causes the Workspace Folder visible from the 'JasperReports Server Access Configuration' UI to be populated incorrectly. In my case, my servername is 'QA' so the eventual folder created is 'QA-1'. However, it should be '/MyReports/QA-1'.

     

    After closing/opening Jaspersoft Studio, this default behavior causes problems when trying to open any reports in this workspace folder because it is pointing to the wrong location. This behavior isn't present in the same session that creates the new folder. In any subsequent sessions, opening report jrxml from the server (as in the example above) results in the following exception:

     

    java.lang.IllegalArgumentException: Path must include project and resource name: /

    at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63)

    at org.eclipse.core.internal.resources.Workspace.newResource(Workspace.java:2069)

    at org.eclipse.core.internal.resources.Container.getFolder(Container.java:201)

    at com.jaspersoft.studio.server.model.server.MServerProfile.getTmpDir(MServerProfile.java:280)

    at com.jaspersoft.studio.server.export.AExporter.getTempFile(AExporter.java:101)

    at com.jaspersoft.studio.server.export.AExporter.exportToIFile(AExporter.java:58)

    at com.jaspersoft.studio.server.export.JrxmlExporter.exportToIFile(JrxmlExporter.java:51)

    at com.jaspersoft.studio.server.action.resource.OpenInEditorAction.dorun(OpenInEditorAction.java:149)

    at com.jaspersoft.studio.server.action.resource.OpenInEditorAction$1.runInWorkspace(OpenInEditorAction.java:111)

    at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39)

    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

     

    Workaround:

     

    I can work around this by clicking the '...' file browser button next to 'Workspace Folder' in the 'JasperReports Server Access Configuration' UI and simply selecting the directory manually after it has been created. This correctly sets it as '/MyReports/QA-1'.

     

    It would appear that the fix to this is to make sure that all of the relative path of directories following ..\JaspersoftWorkspace\ is included when this value is set by Jaspersoft Studio.


    Attachments:

    User Feedback

    Recommended Comments


×
×
  • Create New...