Flex ant task problem - apache-flex

When I try to build a project that uses Flex and where the Flex SDK is on one drive and the project files on another I get the following error in ant:
[mxmlc] java.lang.NoClassDefFoundError: flex2/tools/Compiler
[mxmlc] Exception in thread "main"
It seems to be a problem with the Flex mxmlc ant task. Anyone know the root cause of this? It works if I move the Flex SDK over to the project folder but I don't like being hackish like that...
Ant in verbose mode gives:
compile.main:
dropping E:\c from path as it doesn't exist
dropping E:\programs\flex-sdk\lib\mxmlc.jar from path as it doesn't exist
[mxmlc] java.lang.NoClassDefFoundError: flex2/tools/Compiler
[mxmlc] Exception in thread "main"
[antcall] Exiting E:\svn\trunk\dev\modules\web\webapps\lpjserver\lpjserver-build.xml.
BUILD FAILED
E:\svn\trunk\dev\modules\web\webapps\lpjserver\lpjserver-build.xml:379: The following error occurred while executing this line:
E:\svn\trunk\dev\modules\web\webapps\lpjserver\lpjserver-build.xml:199: mxmlc task failed.
at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:508)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:418)
at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.apache.tools.ant.Main.runBuild(Main.java:758)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: E:\svn\trunk\dev\modules\web\webapps\lpjserver\lpjserver-build.xml:199: mxmlc task failed.
at flex.ant.FlexTask.executeOutOfProcess(FlexTask.java:253)
at flex.ant.FlexTask.execute(FlexTask.java:223)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
... 17 more
--- Nested Exception ---
E:\svn\trunk\dev\modules\web\webapps\lpjserver\lpjserver-build.xml:199: mxmlc task failed.
at flex.ant.FlexTask.executeOutOfProcess(FlexTask.java:253)
at flex.ant.FlexTask.execute(FlexTask.java:223)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.apache.tools.ant.Main.runBuild(Main.java:758)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

Did you put flexTasks.jar into lib folder of your ant installation?
In my case I've copied D:\Flex_sdk_3.3.0\ant\lib\flexTasks.jar into D:\apache-ant-1.7.1\lib\

I determined that this is actually a bug in the flex ant task. FlexTask.java is not doing proper pathing to work across multiple drives on a windows machine.

Somewhere there is a path that doesn't have the drive letter on the front of it. So it works when you're on the 'correct' drive, but not otherwise.
I found this blog posting - search for MXMLC= in the text - someone found a solution for a Mac install that threw the same exception. You may be able to adapt this to you situation. (It looks like maybe when the flex mxmlc compiler is installed and configured it doesn't necessarily include the drive letter everywhere its needed.)
Rather than moving or copying the jar, perhaps you can add the full path to it with drive letter as a property in your build, then append that to the classpath.

Copy Flex sdk/x.x folder to the same drive as your sources, adjust flex.sdk.home ant variable and rebuild.

Related

REST URL Call throwing file not found exception

Can anybody tell me what could be causing this exception?. Because it is working fine in testing environment and not in the live servers .
I tried checking the differences of test and existing prod war file, but i did not find any differences.
The major change I did was converted project from ANT to MAVEN, but not sure how this is related to this exception.
java.io.FileNotFoundException: http://localhost:8888/getreport
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1890)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
at com.sample.SimpleTest.webcontroller.SimpleController.getreport(SimpleController.java:120)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)

JavaFX desktop app won't start in a specific machine (works in others)

I have a java desktop app using Swing which I rewrote in JavaFX using SceneBuilder.
The Swing app works fine on all users machines (35 Machine). After rewriting the app in JavaFX, on one specific machine the app won't start and gives the below error message.
I couldn't figure out the issue. I appreciate if someone can give any help.
Thank you.
Exception in Application start method
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(Unknown Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(Unknown Source)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at java.base/sun.launcher.LauncherHelper$FXHelper.main(Unknown Source)
Caused by: java.lang.RuntimeException: Exception in Application start method
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication1(Unknown Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: com/sun/javafx/css/converters/PaintConverter
at com.jfoenix.controls.JFXPasswordField$StyleableProperties.<clinit>(JFXPasswordField.java:205)
at com.jfoenix.controls.JFXPasswordField.<init>(JFXPasswordField.java:156)
at idehmis.controller.LoginController.<init>(LoginController.java:51)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.base/java.lang.Class.newInstance(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader$ValueElement.processAttribute(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader$InstanceDeclarationElement.processAttribute(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader$Element.processStartElement(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader$ValueElement.processStartElement(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.processStartElement(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.load(Unknown Source)
at idehmis.IDEHMIS.start(IDEHMIS.java:30)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(Unknown Source)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$11(Unknown Source)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$9(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(Unknown Source)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source)
... 1 more
Caused by: java.lang.ClassNotFoundException: com.sun.javafx.css.converters.PaintConverter
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
it looks like the JVM is finding it difficult to locate the com.sun.javafx.css.converters.PaintConverter at runtimewhich causes the ClassNotFoundException Exception error, and which in turn causes the JFoenix library to throw java.lang.NoClassDefFoundError meaning the class was not found on the classpath. This indicates that we were trying to load the class definition, and the class did not exist on the classpath
so first make sure you have the right version of java which is Java 8 to support JFoenix, them make sure The JFoenix library is located in you classpath.
The stack trace, because it prefaces each fully-qualified class name (for example java.lang.ClassLoader) with a module name (e.g. java.base) indicates that the machine is trying to run the application using Java 9.
The CSS converter classes, such as PaintConverter, were promoted from private API, where they were located in Java 8 and earlier, to public API in Java 9. So the class com.sun.javafx.css.converters.PaintConverter no longer exists, and has been replaced by javafx.css.converter.PaintConverter. Hence, when running your application in Java 9, you get a ClassNotFoundException.
The bottom line here is that using any API that is not public, or using third party libraries that do so, is liable to make your application fail if the user updates their JVM. The possible solutions to this problem are:
Avoid using private API, or libraries that use private API
Create and maintain different versions of your code that are for specific JVM versions. In the case of the third-party JFoenix library you are using, there is a separate version for Java 9, so you could create a Java 9 version of the application that uses that version of the library. Note that not only does this create an additional burden on the developer, but it also can potentially create issues for the end user, who will be forced to update the version of your application they use in sync with updating their JVM.
Create a "Self-Contained Application Bundle" for your application. This bundles a specific JVM with your code, so you essentially control the JVM the user uses to run your application. The downsides to this are that you need to create a different bundle for each platform (Windows 32 bit, Windows 64 bit, Mac, Linux) that you want to support, and that the size of the application will increase substantially (to include the JVM).
I would generally recommend the first option when possible, and the third when not.

Exception while running AWS dynamoDb in Local Machine

I have downloaded AWS dynamodb zip file and extracted to D:/dynamoDB folder
When tried to run via command prompt using
java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar
Exception as below occurs
Exception in thread "main" java.lang.NoSuchFieldError: completionKey
at sun.nio.fs.WindowsNativeDispatcher.initIDs(Native Method)
at sun.nio.fs.WindowsNativeDispatcher.<clinit>(Unknown Source)
at sun.nio.fs.WindowsLinkSupport.getRealPath(Unknown Source)
at sun.nio.fs.WindowsPath.toRealPath(Unknown Source)
at sun.nio.fs.WindowsPath.toRealPath(Unknown Source)
at sun.util.calendar.ZoneInfoFile$1.run(Unknown Source)
at sun.util.calendar.ZoneInfoFile$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.util.calendar.ZoneInfoFile.<clinit>(Unknown Source)
at sun.util.calendar.ZoneInfo.getTimeZone(Unknown Source)
at java.util.TimeZone.getTimeZone(Unknown Source)
at java.util.TimeZone.setDefaultZone(Unknown Source)
at java.util.TimeZone.getDefaultRef(Unknown Source)
at java.util.TimeZone.getDefault(Unknown Source)
at org.eclipse.jetty.util.DateCache.<init>(DateCache.java:88)
at org.eclipse.jetty.util.log.StdErrLog.<clinit>(StdErrLog.java:68)
at org.eclipse.jetty.util.log.Log.initStandardLogging(Log.java:185)
at org.eclipse.jetty.util.log.Log.initialized(Log.java:168)
at org.eclipse.jetty.util.log.Log.getLogger(Log.java:435)
at org.eclipse.jetty.util.log.Log.getLogger(Log.java:425)
at org.eclipse.jetty.util.IO.<clinit>(IO.java:44)
at org.eclipse.jetty.util.log.Log$1.run(Log.java:110)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.jetty.util.log.Log.<clinit>(Log.java:85)
at org.eclipse.jetty.util.component.AbstractLifeCycle.<clinit>(AbstractL
ifeCycle.java:33)
at com.amazonaws.services.dynamodbv2.local.main.ServerRunner.createServe
r(ServerRunner.java:123)
at com.amazonaws.services.dynamodbv2.local.main.ServerRunner.createServe
rFromCommandLineArgs(ServerRunner.java:119)
at com.amazonaws.services.dynamodbv2.local.main.ServerRunner.main(Server
Runner.java:70)
I am having Java7 sdk in my windows 32 system.
NoSuchFieldError exceptions are thrown "if an application tries to access or modify a specified field of an object, and that object no longer has that field". In this case, it's likely the jar was compiled against one version of java (or other dependency) and you're using a different version that is not compatible.
I'd suggest updating to Java8 since support for Java7 ended as of April 2015. Also, check your version of jetty (since the last call outside the JVM was caused by org.eclipse.jetty.util.DateCache.<init>(DateCache.java:88)) to make sure it's compatible.

Errors on webapp deploying in Jetty

I have those problems with a webapp.Can you help me, please? :)
First error:
2012-03-15 09:51:57.023:WARN:oejs.ServletHandler:Error for NAME_OF_WEBAPP/NAME_OF_SERVLET
This request comes from a form contained in an html page.
After this error, the terminal shows me this error:
java.lang.NoClassDefFoundError: org/apache/lucene/analysis/payloads/PayloadEncoder
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:369)
at org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:390)
at org.apache.solr.util.plugin.AbstractPluginLoader.create(AbstractPluginLoader.java:84)
at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:141)
at org.apache.solr.schema.IndexSchema.readAnalyzer(IndexSchema.java:835)
at org.apache.solr.schema.IndexSchema.access$100(IndexSchema.java:58)
at org.apache.solr.schema.IndexSchema$1.create(IndexSchema.java:429)
at org.apache.solr.schema.IndexSchema$1.create(IndexSchema.java:447)
at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:141)
at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:456)
at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:95)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:520)
at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:137)
at connector.SolrConnector.<init>(SolrConnector.java:33)
at connector.SolrConnector.getInstance(SolrConnector.java:69)
at connector.SolrConnector.getSolrServer(SolrConnector.java:77)
at connector.QueryServlet.doGet(QueryServlet.java:117)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:546)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:479)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:483)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1031)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:965)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
at org.eclipse.jetty.server.Server.handle(Server.java:349)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:449)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:910)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:647)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:233)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:76)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:615)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:45)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
at java.lang.Thread.run(Thread.java:722)
Caused by:
java.lang.ClassNotFoundException: org.apache.lucene.analysis.payloads.PayloadEncoder
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:424)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:377)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:369)
at org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:390)
at org.apache.solr.util.plugin.AbstractPluginLoader.create(AbstractPluginLoader.java:84)
at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:141)
at org.apache.solr.schema.IndexSchema.readAnalyzer(IndexSchema.java:835)
at org.apache.solr.schema.IndexSchema.access$100(IndexSchema.java:58)
at org.apache.solr.schema.IndexSchema$1.create(IndexSchema.java:429)
at org.apache.solr.schema.IndexSchema$1.create(IndexSchema.java:447)
at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:141)
at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:456)
at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:95)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:520)
at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:137)
at connector.SolrConnector.<init>(SolrConnector.java:33)
at connector.SolrConnector.getInstance(SolrConnector.java:69)
at connector.SolrConnector.getSolrServer(SolrConnector.java:77)
at connector.QueryServlet.doGet(QueryServlet.java:117)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:546)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:479)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:483)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1031)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:965)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
at org.eclipse.jetty.server.Server.handle(Server.java:349)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:449)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:910)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:647)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:233)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:76)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:615)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:45)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
at java.lang.Thread.run(Thread.java:722)
When I compile the file WAR, there aren't errors..
I use Jetty 7.6.0.RC4, Solr 1.4.1 and Java 7.. ;)
java.lang.ClassNotFoundException: org.apache.lucene.analysis.payloads.PayloadEncoder
This is rather self-explaining. The mentioned class cannot be found in the runtime classpath.
Make sure that the mentioned class (or at least, the JAR file containing the class) is in the runtime classpath of the webapp. One of the folders covered by the webapp's default runtime classpath is the webapp's /WEB-INF/lib folder. Drop the necessary JARs in there.
As the package name hints, that class is part of Apache Lucene library. If you need to, you can just download it from over there.

Starting Java applet directly from jar file

The goal is to have an applet run from a jar file.
The problem is that the applet only seems to want to run from an exploded jar file.
Samples on the Internet suggest this applet tag:
<applet code="com.blabla.MainApplet"
archive="applet.jar"
width="600" height="600">
This will not even try to look in the jar file and fails with:
Caused by: java.io.IOException: open HTTP connection failed:http://localhost:8080/helloWord/com/blabbla/MainApplet.class
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
Setting the codebase instead of the archive attribute to the jar file. Looks a bit better. However, the JVM does not realize that it has to open the jar file:
<applet code="com.blabla.MainApplet"
codebase="applet.jar"
width="600" height="600">
Caused by: java.io.IOException: open HTTP connection failed:http://localhost:8080/helloWord/applet.jar/com/blabbla/MainApplet.class
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
How does the applet tag have to be formulated to start an applet class from inside of a jar file?
The problem was that the Java console was caching previous bad jars. Once the cache was cleared in the Java console, the first version of the code worked fine.
<applet code="com.blabla.MainApplet"
archive="applet.jar"
width="600" height="600">

Resources