JBoss is bundled with Hibernate as the default JPA/EJB3 persistence implementation, like GlassFish which is bundled with TopLink essentials. Developers who are trying to use TopLink in an application which is to be deployed on JBoss may face with some difficulties.
Persistence implementation class is referenced in persistence.xml. Since Hibernate JPA implementation is referenced somewhere in persistence.xml in a META-INF folder visible in JBoss classpath, javax.persistence.Persistence finds at least two implementations: TopLink (which is deployed with the application, and you put persistence.xml in your classes/META-INF) and Hibernate. A call to EntityManagerFactory implementation constructor is done through reflection. If it returns null, Persistence tries with the next implementation found. The problem here is that a call to Hibernate's EntityManagerFactory cannot be done, since Hibernate classes (org.hibernate.*) are not visible in the current classloader's classpath, so your application fails to deploy with a ClassCastException for Hibernate's EntityManagerFactory implementation. To overcome this problem you need to do a small trick. Just copy hibernate-entitymanager.jar inside WEB-INF/lib folder, so that org.hibernate.ejb.HibernateEntityManagerFactory is visible in class path. Since all hibernate libraries are not available and also you specified another implementation (TopLink) in your META-INF/persistence.xml, Hibernate is bypassed and TopLink is used instead.
Friday, November 16, 2007
Thursday, November 8, 2007
Typos in Digital Copies of Yusuf Ali Translation
There are a number of copies of widely-known Quran translation of Abdullah Yusuf Ali on the web. Since most of the digital copies are using the text provided by USC-MSA (which is actually extracted by means of OCR), they all have the same typo for 23:22.
Today, I noticed a bug report for Zekr's Yusuf Ali translation, which mentioned the typo. I then checked the printed copy of the book on Google books and found the original text, which was different in 4 places.
The original Arabic text for Sura Al-Muminun, aya 22 is:
the right English translation of Yusuf Ali is:
while many websites have the meaningless translation:
I just tried a Google search and found that the buggy one is more commonly used than the right one. My first query resulted in 6 items, while the second one (buggy) resulted in 27. The copy on on Wikisource also had that problem, which is now fixed.
Special thanks to Benjamin Geer for pointing out these typos.
Today, I noticed a bug report for Zekr's Yusuf Ali translation, which mentioned the typo. I then checked the printed copy of the book on Google books and found the original text, which was different in 4 places.
The original Arabic text for Sura Al-Muminun, aya 22 is:
وَعَلَيْهَا وَعَلَى الْفُلْكِ تُحْمَلُونَ
the right English translation of Yusuf Ali is:
And on them, as well as in ships, ye ride.
while many websites have the meaningless translation:
An on them, as well as in slips, ye side.
I just tried a Google search and found that the buggy one is more commonly used than the right one. My first query resulted in 6 items, while the second one (buggy) resulted in 27. The copy on on Wikisource also had that problem, which is now fixed.
Special thanks to Benjamin Geer for pointing out these typos.
Friday, September 21, 2007
یادی از علامه سید مرتضی عسکری و اندیشهٔ وحدت اسلامی
خدا رحمت کند علامهٔ فقید سید مرتضی عسکری را. این مقاله را امروز توی سایت تقریب دات آیآر دیدم. یکی دو قسمت جالب رو اینجا نقل میکنم. متن کاملش رو از اینجا ببینید.
خدای سبحان میفرماید: «ان هذه امتکم امة واحدة وانا ربکم فاعبدون» (انبیاء /92)؛ این پیامبران بزرگی که به آنان اشاره کردیم (و پیروانشان) همه یک امت واحد بودند و من پروردگار شمایم، تنها مرا بپرستید....
وحدت عملی
در این باره از باب مثال عرض میکنم: ما در مکتب اهل بیت (علیهم السلام) حُکمی داریم مبنی بر این که «هر کس در نماز بسمالله الرحمن الرحیم نگوید نمازش باطل است»، و نمیتوان به او اقتدا کرد ولی با توجه به این که برادران حنفی مذهب ما چنین عقیدهای ندارند و حمد را بدون «بسمالله» قرائت میکنند، از ائمه ما در کتاب «وسائل الشیعه»، در سه حدیث از امام صادق (علیه السلام) آمدهاست که فرمود:
«من صلي خلفهم كان كمن صلي خلف رسول الله»، (یعنی؛ کسی که پشتسر آنان نماز بخواند، مانند آن است که پشتسر رسول خداصلی الله علیه وآله نماز خوانده است)، با این که آن امام [جماعت] حنفی «بسمالله» نمیگوید. در حدیث دیگری آمده:
«اذا صلّيت معهم غفرلك بعدد من خالفك - في قراءة البسملة - و حضر الصلاة في المسجد»، (یعنی؛ هر گاه تو با آنان نماز بگزاری، به تعداد کسانی که در خواندن بسمالله با تو مخالفت کرده و در مسجد به نماز ایستادهاند، از گناهانت آمرزیده میشود).
راوی دیگری به امام صادق (علیه السلام) شکایت میکند و میگوید: «امام جماعت ما در عقیده مخالف با ماست، او همه یاران ما [شیعیان] را دشمن میدارد، [وظیفه ما چیست؟]. امام (علیه السلام) فرمود: از سخن وی چیزی بر تو نیست، به خدا سوگند اگر آنچه میگویی راست باشد، تو از او به امامت در مسجد سزاوارتری، تو در ورود به مسجد نخستین و در خروج از آن آخرین نفر باش و با مردم خوشرفتاری کن و سخن نیکو بگو.
از فرمایش امام صادق (علیهالسلام) برمیآید که آن حضرت از سخن راوی و انتقادش خشنود نشده، لذا به او فرمودند: با مردم خوشرفتار باش و نیکو سخن بگو.
امام صادق (علیه السلام) به راوی دیگری فرمود:
«یا اسحاق! اتصلی معهم فی المسجد؟ قال: قلت نعم، قال: «صل معهم، فان المصلي معهم في الصف الاول كالشاهر سيفه في سبيل الله» (*) ، ای اسحاق، آیا با آنان [مخالفان] نماز میگزاری؟ گفتم: آری؛ فرمود: با آنان نماز بگزار، همانا، نمازگزار با آنان در صف اول، مانند کسی است که در راه خدا شمشیر کشیده است.
بدین سان وحدت عملی تحقق مییابد.
امام صادق (علیه السلام) شخصاً با ابوحنیفه مینشست و در عقاید و احکام با وی مناظره میکرد، و این کار تا زمان شیخ مفید در بغداد معمول بود. شیخ طوسی استاد کرسی تدریس در دارالخلافه بود، ولی سلاجقه که به بغداد رفتند، کرسی شیخ را سوزاندند و میان ما جدایی افکندند، سپس اختلافهایی میان صفویه و خلافت عثمانی پدید آمد، و این اختلافات در واقع از سیاست ناشی میشد نه از دین.
(*) و در این لحظه کتاب «معالم المدرستین» را با دستخویش بلند کرد.
منبع: مجمع جهانی تقریب مذاهب اسلامی
Wednesday, September 12, 2007
ZRE: Zekr Ramadan Edition

Zekr Ramadan Edition released last night. This is a special release (0.6.5) specially developed for Ramadan to deliver recitation feature by the start of Ramadan. In this version, user can listen to Quran recitation online of offline. Recitation support is done through a small flash MP3 player (so all recitations are to be in MP3 format). It uses JW MP3 player for playing recitations.

There is an audio download package on Zekr resources page if you want to download and listen to Quran recitation offline. Instruction:
1. Download minshawi.zip and minshawi-offline.properties. Add minshawi-offline.properties through Tools > Add > Recitation (or just copy it in ~/.zekr/audio).
2. Unzip minshawi.zip to [zekr installation directory]/res/audio/minshawi
3. Restart Zekr and choose Minshawi recitation through Audio > Recitation > Al-Minshawi (offline)
Steps in more detail can be seen on this page.
Ramadan Mubarak :)
Friday, July 27, 2007
مُعاشران گِـره از زلف یار باز کنید
| دوباره ولوله افتاده در ولایت دل | دوباره میچکد از خامهام حکایت دل | |
| ولایت دل از این شورْ باز، آباد است | به لطف حضرت معشوق، رازآباد است | |
| دمیده صبحگه دولت دلم امشب | ببین به مرتبهٔ عشق نائلم امشب | |
| سپردهام دل خود را به دلبری که مپرس | گرفته دست مرا ذرّه پَروری که مپرس | |
| به عشق اوست که اینگونه میسُرایم مست | به عشق اوست که دست مرا گرفته بهدست | |
| به عشق اوست که بیتاب در تب و تابم | به عشق اوست که امشب نمیبرد خوابم | |
| به عشق اوست که بیگانه از خودم امشب | به عشق اوست که دیوانهتر شدم امشب | |
| به عشق اوست که حیران شطح و طاماتم | به عشق اوست که محو تجلی ذاتم | |
| به عشق اوست که سامان نمیپذیرم من | به عشق اوست که در دام دل اسیرم من | |
| به عشق اوست که اندیشه را رها کردم | حساب خویشتن از دیگران جدا کردم | |
| حذر نمیکنم از عشق و رندی و مستی | جز این سه چیست مگر دستمایهٔ هستی؟ | |
| گذشته کار من از احتیاط و ترسیدن | «منم که شهرهٔ شهرم به عشق ورزیدن» | |
| گذشتهام از اندیشهٔ جَحیم و بهشت | «نگارمن که به مکتب نرفت وخط ننوشت» | |
| اگرچه قاصرم از شرح حُسن دلجویت | اگرچه تاب ز من بُرده تابش رویت | |
| اگرچه نام تو در مثنوی نمی گنجد | نمی ز جام تو در مثنوی نمیگنجد | |
| حدیث حُسن تو را بس نمیکنم ای دوست | تو را مقایسه با کس نمیکنم ای دوست | |
| حدیث حسن تو در سینهام نهان تا چند؟ | حدیث مستی دیرینهام نهان تا چند؟ | |
| به نام «حضرت تو» مُهر این سکوت شکست | علی است آنکه مرا این پیاله داده به دست | |
| علی است سلسله جنبان عشق در عالم | علی است اول و پایان عشق در عالم | |
| علی است ساقی میخانهٔ سلوک و شهود | علی است باعث این دستگاه بود و نبود | |
| علی است جلوهٔ حق در زمینهٔ هستی | علی است بادهٔ جوشان و حضرت مستی | |
| کنون که توبهٔ تزویر را شکستم من | قسم به وحدتِ واحد علی پرستم من | |
| علی پرستی من شرک نیست ای زاهد! | بدان، یقین مرا مرتضی است خود شاهد | |
| مگر جداست علی از خدا مَعاذالله! | مگر جداست یقین از وِلا مَعاذ الله! | |
| علی است با حق و حق با علی است، گوش کنید | پیاپی از خُمش اسرار فیض، نوش کنید | |
| علی شدن نه به نام است و جامه و سیم | علی شدن نه به انگشتر است و تیغ و رَد | |
| علی شدن نه به خیبر گشودن است و غض | علی شدن نه به فقه است و جایگاه قض | |
| میان خِیل خلایق چرا علی تنهاست | «هزار نکتهٔ باریکتر ز مو اینجاست» | |
| نه هر مجسمه سازی پـیمبری داند | «نه هر که چهره برافروخت دلبری داند» | |
| سپرده ام دل خود را به دلبری که مپرس! | گرفته دست مرا ذره پروری که مپرس | |
| بدان که دلبرم از راه میرسد امشب | «یگانه رهبرم» از راه میرسد امشب | |
| «رسید مُـژده که ایام غم نخواهد ماند» | علی پرست دگر مُـتهم نخواهد ماند | |
| شب ولادت مولاست، نغمه ساز کنید | «مُعاشران گِـره از زلف یار باز کنید» |
Sunday, July 22, 2007
Zekr 0.6.0beta2 Released
Zekr 0.6.0beta2 is out. This version fixes a number of bugs with advanced search and introduces the following features (main features only):
Get it here.
- Fuzzy queries for advanced search
- HTML export for bookmark sets
- Adding some command line options: -index, -clean, -workspace
- Making task pane resizeable (optional)
- A new language pack: Pashto (thanks to Qudratullah)
Get it here.
Friday, June 15, 2007
Zekr Running on OLPC
Five months ago, I received an email from Babar Haq, a Pakistani Server Technologies Expert, from Open Source Resource Center (OSRC), Pakistan Software Export Board (PSEB) (G) Limited. He was trying to bundle Zekr in their customized OLPC (see this) machines.
We were finally able to run Zekr on an XO-1 machine (AKA OLPC, build 406), using gij, after months of trial-and-error in making native build of Zekr using GCJ, so that there would be no need to any JRE.
I couldn't eventually build a native version of Zekr, because GCJ (using -static-libgcj option) does not embed XML parser code even when explicitly newing
To make a long story short, now Zekr runs on XO-1, using a copy of necessary GCJ libraries and executables from Ubuntu 7.04 (Feisty). There is no need to have Mozilla, since OLPC readily includes XUL Runner. I've put here an image taken by Babar, from an XO-1 machine running Zekr 0.5.0 final on it.
From Wikipedia:

We were finally able to run Zekr on an XO-1 machine (AKA OLPC, build 406), using gij, after months of trial-and-error in making native build of Zekr using GCJ, so that there would be no need to any JRE.
I couldn't eventually build a native version of Zekr, because GCJ (using -static-libgcj option) does not embed XML parser code even when explicitly newing
gnu.xml.dom.DomDocumentBuilderFactory. See these topics about the issue on GCJ mailing list: libgcj_bc.so not embedded and Trying to embed gnu.xml.dom.DomDocumentBuilderFactory.To make a long story short, now Zekr runs on XO-1, using a copy of necessary GCJ libraries and executables from Ubuntu 7.04 (Feisty). There is no need to have Mozilla, since OLPC readily includes XUL Runner. I've put here an image taken by Babar, from an XO-1 machine running Zekr 0.5.0 final on it.
From Wikipedia:
The XO-1, previously known as the $100 Laptop or Children's Machine, is a proposed inexpensive laptop computer intended to be distributed to children around the world, especially to those in developing countries, to provide them with access to knowledge and modern forms of education. The laptop is being developed by the One Laptop per Child (OLPC) trade association.

Subscribe to:
Posts (Atom)