Jun 242016
 
 Posted by on June 24, 2016 at 7:44 pm Database, Oracle Database No Responses »
Oracle Database

While upgrading Oracle database 11g to 12C via DBUA we came to know that the Packages and Types component is in invalid state in Dba_registry.

Below are the errors seen from DBUA as well as command line while upgrading.

Upgrade assistant failed in bringing up the database
Continue reading »

© Incase of any copyright infringements please check copyrights page for faster resolutions.
Jun 132016
 
 Posted by on June 13, 2016 at 6:43 pm Application Servers, Java App Servers, Jboss/WildFly Tagged with: ,  No Responses »
Jboss or Wildfly

While working on deploying a web application on WildFly which implements rest services, we came across below issue of REST services not starting up and all the packaged modules in ear was not initializing and many places it was complaining about the missing dependants. So to avoid this issue of conflicts with Wildfly bundled apis we need to include jboss-deployment-structure.xml file to our applications war file.

jboss-deployment-structure.xml is a new JBoss specific optional deployment descriptor for JBoss EAP 6+. This deployment descriptor provides control over class loading in the deployment in a fine grained manner. A brief write up about the same can be found here in JBoss Deployment Structure File and Add dependency configuration to jboss-deployment-structure.xml links.
Continue reading »

© Incase of any copyright infringements please check copyrights page for faster resolutions.
Apr 162016
 
FAQ

Many times we face issues like the database will be down due to some reason and even after the database issue has been fixed the application data source wont be able to reconnect to DB properly or it will run on some stale DB connections and cause transaction failure and unexpected behaviors. To avoid this we need to configure the JNDI pool to autoreconnect to a valid connection to database after recovering from shutdown/failure so that application can run smoothly.

In this article we will discuss the JNDI/DataSource autoreconnect configuration steps for different application servers.

Apache Tomcat J2EE ServerTomcat jdbc connection pool reconnect:

i. Login to Tomcat server.
ii. Navigate to ‘\conf’ and edit context.xml file
iii. Add parameters ‘validationQuery=”select 1 from dual”’ and ‘testOnBorrow=”true”’ under the Resource tag.

<Resource auth="Container"
driverClassName="oracle.jdbc.OracleDriver"
initialSize="5"
maxActive="120"
maxIdle="5"
maxWait="5000"
name="jdbc/oracle/myds"
password="secret"
poolPreparedStatements="true"
type="javax.sql.DataSource"
url="jdbc:oracle:thin:@DBHOSTNAME:1521/ServiceName"
username="testuser"
validationQuery="select 1 from tab"
testOnBorrow="true"/>

iv. Restart tomcat to reflect the changes.
Continue reading »

© Incase of any copyright infringements please check copyrights page for faster resolutions.
Apr 112016
 
 Posted by on April 11, 2016 at 8:20 pm Big Data, Database, MongoDB 2 Responses »
MongoDB

When Using MongoDB in local computer or laptop for development we usually see mongoDB eating up all RAM and makes the machine very slow to operate, so in this article we will discuss on how to restrict MongoDB memory usage in a non standard way. Usually it is suggested not to restrict mongoDB memory as MongoDB defers to the operating system when loading data into memory from disk. It simply memory maps all its data files and relies on the operating system to cache data. The OS typically evicts the least-recently-used data from RAM when it runs low on memory. So in a production environment it is not recommended to restrict MongoDB memory usage as this might impact the performance and functionalities.
Continue reading »

© Incase of any copyright infringements please check copyrights page for faster resolutions.
Mar 222016
 
Oracle Weblogic Server

While deploying application with JPA 2.0 implementation in weblogic 10.x we used to get java.lang.NoSuchMethodError: javax.persistence.spi.PersistenceUnitInfo error for the application deployment and usually you will be seeing this error in older versions of weblogic like here we faced below issue with WLS 10.3.6.

<Mar 8, 2016 1:27:12 AM IST> <Warning> <HTTP> <vmapp01g12app1> <MYServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1457380632336>

<BEA-101162> <User defined listener org.springframework.web.context.ContextLoaderListener failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'EntityManager' defined in URL [zip:C:/WL_HOME_1036/user_projects/domains/MYDOMAIN/servers/MYServer/tmp/_WL_user/MyApp01/epnft3/war/WEB-INF/lib/create_mbean.jar!/spring-config/appbean/applicationContext-appbean-config.xml]:

Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: javax.persistence.spi.PersistenceUnitInfo.getSharedCacheMode()Ljavax/persistence/SharedCacheMode;.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'EntityManager' defined in URL [zip:C:/WL_HOME_1036/user_projects/domains/MYDOMAIN/servers/MYServer/tmp/_WL_user/MyApp01/epnft3/war/WEB-INF/lib/create_mbean.jar!/spring-config/appbean/applicationContext-appbean-config.xml]:

Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: javax.persistence.spi.PersistenceUnitInfo.getSharedCacheMode()Ljavax/persistence/SharedCacheMode;

Continue reading »

© Incase of any copyright infringements please check copyrights page for faster resolutions.