java-6

Does java cryptography extensions(JCE) come bundled with the JRE?

做~自己de王妃 提交于 2019-12-12 05:13:29
问题 I need to be certain that jce is available even in JRE environments out of the box. After furious googling I only managed to verify that jce comes bundled with the JDK after Java 1.4. Does the jce come bundled with the plain JRE download as well? Could you point out where you found the information, so I can verify for myself and know what I missed? 回答1: yes, the jce is included in all versions of java these days, relevant announcement. 回答2: Have you had a look at $JRE_HOME/lib/jce.jar ? ~$

This class does not support SAAJ 1.3

泪湿孤枕 提交于 2019-12-12 03:56:24
问题 In trying to call a webservice from a portlet from Glassfish to a webservice hosted remotely on weblogic we are getting this error: Caused by: java.lang.UnsupportedOperationException: This class does not support SAAJ 1.3 at weblogic.webservice.core.soap.SOAPHeaderImpl.addHeaderElement(SOAPHeaderImpl.java:178) I added the webservicesclient.jar from WebLogic to the portlet WAR file. How is the best way to handle this problem? EDIT: Adding webservicesclient.jar was the wrong thing to do. I

How to add java plugin to firefox profile using selenium webdriver

南笙酒味 提交于 2019-12-12 00:44:12
问题 I want to add java 6 plugin to firefox profile using java code and selenium. Please any one help how to add plugin to profile 回答1: File file = new File("java 6 plugin file"); FirefoxProfile firefoxProfile = new FirefoxProfile(); firefoxProfile.addExtension(file); firefoxProfile.setPreference("extensions.firebug.currentVersion", "1.8.1"); WebDriver driver = new FirefoxDriver(firefoxProfile); 来源: https://stackoverflow.com/questions/20947659/how-to-add-java-plugin-to-firefox-profile-using

Method argument of different types

北战南征 提交于 2019-12-11 20:53:55
问题 I want to write method that would accept parameter of types a.A or b.B. Currently it's implemented: import a.A; import b.B; ... public void doSth(A arg) { SpecificClass.specificMethod(arg); } public void doSth(B arg) { SpecificClass.specificMethod(arg); } I want to have one generic method "doSth" that use wildcards and accepts only a.A or b.B. Important information a.A and b.B aren't subtypes of each other. The only common type is java.lang.Object. Any help? 回答1: Assuming you could do that,

Liquibase Unsupported major.minor version 51.0

不想你离开。 提交于 2019-12-11 15:02:38
问题 I am attempting to set up Liquibase 3.6.1 on a solaris VM. My JRE is 1.6.0_151-b10. My Liquibase.properties file is configured as follows: driver:oracle.jdbc.OracleDriver classpath:/export/home/oracle/Liquibase/lib/OJDBC-Full/ojdbc6.jar url:jdbc:oracle:thin:@db:port/instance username:uname password:pword When calling "./Liquibase --version" (for example), I get an error. Exception in thread "main" java.lang.UnsupportedClassVersionError: Liquibase/integration/commandline/Main : Unsupported

how do i mock the a static method that provides an instance of the class being mocked with JMockit?

核能气质少年 提交于 2019-12-11 13:41:38
问题 I'm trying to mock a singleton class (SessionDataManager) where I get an instance by calling the static getInstance() method but all attempts seem to return null. I've tried @Mocked SessionDataManager sessionDataManager; or new MockUp<SessionDataManager>(){ @Mock public SessionDataManager getInstance(Invocation invocation) { return invocation.getInvokedInstance(); } }; I get the same result = null; Can anyone suggestion a solution? Thanks 回答1: I would suggest having a look at the

C3P0 hangs - Java 1,6

对着背影说爱祢 提交于 2019-12-11 11:33:59
问题 In continuation with this Websphere hangs due to c3p0 question Our JSP application itself is a legacy code (written some 5 years back) and we need to maintain it for next 3 years. With the updates to Oracle & WAS the existing code is becoming unstable. Rewriting is not an option due to cost factors One such problem came when we had to move to Oracle 11. After some research I found out that connection pooling would help. Proper fix is to make changes to the code but cost comes into picture.

Can't execute embedded Glassfish App at Apple platform

岁酱吖の 提交于 2019-12-11 09:42:30
问题 I'm having a problem running an JEE5 application at GF 3.1 Embedded at Apple computers... (the same environment works at Linux and Windows). The server starts ok, but when loading the APP the server returns a SEVERE message... My deployment is basically the glassfish-embedded-web-3.1.jar file, the configured domain with app inside, and a start class. The output can be seen here: http://pastebin.com/ypeV3jm3; and the lines 44 and 48 show the error messages. At linux/windows platform (where it

how to remove the namespaces from the Element

风流意气都作罢 提交于 2019-12-11 09:39:55
问题 I am working with org.w3c.xml java library and encountering a few difficulties performing a few tasks: I have an Element object; how can I remove namespaces from it and the predecessors? How can I create a Document without the namespaces? I have tried DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance(); docBuilderFactory.setNamespaceAware(false); DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder(); Document doc = docBuilder.parse (new File("C:/Temp

merge XML using STAX XMLStreamWriter

跟風遠走 提交于 2019-12-11 09:16:24
问题 I have created an XML using STAX and XMLStreamWriter. It works fine. I need to merge two xml together. The problem that I am facing is the patient Pojo returns me XML containing all the patient information is below <Patient> <SocialSecurity>3333344</SocialSecurity> <Name> <LastName>pillai</LastName> <FirstName>dhanya</FirstName> <Name> <Patient> I need to add this into existing XML after <proID> like merging. <?xml version="1.0" ?> <Validate> <proID>123</prodID> </Validate> Please advice 回答1: