spring-rabbit examples compatible with Java 1.6 - spring-rabbit

we have an requirement to write RABBIT MQ Listener code in one of our spring application which is running in JAVA 1.6 environment. I have tried the samples provided in spring.io site(https://spring.io/guides/gs/messaging-rabbitmq/). Seems that one is not supporting the java 1.6. Could some please help me to find the SPRING RABBIT JARs version compatible with JAVA 1.6.
Here is the exception with spring-rabbit-1.0.0.RELEASE.jar
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
java.lang.NoClassDefFoundError: com/rabbitmq/client/Channel
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getDeclaredMethods(Unknown Source)
at org.springframework.core.type.StandardAnnotationMetadata.hasAnnotatedMethods(StandardAnnotationMetadata.java:129)
at org.springframework.context.annotation.ConfigurationClassUtils.isLiteConfigurationCandidate(ConfigurationClassUtils.java:157)
at org.springframework.context.annotation.ConfigurationClassUtils.checkConfigurationClassCandidate(ConfigurationClassUtils.java:108)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:278)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:239)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:254)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:94)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:606)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:462)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
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)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.rabbitmq.client.Channel
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
... 25 more

1.0.0 is extremely old.
The current version for Java 6 is 1.7.7 see the project page for versions.
It is compatible with spring boot 1.5.x; the guides have been converted to boot 2, which requires java 8.

Related

Eclipse Neon (Java EE IDE) Javascript Editor Broken

Problem Description
Opening up a file (app.js) with the JavaScript Editor gives me the error: "Editor could not be initialized."
Details:
java.lang.NoSuchMethodError: jdk.nashorn.internal.runtime.ECMAException.getEcmaError()Ljava/lang/Object;
at org.eclipse.wst.jsdt.internal.esprima.EsprimaParser.parse(EsprimaParser.java:148)
at org.eclipse.wst.jsdt.core.dom.ASTParser.createAST(ASTParser.java:651)
at org.eclipse.wst.jsdt.internal.core.CompilationUnit.buildStructure(CompilationUnit.java:168)
at org.eclipse.wst.jsdt.internal.core.Openable.generateInfos(Openable.java:243)
at org.eclipse.wst.jsdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:538)
at org.eclipse.wst.jsdt.internal.core.BecomeWorkingCopyOperation.executeOperation(BecomeWorkingCopyOperation.java:39)
at org.eclipse.wst.jsdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:742)
at org.eclipse.wst.jsdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:802)
at org.eclipse.wst.jsdt.internal.core.CompilationUnit.becomeWorkingCopy(CompilationUnit.java:122)
at org.eclipse.wst.jsdt.internal.ui.javaeditor.CompilationUnitDocumentProvider.createFileInfo(CompilationUnitDocumentProvider.java:975)
at org.eclipse.ui.editors.text.TextFileDocumentProvider.connect(TextFileDocumentProvider.java:478)
at org.eclipse.wst.jsdt.internal.ui.javaeditor.CompilationUnitDocumentProvider.connect(CompilationUnitDocumentProvider.java:1190)
at org.eclipse.ui.texteditor.AbstractTextEditor.doSetInput(AbstractTextEditor.java:4178)
at org.eclipse.ui.texteditor.StatusTextEditor.doSetInput(StatusTextEditor.java:229)
at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.doSetInput(AbstractDecoratedTextEditor.java:1466)
at org.eclipse.wst.jsdt.internal.ui.javaeditor.JavaEditor.internalDoSetInput(JavaEditor.java:2173)
at org.eclipse.wst.jsdt.internal.ui.javaeditor.JavaEditor.doSetInput(JavaEditor.java:2146)
at org.eclipse.wst.jsdt.internal.ui.javaeditor.CompilationUnitEditor.doSetInput(CompilationUnitEditor.java:1306)
at org.eclipse.ui.texteditor.AbstractTextEditor$5.run(AbstractTextEditor.java:3154)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:437)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:353)
at org.eclipse.ui.internal.WorkbenchWindow$14.run(WorkbenchWindow.java:2184)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2180)
at org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(AbstractTextEditor.java:3172)
at org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTextEditor.java:3197)
at org.eclipse.ui.internal.EditorReference.initialize(EditorReference.java:362)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:319)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:54)
at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:966)
at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:931)
at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:151)
at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:375)
at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:294)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:162)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:105)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:74)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:56)
at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:129)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:975)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:651)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:757)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$0(PartRenderingEngine.java:728)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:722)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:706)
at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.showTab(StackRenderer.java:1317)
at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer$1.handleEvent(LazyStackRenderer.java:72)
at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40)
at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233)
at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:4813)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211)
at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36)
at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201)
at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78)
at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39)
at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:94)
at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60)
at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:173)
at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelServiceImpl.java:617)
at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:581)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(PartServiceImpl.java:770)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.bringToTop(PartServiceImpl.java:401)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1214)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3261)
at org.eclipse.ui.internal.WorkbenchPage.access$25(WorkbenchPage.java:3176)
at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:3158)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3153)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3117)
at org.eclipse.ui.actions.OpenWithMenu.openEditor(OpenWithMenu.java:324)
at org.eclipse.ui.actions.OpenWithMenu.lambda$0(OpenWithMenu.java:180)
at org.eclipse.ui.actions.OpenWithMenu$$Lambda$65/49673515.handleEvent(Unknown Source)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4410)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4228)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3816)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:687)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:604)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
at org.eclipse.equinox.launcher.Main.main(Main.java:1492)
Closing and attempting to reopen the file generates a blank tab.
Attempting to open other files also generates a blank tab.
Opening more than one tab generates a NullPointerException.
Restarting Eclipse restores Eclipse to a functional state.
Using the JS Editor (Chrome icon) in place of the JavaScript editor seems to circumvent the problem (only works if the above error has not already been triggered).
I'm afraid using the JS Editor will prevent me from using other plugins which rely on the JavaScript editor to work.
What I tried
Uninstalling unsigned plugins (AngularJS Eclipse)
Reinstalling Eclipse Neon
Reinstalling unsigned plugins (AngularJS Eclipse - same as above)
Notes
In order to launch Eclipse Neon in the first place, the following line was removed from the eclipse.ini:
-vmargs
Temporary Solution
As seen in howlger's answer, this is an issue caused by the JavaScript Editor not properly handling a parsing exception.
This is a trimmed down version of the original file, demonstrating the problem:
(function() {
var app = angular.module('TestModule', []);
app.controller("TestController", [ '$http', function($http){
]});
})();
The online Esprima parser helped me find that I had misplaced a square bracket on line 6.
Here is the code after the fix:
(function() {
var app = angular.module('TestModule', []);
app.controller("Test Controller", [ '$http', function($http) {
} ]);
})();
Eclipse Neon contains the JavaScript Development Tools (JSDT) 2.0 which use Esprima as parser. (Esprima is written in JavaScript and executed by JSDT via Nashorn.) In your case, Esprima fails to parse your JavaScript file and JSDT 2.0 are not very robust (have no fallback strategy) to handle this kind of problem. Try to parse your file with Esprima online. JSDT are aware of these Esprima problems and plan to replace it in an upcoming version (Eclipse bug 497249), maybe in Neon.1 in September. Unfortunately, as long as JSDT fails to parse your file, you can not use the JSDT JavaScript editor.
This issue was completely resolved by installing the latest JDK. Even the part where I had to remove -vmargs from the eclipse.ini to launch Eclipse Neon in the first place.
java -version before:
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)
java -version after:
java version "1.8.0_92"
Java(TM) SE Runtime Environment (build 1.8.0_92-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode)
I have the same issue, i resolved my issue by changing the version of java from 1.6 to 1.8 in eclipse.actually i have java verison 1.8 but my eclipse is poiting to 1.6 version , so i changed that veriosn from 1.6 to 1.8 resolved my issue.
I am facing same error just now. After one hour I found out it was because of a json format mistake. I did not put "," after each element of an array.
$scope.finalResultList = [
{page:1, coors:'1,2,3,4', name:'aaa'}
{page:2, coors:'1,2,3,4', name:'bbb'}
{page:3, coors:'1,2,3,4', name:'ccc'}
];
Eclipse was sooooo smart to find that out and gave me a very very very easy to understand error message. Thank you Eclipse!
So, you might have some mistake in your code. Fix it with some other editor then come back to Eclipse.

Eclipse EASE Javascript - HelloWorld

Hi I'm planning to create a scripting program to scan my Eclipse Java Elements - Class/Interfaces and need to generate some report before compiling. While searching in web, I found this new Eclipse EASE concepts. However, I've downloaded required plugins in Eclipse.
Still I'm not able to run a sample Hello World Application program.
I created new file - "hello.js" which simply has only one statement
print("Hello World")
When i tried to Run As - EASE scripts , i'm getting the below error:
java.lang.NoSuchMethodError: org.eclipse.ease.lang.javascript.JavaScriptCodeFactory.getPreExecutionCode(Lorg/eclipse/ease/modules/IEnvironment;Ljava/lang/reflect/Method;)Ljava/lang/String;
at org.eclipse.ease.lang.javascript.JavaScriptCodeFactory.buildMethodBody(JavaScriptCodeFactory.java:268)
at org.eclipse.ease.lang.javascript.JavaScriptCodeFactory.createFunctionWrapper(JavaScriptCodeFactory.java:243)
at org.eclipse.ease.AbstractCodeFactory.createWrapper(AbstractCodeFactory.java:289)
at org.eclipse.ease.lang.javascript.JavaScriptCodeFactory.createWrapper(JavaScriptCodeFactory.java:174)
at org.eclipse.ease.modules.EnvironmentModule.createWrappers(EnvironmentModule.java:332)
at org.eclipse.ease.modules.EnvironmentModule.wrap(EnvironmentModule.java:286)
at org.eclipse.ease.modules.EnvironmentModule.bootstrap(EnvironmentModule.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225)
at org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85)
at org.mozilla.javascript.gen.c_17._c_script_0(Unknown Source)
at org.mozilla.javascript.gen.c_17.call(Unknown Source)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
at org.mozilla.javascript.gen.c_17.call(Unknown Source)
at org.mozilla.javascript.gen.c_17.exec(Unknown Source)
at org.mozilla.javascript.Context.evaluateReader(Context.java:1110)
at org.eclipse.ease.lang.javascript.rhino.RhinoScriptEngine.internalExecute(RhinoScriptEngine.java:201)
at org.eclipse.ease.lang.javascript.rhino.RhinoScriptEngine.execute(RhinoScriptEngine.java:180)
at org.eclipse.ease.AbstractScriptEngine.inject(AbstractScriptEngine.java:227)
at org.eclipse.ease.AbstractScriptEngine.run(AbstractScriptEngine.java:289)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
org.eclipse.ease.ScriptExecutionException: ReferenceError: "print" is not defined.
at hello.js
Make sure you have EASE Core and EASE Javascript Support (Incubation) installed from the update site http://download.eclipse.org/ease/update/release.
Then make sure you have the Environment module loaded, which provides the print() method.
Usually this module should be loaded automatically but you can also do it manually:
new Packages.org.eclipse.ease.modules.EnvironmentModule().loadModule("/System/Environment", false);
print("hello, world")

connect to alfresco 2017 using alfresco-web-service-client

I am using alfresco-web-service-client 5.0.a, I am trying to login into alfresco-community 2017 which is deployed at : localhost:8081/alfresco.
This is what I've done so far :
import org.alfresco.webservice.authentication.AuthenticationFault;
import org.alfresco.webservice.util.AuthenticationUtils;
import org.alfresco.webservice.util.WebServiceFactory;
public class Main {
public static void main(String[] args) throws AuthenticationFault {
WebServiceFactory.setEndpointAddress("http://localhost:8081/alfresco/api");
AuthenticationUtils.startSession("admin", "admin");
}
}
This is what I get when I run the class :
Exception in thread "main" org.alfresco.webservice.util.WebServiceException: Error starting session.
at org.alfresco.webservice.util.AuthenticationUtils.startSession(AuthenticationUtils.java:99)
at com.lydec.Main.Main.main(Main.java:12)
Caused by: java.net.ConnectException: Connection refused: connect
at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:154)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at org.alfresco.webservice.authentication.AuthenticationServiceSoapBindingStub.startSession(AuthenticationServiceSoapBindingStub.java:187)
at org.alfresco.webservice.util.AuthenticationUtils.startSession(AuthenticationUtils.java:84)
... 1 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:153)
at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:120)
at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
... 12 more
pom.xml
You cannot use the old (and unstable) 5.0.a web service client to talk to a modern version of Alfresco on the server.
This link provides information on the changes related to SOAP-based web services.
If you must use SOAP-based web services, use CMIS (sample code).
I would strongly recommend that you instead use REST instead of SOAP-based web services for just about anything. For Alfresco, you can use the new public REST API or you can use CMIS (either the Atom Pub binding or the Browser binding).

app crashes after hacking cordova-plugin-crosswalk-webview to include crosswalk-lite

I am trying to add crosswalk-lite to my cordova project using cordova-plugin-crosswalk-webview. I created a maven repos of https://download.01.org/crosswalk/releases/crosswalk-lite/android/canary/10.39.237.1/arm/crosswalk-webview-10.39.237.1-arm.zip on my github page, and modified xwalk.gradle pointing my maven. Building is OK, apk file size also looks as expected.
cordova plugin add https://github.com/Poordeveloper/cordova-plugin-crosswalk-webview
But app crashes with.
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2396)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2448)
at android.app.ActivityThread.access$600(ActivityThread.java:173)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1392)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5469)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:857)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:624)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.RuntimeException: Failed to create webview.
at org.apache.cordova.CordovaWebViewImpl.createEngine(CordovaWebViewImpl.java:82)
at org.apache.cordova.CordovaActivity.makeWebViewEngine(CordovaActivity.java:191)
at org.apache.cordova.CordovaActivity.makeWebView(CordovaActivity.java:187)
at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:135)
at org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.java:209)
at com.carriez.carbroker.MainActivity.onCreate(MainActivity.java:32)
at android.app.Activity.performCreate(Activity.java:5226)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1151)
at com.lbe.security.service.core.client.b.x.callActivityOnCreate(Unknown Source)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2360)
... 11 more
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
at org.apache.cordova.CordovaWebViewImpl.createEngine(CordovaWebViewImpl.java:80)
... 20 more
Caused by: junit.framework.AssertionFailedError: Please extend XWalkActivity for shared mode
at junit.framework.Assert.fail(Assert.java:50)
at org.xwalk.core.XWalkCoreWrapper.initEmbeddedMode(XWalkCoreWrapper.java:112)
at org.xwalk.core.XWalkPreferences.setValue(XWalkPreferences.java:105)
at org.crosswalk.engine.XWalkCordovaView.setGlobalPrefs(XWalkCordovaView.java:41)
at org.crosswalk.engine.XWalkCordovaView.<init>(XWalkCordovaView.java:50)
at org.crosswalk.engine.XWalkWebViewEngine.<init>(XWalkWebViewEngine.java:56)
... 23 more
Wondering if anyone can help on this.

JavaScript unit testing with Jasmine and Maven 2.x

I am using Jasmine to test my javascript. I run the jasmine scripts with the maven build. I am using maven 2.0.11. When i run the maven build the jasmine throws below error,
[FATAL ERROR] com.github.searls.jasmine.TestMojo#execute() caused a linkage error (java.lang.NoClassDefFoundError) and may be out-of-date. Check the realms
[FATAL ERROR] Plugin realm = app0.child-container[com.github.searls:jasmine-maven-plugin]
java.lang.NoClassDefFoundError: org/apache/http/client/CredentialsProvider
at com.github.searls.jasmine.runner.SpecRunnerExecutor.execute(SpecRunnerExecutor.java:31)
at com.github.searls.jasmine.TestMojo.executeSpecs(TestMojo.java:56)
at com.github.searls.jasmine.TestMojo.run(TestMojo.java:33)
at com.github.searls.jasmine.AbstractJasmineMojo.execute(AbstractJasmineMojo.java:193)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:454)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:500)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:479)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:331)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:292)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:345)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:132)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:290)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: java.lang.ClassNotFoundException: org.apache.http.client.CredentialsProvider
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195)
at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:255)
at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:274)
at org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:214)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Any ideas on why this error occur?
This has been clarified recently in the plugin documentation:
System requirements:
Maven 3.0.0
Maven upgrade seems to be the only way.

Resources