Showing posts with label Weblogic. Show all posts
Showing posts with label Weblogic. Show all posts

Sunday, 16 August 2020

Jboss Application Migration Toolkit.

I was asked to work on the WebLogic to Jboss Migration, I was Clueless and not sure where to start for the Migration. Hence, I am writing these posts. Red Hat gives you the toolkit by using which you can generate the report for the Migration tasks.


Step:1 Download the Toolkit from Here. There are different options available for download.


1.       Command Line Interface.

2.       WebConsole.

3.       IDE Plugin.

       I am going to Cover the Command Line Interface Tool Here.


Step:2 Extract and move to location say C:/Jboss/Migration


Step:3 Identify the Package we need to run against either Ear, War, Jar, or Classes.


Step:4 Execute


$ ./rhamt-cli --input <PATH_TO_PACKAGING> --output <OUTPUT_REPORT_PATH> --source weblogic --target eap:7 --packages <PACKAGES_AGAINST_TO_RUN>


Eg: $ ./rhamt-cli --input /path/to/simple-sample-app.ear --output /path/to/output/ --source weblogic --target eap:7 --packages com.acme


Step:5 Once Report has Generated Open it and Look for the Mandate migration and you need to fix it. If you are not providing the Options listed above then it prompts for the option, if not it will delete it while executing this please be cautious it may delete all the files if the parameters are not passed correctly .!!!!


Happy Learning !!!!!

WebLogic to WildFly Migrating Strategy

This is one of the topics, which has fewer documents over the Internet. The following post will help you to transform it and gives the Clear picture of what exactly needs to be done for the Migration.

I will recommend you start with Identifying the Following resources to Migrate. We can see these topics covered in separate posts.

1.       JNDI and Context Lookup.
2.       Data Sources.
3.       Queues.
4.       Connection Factories.
5.       Transaction Manager.
6.    Security.

Once if the above-mentioned steps are done then it’s time for the build and deployment. Identify and eliminate WebLogic dependencies.

1.       Build Application using the Java
2.       Remove WebLogic Specific Jars.
3.       Check and Remove the Compilation Jars.
4.       Deploy Application on WildFly and resolve the runtime dependencies.

             

Sunday, 6 August 2017

Tuning Weblogic Server - ATG Servers

Hi All,

     I Was Facing the Slowness in Starting my weblogic server, I cannot point out the Exact Issue then googled it found the below solutions .

 Adding -Djava.security.egd=file:///dev/urandom or -Djava.security.egd=file:/dev/./urandom to JAVA_OPTIONS has helped me to solve the issue.

Hope your weblogic is Starting Fastly.


Happy Learning !!!!!

Saturday, 29 July 2017

Logging in weblogic

Hi guys today I am going to share an interesting topic on weblogic server start up flags.which will be used for atg or any other server start up.
Most of us will configure the weblogic in local and start and stop server through the command prompt will not cause any issue on the logging.  Where else some part of the people especially people working on the build and deployment and those who responsible for the configuration of the servers will face this issue .
The issue is logging the logs in to the out file and because of the gc threads running across, for this I have found the solution and delighted to share with you as well .
Before pitching into that , weblogic gives us the provision where we can  configure the server from the console , after configuring it also gives us the way to define the server start up arguments ,memory and jvm options .
So what ever I am describing below can be configured from the console  of weblogic java arguments or from the start up script in the java_options variable .
$java_options= “xxxxx”
Export $java_options
1)Server logging .
By default the logging will not be redirected to the out file , you have to mention it explicitly , if you are not mentioning it then weblogic will not be knowing where to write the output ie it can be error , logging,debugging or the info. Just configure the below and see the file during the start up and after it will be writing to it.
-Dweblogic.Stdout=/data/logs/weblogic/dev1a.out
-Dweblogic.Stderr=/data/logs/weblogic/dev1a.out
2) java memory .
Once if you define like the below memory will be allocated for the server instances.
Xms4096m -Xmx4096m -XX:NewSize=1024m -XX:MaxNewSize=1024m -XX:PermSize=512m -XX:MaxPermSize=512m
3)gc threading.
By default in Linux gc thread will be writing the logs all the time.  When you define like below It will disable and give the clean log , of the server.
XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:ParallelGCThreads=4
If you find any difficulties please raise to me . so I can  develop my post further.
Happy learning.!!!!

Friday, 7 April 2017

Timezone Region not found Exception in Weblogic

Hi Readers,

Good Day!! Today we are going to see not the technical, but some strange Exception which I faced while upgrading my web logic to 12.1.3, though the exception looks simple, Identifying and rectifying this issue will be challenging. If any of this readers face same exception it is enough you follow only this, will work exactly.

This error exactly will be caused, when configuring the Data Sources in Weblogic . We used to configure the weblogic datasources by configuring the JNDI name,Driver Name, username and password after the configuration if we try to do TestConfiguration then will get the below error

Message icon - Error Connection test failed.
Message icon - Error ORA-00604: error occurred at recursive SQL level 1 ORA-01882: timezone region not found <br/>oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:450)<br/>oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:392)<br/>oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:385)<br/>oracle.jdbc.driver.T4CTTIfun.processError(T4CTTIfun.java:1018)<br/>oracle.jdbc.driver.T4CTTIoauthenticate.processError(T4CTTIoauthenticate.java:501)<br/>oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:522)<br/>oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:257)<br/>oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:437)<br/>oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:954)<br/>oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:639)<br/>oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:666)<br/>oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)<br/>oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:566)<br/>oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:317)<br/>oracle.jdbc.xa.client.OracleXADataSource.getPooledConnection(OracleXADataSource.java:486)<br/>oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.java:174)<br/>oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.java:109)<br/>weblogic.jdbc.common.internal.DataSourceUtil.testConnection0(DataSourceUtil.java:356)<br/>weblogic.jdbc.common.internal.DataSourceUtil.access$000(DataSourceUtil.java:22)<br/>weblogic.jdbc.common.internal.DataSourceUtil$1.run(DataSourceUtil.java:254)<br/>...

If you encounter this type of exception, then you have to follow below steps

Navigate to <WEBLOGIC-INSTALLED DIR>\user_projects\domains\<YOUR-DOMAIN>\bin then 

open the file named setDomainEnv.cmd 

Search for the Property called JAVA_PROPERTIES ad update that property with  the below values

JAVA_PROPERTIES="-Dwls.home=${WLS_HOME} -Dweblogic.home=${WLS_HOME} -Duser.timezone="GMT""

That means you are defining the Time zone which is not defined.  I am defining the GMT because it’s my Time Zone.

After the Changes, you can restart the Managed server then try configuring the Data Source now, you will not face this exception again. That’s it you are done.

Happy Time Saving !!!!!

Friday, 24 March 2017

Weblogic cxf logging services

When you face the below logs in web logic console and the console stopped unexpectedly or hangs or stepped unexpectedly , then you have to follow the below steps for resolving it.

Mar 24, 2017 6:44:55 PM org.apache.cxf.services.RecordStoreService.RecordStorePort.RecordStore
INFO: Outbound Message
---------------------------
ID: 1
Address: http://localhost:8500/ATGen-dimvals/
Encoding: UTF-8
Content-Type: text/xml
Headers: {Accept=[application/fastinfoset, */*], Accept-Encoding=[gzip;q=1.0, identity; q=0.5, *;q=0], SOAPAction=[""]}
Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><startTransaction xmlns="http://recordstore.itl.endeca.com/" xmlns:ns2="http://record.itl.endeca.com/"><transactionType>READ_WR
--------------------------------------
Mar 24, 2017 6:44:55 PM org.apache.cxf.services.RecordStoreService.RecordStorePort.RecordStore
INFO: Inbound Message
----------------------------
ID: 1
Response-Code: 200
Encoding: ISO-8859-1
Content-Type: application/fastinfoset
Headers: {Content-Length=[196], content-type=[application/fastinfoset], Date=[Fri, 24 Mar 2017 13:14:55 GMT], Server=[Jetty(6.1.26)]}
Payload: α ☺ 8╧♥soap(http://schemas.xmlsoap.org/soap/envelope/≡???Envelope???♥Body8╧☻ns2∟http://record.itl.endeca.com/═!http://recordstore.itl.endeca.com/≡=?↨startTransactionResponse=?♣return=?☺id?26   ≡

Step:1

Go to $WL_HOME/../user_projects/domains/base_domain/config/
And add the following In config.xml

<log-filter>
    <name>CXFFilter</name>
    <filter-expression>((SUBSYSTEM = 'org.apache.cxf.interceptor.LoggingOutInterceptor') OR (SUBSYSTEM = 'org.apache.cxf.interceptor.LoggingInInterceptor')) AND (SEVERITY = 'WARNING')</filter-expression>
  </log-filter>

 <server>
   <name>Prod</name>
   <log>
     <log-file-filter>CXFFilter</log-file-filter>
     <stdout-filter>CXFFilter</stdout-filter>
     <memory-buffer-severity>Debug</memory-buffer-severity>
   </log>
   <listen-port>7103</listen-port>
   <web-server>
     <web-server-log>
       <number-of-files-limited>false</number-of-files-limited>
     </web-server-log>
   </web-server>
   <listen-address></listen-address>
 </server>

For the server which you were using should be updated . with this filter .

You have to define for the server and after that restart the weblogic  admin and managed server .

You can also define this from WebLogic console which is very easy when compared to this.

<YOUR_DOMAIN>/logfilters/


create the new filter termed  CXFFilter for the expression give  the below 


((SUBSYSTEM = 'org.apache.cxf.interceptor.LoggingOutInterceptor') OR (SUBSYSTEM = 'org.apache.cxf.interceptor.LoggingInInterceptor')) AND (SEVERITY = 'WARNING')


then go to your corresponding server and select logging, for the LogFile and Standard out give the filter as CXFFilter , save and restart the server .



Step:2

Go to <JAVA_HOME>\jre\lib\logging.properties  and set the following properties

org.apache.cxf.interceptor.LoggingInInterceptor.level = WARNING
org.apache.cxf.interceptor.LoggingOutInterceptor.level = WARNING


After Setting up this then you have to Start the Server and start indexing . Happy Indexing !!!!!!