java-7

A universal match pattern ('/**') is defined before other patterns in the filter chain, causing them to be ignored

柔情痞子 提交于 2019-12-07 00:57:09
问题 Spring Security basic example gives this exception. Error: "A universal match pattern ('/**') is defined before other patterns in the filter chain, causing them to be ignored. Please check the ordering in your namespace or FilterChainProxy bean configuration" I have checked many posts on this same issue. But could not find any solution. Anyone able to deploy a hello spring security? I am using these versions - Spring 3.2.0.RELEASE / Spring security 3.2.0.RELEASE / Tomcat 7 / Java 1.7. Here is

Java 1.7 + JSCH: java.security.InvalidKeyException: Key is too long for this algorithm

谁说我不能喝 提交于 2019-12-06 21:06:49
问题 I'm trying to use JSCH to upload a file to a remote SFTP share. Every time I attempt to connect to the share from within my code, I get an exception that looks something like this: com.jcraft.jsch.JSchException: Session.connect: java.security.InvalidKeyException: Key is too long for this algorithm at com.jcraft.jsch.Session.connect(Session.java:558) ~[jsch-0.1.51.jar:na] at com.jcraft.jsch.Session.connect(Session.java:183) ~[jsch-0.1.51.jar:na] I've seen posts that describe this error when

Java 8 performance VS. Java 7

跟風遠走 提交于 2019-12-06 19:34:54
问题 I'm developing a imaging processing Java 7u80 application using C++ libraries through JNI. As I was willing to execute streams in parallel with Java 8u60, I just switched to JDK 8 and relaunched all my unit tests. Java 8u60 Overall duration: **35'408 [ms]** Java 7u80 Overall duration: **29'581 [ms]** Java 7 is in my case 17% faster than Java 8 (same code, code level resp. 7 and 8). I was wondering if such result may be specific to my application or if others have already notice a downgrade of

Set ant bootclasspath: JDK 1.7 has a new javac warning for setting an older source without bootclasspath

删除回忆录丶 提交于 2019-12-06 18:36:41
问题 How do I set the ant bootclasspath in conjunction with -source 1.5 -target 1.5? How can this not be a hardcoded path to the 1.5 JDK? Can I set an environment variable to bootclasspath similar to how JAVA_HOME can be used from ant? Ideally I would like to do something like set an environment variable or pass an argument to ant. 回答1: Here's an illustration of how you might fetch the Java 5 boot classes location from an environment variable, then use it. First, set the environment variable - say

Order of traversal in Files.walkFileTree

五迷三道 提交于 2019-12-06 18:28:08
问题 What is the order in which Files.walkFileTree visits files/directories at the same level? It doesn't appear to visit them in order of size, last modified time or name. I couldn't find anything in the API documentation either. Perhaps the preVisitDirectory method can be used to specify the order of visit but what is default behaviour ? 回答1: The order in which the subdirectories are read is not defined as per this comment in the Java Tutorial: A file tree is walked depth first, but you cannot

Compile error: “'<>' cannot be used with anonymous classes” [duplicate]

孤者浪人 提交于 2019-12-06 17:30:33
问题 This question already has answers here : Why can't Java 7 diamond operator be used with anonymous classes? (4 answers) Closed 2 years ago . I would so much rather like to write this: Lists.transform(vals, new Function<>() { public List<ValEntry> apply(Validator<? super T> input) { return input.validate(value); } }); ...than this: Lists.transform(vals, new Function<Validator<? super T>, List<ValEntry>>() { public List<ValEntry> apply(Validator<? super T> input) { return input.validate( value )

Java EE installer crashing on Mac OS X Mavericks

牧云@^-^@ 提交于 2019-12-06 13:36:52
Trying to install Java EE 7/Glassfish 4 on OS 10.9 Mavericks and it crashes every time. I have tried installing the Apple JDK and the Oracle JDK and neither work. Has anyone ran into this? I remember installing on 10.8 and it worked just fine. Thanks! Environment Variables: $ echo $JAVA_HOME /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home Output: $ chmod +x java_ee_sdk-7-jdk7-macosx-x64.sh $ ./java_ee_sdk-7-jdk7-macosx-x64.sh Extracting the installer archive... Extracting the installer runtime... Extracting the installer resources... Extracting the installer metadata... Welcome

Error while using part=“…,processingDetails” in a youtube.videos.insert() request

╄→尐↘猪︶ㄣ 提交于 2019-12-06 11:58:38
We're developing in java 7 and YouTube Data API v3. When we are calling the upload service with "processingDetails" part, we are getting a 503 Service Unavailable Error. What are we doing wrong? If we remove it, we can upload the video just fine. But we want/need to know about processingDetails. Here is the code: YouTube.Videos.Insert videoInsert = this.youtube.videos().insert("snippet,statistics,status,processingDetails", videoObjectDefiningMetadata, mediaContent); everything else it's the same as the java client provided in google API. Here is the request: https://www.googleapis.com/upload

Spherical Voronoi Tessellation with Java 7: need fix for winding vertices around faces

只谈情不闲聊 提交于 2019-12-06 11:04:24
I am working on a problem that involves finding the Voronoi tessellation for points distributed over the surface of a sphere. As far as I can tell, my brute-force approach works, since visually it seems to find the Delaunay triangulation of the points. However, my algorithm seems to fail when defining each face's edge order using the vertices. As an example of what I'm going for, here is a picture of a version that correctly determines the edges using a hack that determines edges by determining whether two vertices share more than one forming point. Note that I want to use the tessellation to

Java 8 Incompatible Types

对着背影说爱祢 提交于 2019-12-06 08:53:31
问题 Here's the simple code import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.Map; public class SimpleTest { public static void main(String[] args) { final ArrayList<Map<String, Object>> maps = newArrayList( createMap("1", "a", Collections.EMPTY_MAP, Collections.EMPTY_MAP), createMap("2", "b", Collections.EMPTY_MAP, Collections.EMPTY_MAP), createMap("3", "c", Collections.EMPTY_MAP, Collections.EMPTY_MAP) ); System.out.println(" maps = " + maps); }