Navigation Engine not able to process request - java

I get the following error in Endeca:
com.endeca.navigation.ENEException: Navigation Engine not able to process
request `http://myhost:15000/search?terms=remote&rank=0&offset=0&irversion=601`
My MDEX version is 6.3.0
The referenced jar files in my app is:
endeca_navigation.jar : Specification-IR-Version: 6.3.0 (Read from MANIFEST file)
endeca_logging.jar: Specification-Version: 6.1.2 (Read from MANIFEST file)
Even with these referenced jars, why is the request parameter still irversion=601?
I'm using java 1.5 and building my app in eclipse. At first, it was referencing older jar files (601), but i removed those completely and replaced them with the newer jar files listed above. I've rebuilt my app and I still see the parameter irversion=601. I've been trying to find out what the issue is for a few hours, but i'm having no luck.
Any ideas?

If nothing else I think that you need an N=0 parameter for you request to work.
Also if you are using an application server like Weblogic to run you app, it has a tendency of caching referenced jars which may have to be cleared for it to pick up the new versions of the jars.
Finally if all else fails there is a --back_compat 601 parameter on your dgraph which indicated the accepatble navigation.jar versions. You can use this parameter to determine if the issue is the jar version or something else in between.
Good Luck

Additionally to Wiszh's response, it is useful to take a look at the dgraph request query logs (located in /logs/dgraph/Dgraphxx/Dgraphxx.log and .reqlog) which will show a more specific error and the query that caused it.

Do your jars match the version of Endeca server you are querying?

This issue is due to an old navigation api jar in your class path
Check the ToolsAndFrameworks\version\assembler\lib to get the correct version of navigation api jar. That should fix this issue.

correct jar path fixed the issue for me
ToolsAndFrameworks\version\assembler\lib

Related

FAIL - Deployed application at context path / but context failed to start

Im working in 2 separate webapplications a back and front app.
The funny thing is when I run the back-end I don't have any issues. But in the front-end I get the following error:
I have the following error in Netbeans
NetBeans: Deploying on Apache Tomcat or TomEE
profile mode: false
debug mode: false
force redeploy: true
Undeploying ...
undeploy?path=/
OK - Undeployed application at context path /
In-place deployment at D:\WebDevel\WebStore\WebFrontE\target\Web-1.0-SNAPSHOT
Deployment is in progress...
deploy?config=file%3A%2FC%3A%2FUsers%7E1%2FAppData%2FLocal%2FTemp%2Fcontext7815575477480252472.xml&path=/
FAIL - Deployed application at context path / but context failed to start
Both are running on the same Tomcat. my colleague has the same code and it works fine :-s
Context Path (or) Context Root must be unique for each application deployed on the server.
So you can't deploy two applications with same context root to the same server. It seems for both of your applications the context path is /.
Check server.xml to see what context path both of them have. If they are not unique, then change them to solve the problem.
But if you want the same context root for both applications, then you need to deploy them in two different servers.
For more information:
Tomcat Context paths configuration
I may be a little late but would say that this could be because of the change in the factory name in Tomcat 8. So follow the below steps:
1) First, see if you are using Tomcat 8 or higher.
2) If yes, and tomcat is not able to deploy your application. Run the application in Debug mode and see stack trace in Tomcat window (at bottom. Not same as Tomcat.log). Scroll down the window and see if you can find an Exception like this:
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory
3) If you see something like above, Open your META-INF/context.xml and replace or add the factory attribute in the resource tag with:
factory="org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory"
4) Restart tomcat and redeploy.
While trying to deploy a spring boot web app from jenkins to an external VM I was getting the same error as below.
After I look into tomcat log I found it was for java version error. I didnt install proper java version which my spring boot application supports.
I installed openjdk 8 and removed java7 from vm and it was resolved.
The actual cause behind the below error can be many . so check your tomcat /logs/catalina.out directory for exact error. at Jenkins build log it doesn't give actual error.
FAIL - Deployed application at context path [/webapp] but context
https://www.youtube.com/watch?v=1jsKGhXmm4c
I had this problem a d after a lot of links that didn't work, found this solution. Edit the server.xml on your Tomee server to provide a fully qualified path for appBase:
<Host name="localhost" appBase="C:\apache\apache-tomee-7.0.2-plume\webapps"
unpackWARs="true" autoDeploy="true">
The following error occurs if your context has not started well.
Instance : You have context listener that calls a method and the method is not present.
My issue was a syntax error in web.xml, I didn't close an element
The tomcat window (NetBeans) had a clear errormessage, thanks Arafat
01-Sep-2018 17:34:38.641 SEVERE [http-nio-8080-exec-5] org.apache.tomcat.util.digester.Digester.fatalError Parse Fatal Error at line 50 column 11: The element type "param-value" must be terminated by the matching end-tag "".
I am also had trouble solving this kind of issue on my netbeans. I'm stack the whole day getting rid of this issue. Many solutions have been tried but still nothing happen until I tried to delete the "target" folder of my project and that solved the problem! Hope it helps! :)
I have came across this problems several times,i tried the below steps and it worked..!
1. Backup you current project(For safety).
2. Locate you project folder location (Normally found in MyDocuments or Documents folder named as NetBeansProjects).
3. Open the project folder and delete the folder named target inside your project folder
4. Close the NetBeans and re-open the it and run the project.
And you are good to go.
If the above didn't work then try deleting the xml file from the folder "Tomcat 9.0\conf\Catalina\localhost" folder.
I had this error while using Java Web due to a syntax error:
My Servlet code should be like this:
#WebServlet(name = "EleicaoServlet", urlPatterns = {"/EleicaoServlet", "/main", "/insert", "/edit", "/delete", "/update"})
But I forgot to type '/' in the "/update"
#WebServlet(name = "EleicaoServlet", urlPatterns = {"/EleicaoServlet", "/main", "/insert", "/edit", "/delete", "update"})
And I got this error.
So if nothing above works you may want to check your code, it can be something stupid like this.
I have tried
mvn clean install
and worked for me for the same problem :)
'undeployed application at context path' this error occur due to missing some file while copying project from one system to another.
while coping make sure all files should be copied.If an error occur then please recopy project and import it..
It may work..
I just had the same issue i solved by giving security permission to the user for Apache Server Foundation in root folder
in my case i removed some configuration tags that i added in web.xml,trying to configure a strut package.I also removed that package respectively,i restarted the server,run the project and it worked.
Faced the same problem # one time. In one of the instance, it was caused by a controller that had multiple methods with same route e.g
#RestController
public class UsersController
{
#Autowired
UsersInterface userInterface;
#RequestMapping(value = "/get", method = RequestMethod.GET)
public String test()
{
return "Users";
}
#RequestMapping(value = "/get", method = RequestMethod.GET)
public List<user> getUsers()
{
List<User> users = userInterface.getUsers();
return users;
}
}
As you can see, the controller has 2 methods that define two get routes, hence Spring cannot resolve the method to run the .../users/get route.
Remote one of the get routes and change it to something else.
I may be late to answer but might help others later in the future.
This could be many causes, but the most frequent personally in my case was the web.xml file servlet declarations. When I was cross developing a project both on Mac and Linux, I saw the file behave different in the two platforms due to some space or new line issues. It took me hours to find out as the servlet count was more than 20. Ultimately I narrowed down to strangely only one controller class declaration and found the syntax to be absolutely perfect. It bamboozled me, so I thought I'd rewrite the declaration after deleting the old one and BAM! It worked on Mac immediately. Strange.
I am facing this problem, after trying several other suggestions, the following thing worked perfectly for me.
Delete the following file:
/apache-tomcat-9.0.13/conf/Catalina/localhost/*.xml
This is a bit late but for anyone who might face the same error.
For me, this error was caused by wrong syntax in my servlet.
#WebServlet(urlPatterns = {"/x/login", "/x/register", "/x/logout", "x/createrestaurant"})
It looked like the above and I got the same error. After sometime and trying to deploy on a different server (from Tomcat to Glassfish), Glassfish gave me better logs and I realized the syntax should have been like this
#WebServlet(urlPatterns = {"/x/login", "/x/register", "/x/logout", "/x/createrestaurant"}).
Notice the / before x/createrestaurant.
I had the same issue with even newly added projects tried a lot of stuff mentioned above. what works for me is to manually Stop tomcat service in the Installation directory \Tomcat 9.0\bin Tomcat9w.exe. Then deployed the project it works this way in Netbeans IDE.
FAIL - Failed to deploy application at context path...
I was facing the same issue. But I resolved it. Please see the following steps:
First, stop the Tomcat service that is already running on the background, Not in the Netbeans. For this, go to TaskManager properties>Services>tomcat
Right click on the tomcat service to stop
Now, after that. Close netbeans IDE and run again
Right click on the project and select run. The project will be running without any issue
I hope above solution will be helpfull who having the same error.
One Problem could be the port you are trying to use might be being used by another application. Try changing the port or clearing that one and it might work fine.
Problem has been resolved by stopping the Tomcat server
sudo systemctl stop tomcat
so as to allow Netbeans to run it. If the server is already running when Netbeans tries to deploy an app Netbeans will display the delopy failed message.
I had the same problem, but I used only maven (without IDE). My tomcat version was tomcat7 7.0.70-1 and jdk8 (in pom.xml: <java.version>1.8</java.version>) It turned out that tomcat7 incompatible with java 8, so, I changed java.version in pom.xml on <java.version>1.7</java.version> and that was the solution!
I had same problem and I resolved this issue by stopping the tomcat from IDE and run the web application it starts the tomcat automatically.(This works in Netbeans IDE). Simply Stop Tomcat and start again and redeploy web application.

Using org.eclipse.core.expressions: expressionLanguage.exsd could not be found

I am following this guide to incorporate an activation expression (from core expressions) into my own extension point. As the guide says, I have created my extension point schema as follows:
But as you can see, I get errors for the referenced elements. (Element 'xxx' is not defined).
Actually, when I switch to the definition tab and double-click in the schema URL in the Schema inclusions list, I get the error message schema:/org.eclipse.core.expressions/schema/expressionLanguage.exsd could not be found.
My first suspicion was that something might have changed here for Eclispe Kepler, but the docs say anything about it. And I imported the org.eclipse.core.expressions plug-in from the Plug-Ins view into my workspace temporarily and checked if the referenced schema is actually where it is supposed to be (which it is). So this seems to be ok.
My next suspicion was that this had something to do with my target platform, so I double-checked my target platform, but I don't see any issue here. It includes (among others) the features
org.eclipse.platform 4.3.2.v20140221-1852
org.eclipse.platform.source 4.3.2.v20140221-1852
org.eclipse.rcp 4.3.2.v20140221-1700
org.eclipse.rcp.source 4.3.2.v20140221-1700
and the Core Expressions bundles are there as well:
org.eclipse.core.expressions 3.4.501.v20131118-1915
org.eclipse.core.expressions.source 3.4.501.v20131118-1915
I am currently stuck. Any pointer what else I can check or how I can fix this is appreciated.
Does your plug-in file (org.eclipse.core.expression.xxx.jar) actually have the schema file?
Today I had same problem and found that the jar file doesn't have the schema file.
I downloaded source jar file which have the schema file (Actually I found the source jar file from : http://grepcode.com/snapshot/repository.grepcode.com/java/eclipse.org/4.2/org.eclipse.core/expressions/3.4.400) and put the schema file into my jar file and it solves the problem.
Good luck.
Ok, several chaotic attempts of
reloading the target platform
cleaning all projects
restarting Eclipse with -clean switch
seems to have done the trick. I am not sure what caused this, but now the error has vanished (and I hope it stays this way).

Cannot run Flume because of JAR conflict

I've installed Flume and Hadoop manually (I mean, not CDH) and I'm trying to run the twitter example from Cloudera.
In the apache-flume-1.5.0-SNAPSHOT-bin directory, I start the agent with the following command:
bin/flume-ng agent -c conf -f conf/twitter.conf -Dflume.root.logger=DEBUG,console -n TwitterAgent
My conf/twitter.conf file uses the logger as the sink. The conf/flume-env.sh assigns to CLASSPATH the flume-sources-1.0-SNAPSHOT.jar that contains the definition of the twitter source. The resulting output is:
(...) [ERROR org.apache.flume.lifecycle.LifecycleSupervisor$MonitorRunnable.run(LifecycleSupervisor.java:253)] Unable to start EventDrivenSourceRunner: { source:com.cloudera.flume.source.TwitterSource{name:Twitter,state:IDLE} } - Exception follows. java.lang.NoSuchMethodError:
twitter4j.FilterQuery.setIncludeEntities(Z)Ltwitter4j/FilterQuery;
at com.cloudera.flume.source.TwitterSource.start(TwitterSource.java:139)
The conflict results from a FilterQuery class that is defined elsewhere in the flume lib and that does not contain the setIncludeEntities method. For me, the file that contains this class is the twitter4j-stream-3.0.3.jar and I cannot exclude the file from the classpath as suggested here.
I believe this experience was quite frustrating for you, for me it was for sure. The main problem is, both the files, flume-sources-1.0-SNAPSHOT.jar and twitter4j-stream-3.0.3.jar contains the same FilterQuery.class. That is why the conflict message is generated in the log file.
I am not a Java or Big Data expert, but I can give you an alternate to this problem. Download the Twitter4j-stream-2.6.6.jar or lower version from here and replacethe twitter4j-stream-3.0.3.jar. All the 3.X.X uses this class. After replacing, everything should work fine. But you may get some heap error after downloading huge amount of tweets. Please google the solution as it was resolved in 3.X.X files.
-Edit
Also, please don't forget to download and replace all the twitter4j files in /usr/lib/flume-ng folder. Namely, twitter4j-media-support-2.2.6.jar, twitter4j-stream-2.2.6.jar and twitter4j-core-2.2.6.jar. Any mismatch related to version among these files will also create problem.
As suggested in the post a problematic file can be search-contrib-1.0.0-jar-with-dependencies.jar too.
You need to recompile flume-sources-1.0-SNAPSHOT.jar from the git:https://github.com/cloudera/cdh-twitter-example
Install Maven, then download the repository of cdh-twitter-example.
Unzip, then execute inside (as mentionned) :
$ cd flume-sources
$ mvn package
$ cd ..
This problem happened when the twitter4j version updated from 2.2.6 to 3.X, they removed the method setIncludeEntities, and the JAR is not up to date.
PS: Do not download the prebuilt version, it is still the old.
Simply rename all twitter4j-stream* jar files and rerun your flume. It will work with charm. :)
I had the same problem and at last I solved following these steps:
First I renamed all jar files in jarx: from twitter4j-stream-3.0.3.jar -> twitter4j-stream-3.0.3.jarx, ...
This solved the error, but when it tried to estabilish connection, I got error 404:
(Twitter Stream consumer-1[Establishing connection])
[INFO - Twitter4j.internal.logging.SLF4JLogger.info(SLF4JLogger.java:83)] 404:
The URI requested is invalid or the resource requested, such as a user, does not exist.)
After reading this page (https://twittercommunity.com/t/twitter-streaming-api-not-working-with-twitter4j-and-apache-flume/66612/11) finally I solved downloading a new version of twitter4j (in the page there's a link).
Probably not the best solution, but worked for me.

Overtone Livecoding with Emacs/Slime/Swank/cake - Could not locate overtone.live__init.class

I am trying to use emacs and slime to connect to swank to live code using Overtone. I have the whole thing pretty much working, but when i try to run
(ns foo
(:use [overtone.live]
[overtone.inst.synth]))
(definst bar [] (saw 220))
I get the error 'Could not locate overtone/live__inti.class or overtone/live.clj on classpath:' Which i gather basically means that the class files are not where it is looking for them. I am not sure what to do to fix this.
Important note: Slime/Swank/Cake are deprecated means of connecting Overtone and Emacs. Instead, consider using nREPL via Leiningen 2+ and CIDER
it looks like you haven't got the Overtone jar on the classpath. Things to check:
You have overtone-X-Y-X.jar in your project's lib directory
Your project isn't called Overtone (that can cause issues with tools like lein)
Finally, you might want to take a look at this setup video: http://vimeo.com/25190186 which describes the process of getting an Overtone dev environment setup.
Good luck and come join the mailing list and share your thoughts: http://groups.google.com/group/overtone
Have you tried confirming that overtone is in your java classpath?
(System/getProperty "java.class.path")
It's most likely a temporary fix, as I'm just getting my feet wet with clojure and overtone, but I included overtone as a global dependecy in my ~/.cake directory and installed it with:
cake deps --global
Additionally, I'd reccomend updating to the latest version of overtone as it looks like the vimeo link is a few versions behind what is currently reflected on clojars:
http://clojars.org/overtone

Hibernate in Servlet causesNoClassDefFoundError: org/slf4j/LoggerFactory

I have a Java (6) application which uses Hibernate (V3.3.2) to read data from HSQLDB, which i build and debug/run with Eclipse (V3.5.1), and it works fine.
I then created a GWT (V1.7) Servlet web app, copied my hibernate classes into it, and added the same User Libraries dependencies. However when i run the servlet and try to access a URL which invokes my code i get this:
java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at org.hibernate.cfg.Configuration.<clinit>(Configuration.java:152)
at xxx.daoimpl.DAOSession.initialise(DAOSession.java:40)
where DAOSession.java:40 is :
AnnotationConfiguration config = new AnnotationConfiguration ();
Googling for this error suggests i am missing slf4j-api.jar from the classpath, however if i look at the command line for the Debug properties i can see this jar there:
C:\java\jsedk_6\jre\bin\javaw.exe
-agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:54541
-Xmx512m -Dfile.encoding=Cp1252
-classpath
D:\dev\workspace\xxx\src;
D:\dev\workspace\xxx\resources;
D:\dev\workspace\xxx\war\WEB-INF\classes;
C:\java\eclipse\plugins\com.google.gwt.eclipse.sdkbundle.win32_1.7.1.v200909221731\gwt-windows-1.7.1\gwt-user.jar;
C:\java\eclipse\plugins\com.google.gwt.eclipse.sdkbundle.win32_1.7.1.v200909221731\gwt-windows-1.7.1\gwt-dev-windows.jar;
C:\java\hibernate-annotations-3.4.0.GA\hibernate-annotations.jar;
C:\java\hibernate-annotations-3.4.0.GA\lib\ejb3-persistence.jar;
C:\java\hibernate-annotations-3.4.0.GA\lib\hibernate-commons-annotations.jar;
C:\java\hibernate-distribution-3.3.2.GA\hibernate3.jar;
C:\java\hibernate-distribution-3.3.2.GA\lib\required\antlr-2.7.6.jar;
C:\java\hibernate-distribution-3.3.2.GA\lib\required\commons-collections-3.1.jar;
C:\java\hibernate-distribution-3.3.2.GA\lib\required\dom4j-1.6.1.jar;
C:\java\hibernate-distribution-3.3.2.GA\lib\required\javassist-3.9.0.GA.jar;
C:\java\hibernate-distribution-3.3.2.GA\lib\required\jta-1.1.jar;
C:\java\hibernate-validator-4.0.1.GA\hibernate-validator-4.0.1.GA.jar;
C:\java\hibernate-validator-4.0.1.GA\lib\validation-api-1.0.0.GA.jar;
C:\java\hibernate-validator-4.0.1.GA\lib\log4j-1.2.14.jar;
C:\java\hsqldb\lib\hsqldb.jar;
C:\java\restlet-jse-2.0m5\lib\org.restlet.jar;
C:\java\restlet-jee-2.0m5\lib\org.restlet.ext.servlet.jar;
C:\java\restlet-jse-2.0m5\lib\org.restlet.ext.xml.jar;
C:\java\slf4j-1.5.8\slf4j-api-1.5.8.jar;
C:\java\slf4j-1.5.8\slf4j-log4j12-1.5.8.jar
com.google.gwt.dev.HostedMode
...
If i open the jar i can see the LoggerFactory class in there.
Any idea why it isn't being found by the class loader?
Edit 1: If try to access org.slf4j.LoggerFactory from my code, Eclipse compiles it ok, but i get the same error at runtime.
Edit 2: If i add a Test class with a main which calls the same code and run it, it works. So this classpath problem seems specific to the Servlet.
thanks,
jon
It seems that copying the two slf4j jars to the war/WEB-INF/lib sub-project/dir fixed the problem. I'm not really sure why i should need to do this for these two jars and not for all the other Hibernate, Restlet etc jars that the project also uses, though i suppose for consistency i will do that anyway - i guess it will make deployment easier as well.
If someone can provide some sort of explanation as to why this worked and why exactly i need to do it i will select it as the "correct" answer, otherwise i'll select this one.
Can you please reconfirm that you have at least two slf4j.jar files in the classpath, the slf4j-api.jar and exactly one implementation, such as slf4j-jdk14.jar?
You must not have multiple sflj4-implementations in the classpath.
You have a runtime dependency issue so everything compiles fine but the dependency is in your jars. You need to visit the Hibernate site and look at the compatibility matrix and make sure you are matched up correctly then check the dependencies for annotations and core. You log4J jars look fine so it's definitely some quirk.
If it works in Eclipse then logically it's definitely some diff between the 2 runtimes (eclipse and non-eclipse), if the matrix checks out fine then see if you can factor out the commonalities in the 2 then work out the differences -- your answer should be in there.
I had a similar issue except I was using Tomcat and the NoClassDefFound error was on the juli logger. I fixed it by removing the Tomcat dependencies from my classpath when running in hosted mode because hosted mode embeds a Tomcat server that was conflicting. So I would see what happens if you remove some or all of the restlet jars from your classpath to see if they conflict.

Categories

Resources