Re: IgniteException on starting node from Jar
chevy wrote > So, when I run it from eclipse it picks this config path but from jar it > refers to IGNITE_HOME which I want to avoid. You can put the config file into the JAR under META-INF folder (instead of IGNITE_HOME). Will this work for you? -Val -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/IgniteException-on-starting-node-from-Jar-tp6881p6936.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: IgniteException on starting node from Jar
I am not using complete path to my config. The example you have provided is to start node externally. I am starting node by using -> Ignition.start("config/mpm-ignite.xml”); where config folder (which is also a source folder holds xml files) is directly under my project folder. So, when I run it from eclipse it picks this config path but from jar it refers to IGNITE_HOME which I want to avoid. -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/IgniteException-on-starting-node-from-Jar-tp6881p6921.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: IgniteException on starting node from Jar
Ok, I understand. Seems that when you are running application you specify full path to mpm-ignite.xml, in mpm-ignite.xml defined not absolute path to mpm-default.xml and thats why Spring can’t locate resource, you must specify full path to mpm-default.xml or place configuration files in resources directory and use relative path Please read more about passing configuration file to Ignite here: https://apacheignite.readme.io/docs/getting-started#section-passing-configuration-file With best regards Alisher Alimov alimovalis...@gmail.com > On 10 авг. 2016 г., at 13:30, chevywrote: > > I am using just the config and I think the details provided by ignite.sh are > provided by ignite maven dependences. When I run through my ide it just > refers to config and performs node startup. Can I replicate similar behavior > through my jar itself? Otherwise it points to xml which is available under > IGNITE_HOME and not inside the jar. > > > > -- > View this message in context: > http://apache-ignite-users.70518.x6.nabble.com/IgniteException-on-starting-node-from-Jar-tp6881p6916.html > Sent from the Apache Ignite Users mailing list archive at Nabble.com. signature.asc Description: Message signed with OpenPGP using GPGMail
Re: IgniteException on starting node from Jar
I am using just the config and I think the details provided by ignite.sh are provided by ignite maven dependences. When I run through my ide it just refers to config and performs node startup. Can I replicate similar behavior through my jar itself? Otherwise it points to xml which is available under IGNITE_HOME and not inside the jar. -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/IgniteException-on-starting-node-from-Jar-tp6881p6916.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: IgniteException on starting node from Jar
Hi! I tried to reproduce your problem, but can't whether I try to run it from IDE or jar file. But at first time I didn’t pay attention that you are using apache-fabric, then I tried to change mpm-ignite.xm and provide not existing file name () and catch exception as you. Seems that XmlBeanDefinitionReader can’t locate ignite.cfg file Can you provide more details about how your try to startup application from JAR? With best regards Alisher Alimov alimovalis...@gmail.com > On 10 авг. 2016 г., at 8:20, chevy <chetan.v.ya...@target.com> wrote: > > Please find the attached config files. It is working when I run my code from > eclipse and not through jar. > -- > Regards, > Chetan. > > From: "vkulichenko [via Apache Ignite Users]" <[hidden email] > > > Date: Wednesday, August 10, 2016 at 4:53 AM > To: "Chetan.V.Yadav" <[hidden email] > > > Subject: Re: IgniteException on starting node from Jar > > Hi, > > Spring is used under the hood when you use Spring XML to configure Ignite. > Please attach (not copy-paste to avoid mistakes) both mpm-default.xml and > mpm-ignite.xml files and I will try to run with them. > > -Val > > If you reply to this email, your message will be added to the discussion > below: > http://apache-ignite-users.70518.x6.nabble.com/IgniteException-on-starting-node-from-Jar-tp6881p6887.html > > <http://apache-ignite-users.70518.x6.nabble.com/IgniteException-on-starting-node-from-Jar-tp6881p6887.html> > To unsubscribe from IgniteException on starting node from Jar, click here > . > NAML > <http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer=instant_html%21nabble%3Aemail.naml=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > > mpm-ignite.xml (732 bytes) Download Attachment > <http://apache-ignite-users.70518.x6.nabble.com/attachment/6908/0/mpm-ignite.xml> > mpm-default.xml (4K) Download Attachment > <http://apache-ignite-users.70518.x6.nabble.com/attachment/6908/1/mpm-default.xml> > View this message in context: Re: IgniteException on starting node from Jar > <http://apache-ignite-users.70518.x6.nabble.com/IgniteException-on-starting-node-from-Jar-tp6881p6908.html> > Sent from the Apache Ignite Users mailing list archive > <http://apache-ignite-users.70518.x6.nabble.com/> at Nabble.com. signature.asc Description: Message signed with OpenPGP using GPGMail
Re: IgniteException on starting node from Jar
Please find the attached config files. It is working when I run my code from eclipse and not through jar. -- Regards, Chetan. From: "vkulichenko [via Apache Ignite Users]" <ml-node+s70518n6887...@n6.nabble.com<mailto:ml-node+s70518n6887...@n6.nabble.com>> Date: Wednesday, August 10, 2016 at 4:53 AM To: "Chetan.V.Yadav" <chetan.v.ya...@target.com<mailto:chetan.v.ya...@target.com>> Subject: Re: IgniteException on starting node from Jar Hi, Spring is used under the hood when you use Spring XML to configure Ignite. Please attach (not copy-paste to avoid mistakes) both mpm-default.xml and mpm-ignite.xml files and I will try to run with them. -Val If you reply to this email, your message will be added to the discussion below: http://apache-ignite-users.70518.x6.nabble.com/IgniteException-on-starting-node-from-Jar-tp6881p6887.html To unsubscribe from IgniteException on starting node from Jar, click here<http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code=6881=Y2hldGFuLnYueWFkYXZAdGFyZ2V0LmNvbXw2ODgxfC02OTIwMTYzODA=>. NAML<http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer=instant_html%21nabble%3Aemail.naml=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/IgniteException-on-starting-node-from-Jar-tp6881p6906.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: IgniteException on starting node from Jar
Hi, Spring is used under the hood when you use Spring XML to configure Ignite. Please attach (not copy-paste to avoid mistakes) both mpm-default.xml and mpm-ignite.xml files and I will try to run with them. -Val -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/IgniteException-on-starting-node-from-Jar-tp6881p6887.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: IgniteException on starting node from Jar
Hello, If you do not use Spring, you can not use xml configuration. Configure Ignite programmatically (through java code). See here [1] on Java tab. Also, look at the method Ignition#start(org.apache.ignite.configuration.IgniteConfiguration) [1] https://apacheignite.readme.io/docs/clients-vs-servers#configuring-clients-and-servers On Tue, Aug 9, 2016 at 6:15 PM, chevywrote: > I am not using spring framework for my code and it is in plain Java. So, I > do > not have any spring version to specify explicitly. Also, how can i make my > code use config inside jar rather than pick it from $IGNITE_HOME? > > > > -- > View this message in context: http://apache-ignite-users. > 70518.x6.nabble.com/IgniteException-on-starting- > node-from-Jar-tp6881p6883.html > Sent from the Apache Ignite Users mailing list archive at Nabble.com. > -- Vladislav Pyatkov
Re: IgniteException on starting node from Jar
I am not using spring framework for my code and it is in plain Java. So, I do not have any spring version to specify explicitly. Also, how can i make my code use config inside jar rather than pick it from $IGNITE_HOME? -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/IgniteException-on-starting-node-from-Jar-tp6881p6883.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: IgniteException on starting node from Jar
Hi! Current problem doesn’t related to Ignite, I think that problem in spring, check your spring version and try to specify version of spring-beans schema directly (ex. spring-beans-3.1.xsd ) With best regards Alisher Alimov alimovalis...@gmail.com > On 9 авг. 2016 г., at 17:39, chevywrote: > > Hi, > > When I start ignite node from my eclipse IDE it starts without any issues > but when I export my code to jar and execute the code, I get below mentioned > error. I am using same config even when I am running directly from IDE. > > Error: > > Exception in thread "main" class org.apache.ignite.IgniteException: Failed > to instantiate Spring XML application context > [springUrl=file:/opt/ignite/apache-ignite-fabric-1.6.0-bin/config/mpm-ignite.xml, > err=Line 9 in XML document from URL > [file:/opt/ignite/apache-ignite-fabric-1.6.0-bin/config/mpm-ignite.xml] is > invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 9; > columnNumber: 72; cvc-elt.1: Cannot find the declaration of element > 'beans'.] > > > Config: > > > > > http://www.springframework.org/schema/beans; > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; > xsi:schemaLocation="http://www.springframework.org/schema/beans >http://www.springframework.org/schema/beans/spring-beans.xsd;> > > > > > > > > > > -- > View this message in context: > http://apache-ignite-users.70518.x6.nabble.com/IgniteException-on-starting-node-from-Jar-tp6881.html > Sent from the Apache Ignite Users mailing list archive at Nabble.com. signature.asc Description: Message signed with OpenPGP using GPGMail