Questions tagged [spark-java]

Spark is a lightweight web application framework inspired by Ruby's Sinatra. DO NOT USE FOR QUESTIONS ABOUT APACHE SPARK.

Spark is a lightweight web application framework inspired by Ruby's Sinatra. Its main focus is rapid development in pure Java with no need for extensive, additional XML configuration.

556 questions
0
votes
1 answer

Maven web app on a remote server: missing html files

I've got a Java/Maven web app using the Spark framework that I'm attempting to deploy to a remote Tomcat server using the Cargo plugin. I've never done this using Java, and I'm having a difficult time dealing with static files. The directory…
chrissy
  • 3
  • 2
-1
votes
1 answer

Spark Java sum is giving incorrect value

Spark Java sum is giving incorrect value Java sample code is as below List points = Arrays.asList(-6221.4, 6380.46); Dataset dt = spark.createDataset(points,…
Shyam
  • 9
  • 2
-1
votes
1 answer

Jetty 9 to 11 upgrade requires servlet 5.0. Latest spark-java still using servlet 3.0

Hi we're on our way to upgrade to jetty 11 and have come across this issue - Jetty 11 needs servlet 5.0 while spark-java even upto 2.9.4 is still using servlet 3.0. I could not find any info related to this on the spark-java page. Does anyone have…
shashwatZing
  • 1,550
  • 1
  • 17
  • 24
-1
votes
1 answer

My SparkJava resource server gets 403 errors when trying to validate access tokens

I want to set up a very basic REST API using Spark-java, which just checks an access token obtained from my own authorisation server. It creates a GET request to the authorisation server's /oauth/authorize endpoint followed by…
CiaranC94
  • 176
  • 4
  • 20
-1
votes
1 answer

Use public IP address for java application

I'm building a simple spark application with netbeans Maven. The issue is when I try to access my spark link, I have to put localhost instead of my public IP address. How could I put my public IP address instead of local host or local IP address? My…
Crystal
  • 13
  • 5
-1
votes
1 answer

500 internal server error with spark servlet

The issue I am having is that when I send the post request , the data are added to the data base , but the response I have is internal server error . When I check the database everything is added , but the error is still showing up after the…
TheLetch
  • 375
  • 1
  • 4
  • 15
-1
votes
2 answers

Spark static file not displaying

I am currently using spark as a web framework for a project I am working on. It was working correctly and displaying the html page in the public folder but I was having a problem with localhost:4567 not loading the most recent update to the website.…
-1
votes
1 answer

How to read values from two csv and do operation on b/w its column in spark java api?

I have two Csv in hadoop,say csv1,csv2. Both csvs contain two columns (timestamp and somevalue),say for csv1 columns are t1,v1 and for csv2 columns are t2,v2. I want to calculate v1*v2 for every t1 = t2 (for same timestamp) and store the result as…
A.N.Gupta
  • 331
  • 1
  • 5
  • 16
-1
votes
1 answer

Spark Web Framework, java.lang.ClassNotFoundException

I cannot figure what is causing this error (causing no compile). I am following the absolute most simple example on the front webpage: http://sparkjava.com/documentation.html I receive this error. I have spent a long amount of time trying things…
Richard
  • 135
  • 2
  • 11
-1
votes
1 answer

Sparkjava. How to run my site on my own domain name?

I can run Spark on necessary port on localhost, but I can't find info how to run my site on my own domain name (not localhost). Should I also run and configure any webserver, such as Apache Httpd? OS: Windows Server 2008 R2, JRE 8.
TOBBOT
  • 1
  • 3
-1
votes
1 answer

Run jobs on Spark (Sinatra-Based) Java REST API?

I want to ping another API, query and store some of the results in a database. How should I structure this using the Spark framework? Something like this: Where Spark is the backend I've written out, client is a client pinging the endpoints of…
AndyRoid
  • 5,062
  • 8
  • 38
  • 73
-1
votes
1 answer

Customize logger for spark

I am running spark2.3 and want to configure the logging mechanism so that it would utilize my existing log4j configurations. I can't seem to find a solution to achieve this. Can someone help?
-1
votes
1 answer

Spark Java Can only define one get() function

In my code I have two get functions, one for get("/login",(request...)) and one for get("/",(request....)) If I put the "/login" function before the "/" function only the "/login" page works and vice versa. Any help on this?
AmitPr
  • 13
  • 1
  • 6
-2
votes
1 answer

JRE 1.7 and Spark version 2.6.0. having exception java.lang.UnsupportedClassVersionError: spark/Route : Unsupported major.minor version 52.0

I am using JRE 1.7 with spark version 2.6.0 and IDE as InteliJ idea. Source of my class is as below: package com.tengen; import spark.Request; import spark.Response; import spark.Route; import spark.Spark; public class HelloWorldSparkStyle { …
-2
votes
1 answer

Seems like the amount increases by 2 everytime

So i am working on a project for myself where I am learning to make a small webshop using java spark velocity and mongodb, now I am at the point where I can add and remove items in the shoppingcart but for some reason if I add 2 of the same…
1 2 3
37
38