Jehan Jaleel

Ranch Hand
+ Follow
since Apr 30, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jehan Jaleel

Hi Jeanne,

Thanks for taking the time to help me, I appreciate it.

So if I were to create a calculation summary table, I would probably need a trigger to update it from the source table right?

Can you please offer some suggestions on how I can write this trigger based on the query I provided? Because I have the count, group by and joins the trigger syntax is not clear for me based on the simple examples I found online. I am using a MySQL DB.

Thanks.
Hi,

I have a query which counts the amount of work that some workers have done in a given day. In its most simple form the query is



The actual query has even more joins than I have shown here but this is the core of it.

The problem is that this query is really slow. Can anyone offer suggestions to speed it up?

One idea is to create a seperate table with only 2 columns (workCount,workDate), and to have a trigger update this table. Is this feasible? Is there a better way?

Thanks.
Hi,

I am creating a Joda DateTime object as follows...



I am seeing that the value of dt1 in my debugger is "2013-10-07T00:00:00.000-04:00". So I am just wondering what this "T00:00:00.000-04:00" means? I am guessing it is the time representation of my date but what time is it?

Thanks.
Hi,

Can someone help me understand why the below update from subquery is failing on MySQL 5.6 DB..



MySQL gives the error..



Could it be because hitData_id does not allow nulls and the subquery sometimes returns null? If so how do I modify it to never return null?

Thanks in advance for any help.
I figured it out. The command Link was actually in a separate JSF page from the input field which had the disabled attribute. It was being included in like so...



So I think the problem was the commandLink was not "seeing" the panelGroup that it needed to re render. Rather than even using the reRender attribute, I simply added the Panel Group (which has the input field which has the disabled) called "taskCostWidget" to the existing render attirbute but I prefaced it with "main"...



This did the trick.

My sincere apologies for not sharing this information with you earlier. But your advice was valuable in helping me focus on exactly where the problem was, and it also helped me learn more about JSF, as well as see the many issues in this code I am now responsible for.

Thanks again.
10 years ago
JSF
Tim,

Thanks for taking the time to respond and for telling me about some of the JSF Standards and Best Practices. I actually did not write this code myself but simply inherited. I know it would be best to refactor but right now I just need it to work.

Regarding my actual problem, I am not sure though what you mean by saying the commandLink element is defective. The method specified in the action attribute is being called and I am seeing the code in the JSF backing being firing when I put a breakpoint there. So the commandLink itself is working.

My only question is why the h PanelGroup element is not getting updated like the RichFaces docs which I provided in the link said it would. Specifically the disabled attribute of in the input field which the PanelGroup encompasses is not being called. Do you have any idea why this is happening?

Thanks again,
Jehan
10 years ago
JSF
Hi,

I have a button implemented as a RichFaces a4j Command Link...



When this button is clicked I want an input field another part of the page to be refreshed...



Specifically what I need is for the disabled property to be updated. Notice how disabled currently calls the Controller to see if the object is in paused state. Right now what happens is even after user pauses by clicking the button the input field remains disabled. Only a full page refresh enables it.

I tried using the render and reRender attributes that the RichFaces docs (http://docs.jboss.org/richfaces/latest_3_3_X/en/devguide/html/ArchitectureOverview.html) mentioned but to no avail.

Can anyone offer any suggestions?

Thanks in advance for any help.
10 years ago
JSF
This SQL currently gives an error in MySQL....


[Error Code: 1292, SQL State: 22001] Data truncation: Truncated incorrect DOUBLE value: 'false'

But this SQL works fine..



What am I missing?

Thanks in advance for any help.
Hi,

I find myself in the difficult position of having to debug and resolve issues from someone else's code. What makes it even more painful is that it is not Java but Webharvest, a language I am not too famlialr with....

Can some of the gurus here take a look at this and see if you can find any errors...


Thanks in advance for any help.>
10 years ago
Hi,

I have a native SQL query which I want to execute through Hibernate...



The above code is leading to below exception....



createdBy is a column in the Run table and in the Run JPA entity, so I really do not know why it is not identifying it as a parameter.

Thanks in advance for any help.
Hi all,

I figured it out. I just created another breadcrumb list and wrapped it with the conditional statement like below...

10 years ago
JSF
Hi,

I have the below JSF code which generates bread crumbs..



The issue is that one member of the bread crumb list is conditional (rendered="${run.run.campaign.type == 'COMPOSITE'}"). This is causing an extra redundant bread crumb arrow to appear when that condition is not present. Here is the HTML output....



Any suggestions?

Thanks in advance for any help.
10 years ago
JSF
Hi,

I know this is not Java related, but since this is my favorite forum I think I will post it here.

I am running MySQL Server 5.6 Community on Windows. I want to run a SQL script which is very large (about 3 GB) on one of the databases. I cannot even open the script in DBVisualizer (the tool I used to access mySQL), so I decided to run it from the Windows command line with the below...



But after a few minutes it gives the following error..



I believe it means the server timed out and closed the connection, but how to prevent it from doing so. The SQL file contains CREATE TABLE and INSERT INTO statements (basically it builds a client database locally), so I cannot run it multiple times

Does anyone have any suggestions on how to get around this?

Thanks in advance for any help.
One clue I have to the root of this problem is that the application context file imports beans from other config files like so...



Now in production (and in other developers' setup), these other config files are always in JARs within the lib folder. But what I did was deploy to Tomcat directly from MyEclipse and this caused the application to be in exploded format (so the config files are in the classes folder). When I deleted the files in the classes folder and imported the JARs, then the problem went away. But it is still strange. Why would the location of the files matter as long as it within the classpath?

Thanks.
10 years ago
I have a Spring based web application that I am trying to load in my local Tomcat. (Spring 3.0.5, Tomcat 6)

Right now when the application is starting up on Tomcat, while it is trying to initialize the Spring Web application context, it is going into an infinite loop trying to create the beans I have defined in my XML config files. For example one of the beans bathTransactionManager, you can see below how it gets created and destroyed over and over again...



Any ideas what is causing this?

Thanks in advance for any help.
10 years ago