What jar is Base64 in?
com.google.api.client.repackaged.org.apache.commons.codec.binary.Base64.class is contained in google-http-client-1.13.1-beta.jar, but adding that to the claspath doesn't resolve it.
I just can't figure out what jar has com/google/appengine/repackaged/...
Grrrr... using Appengine.1.9.25 works but switching in 1.9.37 fails....
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/appengine/repackaged/com/google/api/client/repackaged/org/apache/commons/codec/binary/Base64
at com.google.appengine.repackaged.com.google.api.client.util.Base64.encodeBase64URLSafeString(Base64.java:79)
at com.google.appengine.repackaged.com.google.api.client.json.webtoken.JsonWebSignature.signUsingRsaSha256(JsonWebSignature.java:634)
at com.google.appengine.repackaged.com.google.api.client.googleapis.auth.oauth2.GoogleCredential.executeRefreshToken(GoogleCredential.java:378)
at com.google.appengine.repackaged.com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:489)
at com.google.appengine.repackaged.com.google.api.client.auth.oauth2.Credential.intercept(Credential.java:217)
at com.google.appengine.repackaged.com.google.api.client.http.HttpRequest.execute(HttpRequest.java:868)
at com.google.appengine.tools.remoteapi.OAuthClient.get(OAuthClient.java:64)
at com.google.appengine.tools.remoteapi.RemoteApiInstaller.getAppIdFromServer(RemoteApiInstaller.java:413)
at com.google.appengine.tools.remoteapi.RemoteApiInstaller.loginImpl(RemoteApiInstaller.java:376)
at com.google.appengine.tools.remoteapi.RemoteApiInstaller.login(RemoteApiInstaller.java:337)
at com.google.appengine.tools.remoteapi.RemoteApiInstaller.install(RemoteApiInstaller.java:173)
Try to use 1.9.26 version. Seems Google missed to package commons-codec into 1.9.37.
Related
I used to send emails with javamail and Java 8.
Now that I upgraded to Java 12 I get the java.lang.NoClassDefFoundError: javax/activation/DataHandler.
I added the javax.activation-api-1.2.0.jar and now I get java.lang.NoClassDefFoundError: com/sun/activation/registries/LogSupport.
This is because javax.activation-api-1.2.0.jar doesn't have the com.sun... package that previous versions had.
What jars should I put on my project to properly send and email with java 12? And where to find them?
There are a lot of confusing sources like:
https://repo1.maven.org/maven2/javax/activation/javax.activation-api/1.2.0/
https://eclipse-ee4j.github.io/jaf/
https://www.oracle.com/java/technologies/java-archive-downloads-java-plat-downloads.html#jaf-1.1.1-fcs-oth-JPR
You need the implementation jar file, not the API jar file. Use this.
How can I call GAE Endpoints V2 from my Java Client using google-api-client:1.23.0 library.
I followed the migration description (https://cloud.google.com/endpoints/docs/frameworks/java/migrating) for the backend . Deployment worked fine.
But using the generated endpoints client libs I get the error:
Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: java.lang.NoSuchMethodError: com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient$Builder.setBatchPath(Ljava/lang/String;)Lcom/google/api/client/googleapis/services/AbstractGoogleClient$Builder;
at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:133)
Caused by: java.lang.NoSuchMethodError: com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient$Builder.setBatchPath(Ljava/lang/String;)Lcom/google/api/client/googleapis/services/AbstractGoogleClient$Builder;
at com.example.qwarks.backend.qwarksApi.QwarksApi$Builder.setBatchPath(QwarksApi.java:2098)
at com.example.qwarks.backend.qwarksApi.QwarksApi$Builder.<init>(QwarksApi.java:2077)
at com.example.qwarks.utility.Api.<clinit>(Api.java:24)
at com.example.qwarks.screens.SplashScreen.<init>(SplashScreen.java:105)
at com.example.qwarks.Qwarks.create(Qwarks.java:59)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:149)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:126)
I found the problem, I had to remove
compile project(path: ':backend', configuration: 'endpoints')
from my gradle dependencies
I am creating a web service through the apache CXF. but while i proceed(before the wsdl gets created), i receive the following error
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/cxf/tools/java2wsdl/JavaToWSDL
This seems like the java2ws.bat file has some error.
The statement in the bat file is
"%JAVA_HOME%\bin\java" -Djava.endorsed.dirs="%CXF_HOME%\lib\endorsed" -cp "%CXF_JAR%;%TOOLS_JAR%;%CLASSPATH%" -Djava.util.logging.config.file="%CXF_HOME%\etc\logging.properties" org.apache.cxf.tools.java2ws.JavaToWS %*
It seems like at Run time,jvm is not able to find the CXF.jar.I added it in the classpath but still the same error
please help me to solve the issue
The problem arises while creating JVM. You can refer : Java Refuses to Start - Could not reserve enough space for object heap
It solved my problem.
I would like to set up an AppEngine service locally. Everything compiles, but when i try to run the project, I get this error:
SEVERE: Received exception processing C:\Users\eazyigz\Google Drive\Books\Android eBooks\Apress Practical Android Projects\PracticalAndroidProjectsSourceCode\Projects\08_GameService\war\WEB-INF/appengine-web.xml
com.google.apphosting.utils.config.AppEngineConfigException: appengine-web.xml does not contain a element.
See http://code.google.com/appengine/docs/java/config/appconfig.html#Using_Concurrent_Requests for more information.
You probably want to enable concurrent requests.
at com.google.apphosting.utils.config.AppEngineWebXmlReader.readAppEngineWebXml(AppEngineWebXmlReader.java:79)
at com.google.apphosting.utils.config.EarHelper.readWebModule(EarHelper.java:130)
at com.google.appengine.tools.development.AbstractContainerService.loadAppEngineWebXml(AbstractContainerService.java:334)
at com.google.appengine.tools.development.JettyContainerService.initContext(JettyContainerService.java:160)
at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:227)
at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:157)
at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:333)
at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
at com.google.appengine.tools.development.DevAppServerMain.(DevAppServerMain.java:269)
at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:245)
When I do enable threadsafe, Eclipse shows this compilation error:
I simply don't understand what is happening. Can somebody shed some light?
Thank you,
Igor
You should put <threadsafe> into appengine-web.xml file, not web.xml
You need to add true to the file "appengine-web.xml" instead of the "web.xml"
https://developers.google.com/appengine/docs/java/config/appconfig#Using_Concurrent_Requests
I am getting an exception trying to use update/extract with PDF files
My Set up is:-
Ubuntu Server 11.10
Tomcat 6
Solr 3.5.0.2011.11.22.15.54.38
I can browse to solr/admin OK
I have put all the contrib/extract and apache-solr-cell3.5.0.jar libraries into the tomcat folder webapps/solr/WEB-INF/lib
I am calling extract using:-
curl "http://localhost:8080/solr/update/extract?uprefix=attr_&fmap.content=attr_content&commit=true" -F "file=/path/to/my.pdf"
error is
java.lang.NoClassDefFoundError: org/apache/tika/mime/MimeTypeException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:383)
at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:425)
at org.apache.solr.core.SolrCore.createRequestHandler(SolrCore.java:461)
at org.apache.solr.core.RequestHandlers$LazyRequestHandlerWrapper.getWrappedHandler(RequestHandlers.java:248)
at org.apache.solr.core.RequestHandlers$LazyRequestHandlerWrapper.handleRequest(RequestHandlers.java:239)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1372)
Would appreciate any pointers - the only time this error seems to come up elsewhere is with Nutch and cached results.
I have tried sending the mimetype in the querystring and also a *.doc file but got the same error.
According to the error message it is not a MimeTypeException exception you get: The problem is a NoClassDefFoundError, because Solr cannot load the class MimeTypeException.
Normally this class is present in tika-core.jar.
Make sure you actually have that file and also check if you have a lib statement in your solrconfig.xml pointing to the right directory.
This was due to the basic error of copying the necessary tika libraries (to tomcat6/webapps/solr/WEB-INF/lib) but leaving ownership of the jar files as ROOT instead of chown-ing them to TOMCAT6. After setting the right permission and restarting Tomcat it started working OK
Found the solution of this problem, I was using SolrJ to update my pdf indexing.
after deploy solr to tomcat, I didn't include the following libraries into the tomcat/webapp
and I get all the lazy loading problem, etc etc
I even try to get apache tika...
until I do this...
shutdown tomcat
\apache-solr-3.5.0\contrib\extraction
copy the libraries above to below
\apache-tomcat-7.0.26\webapps\solr\WEB-INF\lib
startup tomcat
cheers