The serviceDeploy command for IBM Business Process Manager (BPM), WebSphere Process Server (WPS), and WebSphere Enterprise Service Bus (WESB) fails on UNIX-based operating systems
The serviceDeploy command fails on UNIX-based operating systems. However, when you run the same serviceDeploy command with the same file in a Microsoft Windows environment, the command succeeds.
When you review the log file for the serviceDeploy command, it lists the following error:
The project was not built since the source file Test.java could not be read.
A project that is authored in a Windows environment might contain non-UTF characters in the source file artifacts. Windows uses Cp1252 character encoding while UNIX-based operating systems use UTF-8 character encoding. If there are non UTF-8 characters, the artifact file cannot be read by UNIX-based operating systems.
The non-UTF characters are often found in developer comments within the Java™ code. Examples of these characters are accented characters for foreign languages as well as Windows "fancy" quotes and apostrophes. These characters might have been introduced through copying and pasting Windows-formatted text from another source into the editor.
This issue occurs if the artifacts are authored in a Windows environment, but then they are used in a serviceDeploy command on a UNIX-based operating system.
Diagnosing the problem
You can change the WebSphere Integration Developer workspace to a different file encoding and use it to determine whether there are non-UTF characters. To change the WebSphere Integration Developer workspace to a different file encoding, complete the following steps:
- Click Windows > Preferences > Workspace.
- Change the text file encoding preference from the default Cp1252 character encoding to UTF-8 character encoding.
- Attempt to open the suspect .java file that is identified in the serviceDeploy error message.
An error is displayed if non-UTF-8 characters exist and the file does not open.
Resolving the problem
To identify the non-UTF-8 characters in the identified file, use one of the following techniques:
- Using WebSphere Integration Developer on a Linux operating system, edit the suspected file. Remove the unknown characters that are displayed as \ufffd
- Extract the suspect file on a UNIX-based operating system. Run the following command, which removes non-UTF-8 characters:
iconv -c -f UTF8 -t UTF8 Test.java > Test_strip.java
Run a diff on the two files to display the sections that require changes.
- Use a text editor in Hex mode to manually identify characters that are outside the standard ASCII range.
After the characters are identified, use WebSphere Integration Developer to remove or replace the characters. Use the WebSphere Integration Developer file encoding that is described in the previous section to verify that the file can be opened in UTF-8 mode. If you need to interoperate between Windows and other operating systems, you might want to leave the WebSphere Integration Developer character encoding in UTF-8.
|Business Integration||IBM Business Process Manager Advanced||Application Deployment||AIX, Linux, Linux zSeries, Solaris, Windows, z/OS||8.0, 7.5.1, 7.5|
|Business Integration||WebSphere Enterprise Service Bus||Admin||AIX, HP-UX, i5/OS, Linux, Linux iSeries, Linux pSeries, Linux xSeries, Linux zSeries, Solaris, Windows, z/OS||7.5.1, 7.5, 7.0, 6.2, 6.1.2, 6.1|
More support for:
WebSphere Process Server
Software version: 6.1.2, 6.2, 7.0
Operating system(s): AIX, HP-UX, IBM i, Linux, Solaris, Windows, z/OS
Reference #: 1617125
Modified date: 16 April 2013
Translate this page: