Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!

Bai Shen

Ranch Hand
+ Follow
since Sep 24, 2008
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Bai Shen

Apparently it seems to be a Tomcat 7 issue. I just tried again with Tomcat 6.0.32 and it seems to be working.

However, I still can't find the Jetspeed mailing list info. Does anyone have it?

10 years ago
I'm trying to get a portal stood up. Since Apache makes good stuff, I'm starting with Jetspeed 2.

I went to the site and started the Maven tutorial. I'm using Maven 2.2.1 from the STS bundle. During the Maven install, I get a lot of not found errors from bluesunrise, but it says it finished jetexpress successfully. I configured jetexpress to use Tomcat 7.0.16. There wasn't a major version setup for 7 yet, so I left it at 6.

Everything seems to be working fine until I go to log in with admin/admin. Then I get the following error on the site.

Looking in the logs, I found the following two errors.

This error seems to be caused by a missing file. I did some googling and was able to find the file and replace it, and the error went away.

The other error was this. I can't seem to find any information as to the cause of it. And I can't find the mailing lists to ask on there. Any help would be appreciated. Thanks.

10 years ago
The tomcat silent install doesn't seem to be working any more. Does anybody know why or how to get it to work?

11 years ago
I went and downloaded the EE version of Eclipse and was able to get Tomcat working that way.
11 years ago

Peter Johnson wrote:How did you install Eclipse on Ubuntu? Did you go through the package manager? I recommend that you don't do that, instead download Eclipse from the Eclipse web site (get the "Eclipse IDE for Java EE Developers" package) and install that. Installation is easy - simply unpack the file; I put mine at /opt/eclipse. Then add it to the start menu and you are ready to go.

I did it through the package manager.

I'm still having trouble getting it to see Tomcat, but I think I found a solution.
11 years ago
Never mind. Turns out I had to install the Web Tools plug in for Eclipse.
11 years ago
I'm running Ubuntu 11.04, with Eclipse 3.5.2 installed from the repository. Everywhere I've searched, I'm told to go to the Window/Preferences/Sever/Runtime Environments menu to configure Tomcat to run in Eclipse. But I don't seem to have a Server section.

I have the following.
  • General
  • Ant
  • Help
  • Install/Update
  • Java
  • Plug-in Development
  • Run/Debug
  • Team

  • What am I missing?
    11 years ago
    Still tracking it down, but it looks like it's a Hibernate issue.

    Thanks anyways.

    Paul Clapham wrote:Yeah, I often have that problem that I forget to have Eclipse build the project before I deploy it. Drives you crazy when you're running a previous version and debugging based on the current version.

    I'm running Tomcat in Eclipse, so it should be the latest version. But I have seen Eclipse based products not recompile correctly before. And something is definately off, as now I have that entire section commented out and I'm still getting the issue. So I'm not sure what the problem is, but it's not the synchronized code.

    But anyway I have one suggestion: is it possible that something else is synchronizing on the Logger? Like maybe some logging code? I would suggest creating a new Object for your code to synchronize on, rather than using the Logger.

    I did change it to a more appropriate item. It was originally done to the logger as that was the only static variable I had in the object.

    Paul Clapham wrote:That wouldn't work because you can't pass a type name as a parameter. You need an instance of ThreadPoolExecutor.DiscardPolicy in that position, don't you?

    Apparently so. When I was originally coding it, I thought DiscardPolicy was just a flag for ThreadPoolExecutor. I didn't realize it was it's own object.
    11 years ago
    ARGH! Apparently something weird is going on. If I leave the "more stuff" code uncommented and comment out the synchronized line, it hangs. If I comment out the "more stuff" but leave the synchronized line, it hangs. If I comment out both, it doesn't hang.

    I wonder if Eclipse is not recompiling correctly.

    Rob Spoor wrote:Is this synchronized block executed inside another synchronized block or method? If so you could have deadlock if some other thread tries to get the locks in reverse order.

    I'm not AFAIK. Some of the other jobs use synchronized code, but they don't call each other. The only other thing I have synchronized is the listener code that kicks off a lot of the various jobs.

    Although I had forgotten that some of the other jobs have synchronized code, and they don't see to cause the problem. But they each have their own thread pools, whereas this one is in the main thread pool. Also, this job is called from another job which waits for a return value. The others are all fire and forget jobs.


    Vijitha Kumara wrote:Are there any warnings (if no errors) in the logs? Are you sure this is the code causes this issue? And as you said you created a thread pool within your code, are they properly terminated?

    No warnings or errors that I can find. As I mentioned, the code executes correctly. It's only when I go to shut down Tomcat that I have a problem. And it's only that stop on it's own. I have to terminate it.

    I'm sure this is the code that causes the issue. If this method doesn't get called, Tomcat shuts down correctly. If I comment out the synchronized line, Tomcat shuts down correctly. I've already commented out everything inside the synchronized block with no effect.

    What do you mean by your last question? I'm calling shutdownNow() on my thread pool in the contextDestroyed method of the context listener.
    Yeah, that worked for me too. But I never thought to try that. And I'm still not sure what it gets me. I was doing the following.

    Where q is my queue.
    11 years ago
    I'm not sure why this is happening. Any help is appreciated.

    I have a context listener that creates a thread pool and populates it full of jobs. These jobs occasionally require access to the same resource, so I have a section of code that's synchronized with the static log.

    Any time any of the jobs go through the synchronized section, Tomcat will not shutdown properly. Even if I comment out all of the "more code" section so that it's just the synchronized part, this happens. If I comment out the synchronized line, or the code doesn't call that method, Tomcat shuts down correctly.

    What would cause Tomcat to hang like that? I can only think that it's not locking and unlocking correctly, but the code works fine, limiting access as it should. It's just that Tomcat won't shutdown properly.