Can't read input file while running repast simphony model programmatically - repast-simphony

First time posing on stack overflow, so excuse any missing conventions. Let me know and I will remedy them.
I am having trouble running my models programmatically. I believe it is caused by imageio not being able to read an image file in a jar or in an external project and I cannot find a way to fix it.
When i run the model normally everything is fine, but when i run it programmatically from another project i get:
First the warning:
log4j:WARN No appenders could be found for logger (org.java.plugin.boot.DefaultPluginsCollector).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Then the GUI launches and when i press "Start Run" or "Initialize Run" i get:
Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException: Caught NullPointerException: null on thread AWT-EventQueue-0
followed by a host of others that i believe are not relevant here as i read a repast sourceforge mailing list thing where they said with this error/warning the GUI error log is the thing to read. The logger in the GUI reads:
2019/03/05 09:12:32,297: Error while initializing edited style
javax.imageio.IIOException: Can't read input file!
at javax.imageio.ImageIO.read(Unknown Source)
at repast.simphony.visualizationOGL2D.ImageSpatialSource.registerSource(ImageSpatialSource.java:52)
at repast.simphony.visualization.editedStyle.EditedStyleOGL2D.init(EditedStyleOGL2D.java:95)
at repast.simphony.visualizationOGL2D.DisplayOGL2D.registerStyle(DisplayOGL2D.java:475)
at repast.simphony.visualization.engine.DisplayCreatorOGL2D$2.register(DisplayCreatorOGL2D.java:81)
at repast.simphony.visualization.engine.DisplayCreatorOGL2D$2.register(DisplayCreatorOGL2D.java:1)
at repast.simphony.visualization.engine.StyleRegistrar.registerStyles(StyleRegistrar.java:93)
at repast.simphony.visualization.engine.StyleRegistrar.registerStyles(StyleRegistrar.java:34)
at repast.simphony.visualization.engine.DisplayCreatorOGL2D.createDisplay(DisplayCreatorOGL2D.java:79)
at repast.simphony.visualization.engine.DisplayProducer.createDisplay(DisplayProducer.java:48)
at repast.simphony.visualization.engine.DisplayComponentControllerAction.runInitialize(DisplayComponentControllerAction.java:116)
at repast.simphony.engine.controller.DefaultController$2.visit(DefaultController.java:214)
at repast.simphony.engine.controller.DefaultController$2.visit(DefaultController.java:1)
at repast.simphony.util.collections.NaryTree.preOrderTraverals(NaryTree.java:292)
at repast.simphony.util.collections.NaryTree.preOrderTraverals(NaryTree.java:295)
at repast.simphony.util.collections.NaryTree.preOrderTraverals(NaryTree.java:295)
at repast.simphony.util.collections.NaryTree.preOrderTraversal(NaryTree.java:288)
at repast.simphony.engine.controller.DefaultController.runInitialize(DefaultController.java:212)
at repast.simphony.engine.controller.DefaultController.runInitialize(DefaultController.java:383)
at repast.simphony.ui.RSApplication.initSim(RSApplication.java:157)
at repast.simphony.ui.action.InitRun.actionPerformed(InitRun.java:17)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
The offending code(in the model) for this error must be:
#Override
public Context build(Context<Object> context) {
try {
img = ImageIO.read(new File("maps/trondheimv2.png"));
} catch (IOException e) {
System.out.println(e + ": Image file not found!");
}
...
I have tried using an absolute path:
C:/Users/USER/Documents/Git/REPO/Traffic_Main/maps/trondheimv2.png
and this method:
getClass().getResource("C:/Users/USER/Documents/Git/REPO/Traffic_Main/maps/trondheimv2.png").toURI()));
I am using a renamed version of the FAQ example to run the model programmatically:
package execute;
public class UserMain {
public UserMain () {};
public void start () {
String [] args = new String []{ "C:/Users/USERNAME/Documents/Git/REPO/Traffic_Main/CitySim.rs"};
repast . simphony . runtime . RepastMain . main ( args ) ;
}
public static void main ( String [] args ) {
UserMain um = new UserMain () ;
um . start () ;
}
}
The class is in another project in C:/Users/USERNAME/Documents/Git/REPO/Runner/src/execute
I have added the jars from repast.simphony.runtime_2.6.0/lib and added the repast.simphony.runtime_2.6.0/bin folder to the classpath.
My goal is to run multiple models from the Runner project
Thank you for your time.
edit:
Made the changes suggested by Eric Tatara and got the following errors:
WARN [AWT-EventQueue-0] 11:04:59,452 repast.simphony.ui.RSGUIConstants - Error loading: player_play, it will not be used.
WARN [AWT-EventQueue-0] 11:04:59,453 repast.simphony.ui.RSGUIConstants - Error loading: player_pause, it will not be used.
WARN [AWT-EventQueue-0] 11:04:59,454 repast.simphony.ui.RSGUIConstants - Error loading: player_stop, it will not be used.
WARN [AWT-EventQueue-0] 11:04:59,455 repast.simphony.ui.RSGUIConstants - Error loading: player_step, it will not be used.
WARN [AWT-EventQueue-0] 11:04:59,455 repast.simphony.ui.RSGUIConstants - Error loading: project_open, it will not be used.
WARN [AWT-EventQueue-0] 11:04:59,455 repast.simphony.ui.RSGUIConstants - Error loading: filesave, it will not be used.
WARN [AWT-EventQueue-0] 11:04:59,456 repast.simphony.ui.RSGUIConstants - Error loading: filesave16, it will not be used.
WARN [AWT-EventQueue-0] 11:04:59,456 repast.simphony.ui.RSGUIConstants - Error loading: filter16, it will not be used.
WARN [AWT-EventQueue-0] 11:04:59,457 repast.simphony.ui.RSGUIConstants - Error loading: reload, it will not be used.
WARN [AWT-EventQueue-0] 11:04:59,457 repast.simphony.ui.RSGUIConstants - Error loading: exec, it will not be used.
WARN [AWT-EventQueue-0] 11:04:59,457 repast.simphony.ui.RSGUIConstants - Error loading: folder, it will not be used.
WARN [AWT-EventQueue-0] 11:04:59,458 repast.simphony.ui.RSGUIConstants - Error loading: folder_open, it will not be used.
WARN [AWT-EventQueue-0] 11:04:59,458 repast.simphony.ui.RSGUIConstants - Error loading: camera, it will not be used.
WARN [AWT-EventQueue-0] 11:04:59,458 repast.simphony.ui.RSGUIConstants - Error loading: movie, it will not be used.
WARN [AWT-EventQueue-0] 11:04:59,459 repast.simphony.ui.RSGUIConstants - Error loading: chart, it will not be used.
WARN [AWT-EventQueue-0] 11:04:59,459 repast.simphony.ui.RSGUIConstants - Error loading: database, it will not be used.
WARN [AWT-EventQueue-0] 11:04:59,460 repast.simphony.ui.RSGUIConstants - Error loading: display, it will not be used.
WARN [AWT-EventQueue-0] 11:04:59,460 repast.simphony.ui.RSGUIConstants - Error loading: info_viz, it will not be used.
WARN [AWT-EventQueue-0] 11:04:59,460 repast.simphony.ui.RSGUIConstants - Error loading: kudesigner, it will not be used.
WARN [AWT-EventQueue-0] 11:04:59,461 repast.simphony.ui.RSGUIConstants - Error loading: lockstart_session, it will not be used.
WARN [AWT-EventQueue-0] 11:04:59,461 repast.simphony.ui.RSGUIConstants - Error loading: leaf, it will not be used.
WARN [AWT-EventQueue-0] 11:04:59,462 repast.simphony.ui.RSGUIConstants - Error loading: edit, it will not be used.
WARN [AWT-EventQueue-0] 11:04:59,462 repast.simphony.ui.RSGUIConstants - Error loading: home, it will not be used.
WARN [AWT-EventQueue-0] 11:04:59,462 repast.simphony.ui.RSGUIConstants - Error loading: info, it will not be used.
WARN [AWT-EventQueue-0] 11:04:59,463 repast.simphony.ui.RSGUIConstants - Error loading: view_sidetree, it will not be used.
WARN [AWT-EventQueue-0] 11:04:59,463 repast.simphony.ui.RSGUIConstants - Error loading: harddrive, it will not be used.
WARN [AWT-EventQueue-0] 11:04:59,463 repast.simphony.ui.RSGUIConstants - Error loading: button_cancel, it will not be used.
WARN [AWT-EventQueue-0] 11:04:59,464 repast.simphony.ui.RSGUIConstants - Error loading: edit_add, it will not be used.
WARN [AWT-EventQueue-0] 11:04:59,464 repast.simphony.ui.RSGUIConstants - Error loading: apply, it will not be used.
WARN [AWT-EventQueue-0] 11:04:59,464 repast.simphony.ui.RSGUIConstants - Error loading: redo, it will not be used.
FATAL [AWT-EventQueue-0] 11:04:59,545 repast.simphony.ui.RSUIPlugin - Fatal error starting Repast
java.lang.NoSuchMethodError: com.jgoodies.forms.layout.ColumnSpec.createGap(Lcom/jgoodies/forms/layout/ConstantSize;)Lcom/jgoodies/forms/layout/ColumnSpec;
at com.jgoodies.forms.layout.FormSpecs.<clinit>(FormSpecs.java:115)
at repast.simphony.ui.RunOptionsPanel.initComponents(RunOptionsPanel.java:114)
at repast.simphony.ui.RunOptionsPanel.<init>(RunOptionsPanel.java:39)
at repast.simphony.ui.RSGui.addRunOptionsView(RSGui.java:558)
at repast.simphony.ui.RSApplication.initGui(RSApplication.java:655)
at repast.simphony.ui.RSAppConfigurator.fillBars(RSAppConfigurator.java:52)
at saf.core.ui.GUICreatorDelegate.createDisplay(GUICreatorDelegate.java:189)
at saf.core.ui.GUICreator.createDisplay(GUICreator.java:12)
at repast.simphony.ui.RSUIPlugin$1.run(RSUIPlugin.java:99)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Width (-1) and height (-1) cannot be <= 0
at java.awt.image.DirectColorModel.createCompatibleWritableRaster(Unknown Source)
at java.awt.image.BufferedImage.<init>(Unknown Source)
at repast.simphony.ui.widget.IconRotator.rotate(IconRotator.java:51)
at repast.simphony.ui.widget.IconRotator.access$0(IconRotator.java:47)
at repast.simphony.ui.widget.IconRotator$1.actionPerformed(IconRotator.java:32)
at javax.swing.Timer.fireActionPerformed(Unknown Source)
at javax.swing.Timer$DoPostEvent.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Issue 1: you need to copy the MessageCenter.log4j.properties file into the folder from which you are running the model.
Issue 2: The exception you posted indicates that the error is due to a problem with an edited style class for one of the displays. If you create a display style with the editor and assign an image file to the agent icon, the image file URL is stored in the display descriptor XML file which is located in the project .rs folder. I suspect a relative file path for the image file is defined in the XML file and if you start the code from another folder, the relative path will be incorrect. I would suggest editing the style XML directly and either use an absolute path, or change the relative path accordingly, or perhaps create a symbolic link in the folder from which your running that points to the correct location.

Related

Null pointer exception in gui of jmeter

Please click here for the jmeter test plan
Please click here for the jmeter log file I am trying to hit the server by JUnit Request using Jmeter, but i am getting the followig error:
jmeter.gui.GuiPackage: Problem retrieving gui java.lang.NullPointerException.
Here is my log file
2015/12/04 12:53:17 INFO - jmeter.util.BSFTestElement: Registering JMeter version of JavaScript engine as work-round for BSF-22
2015/12/04 12:53:17 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Cannot find .className property for htmlParser, using default
2015/12/04 12:53:17 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/html is
2015/12/04 12:53:17 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for application/xhtml+xml is
2015/12/04 12:53:17 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for application/xml is
2015/12/04 12:53:17 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/xml is
2015/12/04 12:53:17 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/vnd.wap.wml is org.apache.jmeter.protocol.http.parser.RegexpHTMLParser
2015/12/04 12:53:17 INFO - jmeter.gui.util.MenuFactory: Skipping org.apache.jmeter.protocol.http.control.gui.WebServiceSamplerGui
2015/12/04 12:53:17 INFO - jmeter.gui.util.MenuFactory: Skipping org.apache.jmeter.protocol.http.modifier.gui.ParamModifierGui
2015/12/04 12:53:18 INFO - jorphan.exec.KeyToolUtils: keytool found at 'keytool'
2015/12/04 12:53:18 INFO - jmeter.protocol.http.proxy.ProxyControl: HTTP(S) Test Script Recorder SSL Proxy will use keys that support embedded 3rd party resources in file C:\Users\Vishal\Downloads\apache-jmeter-2.13 (1)\apache-jmeter-2.13\bin\proxyserver.jks
2015/12/04 12:53:19 INFO - jmeter.samplers.SampleResult: Note: Sample TimeStamps are START times
2015/12/04 12:53:19 INFO - jmeter.samplers.SampleResult: sampleresult.default.encoding is set to ISO-8859-1
2015/12/04 12:53:19 INFO - jmeter.samplers.SampleResult: sampleresult.useNanoTime=true
2015/12/04 12:53:19 INFO - jmeter.samplers.SampleResult: sampleresult.nanoThreadSleep=5000
2015/12/04 12:53:28 ERROR - jmeter.gui.GuiPackage: Problem retrieving gui java.lang.NullPointerException
at org.apache.jmeter.gui.GuiPackage.getTestElementCheckSum(GuiPackage.java:853)
at org.apache.jmeter.gui.GuiPackage.updateCurrentNode(GuiPackage.java:435)
at org.apache.jmeter.gui.GuiPackage.getCurrentGui(GuiPackage.java:272)
at org.apache.jmeter.gui.action.EditCommand.doAction(EditCommand.java:45)
at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:81)
at org.apache.jmeter.gui.action.ActionRouter.access$000(ActionRouter.java:40)
at org.apache.jmeter.gui.action.ActionRouter$1.run(ActionRouter.java:63)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
2015/12/04 12:53:28 ERROR - jmeter.gui.GuiPackage: Problem retrieving gui java.lang.NullPointerException
at org.apache.jmeter.gui.GuiPackage.getTestElementCheckSum(GuiPackage.java:853)
at org.apache.jmeter.gui.GuiPackage.updateCurrentNode(GuiPackage.java:435)
at org.apache.jmeter.gui.GuiPackage.getCurrentGui(GuiPackage.java:272)
at org.apache.jmeter.gui.util.MenuFactory.addFileMenu(MenuFactory.java:224)
at org.apache.jmeter.gui.util.MenuFactory.addFileMenu(MenuFactory.java:200)
at org.apache.jmeter.gui.util.MenuFactory.getDefaultSamplerMenu(MenuFactory.java:305)
at org.apache.jmeter.samplers.gui.AbstractSamplerGui.createPopupMenu(AbstractSamplerGui.java:49)
at org.apache.jmeter.gui.tree.JMeterTreeNode.createPopupMenu(JMeterTreeNode.java:158)
at org.apache.jmeter.gui.action.EditCommand.doAction(EditCommand.java:47)
at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:81)
at org.apache.jmeter.gui.action.ActionRouter.access$000(ActionRouter.java:40)
at org.apache.jmeter.gui.action.ActionRouter$1.run(ActionRouter.java:63)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
2015/12/04 12:53:31 ERROR - jmeter.gui.GuiPackage: Problem retrieving gui java.lang.NullPointerException
at org.apache.jmeter.gui.GuiPackage.getTestElementCheckSum(GuiPackage.java:853)
at org.apache.jmeter.gui.GuiPackage.updateCurrentNode(GuiPackage.java:435)
at org.apache.jmeter.gui.GuiPackage.getCurrentGui(GuiPackage.java:272)
at org.apache.jmeter.gui.util.MenuFactory.addFileMenu(MenuFactory.java:224)
at org.apache.jmeter.gui.util.MenuFactory.addFileMenu(MenuFactory.java:200)
at org.apache.jmeter.gui.util.MenuFactory.getDefaultSamplerMenu(MenuFactory.java:305)
at org.apache.jmeter.samplers.gui.AbstractSamplerGui.createPopupMenu(AbstractSamplerGui.java:49)
at org.apache.jmeter.gui.tree.JMeterTreeNode.createPopupMenu(JMeterTreeNode.java:158)
at org.apache.jmeter.gui.tree.JMeterTreeListener.displayPopUp(JMeterTreeListener.java:244)
at org.apache.jmeter.gui.tree.JMeterTreeListener.mousePressed(JMeterTreeListener.java:193)
at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
2015/12/04 12:53:32 ERROR - jmeter.gui.GuiPackage: Problem retrieving gui java.lang.NullPointerException
at org.apache.jmeter.gui.GuiPackage.getTestElementCheckSum(GuiPackage.java:853)
at org.apache.jmeter.gui.GuiPackage.updateCurrentNode(GuiPackage.java:435)
at org.apache.jmeter.gui.GuiPackage.updateCurrentGui(GuiPackage.java:416)
at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:73)
at org.apache.jmeter.gui.action.ActionRouter.access$000(ActionRouter.java:40)
at org.apache.jmeter.gui.action.ActionRouter$1.run(ActionRouter.java:63)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
2015/12/04 12:53:37 ERROR - jmeter.gui.GuiPackage: Problem retrieving gui java.lang.NullPointerException
at org.apache.jmeter.gui.GuiPackage.getTestElementCheckSum(GuiPackage.java:853)
at org.apache.jmeter.gui.GuiPackage.updateCurrentNode(GuiPackage.java:435)
at org.apache.jmeter.gui.GuiPackage.getCurrentGui(GuiPackage.java:272)
at org.apache.jmeter.gui.action.EditCommand.doAction(EditCommand.java:45)
at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:81)
at org.apache.jmeter.gui.action.ActionRouter.access$000(ActionRouter.java:40)
at org.apache.jmeter.gui.action.ActionRouter$1.run(ActionRouter.java:63)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
2015/12/04 12:53:37 ERROR - jmeter.gui.GuiPackage: Problem retrieving gui java.lang.NullPointerException
at org.apache.jmeter.gui.GuiPackage.getTestElementCheckSum(GuiPackage.java:853)
at org.apache.jmeter.gui.GuiPackage.updateCurrentNode(GuiPackage.java:435)
at org.apache.jmeter.gui.GuiPackage.getCurrentGui(GuiPackage.java:272)
at org.apache.jmeter.gui.util.MenuFactory.addFileMenu(MenuFactory.java:224)
at org.apache.jmeter.gui.util.MenuFactory.addFileMenu(MenuFactory.java:200)
at org.apache.jmeter.gui.util.MenuFactory.getDefaultSamplerMenu(MenuFactory.java:305)
at org.apache.jmeter.samplers.gui.AbstractSamplerGui.createPopupMenu(AbstractSamplerGui.java:49)
at org.apache.jmeter.gui.tree.JMeterTreeNode.createPopupMenu(JMeterTreeNode.java:158)
at org.apache.jmeter.gui.action.EditCommand.doAction(EditCommand.java:47)
at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:81)
at org.apache.jmeter.gui.action.ActionRouter.access$000(ActionRouter.java:40)
at org.apache.jmeter.gui.action.ActionRouter$1.run(ActionRouter.java:63)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
2015/12/04 12:53:40 ERROR - jmeter.gui.GuiPackage: Problem retrieving gui java.lang.NullPointerException
at org.apache.jmeter.gui.GuiPackage.getTestElementCheckSum(GuiPackage.java:853)
at org.apache.jmeter.gui.GuiPackage.updateCurrentNode(GuiPackage.java:435)
at org.apache.jmeter.gui.GuiPackage.updateCurrentGui(GuiPackage.java:416)
at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:73)
at org.apache.jmeter.gui.action.ActionRouter.access$000(ActionRouter.java:40)
at org.apache.jmeter.gui.action.ActionRouter$1.run(ActionRouter.java:63)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
2015/12/04 12:53:41 INFO - jmeter.engine.StandardJMeterEngine: Listeners will be started after enabling running version
2015/12/04 12:53:41 INFO - jmeter.engine.StandardJMeterEngine: To revert to the earlier behaviour, define jmeterengine.startlistenerslater=false
2015/12/04 12:53:41 INFO - jmeter.engine.StandardJMeterEngine: Running the test!
2015/12/04 12:53:41 INFO - jmeter.samplers.SampleEvent: List of sample_variables: []
2015/12/04 12:53:41 INFO - jmeter.samplers.SampleEvent: List of sample_variables: []
2015/12/04 12:53:41 INFO - jmeter.gui.util.JMeterMenuBar: setRunning(true,local)
2015/12/04 12:53:41 INFO - jmeter.engine.StandardJMeterEngine: Starting ThreadGroup: 1 : Thread Group
2015/12/04 12:53:41 INFO - jmeter.engine.StandardJMeterEngine: Starting 1 threads for group Thread Group.
2015/12/04 12:53:41 INFO - jmeter.engine.StandardJMeterEngine: Thread will continue on error
2015/12/04 12:53:41 INFO - jmeter.threads.ThreadGroup: Starting thread group number 1 threads 1 ramp-up 1 perThread 1000.0 delayedStart=false
2015/12/04 12:53:41 INFO - jmeter.threads.JMeterThread: jmeterthread.startearlier=true (see jmeter.properties)
2015/12/04 12:53:41 INFO - jmeter.threads.JMeterThread: Running PostProcessors in forward order
2015/12/04 12:53:41 INFO - jmeter.threads.ThreadGroup: Started thread group number 1
2015/12/04 12:53:41 INFO - jmeter.engine.StandardJMeterEngine: All thread groups have been started
2015/12/04 12:53:41 INFO - jmeter.threads.JMeterThread: Thread started: Thread Group 1-1
2015/12/04 12:53:41 INFO - jmeter.threads.JMeterThread: Thread is done: Thread Group 1-1
2015/12/04 12:53:41 INFO - jmeter.threads.JMeterThread: Thread finished: Thread Group 1-1
2015/12/04 12:53:41 INFO - jmeter.engine.StandardJMeterEngine: Notifying test listeners of end of test
2015/12/04 12:53:41 INFO - jmeter.services.FileServer: Default base='C:\Users\Vishal\Downloads\apache-jmeter-2.13 (1)\apache-jmeter-2.13\bin'
2015/12/04 12:53:41 INFO - jmeter.gui.util.JMeterMenuBar: setRunning(false,local)
2015/12/04 12:53:42 ERROR - jmeter.gui.GuiPackage: Problem retrieving gui java.lang.NullPointerException
at org.apache.jmeter.gui.GuiPackage.getTestElementCheckSum(GuiPackage.java:853)
at org.apache.jmeter.gui.GuiPackage.updateCurrentNode(GuiPackage.java:435)
at org.apache.jmeter.gui.GuiPackage.updateCurrentGui(GuiPackage.java:416)
at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:73)
at org.apache.jmeter.gui.action.ActionRouter.access$000(ActionRouter.java:40)
at org.apache.jmeter.gui.action.ActionRouter$1.run(ActionRouter.java:63)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
It seems you're experiencing clash between Selenium and JMeter dependencies jars. Solution would be:
Install clean latest version of JMeter
Install WebDriver Sampler Plugin
Inspect /lib folder of your JMeter installation, locate duplicate .jar files which names start from http* and delete older versions
Restart JMeter and you're done.
You can also run your .jmx file via Taurus tool - it will automatically download and configure the latest JMeter with Plugins. You'll be able to find "good" installation under .bzt/jmeter-taurus folder in your home directory

java.lang.NoClassDefFoundError: > org/jboss/netty/channel/ChannelException

i use play framework,and i want to run on intellij
this is my configure
but when i run enterprise,the error is
Connected to the target VM, address: '127.0.0.1:56744', transport:
'socket' java.lang.NoClassDefFoundError:
org/jboss/netty/channel/ChannelException at
java.lang.Class.getDeclaredMethods0(Native Method) at
java.lang.Class.privateGetDeclaredMethods(Unknown Source) at
java.lang.Class.getMethod0(Unknown Source) at
java.lang.Class.getMethod(Unknown Source) at
sun.launcher.LauncherHelper.getMainMethod(Unknown Source) at
sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source) Caused
by: java.lang.ClassNotFoundException:
org.jboss.netty.channel.ChannelException at
java.net.URLClassLoader$1.run(Unknown Source) at
java.net.URLClassLoader$1.run(Unknown Source) at
java.security.AccessController.doPrivileged(Native Method) at
java.net.URLClassLoader.findClass(Unknown Source) at
java.lang.ClassLoader.loadClass(Unknown Source) at
sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at
java.lang.ClassLoader.loadClass(Unknown Source) ... 6 more
Disconnected from the target VM, address: '127.0.0.1:56744',
transport: 'socket' Exception in thread "main" Process finished with
exit code 1
how to solve it?
i add netty jar,but the problem still exists

Missing Permissions manifest attribute in main jar

I am trying to run an applet in html, but keep getting this NullPointerException.
Below is the stacktrace,
CacheEntry[file:/C:/Users/User/workspace/SearchAlgorithms/bin/Main.jar]: updateAvailable=false,lastModified=Fri Apr 24 15:09:46 IST 2015,length=10095
Missing Permissions manifest attribute in main jar: file:/C:/Users/User/workspace/SearchAlgorithms/bin/Main.jar
java.io.FileNotFoundException: dataProduct.csv (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at Main.init(Main.java:39)
at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter.init(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
java.io.FileNotFoundException: dataLocation.csv (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at Main.init(Main.java:45)
at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter.init(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Java Plug-in 10.79.2.15
Using JRE version 1.7.0_79-b15 Java HotSpot(TM) Client VM
User home directory = C:\Users\User
Things that I have tried:
Signing the jar file
Including the accesscontrol.dopriviledge,
try {
FileInputStream fis = AccessController.doPrivileged(
new PrivilegedExceptionAction<FileInputStream>() {
public FileInputStream run() throws FileNotFoundException {
return new FileInputStream("someFile");
}
});
} catch (PrivilegedActionException e) {
// e.getException() should be an instance of FileNotFoundException,
// as only "checked" exceptions will be "wrapped" in a
// PrivilegedActionException.
throw (FileNotFoundException) e.getException();
}
The applet runs perfectly on the applet viewer. But embedding in html, gives the NullPointerException.
Please Help.

Apache solr returns error as Could not load config for solrconfig.xml

I followed this tutorial for solr searching.
I did all 5 steps in that tutorial. But after that I loaded the solr as:
http://localhost:8983/solr/admin then I got this error.
Problem accessing /solr/admin. Reason:
{msg=SolrCore 'collection1' is not available due to init failure: Could not load config for solrconfig.xml,trace=org.apache.solr.common.SolrException: SolrCore 'collection1' is not available due to init failure: Could not load config for solrconfig.xml
at org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:860)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:251)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:158)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:368)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.solr.common.SolrException: Could not load config for solrconfig.xml
at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:592)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:657)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:364)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:356)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
... 1 more
Caused by: org.apache.solr.common.SolrException: org.xml.sax.SAXParseException: The string "--" is not permitted within comments.
at org.apache.solr.core.Config.<init>(Config.java:148)
at org.apache.solr.core.Config.<init>(Config.java:86)
at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:120)
at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:589)
... 11 more
Caused by: org.xml.sax.SAXParseException: The string "--" is not permitted within comments.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanComment(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanComment(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at org.apache.solr.core.Config.<init>(Config.java:134)
... 14 more
,code=500}
UPDATE
REplaced the solrconfig.xml with new file...then i go tthis error:
HTTP ERROR 500
Problem accessing /solr/. Reason:
{msg=SolrCore 'collection1' is not available due to init failure: Unknown fieldType 'text' specified on field firstname,trace=org.apache.solr.common.SolrException: SolrCore 'collection1' is not available due to init failure: Unknown fieldType 'text' specified on field firstname
at org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:860)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:251)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:158)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:368)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.solr.common.SolrException: Unknown fieldType 'text' specified on field firstname
at org.apache.solr.schema.IndexSchema.loadFields(IndexSchema.java:644)
at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:470)
at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:164)
at org.apache.solr.schema.IndexSchemaFactory.create(IndexSchemaFactory.java:55)
at org.apache.solr.schema.IndexSchemaFactory.buildIndexSchema(IndexSchemaFactory.java:69)
at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:619)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:657)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:364)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:356)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
... 1 more
,code=500}
You probably by mistake inserted ' ' before > and have something like that
-- >
Please download latest 4.4 from site, unzip and replace solrconfig.xml.
example/solr/collection1/conf/solrconfig.xml
I've done this yesterday and I haven't got any error.
Last stack contains an answer for you
Caused by: org.xml.sax.SAXParseException: The string "--" is not permitted within comments.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
If you don't see a mistake open solrconfig.xml in eclipse (or similar ide) this should help
That tutorial is ancient. It appears to be for Solr 1.3. Instead, use the official Solr tutorial: http://lucene.apache.org/solr/tutorial.html

Getting Exception while trying to execute axis2 service client

I am trying to create a sample axis2 ServiceClient. It is throwing below error
org.apache.axiom.om.OMException: No meta factory found for feature 'default'; this usually means that axiom-impl.jar is not in the classpath
at org.apache.axiom.om.OMAbstractFactory.getMetaFactory(OMAbstractFactory.java:170)
at org.apache.axiom.om.OMAbstractFactory.getMetaFactory(OMAbstractFactory.java:135)
at org.apache.axiom.om.OMAbstractFactory.getOMFactory(OMAbstractFactory.java:184)
at org.apache.axis2.description.AxisDescription.<init>(AxisDescription.java:68)
at org.apache.axis2.engine.AxisConfiguration.<init>(AxisConfiguration.java:148)
at org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(DeploymentEngine.java:639)
at org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:116)
at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:68)
at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:184)
at org.apache.axis2.client.ServiceClient.configureServiceClient(ServiceClient.java:150)
at org.apache.axis2.client.ServiceClient.<init>(ServiceClient.java:143)
at org.apache.axis2.client.ServiceClient.<init>(ServiceClient.java:244)
at org.apache.axis2.samples.tu.client.TUrlSOAPClient.addUrl(TUrlSOAPClient.java:46)
at org.apache.axis2.samples.tu.client.TUrlClient.actionPerformed(TUrlClient.java:69)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
The axiom-impl.jar is present in the classpath. Below is the code snippet. In the console I can see that sysout statement "Entered" is displayed, after that its throwing error at ServiceClient object creation. Have tried using different versions of the axiom-impl.jar (1.2.12, 1.2.13, 1.2.7, 1.2.5) but still getting the same error.
public static String testFunction(String testData) throws Exception {
System.out.println("Entered");
//Create a service client
ServiceClient client = new ServiceClient();
System.out.println("Before calling set end point");
//Set the endpoint address
client.getOptions().setTo(new EndpointReference(EPR));
System.out.println("After calling set end point");
System.out.println("getPayload(url)="+getPayload(testData));
//Make the reqest and get the response
OMElement resp = client.sendReceive(getPayload(testData));
//Extract the URL and return
return extractUrl(resp);
}
I had the same error but finally got solved by using axiom-api 1.2.12 and axiom-impl 1.2.12 after long struggle.
Solved this by replacing all the three individual axiom jars( axiom-impl-1.2.13.jar, axiom-dom-1.2.13.jar and axiom-api-1.2.13.jar) by just axiom.jar.
when I use above jar I got another error.
java.lang.ClassCastException: java.lang.ClassCastException: org.apache.axiom.om.impl.llom.factory.OMLinkedListImplFactory
I had to increase version to 1.2.14 of each jar
I had the same error. I did replace the individual axiom jars( axiom-impl-1.2.13.jar, axiom-dom-1.2.13.jar and axiom-api-1.2.13.jar) by just axiom.jar, but the error still happening.
The root cause of the error was the location of META-INF/axiom.xml file. In my case, the XMLParser of the J2EE server container can not open the axion.xml file when it be localized within a jar file.
I had to copy META-INF/axiom.xml into WEB-INF/classes/META-INF/axiom.xml .