jdk1.6

java.lang.ClassCastException: org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6 cannot be cast

感情迁移 提交于 2019-11-30 10:04:55
Application Version: JBoss 7.0.0, Oracle 11g (ojdbc6.jar) and JDK 6 version I have a problem when I am trying to insert the value for CLOB Data type using CLOB.createTemporary function, getting the below exception. java.lang.ClassCastException: org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6 cannot be cast to oracle.jdbc.OracleConnection After searching in multiple forums, did not find any solution. https://forums.oracle.com/forums/thread.jspa?threadID=279238 Basic steps required to deploy a WAR file and configuring the JBoss oracle driver pool configuration is done. But, still not able

Is there a Java utility which will convert a String path to use the correct File separator char?

徘徊边缘 提交于 2019-11-30 06:54:32
问题 I have developed a number of classes which manipulate files in Java. I am working on a Linux box, and have been blissfully typing new File("path/to/some/file"); . When it came time to commit I realised some of the other developers on the project are using Windows. I would now like to call a method which can take in a String of the form "/path/to/some/file" and, depending on the OS, return a correctly separated path. For example: "path/to/some/file" becomes "path\\to\\some\\file" on Windows.

The JDK is missing and is required to run some NetBeans modules

时间秒杀一切 提交于 2019-11-29 22:51:40
Complete error message: The JDK is missing and is required to run some NetBeans modules Please use the --jdkhome command line option to specify a JDK installation or see http://wiki.netbeans.org/FaqRunningOnJre for more information. Some details: I just installed Netbeans on Linux mint for the first time and when I start it when its turning on modules this error message appears. But I do have jdk installed. $ java -version java version "1.8.0_66" Java(TM) SE Runtime Environment (build 1.8.0_66-b17) Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode) $ javac -version javac 1.8.0_66

No com.sun.tools.javac in JDK7

不打扰是莪最后的温柔 提交于 2019-11-29 18:30:08
问题 I'm using JDK7 and Eclipse Indiago in Windows 7 64-bit. I set environment variable JAVA_HOME to F:\JDK7 and add %JAVA_HOME%\bin in path. It's my sample code: com.sun.tools.javac.Main m1 = new com.sun.tools.javac.Main(); m1.compile(source); Error I get: Type com.sun.tools cannot be resolved to a type Why there is no com.sun.tools ? What's the problem ? 回答1: It looks like you are using Eclipse. By default Eclipse only imports JRE jars, not the ones from the JDK. Solution 1: Go to Eclipse

Why do two methods with signature (primitive, wrapper) and (primitive, primitive) cause the method call (wrapper, primitive) to be ambiguous?

泪湿孤枕 提交于 2019-11-29 05:38:38
It's just an exercise but I can't figure out the ambiguity: private static void flipFlop(String str, int i, Integer iRef) { System.out.println(str + "ciao"); } private static void flipFlop(String str, int i, int j) { System.out.println(str + "hello"); } public static void main(String[] args) { flipFlop("hello", new Integer(4), 2004); } It says: The method flipFlop(String, int, Integer) is ambiguous for the type Test I would have guessed that the second argument would have been unwrapped to int and so the second flipFlop method would have been the choice. If you enjoy riveting reading, here is

XercesImpl in conflict with JavaSE 6's internal xerces implementation. Both are needed… what can be done?

五迷三道 提交于 2019-11-29 01:56:41
I am sure that I am not the first to encounter this conflict. The code that I have inherited does the following: org.w3c.dom.Document dom; // declaration javax.xml.validation.Schema schema; // declaration ... ... ... javax.xml.validation.Validator validator = schema.newValidator(); validator.validate(new DOMSource(dom)); where the ... stands for seemingly unimportant/irrelevant code Compiling and running the code with JDK 6 works (and always had...) Recently I have had to integrate into my code another component written elsewhere in the company. That component absolutely requires the inclusion

Is there a Java utility which will convert a String path to use the correct File separator char?

荒凉一梦 提交于 2019-11-28 23:08:26
I have developed a number of classes which manipulate files in Java. I am working on a Linux box, and have been blissfully typing new File("path/to/some/file"); . When it came time to commit I realised some of the other developers on the project are using Windows. I would now like to call a method which can take in a String of the form "/path/to/some/file" and, depending on the OS, return a correctly separated path. For example: "path/to/some/file" becomes "path\\to\\some\\file" on Windows. On Linux it just returns the given String. I realise it wouldn't take long to knock up a regular

Jboss Server Error:Server already running on localhost

隐身守侯 提交于 2019-11-28 18:54:56
I am working on web project where jboss application server is required. After configured the jboss server, I was running my application. It is showing error like:Server already running on local host.Web found a running server at URL //localhost:8080. Süleyman Şahin Works for me Open Command Prompt Type netstat -noa and hit Enter Check the "PID" of process that uses your port And type taskkill /PID "PID number" and hit Enter As @Mxsky stated: You may have to force the processus to quit with the /F option.So the command becomes: taskkill /PID pid_number /F Done. Now start the server Dipak Modi

Most concise way to convert a Set<String> to a List<String>

夙愿已清 提交于 2019-11-28 15:40:47
I am currently doing this: Set<String> setOfTopicAuthors = .... List<String> list = Arrays.asList( setOfTopicAuthors.toArray( new String[0] ) ); Can you beat this ? List<String> list = new ArrayList<String>(listOfTopicAuthors); List<String> l = new ArrayList<String>(listOfTopicAuthors); Considering that we have Set<String> stringSet we can use following: Java 10 (Unmodifiable list) List<String> strList = stringSet.stream().collect(Collectors.toUnmodifiableList()); Java 8 (Modifiable Lists) import static java.util.stream.Collectors.*; List<String> stringList1 = stringSet.stream().collect(toList

How to change settings for SQL Developer to correctly recognize current version of SDK

孤街醉人 提交于 2019-11-28 13:25:30
I've installed Oracle 11g r2 to my machine and when I opened Oracle SQL Developer it says: java 1.6.0_02 is not supported and telling me to install new java version. Then I've installed JDK 1.6.0_27 and set the path in environment variables and run Oracle SQL Developer again, but the same error occurred. How can I change the settings for Oracle SQL Developer to recognize 1.6.0_27 as my SDK? sqldeveloper.conf under sqldeveloper/bin in the SQLDeveloper base directory has an entry for the java home being used. (So, on Windows, if you have unzipped SQLDeveloper to C:\sqldev then sqldeveloper.conf