Testing JSP Changes In IBM WebSphere Without ReStarting The Service

This is a follow-up to my previous post “Restricting The EnterpriseOne Evironment On The JAS Server”.

While coming up with my solution to how to restrict users to an environment when logging on to a JAS server that hosted a path code with multiple environments attached to it, I wanted to be able to test my changes “on-the-fly”.  I didn’t want to restart the service every time.

So, that’s when I found the “temp” directory.

  • This is the “production” directory:
    C:\WebSphere\AppServer\profiles\default\installedApps\Node01Cell\JPD811_HTML.ear\webclient.war\share
  • This is the “temp” directory:
    C:\WebSphere\AppServer\profiles\default\temp\Node01\JPD811_84\JPD811_HTML\webclient.war\share

A file named “_html4env.class” will be placed in there when a user logs in.  It is a compiled version of the “html4env.jsp” file.  So, if you delete that file and make a change to the “html4env.jsp” file or the “_EnvRestriction.htm” file, when a user tries to login WebSphere will compile the “html4env.jsp” file and create a new “_html4env.class” file with your changes.

Tags: , , , , , , , ,

Restricting The EnterpriseOne Evironment On The JAS Server

The organization has a requirement to have a user only login to a certain environment from a certain JAS server instance.

With a basic install of , this would be very easy. However, the 2 environments that are required to be separated are build on top of the same pathcode. Within the JAS settings there is a "Path Codes" parameter that allows you to specify which Path Code will be allowed to be accessed from that particular HTML Server instance.

As you can see from the image, there is also a setting for the "Default Environment". However, there is not a setting to specify which environments are allowed to be accessed.

So, I did a little JSP hacking and came up with a way to restrict the environments that can be accessed from a particular HTML Server instance on JAS:

The solution involves creating a file that gets "included" into another.

The first file is the one that we created. We called it "_EnvRestriction.htm":

<% String redirectTargetURL = "erp.mdu.com";       String mustHaveEnv = "JPDSS811"; if (!(environments.contains(mustHaveEnv))) { %>         <tr>                 <td colspan="3" style="font-size:larger;">                         <strong>YOU DO NOT HAVE ACCESS TO THIS ENVIRONMENT!</strong>                         <br /><br />                         You will be redirected to <a href="http://&lt;%=redirectTargetURL%&gt;"><%=redirectTargetURL%></a> in <span style="color:red" id="redirectSpan">10</span> seconds.                 </td>         </tr>         <script type="text/javascript">                 function redirect(url, msg)                 {                    var TARG_ID = "redirectSpan";                    var e = document.getElementById(TARG_ID);                    var cTicks = parseInt(e.innerHTML);                    var timer = setInterval(function()                    {                           if( cTicks )                           {                                  e.innerHTML = --cTicks;                           }                           else                           {                                  clearInterval(timer);                                  document.body.innerHTML = msg;                                  location = url;                                    }                    }, 1000);                 }                 redirect("http://<%=redirectTargetURL%>","")         </script>         <style>input{display:none;}label{display:none;}</style> <% } %>

Next we edit the file "html4env.jsp" to include our new file (_EnvRestriction.htm). At about line 172, we include the following right before the <tr> tag:

<%@ include file="_EnvRestriction.htm" %>

Please Note: this may not be the best way to restrict environments but it is what we are using. Also, this solution has been successfully used for Tools Release 8.97.2.0 & 8.97.2.6. If you are using a Tools Release other than those listed you may need to make adjustments for this solution to work or it may not work at all.

Is there another way to restrict the environment that a user is able to login to when accessing a JAS server if there are multiple environments built on top of the same path code?

Tags: , , , , , , , ,

Verify That A Version Of Java Is Available

Previously, I wrote about some Java commands that can be used to determine your default Java version.

The following can be used to verify that a certain version of the Java Runtime Environment (JRE) is available on your system.

JAVA CLASS(PropDump) PROP((java.version 1.5))

Tags: , , , , ,

Windows Vista / Windows 7 & IBM iSeries IFS Mapped Drive

If you are using Windows Vista or Windows 7 and need to map a drive to an iSeries IFS directory you will need to follow the steps below:

  1. Open the Local Security Policy editor: Start – Run – “secpopl.msc” – Ok
    image
  2. If a User Account Control window appears, click [Continue].
  3. Expand Local Policies – Security Options
    image
  4. Double-click  “Network security: LAN Manager authentication level”
  5. Change the value to “Send LM & NTLM – use NTLMv2 session security if negotiated”
    image

 

 

This is documented on ’s website: http://www-01.ibm.com/support/docview.wss?uid=nas2bb4cf3cc6d1a859e862573900041ed36.

Another install-related issue concerns installing from the     
applied PTF.  Once the PTF is applied, you can install
this service pack or complete merged image from the network   
share called QIBM on your .  Accessing this share uses 
the LAN Manager component of Windows, and NetServer support   
on the .  In Windows Vista, Microsoft has changed the 
default negotiation method for such connections, so that, at   
this time, accessing shares on the may fail. One way 
to work around this problem is to change a policy setting on   
the PC.  This action requires administrator authority, and can 
be performed as follows:                                       
  1) Click Start, click All Programs, click Accessories, click 
     Run; then type "secpol.msc" (without the quotes) in the   
     Open text box, and click OK.                             
  2) If a User Account Control dialog box appears. verify that 
     the details shown match the request you initiated (you are
     starting the Microsoft Management Console), and if so,   
     click Continue.                                           
  3) From the Local Security Settings console tree, expand     
     Local Policies, then click Security Options.             
  4) In the right pane, scroll down to the setting called     
     "Network security: LAN Manager authentication level       
     Properties" and double-click it.                         
  5) Note the current value.  The default value at the time of 
     this writing is "Send NTLMv2 response only".  If the value
     is not as follows, change it to be:                       
     "Send LM & NTLM-use NTLMv2 session security if negotiated"
     then click OK, and exit the Local Security Settings       
     console. You should now be able to access network shares 
     on the .                                         
The last issue related to install has to do with installing   
from a network share.  Testing has shown that, in some cases, 
installing Access for Windows on a Windows Vista PC   
from a network share fails.  In such cases, copying the files 
from the network share to the PC’s local hard disk, then       
re-starting the installation from the local hard disk,         
completes successfully.                                       
Alternatively, you can map a drive to the network share in a   
Command Prompt box that was opened as administrator and start 
the installation from the mapped drive.                       
To open a Command Prompt box as administrator, click Start,   
then All Programs then Accessories, right-click the Command   
Prompt icon and choose Run as administrator. This action will 
prompt you to allow the Command Prompt program to run elevated.
At the Command Prompt, type in the following command to map the
network drive:                                                 
  net use X: \\server_name\share_name                         
where X: is the drive you want to map, server_name is the     
network server’s name and share_name is the name of the shared 
directory. If you are installing from a , you would   
type in                                                       
  net use X: \\system_i_name\QIBM                             
Then change to the mapped drive in your Command Prompt box and 
run the setup program from there. If you are mapping a drive   
to the QIBM share of your , these are the steps you   
should follow for a 32-bit installation of Access     
for Windows V6R1:                                             
  X:                                                           
  cd ProdData\Access\Windows\Image32                           
  setup.exe                                                   
If you are installing on AMD64 or on Itanium hardware use     
Image64a or Image64i instead.                                 
The cause of this failure is being investigated.

Tags: , , ,

Create A Windows Service / Delete A Windows Service (sc create / sc delete)

Today, I came across a Windows Service on a server that I inherited. By the name of the service I could tell that it was built in-house and I even found enough information to determine who the developed it.  However, since it was not in the Add / Remove Programs list of the Control Panel, I wasn’t sure how to remove it.  So, I found the following on Geeks With Blogs – Shahed’s Blog:


Recently, I was trying to delete a windows service. Normally it should not be necessary to manually delete a service. Uninstalling an application should remove its associated service (if any).

However, I installed some beta products and a service created by one of the applications was not removed automatically. Its very easy to remove a service from registry if you know the right path. Here is how I did that:

1. Run Regedit or Regedt32

2. Find the registry entry "HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services"

3. Look for the service there and delete it. You can look at the keys to know what files the service was using and delete them as well (if necessary).

alternatively, you can also use command prompt and delete a service using following command:

sc delete < SERVICE name>
or to create, simply type
sc create <SERVICE name>

Update:
If you have space in the file path you need to use quotation marks ("). For example: 
sc create "MySQL" binpath= "C:\Archivos de programa\MySQL\MySQL Server 5.1\bin\mysqld.exe"

I used the “sc delete” method to remove the service.

Thanks, Shahed!

Tags: , , , ,

How To Build A SRVPGM Using The Command Line

The other day we had an issue with building a full package for one of our installations.  The issue was related to not having the same tools release active on both the Deployment Server and the Enterprise Server.

However, I found something rather interesting.  You can build an individual package DLL or SRVPGM on the (AS400, iSeries, i) using the command line. 

According to Oracle Support Doc ID 630044.1 you could use the CRTCMOD command.  However, this may error because “any object that has a #include for .h will not be found”.

The correct steps you must use to compile a DLL or SRVPGM using the command line is below:

  1. Add the system library using the following:
    addlible e811sys
  2. If you wished to build the CFIN SRVPGM, run the following command:

    call builddll '/oneworld/packages/<packagename>/text/cfin.txt'

Hopefully, this will help you if you ever need to build a DLL or SVRPGM using the command line.

Tags: , , , ,

Journaling a Physical File on IBM iSeries Using STRJRNPF

We have a system that needs to interface directly with some Files.  This system is written in Java and seems to be very difficult to change any settings to not use commitment control.

Anyway, to get around this issue, we started journaling the physical file that the command was trying to update using the following command:

STRJRNPF FILE(PRODDTA/F0911) JRN(OWJRNL/OW_JRNL)
Tags: , , , , , , , , , ,

Server Management Will Not Start After Update

We are updating our Tools Release to 8.98.2.2 and had an issue with updating the Agent on our Windows web servers. After following the steps to do the update of the Agent it would not restart. I was able to find a document (Doc ID 983043.1) on Support that fixed the issue.

To resolve this issue, Customers need to download the 8.98.2.2 (or newer) version of the update component and proceed with the following steps:

Update your console with the newer version of .

Locate the “scfagent.jar” file in the following directory:
{jde_home}\targets\oc4j\j2ee\home\applications\ManagementConsole\ManagementConsole_WAR\scfagent
where {jde_home} is your console install location.

Copy this file to the following directory on the machine where your Windows agent is running:
{jde_agent_home}\lib\_staging
where {jde_agent_home is the agent install location

Rename the “scfagent.jar” file that you have copied to “agentUpdate.jar”. If there is already a file with this name, it should be replaced with the new file you have copied.

Run the “startAgent.bat” command file twice from the {jde_agent_home}\bin directory. The first time will update the agent JAR files with the newer version, but will likely fail to start the service. The second time should start the service successfully.

I hope that helps!

Tags: , , , , , , , , , , ,

How To Find EnterpriseOne Web Only Versions

Dealing with “Web Only” versions can be a real pain.

They are deleted with each full package deployment and can cause a lot of confusion for the users.

In order to find these troublesome quasi-objects you can run the sql below:

select * from copy811/f983051
where VRVCC2 =’1′
Tags: , , , , , , , , ,

Batch Version (P98305W) Version Error

image After our latest tools release update there was a special instruction that I forgot to do on one of the environments.  It was to delete all versions of the Batch Versions (P98305W) application.  imageUsually, there will be just one version: ZJDE0001.

Well, since I forgot, to the left is the error that you might get if you dont do it.  The second image is the Interactive Versions screen that you will need to use to delete the version.

Related Posts with Thumbnails Tags: , , , , , , , , ,

Next Page »