Win a copy of Hello World this week in the Python forum!

laura mccord

Ranch Hand
+ Follow
since Feb 10, 2009
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
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by laura mccord

I have a package that contains 100s of programs it it.  They all have a main function which means they can be invoked and ran... they each output to std out
i need a program that runs all of them... any ideas how I would do this?

Thanks
2 years ago
Hi,

I can't get my object stored in the database. I pass my object to the method and I placed some print statements and the object is not empty.

I configured hibernate to show the sql and I see after it checks the nextval in the hibernate_sequence nothing happens.

Here is the method:




This is returned from the console:

Hibernate:
select
hibernate_sequence.nextval
from
dual
Exit Status : FAILED

Any suggestions?

Thanks
So I found this way of doing it




It seems like it works but just wondered if this is the best way. I have this separated from my web application right now and I've been thinking if I should incorporate it. The only thing I thought of is that the application is on a load-balancer so if the scheduler goes off I don't want this triggering on each server, I just want it to execute on one of them.

Thanks
6 years ago
I am trying to figure out how to incorporate spring batch. I need to execute a class file on a scheduler and I thought that spring batch might be a good solution but the examples that I have bumped into don't seem to fit my situation.

I have a class that queries ldap and returns a list of user objects. Then I pass the user list to a separate class for processing, in this process it queries a separate database to grab some additional data associated with the user and then I email a newsletter using velocity.

The main objective is to trigger this each morning. The examples that I have read talk about an ItemReader, ItemProcessor, and ItemWriter in which it often involves processing an input file but I haven't come across an example where I can just call a class to be executed or use ldap.

So my questions are:
1. Should I just use cron?
2. Are there examples where instead of reading files I can read from ldap?

Thanks
6 years ago
I'm using the Spring ldapTemplate to grab all the users to then perform a process which will result in sending out a mass newsletter. I get the javax.naming.SizeLimitExceededException because there are around 5000 total users. I was thinking about breaking up the processing, perhaps by splitting the alphabet or something along those lines. Does this seem logical or do others do something a bit more creative when dealing with large amounts of ldap searches?

Thanks
6 years ago
Hmmm...good question. I have no idea why I am using that version. I can update it. Do you think that could be a cause?

6 years ago
JSP
This is exactly my web.xml file. It's using 2.5. Do you notice anything that I am missing?



In my WEB-INF/lib I have jstl-1.2.jar and standard-1.1.2.jar




6 years ago
JSP
I'll see if I can talk them into opening it up but I'm not sure if they will.

I did place a test JSP page with ${3+4} and it displayed ${3+4}.

At this point, if they can't give me access I may just have to place their JSP files in the /examples folder where it works :)

Thanks
6 years ago
JSP
I simply dropped my test.war file in the webapps folder and restarted tomcat. This tomcat instance has autodeploy turned on so my .war file explodes into it's own folder. They have the manager locked down and inaccessible (forbidden 403), I can't even get it to prompt with the user/password so I can't see the gui. Just to share some additional details, this tomcat instance is typically used for a portal with portlet apps that are deployed internally from the source portal code so the manager is never used.

Also, no errors in the logs.
6 years ago
JSP
Yes, that is exactly what I have. Nothing complicated at all but it keeps throwing me this error.

In webapps
- I have my "test" folder
- In my test folder I have a couple .jsp pages whose parent folder is the test folder (one of the .jsp files uses c:if, the other file doesn't use it so its working)
- my WEB-INF/web.xml is very simple (see below)
- and finally I have jstl.jar in my WEB-INF/lib directory.

However, when I stick my test directory inside the default examples folder that comes with tomcat, it works.

My webapp also works fine elsewhere but this Windows tomcat instance just doesn't like it. Unfortunately, I wasn't the Sys. Admin who set up IIS and Tomcat so I don't know what's being restricted. I know that ROOT files are totally inaccessible through http.

my web.xml
6 years ago
JSP
So I guess I'm not sure how to really go about solving this. I didn't have this problem on my other server so I'm not sure how to map the jstl reference where it doesn't use the uri. Is there something that needs to be defined in my web.xml file in order for it to find the jstl uri?

The deal is that the ROOT directory is off limits for me to place a simple .jsp page because it's restricted. I don't have any classes set up in this little web app. I just needed a place to store a couple .jsp pages which need access to the jstl library. But it sounds like I'll need to set up a dispatcher.

6 years ago
JSP
That was a typo in this forum..my test.jsp page looks like this:



However, the error message does have one slash, which is unusual. This is a tomcat install on a Windows server if that makes any difference. I'm used to Linux so I'm not sure if there is something being restrictive on this server instance.

The path http:/java.sun.com/jsp/jstl/core does not start with '/'

java.lang.IllegalArgumentException: The path http:/java.sun.com/jsp/jstl/core does not start with '/'

Thanks
6 years ago
JSP
I'm getting the following error:

The path http:/java.sun.com/jsp/jstl/core does not start with '/'

java.lang.IllegalArgumentException: The path http:/java.sun.com/jsp/jstl/core does not start with '/'

It's a very simple web application to store a couple jsp files that need to be accessible and I'm using jstl. I am able to run this fine without any problems from my localhost server but when I place onto a tomcat server for my employer I noticed it's giving me this error. Could there be some restrictions on this server that I may not be aware of? Anyone experience this before?

Here is my web.xml file


The index file is accessible and works because it's not importing the core jstl library. My test.jsp file is the file that triggers the error message above.




The jstl and standard jar files are in my lib directory and again, it works fine from my local server.

Any suggestions?

THanks
6 years ago
JSP
Hi,

I have a portlet that actually sparks a pop-up in my portal. It works 95% of the time but when it doesn't I have to reconcile the issues.

The logic is a user logs in and based on information in a stored procedure a pop-up appears and they are given options to make their selections and it saves the person's information and the items they selected.

Lately, I noticed that in some cases the items in the database are duplicated. But not always the same. Sometimes it appears that the person had selected "None of the above" which made me think that perhaps after a person leaves and another another person comes in right behind them...they are presented with the previous person's pop-up options and the new person thinks it doesn't apply to them so they click "none of the above" but the form is still tied to the previous person's information.

I've tried many things...making the objects null and then creating a new object(), but it seems like it's not working. I'm also using Hibernate saveOrUpdate() method to update the database. Is it possible that the previous person is not logging out, or they did log out and they didn't close the browser, and the browser is hanging on to the session data? Is it because the portlet is a pop-up which is causing problems and maybe it should be made into a traditional portlet?

Any suggestions? I've been fighting this for months.

THanks
6 years ago
It's a little new to me so I keep having to read it to get the hang of its uses. What I am finding is that with the pop-up I wrote it seems like a user might be not logging out of the application that it is originating from, or not closing out the browser when they are completed with the application, or something to that effect because now I'm thinking that the conflict is also because the session data is not clearing out. I think what is happening is that someone is coming up behind another person and receiving the pop-up with the data from the person before them. And, they are making selections thinking it applies to them when in fact it doesn't. So even though I'm creating new objects it's as if it's taking a mixture of data between users from the database and the attributes that are received from login and creating duplicates.

I was able to eliminate the duplicate objects from the main Person record by replacing merge with saveOrUpdate() but the one-to-many objects that it refers to are now duplicating, which are the Person's items that they are selecting from the pop-up selection list. When the person makes an item selection it should update their item with 'yes'. But, in case it is updating the items but also creating new ones with 'no'. Perhaps, removing the merge() and replacing it with the saveOrUpdate() now from that section may solve it.

So for example



If you have any further suggestions I'd appreciate it.

Thanks