• 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: framework load order????
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: framework load order????


  • Subject: Re: framework load order????
  • From: Theodore Petrosky <email@hidden>
  • Date: Tue, 24 Feb 2015 06:19:17 -0500

OK, I created a BookingFrameworkPrincipal in com.eltek.frameworkprincipal

my requires list:

public final static Class REQUIRES[] = new Class[] {ERCoreBusinessLogic.class, ERXExtensions.class, ERDirectToWeb.class, ERJavaMail.class};

I added the principal to my build.properties:

classes.dir = bin
project.name=BookingFramework
project.name.lowercase=bookingframework
project.type=framework
principalClass = com.eltek.frameworkprincipal.BookingFrameworkPrincipal
customInfoPListContent =
eoAdaptorClassName =
cfBundleVersion =
cfBundleShortVersion =
cfBundleID = com.eltek
javaVersion = 1.5+
component.wellFormedTemplateRequired=false
component.inlineBindingPrefix=$
component.inlineBindingSuffix=
embed.Local=true
embed.System=true


I then added some log lines to:

    public void initialize() {
        // code during startup
    	System.out.println(" ");
    	System.out.println(" ");
    	System.out.println(" ");
    	System.out.println("BookingFrameworkPrincipal initialize");
    	System.out.println(" ");
    	System.out.println(" ");
    }

just so I could see if this thing actually is read. And joy. I see the log lines way up at the top of the console. But no joy :-(

I see from your example, you are actually doing quite a bit. What is the minimum I need here to get ERCoreBusinessLogic, I mean is see you are doing a lot to point to your framework.

I think I am almost there, just missing something (sounds normal to me)


Ted


On Feb 23, 2015, at 6:19 PM, Ramsey Gurley <email@hidden> wrote:

> In your framework principal class you reference ERCoreBL.class in your REQUIRES constant. That will ensure it is loaded before your framework can finish loading. See er.r2d2w.ERR2D2W for an example.
>
> You need to set up your framework principal correctly
> https://wiki.wocommunity.org/display/documentation/Creating+a+ERXFrameworkPrincipal+subclass?src=search
>
> And you need to define which migrations you want to run before yours in your Migration's modelDependencies() method. See ERCoreBL0 for an example.
>
>
> On Feb 23, 2015, at 4:09 PM, Theodore Petrosky <email@hidden> wrote:
>
>> How can I ensure that ERCoreBusinessLogic is loaded BEFORE my framework. I ordered the frameworks and put the ERCBL on top, ahead of my framework, but still no joy. I need to run some SQL against the ERCBL:
>>
>> ERXJDBCUtilities.executeUpdate(database.adaptorChannel(), "ALTER TABLE ERCAuditTrail DROP COLUMN is_deleted");
>> ERXJDBCUtilities.executeUpdate(database.adaptorChannel(), "ALTER TABLE ERCAuditTrail ADD COLUMN is_deleted boolean not null");
>>
>> I want to put this in a migration and run it AFTER ERCBL’s migrations are run.
>>
>> Or is there someplace else I can put this?
>>
>> Actually, is this something I should put into a pull request. if I don’t make this change, I will get:
>>
>> com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression failed: <com.webobjects.jdbcadaptor.PostgresqlExpression: "INSERT INTO ERCAuditTrail(GID, id, IS_DELETED) VALUES (?::varchar(255), ?::int4, ?::bool)" withBindings: 1:_EOIntegralKeyGlobalID[EventBook (java.lang.Integer)19](gid), 2:1(id), 3:false(isDeleted)>: Next exception:SQL State:42804 -- error code: 0 -- msg: ERROR: column "is_deleted" is of type integer but expression is of type boolean Hint: You will need to rewrite or cast the expression. Position: 84 Next exception:SQL Warning:00000 -- error code: 0 -- msg: parse <unnamed>: SHOW TRANSACTION ISOLATION LEVEL Next exception:SQL Warning:00000 -- error code: 0 -- msg: bind <unnamed> to <unnamed> Next exception:SQL Warning:00000 -- error code: 0 -- msg: execute <unnamed>:
>>
>> anyone else have this problem?
>>
>> 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


References: 
 >framework load order???? (From: Theodore Petrosky <email@hidden>)
 >Re: framework load order???? (From: Ramsey Gurley <email@hidden>)

  • Prev by Date: Re: framework load order????
  • Next by Date: Re: looong saveChanges in a background task
  • Previous by thread: Re: framework load order????
  • Next by thread: Re: framework load order????
  • Index(es):
    • Date
    • Thread