Web Builder User-Defined Project Type Issues After Upgrade

  • 7021580
  • 13-May-2011
  • 11-Mar-2018

Environment

Verastream Host Integrator version 7.1 or higher

Situation

In Verastream Host Integrator (VHI) Web Builder, if you have a user-defined project type that was created in version 7.0 or earlier, existing projects using that type may not display in Web Builder after upgrading to version 7.1 or higher.

Furthermore, when attempting to build or deploy the project, you may see errors:

  • With a user-defined project type and project from version 7.0, the error may include "(Access is denied)"
  • With a user-defined project type and project from version 6.6, the build error may include "package com.wrq.vhi.wb . . . does not exist" and "cannot find symbol"
  • With a Deprecated Java Web Service project type, the build error may include:
C:\Users\<user name>\Documents\Attachmate\Verastream\HostIntegrator\projects\<project name>\build.xml:192: java.net.MalformedURLException: For input string: "${servletcontainerport}"
  • With a Deprecated .NET Web Service project type, the build error may include:
C:\Users\<user name>\Documents\Attachmate\Verastream\HostIntegrator\projects\<project name>\build.xml:115: java.io.IOException: Cannot run program "${aspnet_regiis}": CreateProcess error=2, The system cannot find the file specified

Resolution

To resolve these issues you can either Create New Types and Projects or Migrate and Modify the Original Types and Projects.

Create New Types and Projects

If you have not made significant changes to the source code of your existing pre-7.0 projects, consider creating a new project and/or user-defined project in version 7.1 or higher to take advantage of new functionality, such as not needing to run Web Builder with elevated privileges.

Note: For web services, the embedded web service functionality is recommended as described in KB 7021550. However, if you need to re-enable the deprecated web service project types for new Web Builder projects in version 7.1 or higher, please contact Technical Support at https://support.microfocus.com/contact/.

Migrate and Modify the Original Types and Projects

If you prefer to use your original pre-7.1 user-defined project type and projects in version 7.1 or higher, perform the following steps:

  1. Copy your project type files ("userplugins") from the previous location to the version 7.1 or higher location. Typical folder locations are as follows:

Version 7.1 or higher: <Documents>\Attachmate\Verastream\HostIntegrator\userplugins where <Documents> is typically C:\Users\<user name>\Documents (on Windows 7) or C:\Documents and Settings\<user name>\My Documents (on Windows XP)

Version 7.0: C:\Program Files\Attachmate\Verastream\HostIntegrator\lib\webbuilder\userplugins

Version 6.6 and earlier: C:\Program Files\VHI\lib\webbuilder\userplugins

Tip: By copying the files, you should have sufficient privileges to modify the files in steps 3 through 5 below. The previous originals can later be deleted in step 8.

  1. Copy your project files from the previous location to the version 7.1 or higher location. Typical folder locations are as follows:

Version 7.1 or higher: <Documents>\Attachmate\Verastream\HostIntegrator\userpluginprojects

Version 7.0: C:\Program Files (x86)\Attachmate\Verastream\HostIntegrator\lib\webbuilder\userpluginprojects

Version 6.6 and earlier: C:\Program Files (x86)\VHI\lib\webbuilder\userpluginprojects

  1. In the <Documents>\Attachmate\Verastream\HostIntegrator\userpluginprojects\<project name> folder, edit the build.xml file.

Within the target “deploy” node, on the copy task, modify the “todir” attribute:

Old: todir="${vhiroot}/lib/webbuilder/userplugins"

New: todir="${WB_USERPLUGINS}"

  1. In the <Documents>\Attachmate\Verastream\HostIntegrator\userpluginprojects\<project name> folder, edit the build.properties file. Modify the “plugindir” line:

Old: plugindir=userplugins

New: plugindir=$${WB_USERPLUGINS}

Note: Use the double dollar sign as shown above.

  1. In the <Documents>\Attachmate\Verastream\HostIntegrator\userpluginprojects\<project name>\resources\Project folder, edit the build.xml file.
    1. Locate the following existing lines:
<property file="${vhiroot}/${webbuilderdir}/${commondir}/common.properties"/>
<property file="${vhiroot}/${webbuilderdir}/${commondir}/mstools.properties"/>

Note: The mstools.properties line is present with .NET projects only (not Java projects).

    1. . Replace the above lines with the following:
<property environment="env"/>
<property name="wbsettings" 
value="${env.LOCALAPPDATA}/Attachmate/Verastream/HostIntegrator/webbuilder"/>
<property file="${wbsettings}/${commondir}/common.properties"/>
<property file="${wbsettings}/${commondir}/mstools.properties"/>

    1. In all <taskdef> nodes, change classpath="${vhiroot}/${webbuilderdir}/${project_jar}" to classpath="${project_jar}" (find and replace all instances).
  1. Rebuild your user-defined project type:
    1. In Web Builder, click Options > User-Defined Project Types.
    2. For each modified project type, Web Builder automatically detects changes and displays a Confirm Rebuild Project Type dialog ("Web Builder has detected modified source files for the User-Defined Project Type: <name> Do you want to rebuild it now?"). Click Yes.

If you do not see this dialog, select your user-defined project type and click Rebuild.

  1. In the main Web Builder window, right-click each project using this user-defined project type and click Rebuild.

Note: When building projects that use an pre-7.1 upgraded user-defined .NET project type, you must run Web Builder as administrator (same as in version 7.0 and earlier). A non-elevated user will not have sufficient permission to deploy to IIS and will see an error similar to the following:

...
com.wrq.vhi.wb.err.FileCopierException: Unable to write file "C:\Inetpub\wwwroot\projectname\App_Code\filename.cs". Reason: C:\Inetpub\wwwroot\projectname\App_Code\filename.cs (The system cannot find the path specified)
at com.wrq.vhi.wb.common.FileCopier.syncCopy(FileCopier.java:92)
...
The following error occurred while executing this line:
C:\Users\username\Documents\Attachmate\Verastream\HostIntegrator\projects\projectname\build.xml:95: com.wrq.vhi.wb.err.FileCopierException: Unable to write file "C:\Inetpub\wwwroot\projectname\App_Code\filename.cs". Reason: C:\Inetpub\wwwroot\projectname\App_Code\filename.cs (The system cannot find the path specified) because it’s not there

When running Web Builder as administrator, if you create new projects using the pre-7.1 upgraded user-defined .NET project type, the project files are generated in the Administrator user directory (for example, C:\Users\Administrator\Documents\Attachmate\Verastream\HostIntegrator\projects).

  1. After confirming your project works as expected, you can delete the old project and project type files from the original version 7.0 or 6.x directory (see steps 1 and 2).

Cause

Beginning in version 7.1, Web Builder project files and other non-runtime data are stored in Documents instead of Program Files. This change provides improved compatibility with Windows User Account Control and enables many tasks to be performed without elevated administrator privileges.

When upgrading from version 7.0 or earlier, the installer automatically moves and modifies files for standard project types. However, for user-defined project types, some files must be manually moved or updated after installation.

Additional Information

Legacy KB ID

This article was originally published as Attachmate Technical Note 10120.