java-getting-started | Getting Started with Java on Heroku | Platform As A Service library
kandi X-RAY | java-getting-started Summary
kandi X-RAY | java-getting-started Summary
Getting Started with Java on Heroku
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of java-getting-started
java-getting-started Key Features
java-getting-started Examples and Code Snippets
Community Discussions
Trending Discussions on java-getting-started
QUESTION
This problem I am facing in title is very similar to this question previously raised here (Azure storage: Uploaded files with size zero bytes), but it was for .NET and the context for my Java scenario is that I am uploading small-size CSV files on a daily basis (about less than 5 Kb per file). In addition the API code uses the latest version of Azure API that I am using in contrast against the 2010 used by the other question.
I couldn't figure out where have I missed out, but the other alternative is to do it in File Storage, but of course the blob approach was recommended by a few of my peers.
So far, I have mostly based my code on uploading a file as a block of blob on the sample that was shown in the Azure Samples git [page] (https://github.com/Azure-Samples/storage-blob-java-getting-started/blob/master/src/BlobBasics.java). I have already done the container setup and file renaming steps, which isn't a problem, but after uploading, the size of the file at the blob storage container on my Azure domain shows 0 bytes.
I've tried alternating in converting the file into FileInputStream and upload it as a stream but it still produces the same manner.
...ANSWER
Answered 2019-Aug-22 at 16:59Instead of blob.uploadFromFile(fileName);
you should use blob.uploadFromFile(file.getAbsolutePath());
because uploadFromFile
method requires absolute path. And you don't need the blob.upload(fils,file.length());
.
Refer to Microsoft Docs: https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-java#upload-blobs-to-the-container
QUESTION
We are using the Azure Storage SDK for Java V8 in an application to access a simple table in a storage account with few lines, this version is failing the customer security scan, but the new version of the SDK doesn't seems to work with table storage, checking the documentation, it appears that the only way to use a table storage with the newest SDK is accessing through the Cosmos DB Table API.
The Azur Storage for Java SDK page (https://github.com/azure/azure-storage-java) shows only Blob and Queue components. The Azure documentation is not clear on this but all samples point to V8 (or older) SDKs, like this sample https://github.com/Azure-Samples/storage-table-java-getting-started
Is there any way to access a table storage in Java without using the Cosmos DB Table API or the outdated V8 SDK?
...ANSWER
Answered 2019-Feb-15 at 06:20For now, Azure Tables And any client libraries for Table have actually moved over to the CosmosDB team ,and there are no plans to support them.
And about the table support issue in the github has been closed.
So if you want to use Table SDK with Java, you have to use the legacy SDK. Now you could only get the latest SDK for table is CosmosDB.
Hope this could help you, if you still have other questions,please let me know.
QUESTION
I would like to add Spring Data JPA to Java-project generated by Heroku. Berofe I tried to do this, a template of the application was working properly on Heroku-domain and local. Here you will find properly functioning the source code: https://github.com/plkpiotr/fifa-backend/tree/912b8c468aeb86834423fb8a70e5c532cdc1fe1b
Dependencies before changes were as follows:
...ANSWER
Answered 2018-Jul-10 at 19:05I've lost a whole day's work stuck in here. It is finally working now. The solution is as follows:
I created new project by following: https://devcenter.heroku.com/articles/spring-boot-memcache (instead of https://devcenter.heroku.com/articles/getting-started-with-java#introduction as before) But the tutorials are incomplete and inaccurate, so I decided to leave little clues:
Use https://start.spring.io/ to choose needed dependencies.
git commit -m "message"
instead ofgit commit -m 'message'
Enter:
spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
andserver.port=${PORT:8080}
in application.propertiesIf the application still doesn't work try in the terminal:
heroku ps:scale web=1
in Heroku CLI in the correct catalogue.Procfile can't have apostrophes, only:
web: java -Dserver.port=$PORT $JAVA_OPTS -jar target/*.jar
QUESTION
I'm playing around with service fabric, and have setup a 5-node Windows Server 2016 cluster, where I've successfully deployed C# services from a Win10 machine, and have communicated with said services using both C# on Win10 and Java on Ubuntu.
We'll also need to communicate the other way, so the next step, I thought, would be to deploy one of the example Java services onto the cluster. Had to adjust the ServiceManifest.xml
to run a more Windows-friendly bat file, and i thought that was it. Not so - I get Exception in thread "main" java.lang.UnsatisfiedLinkError: no jFabricRuntime in java.library.path
.
I found the libjFabricRuntime.so
file, but that's rather useless on Windows. Google is not helpful in finding any information on jFabricRuntime
nor libjFabricRuntime
.
Is this simply a case of me trying this too early, and I have to wait for the Service Fabric Java SDK for Windows, or is there some other way to get this to work?
...ANSWER
Answered 2017-Apr-25 at 13:56The java samples are intended to run on Linux based Service Fabric clusters. I don't think you can get this to work on Windows, because of differences in implementation of the runtimes.
QUESTION
I created an app on Heroku using the Heroku "Java Getting Started" template available here: https://github.com/heroku/java-getting-started. It was working fine.
Later I decided that I needed to use Java 1.7 instead of 1.8. So I set java.runtime.version=1.7
in system.properties
and also java.version
under properties
in my pom.xml.
Unfortunately now it is not compiling (it uses Maven). When I push to Heroku it will download a bunch of Maven dependencies and then die with the following error:
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.0.0.RELEASE:build-info (default) on project myservice: Execution default of goal org.springframework.boot:spring-boot-maven-plugin:2.0.0.RELEASE:build-info failed: Unable to load the mojo 'build-info' in the plugin 'org.springframework.boot:spring-boot-maven-plugin:2.0.0.RELEASE' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: org/springframework/boot/maven/BuildInfoMojo : Unsupported major.minor version 52.0 [ERROR] ----------------------------------------------------- [ERROR] realm = plugin>org.springframework.boot:spring-boot-maven-plugin:2.0.0.RELEASE
I understand that the "unsupported major.minor version" component of the error message is a difference between Java 1.7 and Java 1.8, but I don't know where else to change the Java version to 1.7. Or maybe it's that some of the plugins require Java 1.8 to function? I'm not really sure, but I haven't specified a version for my org.springframework.boot
dependencies in my pom.xml.
ANSWER
Answered 2018-Mar-21 at 17:52That example uses Spring Boot 2.0, which does not support Java 7.
QUESTION
I'm new to Spring and Spring Boot, but I'm using it as a template.
The Main.java file contains in part the following:
...ANSWER
Answered 2018-Mar-16 at 21:38The problem is not the name of the class, but rather that the Spring Boot Maven plugin detected two classes with a main method. Either delete one of those main methods, or explicitly configure the maven plugin:
QUESTION
I'm modifying the "Getting Started on Heroku with Java" sample app (documentation from Heroku / source on Github) and having trouble with my local database connection.
The relevant code is from the main class:
...ANSWER
Answered 2018-Mar-15 at 01:37Instead of setting DATABASE_URL
locally, set JDBC_DATABASE_URL
like this:
QUESTION
at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:81)
at org.eclipse.sisu.plexus.LazyPlexusBean.getValue(LazyPlexusBean.java:5
1)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContai
ner.java:263)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContai
ner.java:255)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfigu
redMojo(DefaultMavenPluginManager.java:519)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:121)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThre
adedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Nativ
e Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Native
MethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(De
legatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
356)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.(Abstrac
tZipArchiver.java:116)
... 88 more
[WARNING] Error injecting: org.apache.maven.plugin.jar.JarMojo
java.lang.ExceptionInInitializerError
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInsta
nce0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInsta
nce(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newI
nstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:
488)
at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInsta
nce(DefaultConstructionProxyFactory.java:86)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorI
njector.java:105)
at com.google.inject.internal.ConstructorInjector.access$000(Constructor
Injector.java:32)
at com.google.inject.internal.ConstructorInjector$1.call(ConstructorInje
ctor.java:89)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.p
rovision(ProvisionListenerStackCallback.java:115)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.p
rovision(ProvisionListenerStackCallback.java:133)
at com.google.inject.internal.ProvisionListenerStackCallback.provision(P
rovisionListenerStackCallback.java:68)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorI
njector.java:87)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(Constru
ctorBindingImpl.java:267)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:10
16)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.ja
va:1103)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java
:1051)
at org.eclipse.sisu.space.AbstractDeferredClass.get(AbstractDeferredClas
s.java:48)
at com.google.inject.internal.ProviderInternalFactory.provision(Provider
InternalFactory.java:81)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.prov
ision(InternalFactoryToInitializableAdapter.java:53)
at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInt
ernalFactory.java:65)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.p
rovision(ProvisionListenerStackCallback.java:115)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.p
rovision(ProvisionListenerStackCallback.java:133)
at com.google.inject.internal.ProvisionListenerStackCallback.provision(P
rovisionListenerStackCallback.java:68)
at com.google.inject.internal.ProviderInternalFactory.circularGet(Provid
erInternalFactory.java:63)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(
InternalFactoryToInitializableAdapter.java:45)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:10
16)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.ja
va:1103)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
at org.eclipse.sisu.inject.Guice4$1.get(Guice4.java:162)
at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:81)
at org.eclipse.sisu.plexus.LazyPlexusBean.getValue(LazyPlexusBean.java:5
1)
at org.eclipse.sisu.plexus.PlexusRequirements$RequirementProvider.get(Pl
exusRequirements.java:250)
at org.eclipse.sisu.plexus.ProvidedPropertyBinding.injectProperty(Provid
edPropertyBinding.java:48)
at org.eclipse.sisu.bean.BeanInjector.injectMembers(BeanInjector.java:52
)
at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersI
njectorImpl.java:140)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorI
njector.java:114)
at com.google.inject.internal.ConstructorInjector.access$000(Constructor
Injector.java:32)
at com.google.inject.internal.ConstructorInjector$1.call(ConstructorInje
ctor.java:89)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.p
rovision(ProvisionListenerStackCallback.java:115)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.p
rovision(ProvisionListenerStackCallback.java:133)
at com.google.inject.internal.ProvisionListenerStackCallback.provision(P
rovisionListenerStackCallback.java:68)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorI
njector.java:87)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(Constru
ctorBindingImpl.java:267)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:10
16)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.ja
va:1103)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java
:1051)
at org.eclipse.sisu.space.AbstractDeferredClass.get(AbstractDeferredClas
s.java:48)
at com.google.inject.internal.ProviderInternalFactory.provision(Provider
InternalFactory.java:81)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.prov
ision(InternalFactoryToInitializableAdapter.java:53)
at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInt
ernalFactory.java:65)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.p
rovision(ProvisionListenerStackCallback.java:115)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.p
rovision(ProvisionListenerStackCallback.java:133)
at com.google.inject.internal.ProvisionListenerStackCallback.provision(P
rovisionListenerStackCallback.java:68)
at com.google.inject.internal.ProviderInternalFactory.circularGet(Provid
erInternalFactory.java:63)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(
InternalFactoryToInitializableAdapter.java:45)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:10
16)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.ja
va:1092)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
at org.eclipse.sisu.inject.Guice4$1.get(Guice4.java:162)
at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:81)
at org.eclipse.sisu.plexus.LazyPlexusBean.getValue(LazyPlexusBean.java:5
1)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContai
ner.java:263)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContai
ner.java:255)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfigu
redMojo(DefaultMavenPluginManager.java:519)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:121)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThre
adedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Nativ
e Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Native
MethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(De
legatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
356)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.(Abstrac
tZipArchiver.java:116)
... 88 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.688 s
[INFO] Finished at: 2017-10-01T07:43:16-07:00
[INFO] Final Memory: 29M/97M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:2.6:jar
(default-jar) on project java-getting-started: Execution default-jar of goal or
g.apache.maven.plugins:maven-jar-plugin:2.6:jar failed: An API incompatibility w
as encountered while executing org.apache.maven.plugins:maven-jar-plugin:2.6:jar
: java.lang.ExceptionInInitializerError: null
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.apache.maven.plugins:maven-jar-plugin:2.6
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/Umair/.m2/repository/org/apache/maven/plugins/m
aven-jar-plugin/2.6/maven-jar-plugin-2.6.jar
[ERROR] urls[1] = file:/C:/Users/Umair/.m2/repository/org/slf4j/slf4j-jdk14/1.5.
6/slf4j-jdk14-1.5.6.jar
[ERROR] urls[2] = file:/C:/Users/Umair/.m2/repository/org/slf4j/jcl-over-slf4j/1
.5.6/jcl-over-slf4j-1.5.6.jar
[ERROR] urls[3] = file:/C:/Users/Umair/.m2/repository/org/apache/maven/reporting
/maven-reporting-api/2.2.1/maven-reporting-api-2.2.1.jar
[ERROR] urls[4] = file:/C:/Users/Umair/.m2/repository/org/apache/maven/doxia/dox
ia-sink-api/1.1/doxia-sink-api-1.1.jar
[ERROR] urls[5] = file:/C:/Users/Umair/.m2/repository/org/apache/maven/doxia/dox
ia-logging-api/1.1/doxia-logging-api-1.1.jar
[ERROR] urls[6] = file:/C:/Users/Umair/.m2/repository/junit/junit/3.8.1/junit-3.
8.1.jar
[ERROR] urls[7] = file:/C:/Users/Umair/.m2/repository/commons-cli/commons-cli/1.
2/commons-cli-1.2.jar
[ERROR] urls[8] = file:/C:/Users/Umair/.m2/repository/org/codehaus/plexus/plexus
-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar
[ERROR] urls[9] = file:/C:/Users/Umair/.m2/repository/backport-util-concurrent/b
ackport-util-concurrent/3.1/backport-util-concurrent-3.1.jar
[ERROR] urls[10] = file:/C:/Users/Umair/.m2/repository/org/sonatype/plexus/plexu
s-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
[ERROR] urls[11] = file:/C:/Users/Umair/.m2/repository/org/sonatype/plexus/plexu
s-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[12] = file:/C:/Users/Umair/.m2/repository/org/codehaus/plexus/plexu
s-interpolation/1.11/plexus-interpolation-1.11.jar
[ERROR] urls[13] = file:/C:/Users/Umair/.m2/repository/org/apache/maven/maven-ar
chiver/2.6/maven-archiver-2.6.jar
[ERROR] urls[14] = file:/C:/Users/Umair/.m2/repository/org/apache/maven/shared/m
aven-shared-utils/0.7/maven-shared-utils-0.7.jar
[ERROR] urls[15] = file:/C:/Users/Umair/.m2/repository/com/google/code/findbugs/
jsr305/2.0.1/jsr305-2.0.1.jar
[ERROR] urls[16] = file:/C:/Users/Umair/.m2/repository/org/codehaus/plexus/plexu
s-utils/3.0.20/plexus-utils-3.0.20.jar
[ERROR] urls[17] = file:/C:/Users/Umair/.m2/repository/org/codehaus/plexus/plexu
s-archiver/2.9/plexus-archiver-2.9.jar
[ERROR] urls[18] = file:/C:/Users/Umair/.m2/repository/org/codehaus/plexus/plexu
s-io/2.4/plexus-io-2.4.jar
[ERROR] urls[19] = file:/C:/Users/Umair/.m2/repository/commons-io/commons-io/2.2
/commons-io-2.2.jar
[ERROR] urls[20] = file:/C:/Users/Umair/.m2/repository/org/apache/commons/common
s-compress/1.9/commons-compress-1.9.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContaine
rException
'cmd' is not recognized as an internal or external command,
operable program or batch file.
...ANSWER
Answered 2017-Oct-01 at 16:33The log line
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1 at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.(AbstractZipArchiver.java:116)
leads me to the assumption that one of the jars in your project is damaged. This happens sometimes when a download initiated by maven fails. It's impossible to which one is damaged because your log is incomplete.
You should try
QUESTION
I am creating an application where I need to view blobs in browser rather than downloading them. Currently, links of blobs having token downloads the corresponding blob.
I got some reference here to view the blobs in browser : https://github.com/Azure-Samples/storage-blob-java-getting-started/blob/master/src/BlobBasics.java (See from line number 141)
Here is my code to create token :
...ANSWER
Answered 2017-Jul-20 at 09:17Blobs have binary data which could be just about anything - an image, video, document etc. When you click on the blob url it's similar to clicking on any url that point's to a file. The default action of a browser would be to download the file unless the browser can display the contents.
What the comment (To view the uploaded blobs in a browser..) implies is that for the blob to be publicly visible you need to set appropriate permissions. Once these permissions are set you can paste the url to the blob in a browser and it would be accessible.
To allow public access to the container you can use the following code -
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install java-getting-started
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page