Showing posts with label configuration. Show all posts
Showing posts with label 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.

Thursday, June 20, 2013

Using Oracle SQL Developer as MySQL IDE

Need to follow below steps:

- Download desired MySQL connector, unzip and place to desired directory.
- From SQLDeveloper -> Tools -> Preferences -> Databases -> Third party JDBC driver.
  "Add Entry" for desired MySQL connector.

That's It!!!

Now you can observe MySQL tab in the DB Connections SQLDeveloper window.


References:
http://www.techrepublic.com/blog/programming-and-development/configuring-sql-developer-for-mysql/564


Cheers!

Thursday, June 13, 2013

Eclipse Performance Enhancement!

Hi,

Most of the time we suffer from Eclipse responsiveness or performance.

Below is the link for changing Eclipse Memory settings in "eclipse.ini" file:

Tuesday, March 19, 2013

Notepad++ : Another good tool discovered for developers

This is very handy tool having rich file types support and syntax highlighting.

I found it quite handy if you are dealing with any Character Encoding related issues or 
Need to verify or view various characters like TAB, Carriage Return(CR), Line Feed(LF) or New Line Characters.

It also supports very reach support for Character Encoding.

Listed below the features from its official website:
  • Syntax Highlighting and Syntax Folding
  • User Defined Syntax Highlighting and Folding: screenshot 1, screenshot 2, screenshot 3 and screenshot 4
  • PCRE (Perl Compatible Regular Expression) Search/Replace
  • GUI entirely customizable: minimalist, tab with close button, multi-line tab, vertical tab and vertical document list
  • Document Map
  • Auto-completion: Word completion, Function completion and  Function parameters hint
  • Multi-Document (Tab interface)
  • Multi-View
  • WYSIWYG (Printing)
  • Zoom in and zoom out
  • Multi-Language environment supported
  • Bookmark
  • Macro recording and playback
  • Launch with different arguments

You can DOWNLOAD this from below link:

Sunday, March 17, 2013

Using style.display instead of style.visibility

Hello,

HTML-CSS-JavaScript combination is little bit tricky to non-web developers.

There are few UIs which seems to be inconsistent as we are using JavaScript to enable/disable the HTML Components.
And it takes time to find out and align all the forms.
If you are using any JavaScript and CSS combination to hide/show any components, below information may save your time. 


To maintain proper alignment of whole HTML and its elements, please use following:
Element Property
Value
style.display
'none' (To hide element)
style.display
'' (Empty string to show element)


Please try to avoid using style.display='block' and style.visibility='hidden'/'visible'/'inline' as it is affecting the CSS applied.

---
Cheers and Enjoy Scripting!
-------------------------------------------------------------------------
Alphabet 'O' stands for Opportunity,
Which is absent in 'Yesterday', Is available once in 'Today'
And thrice in 'Tomorrow' So don't think about 'Yesterday'.
-------------------------------------------------------------------------

Thursday, April 14, 2011

Productivity Tool - PowerPro

The PowerPro software provides the user with a launch bar that is both compact and powerful. It also includes a menu and tray icon functionality. The program integrates three functionalities. It can run commands such as tool bars, tray icons, scheduler, menus, timer, mouse and hot keys. The PowerPro software can also be used by the user to close, maximize, minimize, position, roll-up to caption and tray minimize other program's windows. The program also provides utility functions. It can send keystrokes to programs, provide virtual desktops, run commands when Windows first opens, serve as a clipboard extender, can shutdown, enable keyboard macros, show all folder files in a menu, enable sounds, wallpaper and screensaver activation as well as randomization.

In practical scenarios, software professionals can use this to :
·         Add List of putties to connect to various servers and get rid of typing username password each time.
Command is as follows:
putty.exe -ssh <UserName>@<ServerIP> -pw <Password>
·         Create shortcuts to various software.
·         Create shortcuts to documentation page(so no need to open browser and then search for bookmark if done).


You can more explore about this software using following link:
·         Home Page: http://powerpro.webeddie.com/index.html
·         Feature & Configuration Demo: http://powerpro.webeddie.com/tour/index.htm

So after exploring this, you can save time and concentrate on other work :)

Cheers!!!

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!

Tuesday, December 21, 2010

Use Productivity Tool : StrokeIt !!!

While working on various windows tired of minimizing, opening, doing various operations.
Now time to move on to StrokeIt - Mouse Gestures for Windows. : http://www.tcbmi.com/strokeit/

Want to download StrokeIt, use the following link:
http://www.tcbmi.com/strokeit/downloads.shtml

It is also FUN to use this tool using your mouse :)

To get more information about how to use and other details, check out following link:
http://www.tcbmi.com/strokeit/wiki/index.php?title=Help:Getting_started

Thursday, May 8, 2008

Java IDE selection :)

This article contains mostly the links of articles which are about the IDE selection & comparison of their features.

Java developers are generally used to with the IDEs : Eclipse, NetBeans, Intellij IDEA.

Most of the developers use Eclipse & Jetbrains' Intellij IDEA.

So lets view the following link to compare those.

http://www.ibm.com/developerworks/library/os-ecidea/?ca=dgr-lnxw06IDEA2Eclipse

http://trusoftware.blogspot.com/2006/11/eclipse-vs-intellij-idea.html

http://www.javafaq.nu/java-article1009.html

http://docs.codehaus.org/display/GRAILS/IDEA+Integration

http://memo.feedlr.com/?p=4

http://librenix.com/?inode=5533

http://blogs.jetbrains.com/idea/2006/11/eclipse-vs-intellij/

http://blog.tremend.ro/2006/08/10/intellij-idea-versus-eclipse-part-i/

Thursday, March 6, 2008

New version resin 3.1.3 pro is more stricter reagarding JSP/Servlet specification

I came to know about this while upgrading the resin server.
Resin is stricter regarding the specification of JSP & servlet as compared to other web-containers like Tomcat.
Most of the JSP pages were created using the custom tags, so those were throwing exceptions.
Resin is strict about the valid return values in Class file of Tags and the value which we mention in JSP.

Wednesday, February 6, 2008

How to run javac 1.5 (or beyond) compiler for JSP compilation in Tomcat 5.5 with generics enabled (and other Java 1.5 only features like autoboxing)?

Most of web applications are using Tomcat as a container & Java as these are open source & much more information available for their usage.
Apache's Tomcat & Sun's Java are coming with their newer versions so we are going for their new features.
Like in Java 1.5 has come with its newer features of Autoboxing & Generics which made programmers' life simpler but while upgrading our applications it becomes difficult. ;)

I came across this problem while upgrading my application with Java(1.5). I have used Tomcat 5.5.9 to run my web-application. This version of Tomcat is compiling JSP with Java(1.4) even if I have only JDK 1.5 installed on my machine.
Due to this my changes in JSP regarding Autoboxing won't getting compiled & tomcat started throwing exception for JSP which is having use of Java 1.5 features.

So to make them compile with Java 1.5 we have to follow the steps:
[Step 1] Copying tools.jar, ant.jar, ant-launcher.jar to <TOMCAT_HOME>\common\lib & removing jasper-compiler-jdt.jar
You will get the tools.jar from <JAVA_HOME>\lib & other two ant related jars from lib folder of ANT. Better to have latest updated Ant.

[Step 2] Modifying the web.xml located @ <TOMCAT_HOME>\conf\

compilerSourceVM - What JDK version are the source files compatible with? (Default JDK 1.4)
compilerTargetVM - What JDK version are the generated files compatible with? (Default JDK 1.4)
* You have to modify JDK version to 1.5 for compliation of JSP with JDK(1.5).

To more info about above parameters you have to visit Apache Tomcat 5.5 Documentation.
The above parameters are to be added as shown in following code:
<servlet>
<servlet-name>jsp</servlet-name>
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
<init-param>
<param-name>fork</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>xpoweredBy</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>compilerSourceVM</param-name>
<param-value>1.5</param-value>
</init-param>
<init-param>
<param-name>compilerTargetVM</param-name>
<param-value>1.5</param-value>
</init-param>

<load-on-startup>3</load-on-startup>
</servlet>