[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Upgrade to WO 4.0 and make does not work!



Folks, the Java API class names and import paths have changed in WO4.
They mirror almost exactly the Framework/Class names you use with script
or ObjC. While this is great from an internal support/doc standpoint and
from an exhaustive API exposition standpoint, it does mean you will have
to convert some java code.  This is highlighted in the release notes.
(Check out WOInfoCenter from the WebObjects Start menu group and look
under release notes for much more info.)  tops Conversion scripts are
provided to do most of the mundane legwork (like renaming
'FetchSpecification' to 'EOFetchSpecification') automatically.

Also note that the project layout and makefiles changed. Here's a
document from the release notes that talks about conversion -- attached
below.  BTW for not so big projects, I've found it easiest to convert
projects by opening a New one and then dragging/dropping resources from
the 3.5 project into the new project. Just a thought. You get all the
new makefiles, folder structure, PB plist, localization etc. changes for
free that way.

d









-----------

To convert a project to WebObjects 4.0, do the following:

    1.Convert your project's makefiles as described in the document
     
$NEXT_ROOT/Developer/Makefiles/Conversion/DirectoryLayout/ConvertMakefilesReadMe.rtf. 

      ($NeXT_ROOT is the root installation directory specified when
WebObjects was installed.) The project files must change to point to new
      locations for the build tools. The ConvertMakefilesReadMe.rtf
document tells you how to make those changes.

    2.If your project contains Java code files, convert them as
described in Converting Java Code. 

Note: The Java APIs have changed considerably. If you've written Java
code, you must convert it before you can compile.

    1.Open your project in Project Builder, and click "Upgrade Now" when
prompted. 

      Among other things, upgrading your project in this fashion will:

      - Upgrade your PB.project file to the latest version.

      - Upgrade your makefiles to the latest versions.

      - Convert your WebObject project suitcases to the new format.

      - Convert your project so that it conforms to the new localization
scheme. As a result of this, script (.wos) and .api files are moved
outside of
      their component (.wo) directories. Script files now appear in the
Classes suitcase. For more information on the new localization scheme,
see the
      section Changes to Localization.

    2.Build. If errors occur during the build, fix them and re-build the
project. 

      The WebObjects Framework contains many new optimizations that
should greatly improve your application's performance. However, you may
      find your code relied on some part of the request-response loop or
template parsing code that is no longer always performed.

    3.Run the project. If your application doesn't run as expected, read
the sections Troubleshooting WebObjects 4.0 Template Parsing,
      Troubleshooting WebObjects 4.0 Request Handling, and WebScript
Changes. Among other things, these sections outline the use of
      WebObjects 3.5 compatibility flags that allow you to revert to the
style of template parsing and request handling that was performed in
      WebObjects 3.5. 

    4.At this stage, if you want, you can remove all usage of deprecated
API. WebObjects has been rewritten to be thread-safe, which required
      deprecating some of the existing APIs. You can still use
deprecated API as long as you do not enable multithreading in your
application. You'll
      receive warnings about deprecated API at run-time. For a complete
list of what's deprecated, see Support for Multithreaded Applications. 





d



Endre Meckelborg Rognerud wrote:
> 
> I've just upgraded from WO 3.51 to WO 4.0. This was not easy, but it works
> now. But it took me ca. 1 minute to find an error. I upgraded one of my
> projects and tried to compile it. I got the following error:
> 
> "C:/Apple/NextDeveloper/Executables/make: not found"
> 
> In my folder C:\Apple it is a folder Developer, not NextDeveloper. Ok... I
> copy this folder to another one called NextDeveloper. Now it works to
> compile, but not without errors. I've heard that it should be a script for
> upgrading old projects in WO 4.0, because a lot has changed in the class
> hierarchy for Java. I can't see that this works. It fails in
> Application.java with the message:
> 
> "Package next.util not found in import."
> 
> This is the first statement in my project :-) Do I do something wrong, or is
> it just really hard to upgrade to WO 4.0?
> 
> Interested in comments!!
> Endre M. Rognerud