(INFO) For those that want to use Cling 2 Alpha 1 without Maven in Android

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

(INFO) For those that want to use Cling 2 Alpha 1 without Maven in Android

Jose Luis Larraz
You will need the next jars:

cling-core-2.0-alpha1.jar
cling-support-2.0-alpha1.jar
javax.servlet-3.0.jar
seamless-http-1.0-alpha1.jar
seamless-util-1.0-alpha1.jar
seamless-xml-1.0-alpha1.jar
slf4j-api-1.6.1.jar
slf4j-jdk14-1.6.1.jar
jetty-client-8.1.8.v20121106.jar
jetty-continuation-8.1.8.v20121106.jar
jetty-http-8.1.8.v20121106.jar
jetty-io-8.1.8.v20121106.jar
jetty-security-8.1.8.v20121106.jar
jetty-server-8.1.8.v20121106.jar
jetty-servlet-8.1.8.v20121106.jar
jetty-util-8.1.8.v20121106.jar

Just one thing more, the jetty jars contains one file called "about.html", you must unzip all the jetty jars delete it and again zip the content unzipped previously with the same name.
Reply | Threaded
Open this post in threaded view
|

Re: (INFO) For those that want to use Cling 2 Alpha 1 without Maven in Android

Christian Bauer
Administrator
Or finally switch to Maven… and enable extractDuplicates in the Android plugin, as in the Cling pom.xml files. It's really not that difficult to build Android apps with Maven anymore.

Reply | Threaded
Open this post in threaded view
|

Re: (INFO) For those that want to use Cling 2 Alpha 1 without Maven in Android

personne3000
In reply to this post by Jose Luis Larraz
Thank you so much ! I spent half a day struggling on this problem.

If knowing and using Maven is required for this library, this should be made clear in the documentation. Instead, it just says "for those using maven...", as if this was an option. It should be either said that using Maven is necessary, or the exact list of dependencies should be given.
Reply | Threaded
Open this post in threaded view
|

Re: (INFO) For those that want to use Cling 2 Alpha 1 without Maven in Android

zreptil
In reply to this post by Jose Luis Larraz
Thank you very much for this list. I spent one complete day looking around for a possibility to make my app work with cling 2.0. Without this list i would have spent much more time searching for the needed jars. i could not find it in the documentation or in samples, i downloaded.

it would be great, if the needed jars are included in the cling 2 distribution when it will reach the final state. or if at least they are listed in the documentation. i don't know Maven and i think i am not the only one. if a library depends on other libraries it should be pointed out somewhere, what libraries are needed to make it work.

Reply | Threaded
Open this post in threaded view
|

Re: (INFO) For those that want to use Cling 2 Alpha 1 without Maven in Android

Jose Luis Larraz
If you need to activate the log as it comes in the manual you will need this jar
seamless-android-1.0-alpha2.jar
that is in this link
http://4thline.org/m2/org/seamless/seamless-android/1.0-alpha2/
and thats the repository
http://4thline.org/m2/org/seamless/

As i take me a time to find it, i put it here to avoid people waste time if they dont want to use maven (Far any reason)
Reply | Threaded
Open this post in threaded view
|

Re: (INFO) For those that want to use Cling 2 Alpha 1 without Maven in Android

Christian Bauer
Administrator
Reply | Threaded
Open this post in threaded view
|

Re: (INFO) For those that want to use Cling 2 Alpha 1 without Maven in Android

hoangth
In reply to this post by Jose Luis Larraz
I've downloaded jetty library, unzip each file, delete about.html and zip again with the same name in jar extension (I've also tried rename theme exactly like you suggest) but it still not work. Also, other .jar files are included in the project too. Here the error log, could you please take a look and tell me why

[2014-12-07 16:01:58 - GR2] Dx
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dx.cf.iface.ParseException: class name (org/eclipse/jetty/servlet/DefaultServlet) does not match path (jetty-servlet-8.1.8.v20121106/org/eclipse/jetty/servlet/DefaultServlet.class)
        at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:520)
        at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406)
        at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388)
        at com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251)
        at com.android.dx.command.dexer.Main.processClass(Main.java:665)
        at com.android.dx.command.dexer.Main.processFileBytes(Main.java:634)
        at com.android.dx.command.dexer.Main.access$600(Main.java:78)
        at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:572)
        at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
        at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
        at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
        at com.android.dx.command.dexer.Main.processOne(Main.java:596)
        at com.android.dx.command.dexer.Main.processAllFiles(Main.java:498)
        at com.android.dx.command.dexer.Main.runMonoDex(Main.java:264)
        at com.android.dx.command.dexer.Main.run(Main.java:230)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:483)
        at com.android.ide.eclipse.adt.internal.build.DexWrapper.run(DexWrapper.java:188)
        at com.android.ide.eclipse.adt.internal.build.BuildHelper.executeDx(BuildHelper.java:786)
        at com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder.build(PostCompilerBuilder.java:597)
        at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
        at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
        at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:328)
        at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:403)
        at org.eclipse.core.internal.resources.Project$1.run(Project.java:618)
        at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
        at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:597)
        at org.eclipse.core.internal.resources.Project.build(Project.java:124)
        at com.android.ide.eclipse.adt.internal.project.ProjectHelper.doFullIncrementalDebugBuild(ProjectHelper.java:1143)
        at com.android.ide.eclipse.adt.internal.launch.LaunchConfigDelegate.launch(LaunchConfigDelegate.java:155)
        at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885)
        at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
        at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039)
        at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
...while parsing jetty-servlet-8.1.8.v20121106/org/eclipse/jetty/servlet/DefaultServlet.class

[2014-12-07 16:01:58 - GR2] Dx 1 error; aborting
[2014-12-07 16:01:58 - GR2] Conversion to Dalvik format failed with error 1

Thank you very much
Reply | Threaded
Open this post in threaded view
|

Re: (INFO) For those that want to use Cling 2 Alpha 1 without Maven in Android

Christian Bauer
Administrator
You zipped it wrong. Make 'org' directory the root...

On December 7, 2014 10:02:49 AM GMT+01:00, "hoangth [via Mailinglists]" <[hidden email]> wrote:
I've downloaded jetty library, unzip each file, delete about.html and zip again with the same name in jar extension (I've also tried rename theme exactly like you suggest) but it still not work. Also, other .jar files are included in the project too. Here the error log, could you please take a look and tell me why

[2014-12-07 16:01:58 - GR2] Dx
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dx.cf.iface.ParseException: class name (org/eclipse/jetty/servlet/DefaultServlet) does not match path (jetty-servlet-8.1.8.v20121106/org/eclipse/jetty/servlet/DefaultServlet.class)
        at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:520)
        at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406)
        at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388)
        at com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251)
        at com.android.dx.command.dexer.Main.processClass(Main.java:665)
        at com.android.dx.command.dexer.Main.processFileBytes(Main.java:634)
        at com.android.dx.command.dexer.Main.access$600(Main.java:78)
        at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:572)
        at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
        at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
        at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
        at com.android.dx.command.dexer.Main.processOne(Main.java:596)
        at com.android.dx.command.dexer.Main.processAllFiles(Main.java:498)
        at com.android.dx.command.dexer.Main.runMonoDex(Main.java:264)
        at com.android.dx.command.dexer.Main.run(Main.java:230)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:483)
        at com.android.ide.eclipse.adt.internal.build.DexWrapper.run(DexWrapper.java:188)
        at com.android.ide.eclipse.adt.internal.build.BuildHelper.executeDx(BuildHelper.java:786)
        at com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder.build(PostCompilerBuilder.java:597)
        at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
        at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
        at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:328)
        at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:403)
        at org.eclipse.core.internal.resources.Project$1.run(Project.java:618)
        at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
        at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:597)
        at org.eclipse.core.internal.resources.Project.build(Project.java:124)
        at com.android.ide.eclipse.adt.internal.project.ProjectHelper.doFullIncrementalDebugBuild(ProjectHelper.java:1143)
        at com.android.ide.eclipse.adt.internal.launch.LaunchConfigDelegate.launch(LaunchConfigDelegate.java:155)
        at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885)
        at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
        at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039)
        at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
...while parsing jetty-servlet-8.1.8.v20121106/org/eclipse/jetty/servlet/DefaultServlet.class

[2014-12-07 16:01:58 - GR2] Dx 1 error; aborting
[2014-12-07 16:01:58 - GR2] Conversion to Dalvik format failed with error 1

Thank you very much


To start a new topic under Cling users and developers, email [hidden email]
To unsubscribe from Cling users and developers, click here.
NAML
Reply | Threaded
Open this post in threaded view
|

Re: (INFO) For those that want to use Cling 2 Alpha 1 without Maven in Android

hoangth
Thank you Christian. I've zipped again, and now new error log. After sometime searching google, I've tried delete jdk 1.8, install jdk 1.7 but the problem still happen. Can you take a look?

[2014-12-07 17:20:43 - GR2] Dx
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dx.cf.iface.ParseException: bad class file magic (00051607) or version (0000.0002)
        at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:472)
        at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406)
        at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388)
        at com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251)
        at com.android.dx.command.dexer.Main.processClass(Main.java:665)
        at com.android.dx.command.dexer.Main.processFileBytes(Main.java:634)
        at com.android.dx.command.dexer.Main.access$600(Main.java:78)
        at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:572)
        at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
        at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
        at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
        at com.android.dx.command.dexer.Main.processOne(Main.java:596)
        at com.android.dx.command.dexer.Main.processAllFiles(Main.java:498)
        at com.android.dx.command.dexer.Main.runMonoDex(Main.java:264)
        at com.android.dx.command.dexer.Main.run(Main.java:230)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at com.android.ide.eclipse.adt.internal.build.DexWrapper.run(DexWrapper.java:188)
        at com.android.ide.eclipse.adt.internal.build.BuildHelper.executeDx(BuildHelper.java:786)
        at com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder.build(PostCompilerBuilder.java:597)
        at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
        at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
        at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:328)
        at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:403)
        at org.eclipse.core.internal.resources.Project$1.run(Project.java:618)
        at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
        at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:597)
        at org.eclipse.core.internal.resources.Project.build(Project.java:124)
        at com.android.ide.eclipse.adt.internal.project.ProjectHelper.doFullIncrementalDebugBuild(ProjectHelper.java:1143)
        at com.android.ide.eclipse.adt.internal.launch.LaunchConfigDelegate.launch(LaunchConfigDelegate.java:155)
        at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885)
        at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
        at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039)
        at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
...while parsing __MACOSX/org/eclipse/jetty/util/ajax/._JSON$1.class

[2014-12-07 17:20:43 - GR2] Dx 1 error; aborting
[2014-12-07 17:20:43 - GR2] Conversion to Dalvik format failed with error 1
Reply | Threaded
Open this post in threaded view
|

Re: (INFO) For those that want to use Cling 2 Alpha 1 without Maven in Android

hoangth
In reply to this post by Christian Bauer
And btw, I go to here https://github.com/4thline/cling/tree/master/demo/android. Go to the pom.xml location and run "mvn compile" on it. A lot of errors generated
Can you please create a tutorial somewhere on your website, how to build your demo source code? Anything I've tried is failed. I don't know what to do to use this project library anymore
Reply | Threaded
Open this post in threaded view
|

Re: (INFO) For those that want to use Cling 2 Alpha 1 without Maven in Android

Christian Bauer
Administrator
This is not how Maven works, individual module compile requires an install first of dependencies. The steps to build deployable APK from the Cling source are in the README. Learn Android development and Maven/Gradle without Cling first.
Reply | Threaded
Open this post in threaded view
|

Re: (INFO) For those that want to use Cling 2 Alpha 1 without Maven in Android

hoangth
Thank you very much, but one more question: Is there any problem with java on Mac OS when using with Cling?
Reply | Threaded
Open this post in threaded view
|

Re: (INFO) For those that want to use Cling 2 Alpha 1 without Maven in Android

sebroth
No problems here. Cling2, OSX.