Monday, 16 September 2013

Media objects gotcha–upgrade / deployment server rename

Too many times we forget to update all of the records in F00165 when you change out your deployment server and you’ve been using it for media object storage.  Remember that when you rename the MO queue in the P98MOQUE, this does not change the location of all the records that you may have saved against the MO.

image

So you will need to run update statements in SQL to ensure that once you’ve copied the directory structure to your new deployment server you also change all of the internal pointers.

Different media object types have different requirements for pointing to the final file name, you’ll need to look into the F00165 to work it all out.

Wednesday, 24 July 2013

Structure member alignment for client and server programming with JDE

Quick note to self:

When writing an OSA to work on a windoze (windows) server, use a structure member alignment of 4, /Zp4 .  If you are testing your OSA on the client then ensure that the struct member alignment is 1, or /Zp1.  It's easy too look at the command in various iterations of visual studio to ensure that the struct member alignment is correct.

Highlight the project (not the solution) and fork project, properties

Open general menu item
Then c/C++ then code generation.  Under there you'll find "Struct Member Alignment" - set this.

Then goto command line under the c/c++ window and you're command will look something like:

/Od /I "D:\E910_1\DV910\include" /I "D:\e910_1\system\includev" /I "d:\e910_1\system\include" /D "_WINDLL" /D "_MBCS" /Gm /EHsc /RTC1 /MDd /Zp1 /Fo"Debug\\" /Fd"Debug\vc90.pdb" /W3 /nologo /c /Wp64 /ZI /TP /errorReport:prompt

What is that for?  windows CLIENT of course!

Note also (to help you if you're struggling), the link command looks like:

/OUT:"C:\Users\shannonm\Documents\Visual Studio 2008\Projects\myBIGPDF\Debug\myBIGPDF.dll" /NOLOGO /DLL /MANIFEST /MANIFESTFILE:"Debug\myBIGPDF.dll.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"c:\Users\shannonm\Documents\Visual Studio 2008\Projects\myBIGPDF\debug\myBIGPDF.pdb" /DYNAMICBASE:NO /MACHINE:X86 /ERRORREPORT:PROMPT kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib

Ensure that you include jde.h (you'll need this).  You'll need to include dirs like "include and include) under system and you'll also need to include lib and libV dirs.  Also the specific resource files for functions that you call will need to be added to the project.

Friday, 12 July 2013

JDE BSFN Return Values

It might defy logic, but the following is true:


#define ER_SUCCESS   0L
#define ER_WARNING   1L
#define ER_ERROR   2L

as defined in jdekdfn.h

So, when you read things like:


Jul 12 15:47:41.167618  jdeobj.c2711     - 3900/-258356336 WRK:POAPPROVE_EF810FD0_DConnector    **********************************************************************************
Jul 12 15:47:41.167629  jdeddapi.c315    - 3900/-258356336 WRK:POAPPROVE_EF810FD0_DConnector    Entering jdeCloseDictionary
Jul 12 15:47:41.167642  jdeddapi.c349    - 3900/-258356336 WRK:POAPPROVE_EF810FD0_DConnector    Exited jdeCloseDictionary with DDType 0
Jul 12 15:47:41.167657  jdeobj.c2404     - 3900/-258356336 WRK:POAPPROVE_EF810FD0_DConnector    Return value is 2 for ApproveOrRejectOrder. (BSFNLevel = 2)
Jul 12 15:47:41.167674  jdeobj.c3189     - 3900/-258356336 WRK:POAPPROVE_EF810FD0_DConnector    Entering AddObjectCache

The 2 means Error, simple!

Friday, 14 June 2013

EM12C will not start Could not initialize class oracle.dfw.impl.common.TempFileManager

em12c will not start!

It just won't start.

generally, my recommended EM12C start sequence is:




  1. listener
  2. database
  3. oms
  4. wls
  5. agent

but my OMS would fail and take ages to do so.

I was getting in /u01/app/oracle/middleware/gc_inst/user_projects/domains/GCDomain/servers/EMGC_ADMINSERVER/logs/EMGC_ADMINSERVER.out

java.lang.NoClassDefFoundError: Could not initialize class oracle.dfw.impl.common.TempFileManager

Of course, this is not the first log to look at, generally you start with:

/u01/app/oracle/middleware/gc_inst/em/EMGC_OMS1/sysman/log/emctl.log

This gave me double barreled 404's!!


2013-06-14 14:50:35,974 [main] DEBUG oms.StatusOMSCmd processStatusOMS.240 - console page status code is 404
2013-06-14 14:50:36,022 [main] DEBUG oms.StatusOMSCmd processStatusOMS.242 - pbs page status code is 404
2013-06-14 14:50:36,022 [main] DEBUG oms.StatusOMSCmd processStatusOMS.245 - console header is null
2013-06-14 14:50:36,023 [main] DEBUG oms.StatusOMSCmd processStatusOMS.247 - pbs header is null
2013-06-14 14:50:36,023 [main] DEBUG oms.StatusOMSCmd processStatusOMS.285 - Both Console and PBS are down. Status codes are: Console - 404 and PBS - 404

Which means nothing

What I must say at this stage is that I did notice someone had tried to run weblogic as root, as I had to change permissions on some of the log files that WLS wanted to write to.  It's a dead give-away with WLS, but not so with EM12C layers.


Then, I got to oracle support and used my search string: 
java.lang.NoClassDefFoundError: Could not initialize class oracle.dfw.impl.common.TempFileManager


I got a direct hit:
https://support.oracle.com/epmos/faces/DocContentDisplay?_afrLoop=128932762907641&id=1498363.1&_afrWindowMode=0&_adf.ctrl-state=8pjmggysh_351


It seems that there is something dodgey in the /tmp dir.  It was really weird, I had a directory called:
oracle-dfw-5069570897830055595.tmp in /tmp, but oracle could not even list it.  When I tried to use root, it could not see it?? Anyways, without investigating much further I deleted the dir /tmp/oracle-dfw-5069570897830055595.tmp and was able to start oms first go!


Seconds later I was getting my alerts and I felt better about EM12C







Monday, 3 June 2013

Printing from JD Edwards, tray selection, BIP to PCL etc

I was recently onsite for a client trying to solve a fairly simple printing issue - tray selection for BIP output.  Surely, very simple...  This was a windows enterprise server, not too sure if this makes it easier or harder.

Of course, let's do some simple analysis first to know where we are at with our capabilities.

I create a couple of local printers on my workstation and share them.  Easy, then I can create JD Edwards printer definitions to \\workstation\printer and see the output.  Great.  I can toggle between PCL, PDF and PS and see what is coming out and what works and what does not and then build some working scenarios from there.

I pause my windows printer and then look in the C:\Windows\System32\spool\PRINTERS

standard report output: (1 page PDF)
PDF - 55K
PCL - 4K (I love PCL)
PS - 55K

Then I run a BIP job, two pages
PDF - 67K (rename the .spl and you can open it as a PDF - nice)
PS - 67K (rename the .spl as a PDF and you can open it - weird!!)
PCL - 8K (does not have any graphics!!!)

So, the analysis from above might be as you expect.  ALL outputs work from both BIP and standard, but BIP cannot put graphics into the PCL output.  This is important.  If you have PCL printers, you cannot print immediate from BIP and have the reports look great (or can you?).

All of the above is good to know, but does not help me with my main problem, printing to a particular tray of a particular printer.

What options do I try:

  • Create a windoze printer definition that defaults the correct tray and address this from E1.  Does not work.  Default paper tray is used - this is annoying.
  • Force the printer definition in E1 to use the tray that you want - no - does not work
  • Write my own "JDE conversion program" and have that do the printing - too complicated at this stage, although seems possible
  • Use OSA's to grab the output and then print to the printer that I want.  BUT - OSA does not get called from BIP output - Doh!
    • As a side note, I did write this code as an OSA and got everything printing fine from E1 with my OSA.  All tray selection working perfectly.
    • Note that this is quite difficult, as you cannot run an interactive program from a windows service.  I was dabbling in "createProcessW", "shellExecuteEx" I could not bring myself to use "system" - but I probably could have.
    • The long and hard lesson out of this is that you cannot run any processes from a windows service (as all of the kernels run as a service) to execute a program that requires a desktop  / interactive session.  My idea was to run acrord32.exe with the /T option to print the adobe document to my printer of choice.  Hey, this would be nice and neat and get my out of my PCL limitations too...  But, adobe wants desktop resources, so this will not work.  I did get it working with the Fox-It viewer.  This is a really nice viewer and performs a great job with the printing in this scenario.  http://www.foxitsoftware.com/Secure_PDF_Reader/ I recommend this software, it also closes the exe when the print is done, not like Adobe that just likes to hang around for nothing!!
To reduce my compile and build and deploy times, I started just calling a script from the OSA, this worked like a treat.

The command that the script runs to print a PDF to a specified printer looks like the below:

C:\Program Files (x86)\Foxit Software\Foxit Reader\Foxit Reader.exe" /t "D:\JDEdwards\E910\ddp\PrintQueue\R0010P_XJDE0001_55464_PDF.pdf" "\\svfpr04\OPS CENTRAL RICOH MP 7001 -T2"

But, this would not work from BIP, as BIP does not use OSA functionality when writing the PDF - which is the ULTIMATE pain!!!

So, back to the drawing board after a lot of code has been written and is working.  My final solution is a work-around until BIP tray selection logic is going to catch up.  I cannot retrofit all the printers in the organisation with PS drivers or PDF drivers!

I finally decided to script once again, but a different angle.

As you know BIP output is written only to the database by default, so it's not like you can just grab the output from the tables and send it to the printer, BIP does a lot of magic there to do that stuff for you - BUT you can enable BIP archiving, which will write all output to a dir on the enterprise server (I can feel a script coming on!!!).

Then a simple WMI based vbscript to listen for createFile events in teh BIP archive dir can be written.  Do some testing on filename and we have a solution!  We can also query the database from the script and get all of the printer information from the job and actually direct the output to the proper E1 printer - nice!

But, lets be honest.  It's not that nice.  Sure I can avoid replacing all my PCL printers (hey - maybe that is NICE).  Reprint from E1 is still dodgy for tray selection, but the end users can do it from Adobe - workaround when the script breaks.  But it's just another thing to go wrong with printing, which should be super simple and should just work.

At the end of the day, there is about 40 lines of script (20 doing debugging and logging) to print BIP output to PCL printers.




Tuesday, 21 May 2013

Sizing JD Edwards for 1000 users, general sizing maxims for JD Edwards

It's an interesting conundrum, you want to choose the platform for your JD Edwards solution.  You might be a net new customer or you might be upgrading and putting platform choice out there as an option.  What are you going to choose, there are so many options out there.

Firstly, start around your database and work from there.  The database WILL be your bottleneck for scalability and performance.  Your disk IO will be the bottleneck for the database server.  This is IF your solution is sized correctly.  JDE does not use many of the advanced database functions, lets be honest it does not use aggregate functions that often!  So JDE will push the DB disks hard, get your system ready for it!

I'm thinking that if you had more than 1000 concurrent users, then your choices are smaller.  I personally would not put that load on a SQLServer database just yet.  I think you have much more scalability with the other options.  What are they?  Oracle or AS/400 of course.  I'm actually not going into DB2/UDB, as my experiences (of which there are many) might have you looking at other options.

Now I'm not immediately and directly discounting SQLServer as an option for > 1000 concurrent users, I just think that it's going to be harder to achieve.  NOT impossible, probably not even "extremely difficult", but harder than the other options.  I'm also talking about 1000 concurrent users, not named.

I think that with the correct amount of SSD, Fusion IO, fast disk (get data close to CPU!!), you can make a SQL server box do almost anything.  Native 64 bit support has taken care of nearly all extensibility issues that one might have previously had with SQL Server.

Lets talk more about the two other main options, Oracle or AS/400.  The adage used to be - "no one gets fired for buying IBM" - that's gotta be wrong and getting wronger (like my paradoxical statement) every year.  I'd like to start firing people that choose IBM because they have two staff (that could leave tomorrow) that know their way around an AS/400 - This is not a reason to keep the machine.  We need to make all business decisions based upon ROI, not from the heart.  These days we need to future proof our decisions too, as technology advancements are moving at the speed of light!  Yes the 400 has sat in a corner and just worked for the last two years, in general - so would any other DB!

I like the way oracle has essentially decoupled itself from hardware.  You point an application to a listener and away you go - it does NOT matter what CPU architecture is behind the scenes - as long as the data is there - they query will process the same way.  Unfortunately for AS/400 (and SQLServer) there is a limitation on the CPU architecture that is supported behind the scenes.

Oracle has also hitched itself to the hardware in a way that no other vendor can, engineered systems.  They've developed hardware that is purely designed for one purpose in life - run database queries, run them fast and run them all day long.  These are amazing machines (viewed as appliances) that are created and designed with a single purpose in life - no wonder they do such a good job.  I've worked with a number of engineered systems and they do fly.

A common misconception that I get from many clients considering oracle (which is free in the standard edition form with net new JD Edwards licensing [SaaS or perpetual]) is that oracle is too complex, they'll need to employ a DBA etc etc.  I'll get up on my soap box and yell from the roof tops - this is not the case anymore.  The Enterprise Manager suite of programs that comes with 11GR2 is exceptional.  What I like to do is use EM12C to augment the management and monitoring capabilities, which is free for basic functionality.  The combination of these two management methods will see your database running and monitored without human interaction.  Some of my clients have uptime of > 260 days without being touched...  On Windows...  This is not a record (this is not when things crashed, it's an example), this is just how things are at the moment, an oracle database, if sized correctly, will just run.  If you have issues - start pointing the finger towards something else.

I do need to go back to the 400.  It's a great machine.  It does a lot of heavy lifting for a lot of clients, and has been doing this for a very long time.  I love the 400, I've had interactions with it for the last 15 years.  I do however, think that there are better options out there - when considering things like:

  • interoperability
  • IaaS options, cloud options
  • HA
  • SAN storage usage
  • supportability
  • hardware agnostic
  • resource availability

At this stage I seem to be recommending oracle for the database for systems that support over 1000 users concurrently.  You have a choice of computers that are going to support this, IBM P,  sun T5, Sun M series, engineered systems, x86 (win & lin) - the list goes on.  Look at what oracle have done with x86 and exadata / ODA - exceptional performance from the old x86 CPUs.  What I'm trying to say here is that you don't need the massive RISC based CPU's to get massive performance anymore.  Let's face it, processing power will be a commodity item, if it is not already.  Reliability is being built into every layer (RAC, virtualisation etc), you're not going to be concerned about CPU architecture for your database, because oracle can run anywhere (is that like Java I hear you say?).

Get your data as fast as possible and get it as close as possible to the CPU and you are not going to have performance issues.

Any architecture will support this type of interactive load, with the right amount of cores, sockets and RAM.  RAC can see you expanding the solution across any number of chassis.

Once you've decided on the database (you need to decide between standard edition and EE - how deep are your pockets?), you can then put some logic processing and web processing around your DB decision - easy!  No real licence ramifications for LOADS of CPU on the enterprise server / logic server - so I say go for it.  Webserver licensing should be handled under your technology foundation, so you can also "soup up" this layer.  Remember that hardware is cheaper than consulting when you have performance issues.  Get this right up front!

That is my very basic wrap for some key considerations in large JD Edwards sizing and database choices, the main take homes are:

  • Any hardware will do the job (within MTRs), some will be harder to get fast than others
  • Oracle DB is not the scary time consuming beast that used to be
  • Get your database server sized right, get the fastest disk IO possible.  Consider SSD / fusionIO
  • Build your solution around the database server
  • Build your solution to be future proof, consider question like IaaS readiness.

Thursday, 2 May 2013

installing E910 on a client that had E900 1.0.0.0.5

This is a quick one.  I had an old E900 fat client that I wanted to upgrade to E910.

I was getting an "Error"
"An error occurred during the interview [sic] for this component:  EnterprsieOne Development Client 1.0.0.0.5.  A previous installation of an E1 client exists..."

But, I did use "Add remove programs" to get rid of the old one until it just died.   I then did shift-delete on the dir and renamed and restarted it.

I looked in th registry and could not find JDEdwards anywhere.

Then, I learnt that I had to check the Wow6432Node under HKEY_LOCAL_MACHINE\SOFTWARE for all of the 32 bit software...  It is here that I found the JDEdwards branch in the registry.

I deleted the JDEdwards part of the path below, and all of the sub folders in the registry.  I'm guessing that If you've read to hear you are going to be technical enough to be able to delete the right parts of your registry safely.

HKEY_LOCAL_MACHINE\SOFTWARE\ Wow6432Node\JDEdwards

Note also that I've left the existing e1local, I considered getting rid of it - but I'm going for the "path of least resistance" installation.

And viola! Everything work first time once I found the registry key to delete.