tags:

views:

50

answers:

3

I have a few EJBs compiled with Weblogic's EJBC complient with Weblogic 9.2.1. Our customer uses Weblogic 9.2.3. During server start Weblogic gives the following message:
<BEA-010087> <The EJB deployment named: YYY.jar is being recompiled within the WebLogic Server. Please consult the server logs if there are any errors. It is also possible to run weblogic.appc as a stand-alone tool to generate the required classes. The generated source files will be placed in .....>
Consequently, server start takes 1.5 hours instead of 20 min. The next server start takes exactly the same time, meaning Weblogic does not cache the products of the recompilation. Needless to say, we cannot recompile all our EJBs to 9.2.3 just for this specific customer, so we need an on-site solution.
My questions are:
1. Is there any way of telling Weblogic to leave those EJB jars as they are and avoid the re-compilation during server start?
2. Can I tell Weblogic to cache the recompiled EJBs to avoid prolonged restarts?

Our current workaround was to write a script that does this recompilation manually before the EAR's creation and deployment (by simply running java weblogic.appc <jar-name>), but we would rather avoid this solution being used in production.

A: 

I FIXED this problem by spending a great deal of time researching and decompiling some classes.I encountered this when migrating from weblogic8 to 10 by this time you might have understood the pain in dealing with oracle weblogic tech support.

unfortunately they did not have a server configuration setting to disable this

You need to do 2 things

Step 1.You if you open the EJB jar files you can see

ejb-jar.xml=3435671213

com.mycompany.myejbs.ejb.DummyEJBService=2691629828

weblogic-ejb-jar.xml=3309609440

WLS_RELEASE_BUILD_VERSION_24=10.0.0.0

you see these hascodes for each of your ejb names.Make these hadcodes zero. pack the jar file and deploy it on server.

com.mycompany.myejbs.ejb.DummyEJBService=0

weblogic-ejb-jar.xml=0

This is just a Marker file that weblogic.appc keeps in each ejb jar to trigger the recompilation during server boot up.i automated this process of making these hadcodes to zero. This hashcodes remain the same for each ejb even if you execute appc for more than once if you add a new EJB class or delete a class those entries are added to this marker file

Note 1: how to get this file? if you open domains/yourdomain/servers/yourServerName/cache/EJBCompilerCache/XXXXXXXXX you will see this file for each ejb.weblogic makes the hashcodes to zero after it recompiles

Note 2: When you generate EJB using appc.generate them to a exploded directory using -output C:\myejb instead of C:\myejb.jar.This way you can play around with the marker file

Step2. Also you need a PATCH from weblogic.When you install the patch you see some message like this "PATH CRXXXXXX installed successfully.Eliminate EJB recomilation for appc". i dont remember the patch number but you can request weblogic for that.

You need to use both steps to fix the problem.The patch fixes only part of the problem Goodluck!!

cheers raj

rajdevar
Thanks, eventually we opted to recompile the EJBs once at the Customer's site instead of messing with the EJBs' internal markers (we don't want Oracle saying they cannot support problems derived from this scenario).
RonK
A: 

the Marker file in EJBs is WL_GENERATED

rajdevar
A: 

Just to update the solution we went with - eventually we opted to recompile the EJBs once at the Customer's site instead of messing with the EJBs' internal markers (we don't want Oracle saying they cannot support problems derived from this scenario).

We created two KSH scripts - the first iterates over all the EJB jars, copies them to a temp dir and then re-compiles them in parallel by running several instances of the 2nd script which does only one thing: java -Drecompiler=yes -cp $CLASSPATH weblogic.appc $1 (With error handling of course :))

This solution reduced compilation time from 70min to 15min. After this we re-create the EAR file and redeploy it with the new EJBs. We do this once per several UAT environment creations, so we save quite a lot of time here (55min X num of envs per drop X num of drops)

RonK