Same model with multiple databases and no EOs --a vendor "database"
I have a given database I want to integrate into some existing webobjects info systems. The database is not too normal, so some directions to proceede would be appreciated. Q1. Some tables have no primary key, so no EOs. But there is a method called rawRowsForSQL on the EOUtilities class. Is that the best option other than raw sql? All other tables have non-numeric primary keys , columns which really should be entity attributes and not primary keys. Wonder has er.extensions.eof.ERXEOAccessUtilities; any other things I should look at for raw row non-EO fun? raw SQL? Q2. There is what I would consider a location attribute, but instead of making it an attribute, it is used as a database name. So there is one model, but several databases, all similar except for the connection dictionary. The dictionaries only differ slightly: jdbc:postgresql://localhost:5432/locationA << (At least postgres is involved.) VS jdbc:postgresql://localhost:5432/locationB EnterpriseObjects.pdf discusses: How does an EOObjectStoreCoordinator determine which of its EOCooperatingObjectStores should service a particular fetch specification? Remember that within an EOModelGroup, entity names must be unique. Also remember that fetch specifications are entity-centric—every fetch specification is specified on the basis of a particular entity. So an object store coordinator simply looks for the list of entities registered within its cooperating object stores to match an entity name to particular cooperating object store. So I need to setup a EOObjectStoreCoordinator (OSC) for each different database, and change the connection dictionary so it has the correct jdbc url: jdbc:postgresql://localhost:5432/locationA << default with model jdbc:postgresql://localhost:5432/locationB jdbc:postgresql://localhost:5432/locationC On these OSCs, I can use EODatabaseContext.forceConnectionWithModel to set the correct connection dictionary, or EOUtilities.connectWithModelNamed, or some other method somebody (not me) knows of. Then I just use ECs from the correct OSC to do the raw row non-EO fun: EOObjectStoreCoordinator locationBObjectStore = new EOObjectStoreCoordinator(); EOEditingContext editingContextLocationB = new EOEditingContext(locationBObjectStore); Does this sound like the correct direction to deal with these databases? refs: Re: Different Database Connection per session for the same model site:lists.apple.com goat herding What could go wrong? Thanks, Greg Brown gsbr...@umich.edu ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: (ERX)WOForm creates a new Session
I think one of the Davids (LB) covered this in an exciting dramatic screen cast : http://wocommunity.org/webobjects_screencasts.html Look for WOLips and Wonder tutorial part 1 and or part 2. On Mar 12, 2013, at 1:33 PM, Roger Perryman wrote: > I am creating a Login page and I don't want it to create a new Session until > after the page is submitted. Loading the Login page creates a new session. > Initially, I had a few elements that had session references but I corrected > those. I am still getting a session created. I've traced it down to the > ERXWOForm tag (It does the same thing with WOForm). Removing the tag stops > the session from being created. I don't recall this behavior before. I'm > hoping it is a simple setting in the properties file. > > I am using WOnder 5.8.1. > > I have stripped it down to the simplest page I can get: > > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> > http://www.w3.org/1999/xhtml";> > > > Login > > > > > > > > > > loginForm: ERXWOForm > { > id = "loginForm"; > multipleSubmit = true; // I've tried both true and false > } > > I believe I have done all of the requisite steps: > > > In Application.java: > > public Application() > { > super(); > setDefaultRequestHandler( requestHandlerForKey( > directActionRequestHandlerKey() ) ); > } > > > In DirectAction.java: > > public WOActionResults defaultAction() > { > return pageWithName( Login.class ); > } > > In Session.java: (not required but helpful) > > public Session() > { > super(); > log.info( "Session Created: " + sessionID()); > } > > > ___ > Do not post admin requests to the list. They will be ignored. > Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/webobjects-dev/gsbrown%40umich.edu > > This email sent to gsbr...@umich.edu Greg Brown gsbr...@umich.edu ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Frontbase metadata with DBUnit not working--NOW WORKING
Before I forget to mention it, I did get FrontBase (FB) and DBUnit working. The problem seems to be that FB versions after 5.2 seem to behave differently. DBUnit checks tables in the FB schema, but only with the newer versions it gets an error: org.dbunit.dataset.NoSuchTableException: Did not find table 'INFORMATION_SCHEMA_CATALOG_NAME' in schema 'null' when writing out the metadata via FlatDtdDataSet.write(…). Now the 'INFORMATION_SCHEMA_CATALOG_NAME' is in the INFORMATION_SCHEMA, along with: INFORMATION_SCHEMA_CATALOG_NAME*, EOMODELER_RELATIONS*, BLACK_AND_WHITE_LIST*, TABLE_STATISTICS_HISTORY*, So don't use that schema, and you will have one less problem. DBUnit has a new method JdbcDatabaseTester which takes the schema name to use, so by using only the _SYSTEM schema, it does not reference all the junk in the INFORMATION_SCHEMA, and consequently does not get the above error, and is able to write out the dtd as well as the actual xml data set (which always did work). Also, with mixed case table names, I must now set a "Feature" like: dtdConnection.getConfig().setFeature("http://www.dbunit.org/features/caseSensitiveTableNames";, true) ; On Feb 8, 2013, at 6:50 PM, Chuck Hill wrote: > > On 2013-02-08, at 3:34 AM, Greg Brown wrote: > >> Hello, >> >> Does anybody use Frontbase with DBUnit? I have recently upgraded a project >> and the newer versions of Frontbase are causing some problems with dbunit. > > Yes, but not with FB 5 yet. > > >> I have changed some testing code and everything works (ah…so far..) except >> writing out the database schema with dbunit, something like: >> >> FlatDtdDataSet.write(dout, new FileOutputStream(dtdname)); >> >> which causes an exception because it can't find or validate the metadata: >> >> org.dbunit.dataset.NoSuchTableException: Did not find table >> 'INFORMATION_SCHEMA_CATALOG_NAME' in schema 'null' >> at >> org.dbunit.database.DatabaseTableMetaData.(DatabaseTableMetaData.java:146) >> at >> org.dbunit.database.DatabaseDataSet.getTableMetaData(DatabaseDataSet.java:293) >> at org.dbunit.dataset.xml.FlatDtdWriter.write(FlatDtdWriter.java:94) >> at org.dbunit.dataset.xml.FlatDtdDataSet.write(FlatDtdDataSet.java:111) >> at org.dbunit.dataset.xml.FlatDtdDataSet.write(FlatDtdDataSet.java:99) >> >> I had similar problems with table names, it seems a case issue with metadata >> and setting a dbunit property: >> >> >> connection.getConfig().setFeature("http://www.dbunit.org/features/caseSensitiveTableNames";, >> true) ; > > Do you set useQualifiedTableNames to false? I needed to do that, but don't > recall why at the moment. > > >> fixed that. It seems that the case-insensitive default just up-cases all >> names, then it looks for the up-cased table name. It does not seem case >> insensitive to me, as the case-insensitive default can not find tables with >> mixed case, like "WoodenTable" > > I recall hitting that bug in dbUnit. > > >> Frontbase seems to change a little with each version; I noted awhile back >> that WOlips could not reverse engineer the latest version of a Frontbase db, >> previous versions could be reverse engineered. Again, probably a metadata >> issue. > > Perhaps a missed update to the FBPlugin? > > > Chuck > > > -- > Chuck Hill Senior Consultant / VP Development > > Practical WebObjects - for developers who want to increase their overall > knowledge of WebObjects or who are trying to solve specific problems. > http://www.global-village.net/gvc/practical_webobjects > > Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing > Companies in B.C! > Global Village Consulting ranks 76th in 24th annual PROFIT 200 ranking of > Canada’s Fastest-Growing Companies by PROFIT Magazine! > > > > > > > > Greg Brown gsbr...@umich.edu ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Frontbase metadata with DBUnit not working
Hello, Does anybody use Frontbase with DBUnit? I have recently upgraded a project and the newer versions of Frontbase are causing some problems with dbunit. I have changed some testing code and everything works (ah…so far..) except writing out the database schema with dbunit, something like: FlatDtdDataSet.write(dout, new FileOutputStream(dtdname)); which causes an exception because it can't find or validate the metadata: org.dbunit.dataset.NoSuchTableException: Did not find table 'INFORMATION_SCHEMA_CATALOG_NAME' in schema 'null' at org.dbunit.database.DatabaseTableMetaData.(DatabaseTableMetaData.java:146) at org.dbunit.database.DatabaseDataSet.getTableMetaData(DatabaseDataSet.java:293) at org.dbunit.dataset.xml.FlatDtdWriter.write(FlatDtdWriter.java:94) at org.dbunit.dataset.xml.FlatDtdDataSet.write(FlatDtdDataSet.java:111) at org.dbunit.dataset.xml.FlatDtdDataSet.write(FlatDtdDataSet.java:99) I had similar problems with table names, it seems a case issue with metadata and setting a dbunit property: connection.getConfig().setFeature("http://www.dbunit.org/features/caseSensitiveTableNames";, true) ; fixed that. It seems that the case-insensitive default just up-cases all names, then it looks for the up-cased table name. It does not seem case insensitive to me, as the case-insensitive default can not find tables with mixed case, like "WoodenTable" Frontbase seems to change a little with each version; I noted awhile back that WOlips could not reverse engineer the latest version of a Frontbase db, previous versions could be reverse engineered. Again, probably a metadata issue. Greg Brown gsbr...@umich.edu ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Maven: archetypes, infrastructure, and documentation
On Jan 20, 2012, at 6:39 PM, Lachlan Deck wrote: > I've been away over the Christmas break, but it appears no one's replied, > so... > > Henrique and I worked on those archetypes a few years ago. I've not been > doing any WebObjects development for a couple of years now; hence I've not > had the need nor the opportunity to update them. > > But please feel free to attempt to improve them, via github. Yes, the maven stuff needs a little love and attention. This makes me wonder if there can be a streamlining of maven. Right now it is designed to be a totally separate system from the wolips system. Of course, that means a whole separate system to maintain, document, test, etc. Maybe maven can be streamlined to require less maintenance work? The archetypes for project creation do need some updating. But--do we need maven archetypes? What am I thinking? One way to use maven would be to use the regular FluffyBunny (FB) projects creation, then have a wolips | goodie | option | choice that would take a FB project and write a POM.xml. This option could be extended to even clone the FB project, and put it in a src/main folder structure instead of the FB folder structure, and make it a maven nature project in eclipse, if it really mattered or was necessary. Development/debugging would then take place with the same standard eclipse/wolips setup, which has many useful debugging tools, debugging screens, some of which don't work with maven-natured eclipse projects. All the wiki documentation would not need anything special for maven, as everybody would be developing/debugging with the standard wolips. However, if somebody wanted to turn in a project, and not require downloading Wonder, and all the directory setup, Wonder installation, etc.--then they could just generate a pom.xml and turn in their project. I think the best thing about maven is that all one needs to build one's project is a pom.xml (+maven). It doesn't require Eclipse, downloading Wonder, or any of that complication. I suspect that most developers also build the production version, test, and do everything themselves, so they already have eclipse, Wonder, etc. But maven is nice because one just needs to "mvn clean deploy", and that works on Windows, linux, MacOS: there is no downloading eclipse on windows/linux/Mac, compiling Wonder with all the right wobuild.propeties, etc. A chimpanzee could probably build a production woa; I am not sure about a monkey. I also like that the correct version of a jar is specified, no ambiguous questions like: What version was that? or where did those jars go? I don't know if the development part of a maven project in eclipse is what people (4 or 5 people?) like; development seems to work better using standard wolips.The portable almost-now-standard maven build process is useful. The repository / library system is wonderful too; as one can find about any jar, any version, and use it. And, with the nexus maven repository, one will have a copy of all the artifacts/jars needed to build one's projects, until the disk and backups fail. Maybe a more streamlined approach, which piggybacks on all the wolips stuff would be a useful future direction. It would be more efficient, require less upkeep. Any thoughts about this? ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Question: Where/what fails with webobjects 5.4.3 on older system?
Inquiring minds want to know. Assuming one builds a wo 5.4.3 app, with all needed jars bundled in the app, what would happen if trying to run that bundle of joy on an older jdk 1.5 system like Tiger? What fails? the adapter interface? Java is java so in one sense it should work, but there are other parts: adapter, apache 1.3, wotaskd, etc. which may have changed slightly between wo 5.3.3 and 5.4.3 Or does it work? Thanks, Inquiring minds want to know. ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Best way to access MS SQL Server 2005?
Hi, I have to get info from a MS SQL Server 2005 database, read only, and paste it in an existing application. What's the best way to access this? I hear of Chuck Hill's plugin, but can't find it anywhereor ERXMicrosoftPlugIn, where is that? Did that drop out of Wonder? Thanks! ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Best way to access MS SQL Server 2005?
Hi, I have to get info from a MS SQL Server 2005 database, read only, and paste it in an existing application. What's the best way to access this? I hear of Chuck Hill's plugin, but can't find it anywhereor ERXMicrosoftPlugIn, where is that? Did that drop out of Wonder? Thanks! ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
D2W: Does it work with one sided relationships ?
ues t(WOComponentRequestHandler.java:432) at com.webobjects.appserver.WOApplication.dispatchRequest (WOApplication.java:1306) at er.extensions.appserver.ERXApplication.dispatchRequestImmediately (ERXApplication.java:1772) at er.extensions.appserver.ERXApplication.dispatchRequest (ERXApplication.java:1737) at com.webobjects.appserver._private.WOWorkerThread.runOnce (WOWorkerThread.java:173) at com.webobjects.appserver._private.WOWorkerThread.run (WOWorkerThread.java:254) at java.lang.Thread.run(Thread.java:613) So I am wondering if D2W + Wonder expects 2-way relationships everywhere. I set er.extensions.erxStats.enabled = false , but it still implodes. Is there a rule to keep implosions at bay? Is it a better option maybe to just expose the foreign and primary keys as entity properties and manually manage relationships ? Greg Brown gsbr...@umich.edu ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Wonder and Can't get path when run as jar:
Hi, Is it just a fact of life that wonder in a jar: WARN er.extensions.foundation.ERXFileUtilities - Can't get path when run as jar: ERJavaMail - Properties Are there any properties which should be used? or I assume the defaults are ok. Greg Brown gsbr...@umich.edu ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Proper Wonder/App Initialization for testing
Hi, I converted an app to use Wonder, and I think my tests need do do something new so that all the Wonder stuff initializes properly. This page: http://wiki.objectstyle.org/confluence/display/WONDER/Integrate+Wonder +Into+an+Existing+Application has nothing about tests ;>o Unit type tests seem to run fine without initializing the wonder frameworks, but database type (dbuinit) tests probably need the wonder stuff to be properly initialized. ERXExtensions has a bunch of initApp, initEOF, initialize methods, which one is generally best for testNG / dbuinit initializations? Or do I need something like an initApp followed by a initEOF? How do people handle this? a @BeforeSuite annotation to a method which calls some er.extensions.ERXExtensions.initFoo()? Thanks, gb ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: D2W: How to turn on relationship editing? SOLVED!
On Sep 7, 2009, at 8:51 PM, David LeBer wrote: I find it helpful to create a model group for my projects in RuleModeler (File -> New Model Group) that I add references to all of the model files that my project depends on. Something like: MyApp: user.d2wmodel MyFramework: d2w.d2wmodel MyLook: d2w.d2wmodel ERDirectToWeb: d2w.d2wmodel JavaDirectToWeb: d2w.d2wmodel This makes it easier to trace all of the rules that may apply. For your particular problem, try adding rules like the following: 90 (task = 'edit' and smartRelationship != null and not (smartRelationship.isToMany = 1)) => componentName = "ERD2WEditToOneRelationship" [Assignment] 90 (task = 'edit' and smartRelationship.isToMany = 1) => componentName = "ERD2WEditToManyFault" [Assignment] If I remember correctly the default Wonder rules seem to miss these. Those rules did the trick! Thanks all! If I recall correctly, didn't the D2W from Apple have things (attributes and relationships) ready to edit? Wonder by default only allows inspecting a few things. Should the default rules that ship with the Wonder D2W frameworks have the rules to allow editing, right out of the box, so to speak? I would say yes, one should be able to edit the DB. What do others think? Greg Brown gsbr...@umich.edu ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
WebObjects apps in war; maven; where is ERXServletAdaptor; etc.
Hi, For more fun and joy, I am trying to package and -- this is the important part-- run a WebObjects Wonder app in a tomcat or jetty container. I think I am getting tripped up by the Wonder initialization in a servlet environment. (WO 5.3) The auto-generated web.xml file has: WOServletAdaptor er.extensions.jspservlet.ERXServletAdaptor 5 Hmm Wonder has no er.extensions.jspservlet.ERXServletAdaptor.java, and neither does the http://maven.wocommunity.org/content/groups/ public & snapshot repository of goodies. Q 1. Should http://maven.wocommunity.org/content/groups/public have this jar, or am I missing where it is? I did a svn checkout, and a maven build and I found a jar with ERXServletAdaptor. Next question: Q 2. Should I use that jar? In http://wiki.objectstyle.org/confluence/display/WONDER/Creating+a +wonder+app+to+deploy+as+a+servlet I read that "Henrique created a class called ERXServletAdaptor and it is submitted as a pending project wonder patch as we speak (or as I type, as the case may be). I could not get the code in that patch to run as is, so I have changed it just a bit. Here is my version of the class that works for me. Something very similar to this may soon be bundled with project wonder [ or not--"As I told Henrique in his bug report: I'm not going to include this into ERX..." ] , but for now, you can just toss this class into your project's Sources folder:" (yeah, after you figure out javax.servlet api has to be found and added as a dependancy. ) Is that the version I should use? Is that different than the jar I got with a Wonder svn download and build? Which one? Q 3. Info.plist Doctype? Do I have to remove that? Here it says to: http://wiki.objectstyle.org/confluence/display/WO/Web+Applications- Deployment-Tomcat+Deployment Q 4. Perhaps it is WO 5.3.3? They have the WOServletAdaptor in two jars JavaWOJSPServlet and a JavaWOJSPServlet_client ; which one? both? or is it the classpath order? Oh, the excitement! This is the error I always get: javax.servlet.UnavailableException: Error initializing ERXServletAdaptor: ${mainclass} t . i. a Greg ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: WOHyperlink is different with pageName vs directAction bindings?
This is with 5.3.3. Below are the generated htmls for the link, first with a woa/wa DA binding: TextlinkSee Results now Above looks ok, below is the html generated with a pageName binding: TextlinkSee Results now It seems W..W..WebObjects st...st...stutters: it generates &person= instead of &person= I guess its radar file time... On Jul 14, 2009, at 6:27 PM, Chuck Hill wrote: Which version of WO? That is just a bug, file a Radar. Chuck On Jul 14, 2009, at 2:26 PM, Greg Brown wrote: Hi all, I noticed that a WOHyperlink evaluates as different links depending upon how it is bound; if a pageName parameter is given, then an accompanying bound queryDictionary adds characters to the link like: blahurl/?name=thename&city=Leuven Whereas if a directAction parameter is bound, then one gets urls like: blahurl/?name=thename&city=Leuven So in one case, you get: name=thename amp;city=Leuven And with DirectActions: name=thename city=Leuven What do people do with this difference? Does Wonder have a dictionary filter to get rid of the prepended 'amp;' ? or a method to use a "amp;city" key as equal to a "city" key for a fetching the values? WebObjects, what an elaborate mechanism for passing strings around! ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/chill% 40global-village.net This email sent to ch...@global-village.net -- Chuck Hill Senior Consultant / VP Development Learn WO at WOWODC'09 East in Montréal this August! http://www.wocommunity.org/wowodc09/east http://arstechnica.com/apple/news/2009/07/webobjects-sliced- from-106but-prognosis-of-death-premature.ars Greg Brown gsbr...@umich.edu ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
WOHyperlink is different with pageName vs directAction bindings?
Hi all, I noticed that a WOHyperlink evaluates as different links depending upon how it is bound; if a pageName parameter is given, then an accompanying bound queryDictionary adds characters to the link like: blahurl/?name=thename&city=Leuven Whereas if a directAction parameter is bound, then one gets urls like: blahurl/?name=thename&city=Leuven So in one case, you get: name=thename amp;city=Leuven And with DirectActions: name=thename city=Leuven What do people do with this difference? Does Wonder have a dictionary filter to get rid of the prepended 'amp;' ? or a method to use a "amp;city" key as equal to a "city" key for a fetching the values? WebObjects, what an elaborate mechanism for passing strings around! ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Graceful shutdown of WO apps + monitor + wotaskd
On May 5, 2009, at 10:32 AM, Kieran Kelleher wrote: Depends on how wotaskd and womonitor are configured to run. Assuming you are using Leopard, and using launchd jobs, you can restart them by telling launchctl to stop the job ... and they should automatically restart for example sudo launchctl stop com.webobjects.wotaskd sudo launchctl stop com.webobjects.womonitor (assuming "com.webobjects.wotaskd" is the name of the launchd task) Yes, same for tiger; however, for me, this is a "restart" not a shutdown usually killing wotaskd results in the managed instances getting killed too IIRC. you can also kill an instance by getting its pid and using kill. But then it may just get restarted, depending on the config of the instance ... To get a pid of an instance, you get its port number in womonitor and do sudo lsof -i tcp: if your apps are actually misbehaving, refusing connections, and basically hung or deadlocked, then it is useful to jstack them before killing them to see what is wrong: sudo jstack HTH, Kieran Useful jstack is. I found that for tiger & leopard: sudo launchctl unload -w /System/Library/LaunchDaemons/ com.apple.womonitor.plist sudo launchctl unload -w /System/Library/LaunchDaemons/ com.apple.wotaskd.plist This kill them and they stay dead, otherwise they keep restarting. This writes a Disabled into the System/Library/LaunchDaemons/com.apple.womonitor.plist file. To start just: sudo launchctl load -w /System/Library/LaunchDaemons/ com.apple.womonitor.plist sudo launchctl load -w /System/Library/LaunchDaemons/ com.apple.wotaskd.plist This changes the Disabled key to a false value, and writes (-w) it into the file: System/Library/LaunchDaemons/com.apple.womonitor.plist so now they keep on running. I use this in a script which periodically runs. It has a list of things to do like: stop a bunch of processes sudo launchctl unload -w /System/Library/LaunchDaemons/ com.apple.womonitor.plist sudo launchctl unload -w /System/Library/LaunchDaemons/ com.apple.wotaskd.plist check for software updates check the disks email a report of all the above and general server condition pause a few hours so I can do some maintenance if necessary restart needed services reboot and come up fully functional A few minutes after reboot, a status report is emailed just to check that everything is working. On May 5, 2009, at 10:24 AM, Greg Brown wrote: Hi, There isn't much I could find about programatically shutting down the webobjects system, so I assume something like a SIGTERM signal would, if sent to all three, terminate all webobjects programs on unix. Is there a nicer way? I assume a reboot does pretty much the same thing. Thanks! Greg ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/kieran_lists% 40mac.com This email sent to kieran_li...@mac.com Greg Brown gsbr...@umich.edu ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Graceful shutdown of WO apps + monitor + wotaskd
Hi, There isn't much I could find about programatically shutting down the webobjects system, so I assume something like a SIGTERM signal would, if sent to all three, terminate all webobjects programs on unix. Is there a nicer way? I assume a reboot does pretty much the same thing. Thanks! Greg ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: WO development on Windows with Eclipse/WOLips
All, WebObjects is definitely an awesome tool. I can say that as for the past four years I have been using WO, my WO efforts and the results the apps generate have caught the attention of a much larger company under whom I am now employed. My question centers around the fact I am required to embrace a government standard of Windows + SQL Server for the WO applications for both deployment and development. Deployment comes later, and with the recent activity on the list I believe I will be ok using Tomcat. Ick! is my first thought. You will probably want my SQL Server plugin: http://www.gvcsitemaker.com/chill/ms_sql_server_eof_plugin You will probably spend some time working around SQL Server features / limitations. Chuck, Does that plugin work with wonder / WO 5.3.3 ? Its problem is only that it doesn't build under WO 5.3.3, correct? Thanks! ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: maven.
Anyway. I'm TRYING not to hate, but I am just not feeling it. ms I liked the Maven: The Definitive Guide It 'should' be easier, it should be talking to the 'archetype' instead of the 'wizard' to create projects, and that is all; but, that is currently broken as the archetypes needs to be updated to work with equal functionality to the 'wizards', the workarounds in the wiki are a pain. They may be fixed soon? :>) Dependancies : in eclipse with m2eclipse you can Navigate > Open Maven Pom> then enter some jar name and it brings up related jars or whatevers. I wish here one could just drag the desired artifact into the project's pom's dependency window, but one must copy and paste info from the found pom into the project pom. Next m2eclipse? :>) The Entity Modeler seems to have problems with the NSJarBundle Frameworks; so one must put the directory frameworks: ERPrototypes ERExtension someDBPlugin on the path in front of the NSJarBundle Frameworks that Maven uses to get functionality like SQL generation etc. to work. Maybe that will be fixed soon? :>) ( Would this disrupt EXRMigrations? ) All in all, basic Wolips project creation, etc. works but only with workarounds as things are 80% functional. That it is so close to working, is kind of frustrating. Maybe this year it will be just as easy to use as ant. One nice thing I do like is how dependencies are pulled into the local repository. It quickly builds up to be a storehouse of jars etc that you need to build your projects, and its got lots of meta info about those jars. In fact, if I need an external jar I look in ~/.m2/ repository/ ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
unit tests and woapplication bundles, resources, etc.
Hi, I am having trouble with my testing of my woapp. I have parameters that are in the Properties file, the woapp accesses them through System.getProperty("importLogFilename"); BUT, when running with the testng environment in eclipse, all the strings from calls like System.getProperty("importLogFilename") come up null. I am guessing it can't find/use the Properties file. 1. For bundle loading to work properly, you need to use a custom Working Directory for the JUnit/TestNG launcher: ${workspace_loc:MyFW/dist/MyFW.framework/Resources/Java} Apps are similar but a different path. ${workspace_loc:nucptdb/build/nucptdb.woa/Contents/Resources/Java} 2. Again, for bundle loading, add the jars from the built framework / application (can be in the projects in the Eclipse workspace) to the User Entries of the classpath and move above whatever is there. Do the same for all the frameworks that it references. 3. The usual connection dictionary setting classes to set things up and switch prototypes etc. 4. Sometimes I need to call primeApplication, IIRC for component tests: WOApplication.primeApplication("MyFW", null, "net.foo.bar.appserver.FWApplication"); Same result if I call WOApplication.primeApplication or not. Where FWApplication is a subclass of WOApplication. You can also leave the last param blank and it will use WOApplication - sometimes that works for simple stuff. Chuck Not a BUNDLEof joy. Greg Brown [EMAIL PROTECTED] ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: How to build Wonder for WebObjects 5.3 ?
Greetings, The latest Wonder source seems to be only for WebObjects 5.4.1; is there anything for Tiger (10.4x) users at 5.3.3? The page: http://wiki.objectstyle.org/confluence/display/WONDER/Download+Wonder +Source%2C+Build+and+Install refers to Build.txt, which states: Building Instructions = You can build Project Wonder with Ant, Maven and Eclipse. But that is only for Leopard/WO 5.4.1 I think, somebody correct me. Anything else makes lots of errors. The only way for me to use Wonder with WO 5.3.3 is the pre-compiled frameworks. Hmmm.. How does Mike S. make those? Ok, I found the icu4j.jar, and installed it, but I got a more errors, all related to NSMutableArray: (classpath ordering?) /Wonder/Common/Frameworks/ERExtensions/Sources/com/webobjects/ foundation/NSArray.java:[877,29] type com.webobjects.foundation.NSMutableArray does not take parameters But I think there is no other way for WO 5.3.3 users BUT the pre- compiled frameworks. It is difficult to support multiple versions of WebObjects, maybe Maven can help! Somebody correct me if I am wrong, now I will give up on Wonder from source, and download the pre-compiled frameworks, Thanks! Greg ps. Is changing the pom.xml to: 5.3.3 correct? is that enough for Maven? Just guessing here... On Apr 3, 2008, at 10:22 PM, Henrique Prange wrote: Hi Greg, Greg Brown wrote: I was thinking that Wonder, with all the hard work that has been contributed in the last few years, has advanced so far that I should be using it! I was also looking at maven. It may be promising as well. The latest Wonder source has in its pom.xml: 5.4.1 So I assume that it is set to build Wonder for version 5.4.1. I am on 5.3.3, so I edited pom.xml so it said: ... 5.3.3 ... and tried a mvn install. I got a tired brain and errors: Downloading: http://repo1.maven.org/maven2/icu4j/icu4j/2.8/ icu4j-2.8.pom Downloading: http://webobjects.mdimension.com/maven2/releases/ icu4j/icu4j/2.8/icu4j-2.8.jar Downloading: http://repo1.maven.org/ maven2/icu4j/icu4j/2.8/icu4j-2.8.jar [INFO] - --- [ERROR] BUILD ERROR [INFO] - --- [INFO] Failed to resolve artifact. Missing: -- 1) icu4j:icu4j:jar:2.8 Try downloading the file manually from the project website. I think it is looking for the icu4j.jar. Where is it? It can't find it. Is that a bug? No. This is not a bug. Some dependencies was not deployed to the Maven central repository. You have to install them by hand. See [1] for instructions. Anyway, the POMs of Wonder project are a little bit outdated. I'm fixing it and I will send a patch to the Wonder soon. [1]http://maven.apache.org/guides/mini/guide-installing-3rd-party- jars.html Cheers, Henrique I also think the Wonder source is set to build the 5.4.1 versions for eclipse or ant. What's the difference from the one that works with WebObjects 5.3.3? Thanks! ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/hprange% 40gmail.com This email sent to [EMAIL PROTECTED] Greg Brown [EMAIL PROTECTED] ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
How to build Wonder for WebObjects 5.3 ?
I was thinking that Wonder, with all the hard work that has been contributed in the last few years, has advanced so far that I should be using it! I was also looking at maven. It may be promising as well. The latest Wonder source has in its pom.xml: 5.4.1 So I assume that it is set to build Wonder for version 5.4.1. I am on 5.3.3, so I edited pom.xml so it said: ... 5.3.3 ... and tried a mvn install. I got a tired brain and errors: Downloading: http://repo1.maven.org/maven2/icu4j/icu4j/2.8/icu4j-2.8.pom Downloading: http://webobjects.mdimension.com/maven2/releases/icu4j/ icu4j/2.8/icu4j-2.8.jar Downloading: http://repo1.maven.org/maven2/icu4j/icu4j/2.8/icu4j-2.8.jar [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to resolve artifact. Missing: -- 1) icu4j:icu4j:jar:2.8 Try downloading the file manually from the project website. I think it is looking for the icu4j.jar. Where is it? It can't find it. Is that a bug? I also think the Wonder source is set to build the 5.4.1 versions for eclipse or ant. What's the difference from the one that works with WebObjects 5.3.3? Thanks! ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: https and Deployment: Reality deviates from Documentation?
On Apr 2, 2007, at 1:08 PM, Chuck Hill wrote: On Apr 2, 2007, at 6:50 AM, Greg Brown wrote: I am running ( trying) Myapp.woa with apache 1.3, Mac OSX 10.4.8 and the documentation doesn't appear to be right! or I misunderstand, so for the record: Documents say: However, most web applications contain web server resources, such as images. You should place these resources in the web server’s Document Root directory. You accomplish that by performing a split installation. If I use https to access Myapp.woa, then it seems a split install is necessary. Is that manditory? a split install? if so maybe it should say: "You MUST What are you seeing that makes you think that? Here is a snippet from apache access log: 172.214.237.168 - - [02/Apr/2007:14:25:07 -0400] "GET /cgi-bin/ WebObjects/Test HTTP/1.1" 200 2804 172.214.237.168 - - [02/Apr/2007:14:25:07 -0400] "GET /WebObjects/ Frameworks/JavaDirectToWeb.framework/WebServerResources/ Background.gif HTTP/1.1" 200 257 172.214.237.168 - - [02/Apr/2007:14:25:07 -0400] "GET /WebObjects/ nucptdb.woa/Contents/WebServerResources/vasealwhite.jpg HTTP/1.1" 404 3752 172.214.237.168 - - [02/Apr/2007:14:25:07 -0400] "GET /WebObjects/ Frameworks/JavaDirectToWeb.framework/WebServerResources/ LoginMetalBtn.gif HTTP/1.1" 200 1721 As you can see, I used "Test" in the Monitor Application pane, to refer to a nucptdb.woa application. The 3rd line above refers to a nucptdb.woa/Contents/WebServerResources/vasealwhite.jpg, which does exist in the application bundle, nucptdb.woa, but not in the WebServer Document root. Now in the apache error.log: [Mon Apr 2 14:25:07 2007] [error] [client 172.214.237.168] File does not exist: /Library/WebServer/Documents/WebObjects/nucptdb.woa/ Contents/WebServerResources/vasealwhite.jpg And no jpg vended. To me it seems like apache is looking in the Document root, and I can make things work by putting that jpg in the root. place these resources in the web server’s Document Root directory. A second misunderstanding/documentaion question: It says (on the Application tab) that when configuring an application one could use any name they wanted for the application's name in the Monitor program, e.g., for Myapp.woa I could call it application Test, then give the path to Myapp.woa/ Myapp. Well of course that doesn't appear to work with https! With https the Test app will look for resources in Test.woa, which does not exist. The only way I could get this to work was ignore the documentation and have the Monitor application name match exactly the Myapp.woa name. Are these realities localized to just my machine? or should the documentation be changed? You have done / are doing something wrong or not doing something that needs to be done. Or something... :-) We use https and names in monitor that differ from the app name file system all the time with no problems at all. What exactly are you doing / trying to do and what are you seeing? Are you perhaps running in Direct Connect mode (URL like http://some.domain.com:3456/...). Direct Connect (besides being evil and a toy) does not support HTTPS. Chuck -- I can make things work by putting /WebObjects/nucptdb.woa/Contents/ WebServerResources/vasealwhite.jpg in apache's document root, but that seems like a split install. I used WOlips, and don't have the parameter - wsDestDir (Destination directory where WebServerResorces should be copied during split install (presense of this parameter will trigger split install). WebServerResources will be created under [wsDestDir]/ WebObjects/AppName.woa/Contents/.) set up. On Monitor's Site pane, I have the URL to the WebObjects HTTP adaptor as https:// and most applications probably have http:// Could that be a problem? Thanks for looking, Greg Brown [EMAIL PROTECTED] ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to archive@mail-archive.com
https and Deployment: Reality deviates from Documentation?
I am running ( trying) Myapp.woa with apache 1.3, Mac OSX 10.4.8 and the documentation doesn't appear to be right! or I misunderstand, so for the record: Documents say: However, most web applications contain web server resources, such as images. You should place these resources in the web server’s Document Root directory. You accomplish that by performing a split installation. If I use https to access Myapp.woa, then it seems a split install is necessary. Is that manditory? a split install? if so maybe it should say: "You MUST place these resources in the web server’s Document Root directory. A second misunderstanding/documentaion question: It says (on the Application tab) that when configuring an application one could use any name they wanted for the application's name in the Monitor program, e.g., for Myapp.woa I could call it application Test, then give the path to Myapp.woa/Myapp. Well of course that doesn't appear to work with https! With https the Test app will look for resources in Test.woa, which does not exist. The only way I could get this to work was ignore the documentation and have the Monitor application name match exactly the Myapp.woa name. Are these realities localized to just my machine? or should the documentation be changed? Thanks for your insights. Greg Brown [EMAIL PROTECTED] ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to archive@mail-archive.com
Database testing and EOF; junit testrunner environment;
I am trying to set up DBUnit test AND test EO stuff also.It seems the testrunner environment is very different than the normal environment that EOF operates under; I can't use EOF to do fetches. If I try, java.lang.IllegalArgumentException: An object store for the entity "Patient" could not be found. Verify that the entity is defined in an EOModel, and that the model is installed properly. To see what models are loaded, you can try printing the return value of EOModelGroup.defaultGroup() in your application. at com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsWithFetchSpecification(EOObjectStoreCoordinator.java:536) at com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4114)Of course the fetches work with a normal Application launch, but not in the test environment; many missing resources.I looked at WOUnitTest, but it has a WOOUTMAIN web component that calls public WOComponent saveSettings() { setSettings(); try { WOUTTestRunner.savePreferences(); } catch (java.io.IOException e) { NSLog.err.appendln("WOUT failed to save settings because " + e); } return context().page(); }now public class WOUTTestRunner extends BaseTestRunner BUT there is no WOUTTestRunner.savePreferences(); at least under junit 3.8.1So what does work for testing database/EOF?Thanks,Greg ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to archive@mail-archive.com