Win a copy of Rust Web Development this week in the Other Languages forum!

sajjad ahmad

Ranch Hand
+ Follow
since Jan 23, 2003
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by sajjad ahmad

I finally figured a workaround for this problem , and now JPA2.0 application is running fine on Weblogic10.3.3 server.

I found out that the problem was actully relted to hibernate validator , In my JPA method code I had a "@Valid" annotation along with the object I was getting , I was trying to use hibernate validator to validate the object before persisting it , there I was getting all these exceptions.
To get my application running on server I had to remove those @valid annotations from my JPA code and now everything is working fine. But now I am relying on page level validation which in my case is good enough.
However the ideal solution would be to find a compatable hibernat validator jar and keep the @valid annotations in your project for the sake of better validation.
For now this solution is working for me , ASA I get time I will try to find the hibernate validator jar which can work with this version on server we have and will love to have server side validation as well.
I hope this workaround will save some days of someone out there .

Please note that in order to run your JPA2.0 application on weblogic10.3.3 which is JPA1.0 compliant you will have to rename your persistence.xml to something like foo.xml and mentione the name of this xml file in your applicationContext.xml as (I am using Spring here )



rename the persistenceUnit and dataSource according to the beans you have defined in your application

and you will have to define package exclusions in your weblogic.xml file as



I invested few days to resolve the problem , and sharing the solution hoping it might benefit someone someday cheers.
9 years ago
I finally figured a workaround for this problem , and now JPA2.0 application is running fine on Weblogic10.3.3 server.

I found out that the problem was actully relted to hibernate validator , In my JPA method code I had a "@Valid" annotation along with the object I was getting , I was trying to use hibernate validator to validate the object before persisting it , there I was getting all these exceptions.
To get my application running on server I had to remove those @valid annotations from my JPA code and now everything is working fine. But now I am relying on page level validation which in my case is good enough.
However the ideal solution would be to find a compatable hibernat validator jar and keep the @valid annotations in your project for the sake of better validation.
For now this solution is working for me , ASA I get time I will try to find the hibernate validator jar which can work with this version on server we have and will love to have server side validation as well.
I hope this workaround will save some days of someone out there .
9 years ago
I was trying to debug my code and found while debugging that when I try to fetch list using JPA in my project I am getting it , but only when I try to save a record by clicking the save button on my page it doesn’t even go to create method defined in controller that’s very strange that probably means the URL pattern defined for this page which works fine in VM server is somehow not working in weblogic because this could be the only reason why I am not able to go at that break point I have.

It’s weird, also I get the Class cost exception like already mentioned


I wonder where the hell this exception is coming from ? I will dig it more and update the forum accordingly.
The fact that the persistence context is being loaded for all finder operations and even for deleting a record but giving above exception when trying to create or update a record is driving me crazy now :S.
If there was a problem loading PersitenceProvider why was it loaded when I was trying to fetch records and why it is giving ClassCastException now?
9 years ago
Good Day all ,

I am having this problem since many days now , I was able to successfully deploy JPA2.0 appliaction on weblogic 10.3.3 , the application can run select queries using JPA. But when I try to run a create or update information on the same table I get below exception


This is very strange because in my persistence.xml I have provided hibernate as JPA provider , the persistence unit defined is like below

And I have also provided the package level preferences in my weblogic.xml , below is my weblogic.xml file. As you can see I have explicitly told weblogic to prefer web app packages still it’s trying to load org.eclipse.persistence.jpa.PersistenceProvider instead of a persistenceProvider from hibernate jar.Please help me out here I am stuck at this point



I have created the same post at oracle web site
https://forums.oracle.com/forums/thread.jspa?threadID=2474374&stqc=true
9 years ago
Good day everyone ,

Can anybody guide me to a good tutorial for changing the design (css) of a spring roo generated application. Some of my requirements are
1) I want to show data in tables not divs , the table css defined in standard.css is used by list table , but I want to have a different css fr other tables i use in my application.
2) instead of showing one filed in a different row in create update pages I want to use an html table for better look and feel on the application to effectively utilize the space available. But I need different table style I can add another style in css but then I will have to include that class for each table i use in the application.Is there a better way of doing it.
3) I also want to control the width of divs in create and update pages so that I can put more columns in the tables , how can I do that?

Is there a good designer tool/plugin available to design ROO generated pages? I am even willing to buy any commercial tool if needed.

Thanks for your cooperation.

I have posted the same question on Spring roo forum for finding quick help.

http://forum.springsource.org/showthread.php?132914-Help-needed-to-edit-CSS-in-spring-roo-application&p=432265#post432265


9 years ago
Ah , finally resolved the problem. It was the most stupid problem I ever had and it watsed my whole weekend :s.

I found the solution from following website
http://stackoverflow.com/questions/8303050/including-js-files-jquery-in-jspx-files

he problem was apparently the way script tag has to be written in application meant to run on IE I was using the below java script include


The solution ws to write it like



Below I am copying some stuff from that web site

JSPX has the quirky behaviour that it auto-collapses tags without body. So effectively
<script type="text/javascript" src="route/to/scripts/jquery.js"></script>
<script type="text/javascript" src="route/to/scripts/jquery.ui.js"></script>
<script type="text/javascript" src="route/to/scripts/something.js"></script>
will end up in browser as
<script type="text/javascript" src="route/to/scripts/jquery.js" />
<script type="text/javascript" src="route/to/scripts/jquery.ui.js" />
<script type="text/javascript" src="route/to/scripts/something.js" />
which is invalid <script> syntax (rightclick page in browser and do View Source to see it yourself). The browser behaviour is undetermined.

You can workaround this by putting a <jsp:text /> between the tags
<script type="text/javascript" src="route/to/scripts/jquery.js"><jsp:text /></script>
<script type="text/javascript" src="route/to/scripts/jquery.ui.js"><jsp:text /></script>
<script type="text/javascript" src="route/to/scripts/something.js"><jsp:text /></script>


Please go to the mentioned website for the details.
9 years ago
Let me give you more details about it , I am writing the below code in spring roo generated application to load the desired js file in my application



on run time in html code I can see the js file in being included correctly (the path is correct) , but I don't see the alert messages , however if I remove line


I can see the alert messages , which means there is some problem when spring is trying to load the js file however I don't see any error both on server console or at browser.

I am almost cluless here that whats going wrong at this point.

Below is the code generated for the page where I am including the js file


and the html code for text area where I can't see this whole rich text box thing being applied is


9 years ago