Problems while deploying application in Tomcat 6.0.x - tomcat6

org.springframework.beans.factory.BeanCreationException: Error creating bean with name......
I got the above problem while deploying my project in Tomcat .
I got another problem : Unable to initialize the bean Configurator.jar
Do the above problems are occurring due to environmental settings or Project specific problems?

It looks like its a spring encounters some error during the war startup.
Usually spring gets triggered as a context listener and it starts to initialize your beans and resolve dependencies between the beans. There is one certain bean that fails (Configurator I guess) and the whole spring initialization process fails because of that.
You can debug the bean initialization code (probably constructor) and try to understand why does spring fail to initialize it properly. In any case I can't give you more information without a full stacktrace.
Hope this helps

Related

Sonata-Project's Google Authenticator: Undefined Method "getTwoStepVerificationCode" from Application\Sonata\UserBundle\Entity\User

guys!
I am currently working on a project built on Symfony 2.8 and a few Sonata-Project bundles. The goal is to achieve Two-Factor Authentication (a.k.a Two-Step Verification). I saw that Sonata-Project has a package for implementing such functionality and installed it. Then configured the app/config/config.yml file according to sonata's documentation, but when I try to log into my Dashboard from the login form, I do that without any further obstacles (no 2-Factor Authentication Prompt). Here, on stackoverflow.com, I've seen a few answers, (not-fully) related to my question, that suggest running php app/console sonata:user:two-step-verification *ADMIN_USER_NAME*. I've tried to run this command in my terminal, but got this exception thrown:
[Symfony\Component\Debug\Exception\UndefinedMethodException]
Attempted to call an undefined method named "getTwoStepVerificationCode" of class
"Application\Sonata\UserBundle\Entity\User".
What seems to be the problem here? Why such method doesn't exist? How can I resolve this issue?
P.S.: I try to use this Google-Authenticator package in conjunction with Soanata-Project's UserBundle as it is "a feature" (if I may call it such) of the latter.
Does your application properly extend Sonata\UserBundle\Entity\BaseUser? Because if not you will have this issue. Check your class Application\Sonata\UserBundle\Entity\User.

Error while calling Discovery service in conversation-with-discoveryapplication

I have used https://github.com/watson-developer-cloud/conversation-with-discovery code and deployed application in Bluemix, when I am testing the application conversation is working but discovery service is not working .
I have added OUT_OF_Scope intent with call_discovery action.
I am getting server is busy error when we give out scope question in chatbot.
below is the the log error , please help me to resolve this error.
Exception thrown by application class 'com.ibm.watson.apis.conversation_with_discovery.rest.ProxyResource.postMessage:192'
java.lang.NullPointerException
at com.ibm.watson.apis.conversation_with_discovery.rest.ProxyResource.pos
When I used the conversation-with-discovery I had the same problem, but I see within the Github the solution for this: Switch to the liberty-for-java_v3_7-20170118-2046 buildpack that doesn't have problems with the Java SDK.
Reference: IBM Developer

JBossWS & Stateless WebServices, OutFaultInterceptor being ignored

We are tying to use a WebService OutFaultInterceptor as per this blog post and it doesn't seem to work in JBoss 7.x.
The problem is simple in that it just ignores the #OutFaultInterceptor annotation. I tested this by putting in a erroneous interceptor name and it didn't error out. Logging within the interceptor is simply not called (when the interceptor name is correct).
I have also tried using the WEB-INF/jboss-webservices.xml to define out interceptors but that also seems to get ignored.
Removing the #Stateless annotation also does not seem to help.
This was working fine on JBoss 5.1 but simply seems to not work on JBoss 7.x. What am I missing here?
Is there an alternative way to "translate" exceptions into soap faults?
In order for using Apache CXF APIs and implementation classes you need to add a dependency to the org.apache.cxf (API) module and / or org.apache.cxf.impl (implementation) module.
Dependencies: org.apache.cxf services
According documentation:
When using annotations on your endpoints / handlers such as the Apache
CXF ones (#InInterceptor, #GZIP, ...) remember to add the proper
module dependency in your manifest. Otherwise your annotations are not
picked up and added to the annotation index by JBoss Application
Server 7, resulting in them being completely and silently ignored
See also: JBoss Modules
I hope this help.

Google App Engine + Jersey + IntelliJ Idea

Okay so I'm having some annoying issue here. I am clearly missing something, and already been frustrating myself with this for the last 4-5 hours.
I cannot seem to be able to create a simple GAE+Jersey up and running with IntelliJ.
The frustrating part is that I do not get any errors, just that the REST service is not present after deployment.
I've tried out a few basic stuff, basically everything you can find on Google (and here).
After some frustration I've downloaded this project: https://github.com/BluerockInteractive/GAE-Jersey-Guice-Sample
Just cause this will list out the available servers, plus the deeper logging level.
Now here's the output of the AppEngine startup:
https://docs.google.com/open?id=0B42XvjSlpDCtTTdwQl9MSTBlQ0U
So my problem: The AppEngine is up and running. If I create a basic servlet everyting works fine. However, I cannot get Jersey to work. In every form I could try it always throws an
HTTP ERROR 404
Problem accessing /jerseyguicesample. Reason:
NOT_FOUND
Powered by Jetty://
Any ideas, what I could be missing here?
Here's an image of the IDE and the artifact settings: http://img51.imageshack.us/img51/7913/20120428124133.png
Thanks, :D
This example has REST handlers mapped to /rest/test, /rest/players/{name}/xml, /rest/players/{name}/json and /rest/hello.
What (and where) did you map /jerseyguicesample to?

How do you debug CXF endpoint publishing?

Given the "cxf-osgi" example from fuse source's apache-servicemix-4.4.1-fuse-00-08, built with maven 3.0.3, when deploying it to apache karaf 2.2.4 and CXF 2.4.3 the web service is never published and never visible to the CXF servlet (http://localhost:8181/cxf/). There are no errors in the karaf log. How would one go about debugging such behavior?
It's worth turning up the log level(s) - you can do this permanently in the etc/org.ops4j.pax.logging.cfg or in the console with log:set TRACE org.apache.cxf - IIRC this will show some useful information.
Also check that it's actually published on localhost/127.0.0.1 - it may well be being published on another interface, the IP of the local network but not localhost. Try using 0.0.0.0 as the the address, that way it will bind to all available interfaces.
As you're using maven, you can download the CXF source (easily in Eclipse) and connect a remote debugger to the Karaf instance, with some strategically placed breakpoints you should be able to get a handle on what's going on.
Try changing to Equinox instead of the default of Felix. There is a bug in 2.4.3 in that it doesn't work well with Felix. Alternatively, CXF 2.4.4 is now available that should also fix it.
Take a look at this issue I filed this week: https://issues.apache.org/jira/browse/CXF-4058
What I found is that if my beans.xml is loaded before the cxf bundle jar, then the endpoints are registered with CXF but not with the OSGi http service. So everything looks good from the logs but the endpoints are never accessible. This is a race condition.
I did two workarounds: 1) in the short term, just move my own jars later in the boot order (I use Karaf features) so Spring and CXF are fully loaded before my beans.xml is read and 2) abandon Spring and roll my own binding code based loosely on this approach: http://eclipsesource.com/blogs/2012/01/23/an-osgi-jax-rs-connector-part-1-publishing-rest-services/
I just implemented solution #2 yesterday and I'm already extremely happy with it. It's solved all of my classloader issues (before I had to manually add a lot of Import-Package lines because BND doesn't see beans.xml references) and fixed my boot race condition.

Resources