Grails and Spring Security CAS plugin - spring

I am currently having an issue where when I try to start my app I get the error:
ERROR context.GrailsContextLoader - Error initializing the application: Cannot execute
null+null
Message: Cannot execute null+null
This only happens when I tell the program to compile the Spring Security CAS plugin. This only started happening when I turned off forking, since it was making it hard to set up a JNDI. Is there a way to fix this problem without turning back on forking?

It turns out that the reason it wasn't working was because I hadn't finished configuring it. This doesn't make much sense to me, given that I was able to run the app just fine before without configuring it, seeing as how I never used that plugin within the implementation, it was just downloaded.

Related

Can't get Netbeans Project to acknowledge existing Tomcat or Glassfish Server

I haven't been able to figure out what I'm missing here.
I've installed Tomcat and can spin it up fine. (Glassfish too, in my efforts, but I had removed it when I took the screenshot.)
So now I want to hook my project up to the Tomcat instance so I can have Netbeans deploy it for me automatically.
I right-click on my project, go down to Properties. In Project Properties I select 'Run' and go to the drop down to select my server. Only, there's no servers.
Why is it not showing up here? Am I going about this all wrong?
Thanks in advance for any help!
Other potentially useful notes:
* Using Gradle (for my first time)
* Using Spring Boot (for my first time)
* On Windows 10 (don't hate me, I don't love it either)
I was chasing the wrong problem. Spring-boot provides an embedded server so I had no need to install and provide my own.
My real problem was that I had dependencies declared for jpa, postgresql, etc. that I hadn't configured in application.properties. When I tried to run, I'd get an error saying "a problem occurred starting process /path/to/my/jdk/java.exe". I couldn't figure what was going on and, looking around, I saw the issue mentioned in my question about the server.
The solution was to simply comment out the dependencies in my build.gradle until I was ready for them. After I got my PostgreSQL DB set up and added the configureation to application.properties, I was able to un-comment them and it's working great.

bean validation does not work under weblogic

The title is inspecific, sorry, but I don't know what's really wrong ...
Ok, so I have working springboot app (version 2.0.4.RELEASE), weblogic 12.2.1.1. When running standalone, it's OK. But when executed under weblogic, beanvalidation silently ignores all validation issues. The typical weblogic cause for this is, that it ignores libraries which apps wants, and using it's own instead resulting in unexpected and unreliable app behavior. And yes, when debugging, bean validation code does not match with what is being declared in pom.xml. So I added
<package-name>org.hibernate.validator.*</package-name>
<package-name>javax.validation.*</package-name>
as prefer-application-packages, but now I'm getting
org.eclipse.persistence.jpa.PersistenceProvider cannot be cast to javax.persistence.spi.PersistenceProvider
which was described here: Weblogic 10.3.3 trying to load org.eclipse.persistence.jpa.PersistenceProvider instead of configured Hibernate Provider but I cannot get it to work. Any help please? I understand, that this means that weblogic is probably ruining foundations of springboot app, I'd like to fix it, however it kinda works, except for beanvalidation. So complete fix is probably not that necessary, and maybe someone does have an idea how to differently pretty-please weblogic to turn bean validation on?
I'd really like to share more, but that thing does not log any issue at all. It just dont validate beans, and the same code (except for weblogic tooling) does work properly, when weblogic is avoided.
There must be following in weblogic.xml
...
<prefer-application-resources>
<resource-name>META-INF/services/javax.persistence.spi.PersistenceProvider</resource-name>
...
</prefer-application-resources>
...

Spring boot application crashing on starting:Togglz: java.lang.IllegalStateException: Could not find the FeatureManager

i'm using toggle feature with toggle dependencies but when i tried to bring up the services some times application startup is failing saying could not find FeatureManger.
I followed server approaches but none of them worked well. in this post the issue been highlited by updating jar dependecy, even that also not working.
Please suggest if you have other fix available for this issue.
https://github.com/togglz/togglz/commit/22b20ef7c8758dc5deadf0a6c4726e8c8d73cf5c

Releasing Hibernate Resources On Redeploy

I have a web app running on Tomcat 6.0.35, which makes use of Spring 3.1.2, Hibernate 4.1.8 and MySQL Connector 5.1.21.
I have been trying to figure out what is causing Tomcat to keep running out of memory (Perm Gen) after a few redeploys.
Note: Don't tell me to increase Tomcat's JVM memory because that will simply postpone, the problem
Specifically, I made use of the VisualVM tool, and was able to eliminate some problems, including some mysql and google threads issues. I was also able to discover and fix a problem caused by using Velocity as a singleton in the web app, and also not closing at the correct time/place some thread local variables I was having. But I still am not completely able to eliminate/figure out this Hibernate issue.
Here is what I'm doing:
Deploy my webapp from my development IDE
Open a tomcat manager window in my browser
Start VisualVM and get the HeapDump on the tomcat instance
Go the tomcat manager and redeploy my webapp
Take another HeapDump in VisualVM
My first observation is that the WebappClassLoader for the original webapp is not garbage collected.
When I scrutinize the retained objects from the second HeapDump, the class org.hibernate.internal.SessionFactoryImpl features prominently which leads me to believe that it IS NOT being destroyed/closed by Spring or something along those lines (and hence the WebappClassLoader still having a reference to it).
Has anyone encountered this problem and identified the correct fix for it?
I don't currently have an idea what could be amiss in your setup but what I know is that using Plumbr you'll most likely find the actual leak(s).

Struts2 Dispatcher initialization failure with maven - jetty

I have the following problem:
I am working on a Web-Project using Struts2 with Tiles supported by a combination of Hibernate and Spring. In addition I am using Maven (which I'm new to) and the jetty server container. So my coworker told me what to do: just check out the project from the svn-repository and run the command (sudo) mvn jetty:run. According to my coworker this should work just fine, as it does when he checks out the project. But I always get the same error:
2011-08-22 10:09:20,568 ERROR org.apache.struts2.dispatcher.Dispatcher.error:38 -
Dispatcher initialization failed
Unable to load configuration. - [unknown location]
I already tried to re-check out the project, cleaned and updated maven, but still, the same error.
I think it has something to do with a missing struts2 .jar-file, but I thought maven downloads all necessary libraries automatically. Please give me a hint what could be missing, I'm sure it's something simple I overlooked.
Thanks in advance.

Resources