• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: folders inside a project
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: folders inside a project


  • Subject: Re: folders inside a project
  • From: Theodore Petrosky <email@hidden>
  • Date: Thu, 19 Mar 2015 10:52:38 -0400

when the .jasper file lives in a folder “Reports” this will work in development not in deployment

TPJRReportTaskFromEO reportTask = new TPJRReportTaskFromEO(aProject, "SingleProject.jasper", parameters);

So I changed it to:

TPJRReportTaskFromEO reportTask = new TPJRReportTaskFromEO(aProject, “Reports/SingleProject.jasper", parameters); generates an error:

Mar 19 09:47:43 ProjectManager[2008] ERROR er.extensions.appserver.ERXApplication  - Exception caught: org.apache.commons.lang.exception.NestableRuntimeException: org.apache.commons.lang.exception.NestableRuntimeException: Failed to generate report Reports/ProjectReportForAE.jasper

I took the time and followed how the string is passed around and it eventually ends up here:

String inputFileName = ERXFileUtilities.pathURLForResourceNamed(compiledReportName, frameworkName, null).getFile();

so we are passing Reports/SingleProject.jasper as a string and the above error is the result.

I guess I need to understand ERXFileUtilities.pathURLForResourceNamed

    /**
     * Determines the path URL of the specified Resource. This is done
     * to get a single entry point due to the deprecation of pathForResourceNamed.
     * In a later version this will call out to the resource managers new methods directly.
     * @param fileName name of the file
     * @param frameworkName name of the framework, <code>null</code> or "app"
     * for the application bundle
     * @param languages array of languages to get localized resource or <code>null</code>
     * @return the absolutePath method off of the file object
     */



On Mar 19, 2015, at 4:25 AM, Hugi Thordarson <email@hidden> wrote:

Resource management is a little more lenient during development and will look for named resources inside subfolders. This means that if something resource-related works in dev but breaks in production, it’s usually because you're referencing a resource by name only rather than the full resource path (ie. using “report.jrxml” instead of “Reports/report.jrxml”). Might want to check that out.

- hugi



On 18. mar. 2015, at 20:33, Chuck Hill <email@hidden> wrote:

Have you verified that the folder and its contents are getting copied to the server as you expect?


On 2015-03-18, 1:28 PM, "Theodore Petrosky" wrote:

I am trying to clean up my WO projects a little. I end up with so much in my Resources folder so I thought of putting other folders.

I am working on a project with jasper reports and I updated my version to 6.0.3 which is working great. They made some major changes in the app that one uses to create the .jrxml and .jasper files. It is eclipse based and I am still not really happy with how it demands that I keep things in folders. Maybe I am not seeing yet it is new.

I created a folder in my Resources called Reports. In development mode, everything works fine and my app can find the .jasper files. However, when I compile my app and move it to the server, my app can not see into this folder to find the report files.

Is there a property that controls if the app is looking into sub folders?

Ted
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: folders inside a project
      • From: Ramsey Gurley <email@hidden>
References: 
 >folders inside a project (From: Theodore Petrosky <email@hidden>)
 >Re: folders inside a project (From: Chuck Hill <email@hidden>)
 >Re: folders inside a project (From: Hugi Thordarson <email@hidden>)

  • Prev by Date: Re: folders inside a project
  • Next by Date: Re: folders inside a project
  • Previous by thread: Re: folders inside a project
  • Next by thread: Re: folders inside a project
  • Index(es):
    • Date
    • Thread