Showing posts with label server configuration. Show all posts
Showing posts with label server configuration. Show all posts

Tuesday, May 10, 2016

WebLogic 10.3.x Error : NoSuchMethodError for javax.persistence.spi.PersistenceUnitInfo.getSharedCacheMode()Ljavax/persistence/SharedCacheMode

As of now mostly trend is using newer frameworks or migrating from older framework to newer one.
One of the classic situation we started facing with Application Deployment once we have done migration.

Technology Stack we are using in our Applications is as below:
·         Java 7
·         JPA 2.0
·         Spring 3.0
·         Hibernate 3.0
·         EJB 3.0
·         Oracle 11g

While deploying we are getting below exception:
Caused By: java.lang.NoSuchMethodError: javax.persistence.spi.PersistenceUnitInfo.getSharedCacheMode()Ljavax/persistence/SharedCacheMode;
at org.hibernate.ejb.util.LogHelper.logPersistenceUnitInfo(LogHelper.java:39)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:516)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)
at weblogic.deployment.PersistenceUnitInfoImpl.createEntityManagerFactory(PersistenceUnitInfoImpl.java:352)
at weblogic.deployment.PersistenceUnitInfoImpl.createEntityManagerFactory(PersistenceUnitInfoImpl.java:332)


In development environment we are using below for deployment:
·         WebLogic 12
·         Oracle 11g

So what is cause for this?
·         Pre-Production and Production environment having:
o   WebLogic 10.3.5
o   Oracle 11g

As database point of view there is no issue.
So it's mostly application server compatibility issue.
JPA Jars which WebLogic 10.3.5 is having are of different versions than application requires.

So as to resolve this issues, following are 2 possible solutions:
·         Application Level Changes:
o   Adding ANTLR specific changes to be done in weblogic-application.xml file located under META-INF.
<?xml version="1.0" encoding="UTF-8"?>


       <!--  This is needed since WL has a different version of antlr jar-->
    <prefer-application-packages>
        <package-name>antlr.*</package-name>
    </prefer-application-packages>
   
</weblogic-application>

o   Adding JPA specific JARs to application WAR/EAR only.
§  Hibernate-jpa-api.jar
§  Weblogic-fullclient.jar

·         WebLogic Level – Configuration changes:



--
III  Best Regards,
III  Abhijeet.

Wednesday, February 2, 2011

Keynote NF : Handy and productive tool to manage notes.

I would like to let you know about a good lightweight tool : Keynote NF
As we use notepad to save various important notes or mark some to-dos.
Due to this desktop gets messy and its trouble to find things which we have written for our simplicity :)
Using keynote one can save the important notes or any under process notes in single file.
It is having various features, I have found few of it while its usage:
  • Simple to use and Lightweight – When not in use keeps running in background.
  • Freeware – No licenses.
  • Supports Rich Text and various feature like MS Word.
  • Alarm / Reminders.
  • Tree based to arrangements of notes and multiple tabs.
  • Good search capabilities.
  • No need to install – Unzip and start using it.
You can explore it more and I am sure you may find it handy as compared to using notepad.
Here are details about Keynote NF:
Keynote NF Downloads (No need to install – Unzip and Use it):

Cheers!

Thursday, November 11, 2010

message from server: "Host is not allowed to connect to this MySQL server"

Today I came across the problem for remotely connecting to MYSQL database from an application hosted on different machine.

Solution for this issue is to run the following query for granting privileges  to desired user:

GRANT ALL PRIVILEGES ON *.* TO '<USER_NAME>'@'%' IDENTIFIED BY '<PASSWORD>' WITH GRANT OPTION;

Enjoy!!!