I have a problem trying to deploy my project:
«Found a jar file too large to upload». The problem occurs when the script tries to upload
appengine-api-1.0-sdk-1.5.3.jar (15.8 MB although only 10MB files are allowed).
The problem is well-known since 2009. There are a lot of tickets in google issue tracker and here as well. There are a lot of messages of this kind all over the web. But all of them are referring to the two solutions:
1) Using the --enable_jar_splitting. Surely I've tried to use it. No success:
# appengine-java-sdk-1.5.3/bin/appcfg.sh -e some_mail#gmail.com --enable_jar_splitting update project/war
Reading application configuration data...
......
java.lang.IllegalStateException: Found a jar file too large to upload: "/tmp/appcfg4869648953084473935.tmp/WEB-INF/classes/war/WEB-INF/lib/appengine-api-1.0-sdk- 1.5.3.jar". Consider using --enable_jar_splitting.
Unable to update app: Found a jar file too large to upload: "/tmp/appcfg4869648953084473935.tmp/WEB-INF/classes/war/WEB-INF/lib/appengine-api-1.0-sdk- 1.5.3.jar". Consider using --enable_jar_splitting.
Please see the logs [/tmp/appcfg5857347513630341491.log] for further information.
I tried to use different versions of SDK (1.4.3, 1.5.2 and the latest 1.5.3). But the script ignores the --enable_jar_splitting option.
2) Unpack appengine-api-1.0-sdk-1.5.3.jar to WEB-INF/lib. Another error arises in this case. Projects are limited by 3000 files. There are 3500 files approx. in appengine-api-1.0-sdk-1.5.3.jar archive and 100 files in my project. So, this solution does not work as well.
3) I have found the 3d solution myself. You can delete the appengine-api-1.0-sdk-1.5.3.jar from WEB-INF/lib directory. It works but only in cases you're having simple projects. But it does not work in case of projects using all the power of google appengine. I need to use datastore and some other functions. Without the appengine-api-1.0-sdk-1.5.3.jar the project could be deployed, but it does not work and produces errors in google error console (classes are missing).
I have sent a message to google. They're keeping silence, unfortunately.
Please help me, you clever guys. I will be awfully grateful. Hope, there is a little trick to get it work.
You don't need to upload the API jar - it's part of the App Engine platform. Whatever configuration you've changed that is causing the SDK to try and upload it, you should change back.
You can try to split appengine-api-1.0-sdk-1.5.3.jar manually.
Unzip the jar file.
Zip half the files to one jar file
Zip the other half to one jar file.
Update your class path and build tools.
Related
I`m trying to achieve this: http://docs.aws.amazon.com/devicefarm/latest/developerguide/test-types-android-appium-java-junit.html
using gradle...not maven. Any help?
I work for the device farm team.
We provide the packaging instructions using maven to provide a consistent experience across all test frameworks.
What we eventually are looking for are 2 jar files (containing code under src/main and src/tests) and a dependency jar folder containing all the jar files used by your test.
We currently do not have a out of the box way of packaging your tests using gradle.
However, setting up maven should not be hard as most of the customers follow the instructions to the dot and are able to get through it.
If you aren't able to proceed I would suggest opening a thread on AWS forums and we can follow up on that to help you get there.
I am for the first time trying java in Spring Tool Suite and using an example project imported, now running into endless issues. I tried building the project and go the following error:
Archive for required library: 'C:/Users/cccc/.m2/repository/com/vaadin/vaadin-client/7.1.0/
vaadin-client-7.1.0.jar' in project 'quicktickets-dashboard' cannot be read or is not a
valid ZIP file quicktickets-dashboard Build path Build Path Problem
This is probably a spring issue and not related to the project itself. Please does anyone have a working solution to this. Tried a few, building, closing, rebuilding, deleting local repository etc. but still the same issue. Any ideas appreciated.
The most likely explanation is that your maven cache is corrupted. First, check if the C:/Users/cccc/.m2/repository/com/vaadin/vaadin-client/7.1.0/vaadin-client-7.1.0.jar jar is complete. Run jar tvf on the file to make sure you can use it.
If you're lucky, things will work if you delete the C:/Users/cccc/.m2/repository/com/vaadin/vaadin-client/7.1.0/ folder, but if that doesn't work, you will have to try deleting C:/Users/cccc/.m2/repository. It's just a local cache of artifacts downloaded from maven central or an internal repository, so it is OK to delete.
I am 90% certain this would fix your problem.
I clear /.m2/repository/.cache and it works fine.
I'm running into java.lang.ClassNotFoundException: net.sourceforge.jtds.jdbc.Driver
I can get around the error by putting jtds.jar file in the CATALINA_HOME/lib directory but this isn't an ideal solution as the application should be modular enough to be deployable on any server.
I have the jtds.jar file in [tomcat_dir]/webapps/myapp/WEB-INF/lib which is where I want it to be found from.
I know there are TONS of similar questions so I apologize if this is a duplicate but I've yet to be able to find a post that helps.
Why can't my app find the correct jtds.jar file which I've included in the app package? What do I need to do in order to get the app to recognize that jar file?
Tomcat 6 and higher demands that JDBC driver JARs appear in the server /lib, especially if you have JNDI data sources.
It might not be ideal, but you'll have to get over it. How often will you be changing app servers?
I am currently working with GAE and was trying to figure out if there was some way that I can run php on GAE. Fortunately, I came across Quercus and was very happy to find that it had all that i needed.
But the problem now is that once I include the resin.jar to the WEB-INF/lib folder and try to update app using the google plugin in eclipse, it gives me an error saying that the size of the jar file is big and recommends me adding --enable_jar_splitting flag.
Now I have gone through a lot of sites where people have had similar problems. So what do I do to overcome this?
So here's what I am looking for in short:
1. Either a way to include this flag in the eclipse plugin
2. Finding out a way to split the jar file.
SOLUTION:
The only way that the above is currently possible is by using the command line utility present in the sdk/bin folder called - appcfg.sh
appcfg.sh --enable_jar_splitting -e user#domain.com update /path/to/war/file
PS: It is assumed that you have added the path to the bin folder as a environmental variable.
We want to implement a feature like this: when user firstly run the app, app will download a jar file to local PC from a server and load the jar file but when user run the app again, app can distinguish if the content of the jar file in local folder is same as the one on server, if so not download it again just load it from local folder; if not app will download it and update local one (the jar file name on server and on local must be same). Currently one solution I can think out is to use checksum that is app generates the checksum of local jar file then get the checksum of server jar file from the server, check if they are same, if so not download again, if not download and update. Is there a simple way to generate checksum of a jar file? Or is there any other better solution for this feature? Thanks.
Calculating the jar checksum is the same as calculating the checksum of any file. But it looks like you need Java Web Start, which will take care of everything.
Java Web Start is certainly the right way to do it as Bozho says. For a hand-made alternative see What's the best way to add a self-update feature to a Java Swing application?
You can use the Files.getChecksum(file) from Google Guava libraries
If you are building the jar file with maven there is a maven plug-in for generating check-sums of a compiled jar. Maven Plugin Link .
As for the downloaded jar you can locally SAVE ,rather than generate, the jars check sum. Fetch the check-sum from the server and send a request to the it every time you need to check if the jars check sum is changed and if so download the new one.