Sunday, August 28, 2016

ASR installation for Metasolv 6.2.x

As mentioned in earlier posts our Metasolv installation is clustered so we will do ASR installation in clustered environment.

Pre Installation checklist


Metasolv 6.2.x is installed.

below paths are set as per your directory structure.

PATH= BEA_Home/jdk_version/bin $PATH
BEA_HOME=/opt/app/mss_home/bea(installation directory of Oracle Weblogic 10.3 server)
JAVA_HOME=/opt/app/mss_home/bea/jdk_version

Installation of ASR


STEP 1. 


From Metasolv installation directory mss_home run the following command.

java -jar Asr.releaseNo.buildNo_M62.jar

for version 53 it should be java -jar Asr.R53_0_0.b23_M62.jar


STEP 2.


The above java command will ask to choose Metasolv Home directory, a directory asr53installer(asr+version+installer) will be created in the selected directory.


It will automatically invoke setup.sh/setup.cmd in mss_home/asr53installer directory.

STEP 3.


Click Next.

STEP 4.


Enter the path and name of the MetaSolv Home directory, MetaSolv Domain directory, and MetaSolv Server directory or click Open to search for the directories.


STEP 5.


Click Next.


STEP 6.


Select any one of the following installation types:


  •  Install all ASR Files
  •  Install Only ASR EAR File




For a clustered environment, you can choose an option to extract the .EAR file only

For a non-clustered environment, choose the option to install and deploy all files.


STEP 7.


Click Next.


STEP 8.


Click Finish.

STEP 9. 


For a clustered environment.

  1. Locate the loggingconfig_cluster-ASR53.xml file located in the mss_home/managedserver/appserver/config directory, where managedserver is the WebLogic managed server. 
Add the following snippet in appender element for ASR 53.


  <appender name="XMLFileAppASR53" class="org.apache.log4j.RollingFileAppender">
      <param name="ImmediateFlush" value="true"/>
      <param name="append" value="true"/>
      <param name="MaxFileSize" value="10000KB"/>
      <param name="MaxBackupIndex" value="10"/>
      <param name="File" value="${mslv.log.dir}/appserverlog_ASR53.xml"/>
      <layout class="com.metasolv.common.framework.logging.api.log4jext.xml.MSLVXMLLayout">
      </layout>
  </appender>

  <appender name="AuditFileAppASR53" class="org.apache.log4j.RollingFileAppender">
      <param name="ImmediateFlush" value="true"/>
      <param name="append" value="true"/>
      <param name="MaxFileSize" value="10000KB"/>
      <param name="MaxBackupIndex" value="10"/>
      <param name="File" value="${mslv.log.dir}/appserver_auditlog_ASR53.xml"/>
      <layout class="com.metasolv.common.framework.logging.api.log4jext.xml.MSLVXMLLayout">
      </layout>
  </appender>


Add the following snippet in category element for ASR 53.

  <category name="cmm.ASR" class="com.metasolv.common.framework.logging.api.log4jext.MSLVLogger" additivity="false">
    <level value ="error" class="com.metasolv.common.framework.logging.api.log4jext.MSLVLevel"/>
    <appender-ref ref="XMLFileAppASR53"/>
  </category>

  <category name="ASR" class="com.metasolv.common.framework.logging.api.log4jext.MSLVLogger" additivity="false">
    <level value ="debug" class="com.metasolv.common.framework.logging.api.log4jext.MSLVLevel"/>
    <appender-ref ref="XMLFileAppASR53"/>
  </category>

  <category name="cmm.SecurityASR" class="com.metasolv.common.framework.logging.api.log4jext.MSLVLogger" additivity="false">
    <level value ="debug" class="com.metasolv.common.framework.logging.api.log4jext.MSLVLevel"/>
    <appender-ref ref="AuditFileAppASR53"/>
  </category>

   
      2. Rename the file to loggingconfig_cluster-ASR53.xml.

STEP 10.


 RUN the ASR installation in each managed server instance.

STEP 11.


 Restart managed servers.

STEP 12.


RUN prodfixsql/procs sqls.

  1. Run pfixSQL_Master.sql file located in the mss_Home/server/appserver/sql/ASR53/prodfixsql. This sql will call rest of sql files located in same directory.
  2. Run the asr_master.sql file located in the mss_Home/server/appserver/sql/ASR53/procs directory that was created during the installation to apply the contents of the ASR procs directory to the database.


STEP 13.

  1. Undeploy existing ASRversion.ear from application servers
  2. Deploy ASRnewVersion.ear(cluster-ASR53.ear for clustered env) on application servers from admin console.
Changes done in STEP 9 will help in avoiding error while deployment.

“log4j: ERROR Attempted to append to closed appender named [XMLFileApp”

STEP 14.

Modify the gateway.ini , add below entry.

ASR53SERVER=MetaSolv.CORBA.WDIASR53.WDIROOT,MetaSolv.WDIASR53.WDIRootImpl

comment out similar entry for earlier version by placing a semi-colon in front of the entry.

;ASR52SERVER=MetaSolv.CORBA.WDIASR52.WDIROOT,MetaSolv.WDIASR52.WDIRootImpl


I hope this will help installing ASR newer upcoming versions, I will also try to post further the post ASR installation customization (e.g. generate java files from new IDL ASR files) for ASR new versions, please leave your feedback or query.

Saturday, August 27, 2016

Internal Compiler Error - NullPointerException in ReferenceBinding.binarySearch(ReferenceBinding.java:108)

PROBLEM


While compiling java code in Weblogic workshop 10.3(eclipse_3.3.2) encountered below error.

Internal Compiler Error-NPE in ReferenceBinding.binarySearch(ReferenceBinding.java:108)



Internal compiler error
java.lang.NullPointerException
at org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding.binarySearch(ReferenceBinding.java:108)
at org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding.getMethods(ParameterizedTypeBinding.java:542)
at org.eclipse.jdt.internal.compiler.lookup.Scope.findMethod(Scope.java:1069)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getMethod(Scope.java:2072)
at org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:428)
at org.eclipse.jdt.internal.compiler.ast.CastExpression.resolveType(CastExpression.java:459)
at org.eclipse.jdt.internal.compiler.ast.Assignment.resolveType(Assignment.java:185)
at org.eclipse.jdt.internal.compiler.ast.Expression.resolve(Expression.java:907)
at org.eclipse.jdt.internal.compiler.ast.Block.resolve(Block.java:100)
at org.eclipse.jdt.internal.compiler.ast.IfStatement.resolve(IfStatement.java:233)
at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatements(AbstractMethodDeclaration.java:428)
at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:195)
at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:400)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1085)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1164)
at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:366)
at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:626)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:392)
at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:362)
at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:174)
at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:299)
at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:59)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:269)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:172)
at com.bea.wstudio.javabuilderx.JavaBuilderX.build(JavaBuilderX.java:66)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:624)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:166)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:197)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:247)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:249)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:214)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:353)
at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:494)
at org.eclipse.core.internal.resources.Project.build(Project.java:76)
at org.eclipse.ui.actions.BuildAction.invokeOperation(BuildAction.java:195)
at org.eclipse.ui.actions.WorkspaceAction.execute(WorkspaceAction.java:141)
at org.eclipse.ui.actions.WorkspaceAction$1.runInWorkspace(WorkspaceAction.java:460)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)



CAUSE


During the Weblogic server installation process we apply multiple Weblogic patches and those need to be cleaned and activated.


SOLUTION


After applying Weblogic patches using smart update, we have to activate those patches and that we can do via below command.

Go to workshop folder in bea home directory(Oracle Weblogic installation directory) and then workshop_10.3 folder and run the command as below.

workshop.exe -clean -initialize


Hope this helps in resolving famous internal compiler error in you weblogic workshop or eclipse, Please leave your feedback or query.