java

wss4j: - Cannot find key for alias: monit

Hi I'm using axis1.4 and wss4j. When I define in client-config.wsdd for WSDoAllSender and WSDoAllReceiver different signaturePropFiles where I have different key stores defined with different certificates, I'm able to have different certificates for sending and receiving. But when I use the same signaturePropFiles' with the same keystore...

SMTPTransport as private static for class that implements MessageDrivenBean and MessageListener

If I use SMTPTransport (http://java.sun.com/products/javamail/javadocs/com/sun/mail/smtp/SMTPTransport.html) as private static object for class that implements MessageDrivenBean and MessageListener, will it be thread safe or are there some possible error situations? ...

Which Java collection's Linked list adds in O(1) when given an element?

hi, i need to insert into a very large LinkedList, whose elements i hold in a fast-access HashMap. it's important to keep the list in order (which is not the natural order of the keys). i thought it would be possible to hash the linked list nodes, then insert directly on the node (getting the node from the map + insert in a linked list...

Android: customize application's menu (e.g background color)

What is the way (if there is a way) to customize the menu (the one triggered by the MENU button of the phone). I'm especially interested in two things: changing the background color from the standard light gray into a darker gray how the menu items are aligned. I have 4 items and they are automatically aligned 2x2, but I would prefer t...

How to expand JTree nodes (in advance), but keep them invisible

Hi, I seems to me that when i call JTree.expandPath( path ) That by default all its parents are expanded as well. But what i actually want to do is, set up specific invisible children to be expanded in advance. So that when a node is expanded that its complete sub-tree pops-out. I've found that internally in JTree expandedState...

JdbcTemplate batch update in postgresql - date loses time?

I am inserting a list of object with java.util.date in format YYYY-MM-DDThh:mm:ssTZD (2008-09-26T14:34:59+02:00). SQL: INSERT INTO cdate (key,valuedate,user_id) VALUES(?,?,?) BatchPreparedStatementSetter bpss = new MetaJdbc().setMetaBatchPreparedStatement( list, userId); getJdbcTemplate().batchUpdate(sql,bpss); Date is...

jquery pagging problem with IE7

i am using JQUERY plug in for paging http://jonpauldavies.github.com/JQuery/Pager/PagerDemo.html my code as as following i have created one .js file called inilization.js and bellow is total code in inilization.js function init(a,b) { $("#pager").pager({ pagenumber: a, pagecount: b, buttonClickCallback: PageClick }); } when i ca...

How does JVM executes the Inheritance Tree Structure in Java ?

class Vehicle { public int wheels; public int lights; } class Car extends Vehicle { public int wheels =4; public int lights =2; public void lights_on( int lights){ //Code to onlights } } class BMWCar extends Car { public int wheels =4; public int lights =4; } public class TestCar { public static void ma...

Unwanted border around JPanel

I'm creating a form with a JPanel inside it for some graphics and some buttons for controlling the thing. For some reason I have to specify the JPanel to be 10 px less wide and 30 px less high than the actual graphics I want to put inside it. What causes this problem? This is the code: public class Window { public Sheepness sheepness;...

How to restrict access to mutable or immutable methods?

Hi In a new Java project I try to apply as much best practices as possible. The one I'm having problems with is immutability. Although I understood the concept and already built some immutable classes I now came to a class where I think it's more appropriate to do it as a mutable class. The main problem is that I want to hide the mutab...

Relative path in JLabel HTML

Hi, I am trying to make JLabel show an html which is referencing an image using a relative path. But I cannot make JLabel locate the image. It works fine when I am using absolute path. I have tried running the program from the command line or from eclipse and add dialog to show me where is the current working directory but for avail. I ...

Problems with ArrayList items and hibernate

I have a problem with getting the list items, below is my hibernate code, after that code there is my method ..and below that is my junit test. How can I make sure that query is executing properly, and how can I check that results actually work .. this query should return couple of pids .. and put them in the list.. now I'm 90 % sure tha...

Hibernate enum mapping

I need to map the enums which didn't implement the interface beforehand to the existing database, which stores enums in the same table as the owner class using the @Enumerated(EnumType.STRING). class A { HasName name; } interface HasName { String getName(); } enum X implements HasName { John, Mary; public String getNa...

Finding a needed dll after a JBoss (hot) redeploy?

My web application uses a native dll for part of its functionality (the location of which is provided in PATH). Everything works until I make a change to the WAR and JBoss hot deploys this WAR. At this point, the dll is no longer found and I need to manually restart the server. What is the best way to load the dll back into the app afte...

Source code is in JDK 1.4 and JUnit test cases in JDK 1.5

I am working on a project that is using JDK 1.4 and I am planning to write JUnit test cases in JDK 1.5 for several reasons like: I wanna explore JDK 1.5 to use Mocking frameworks more efficiently. Is it a good idea to do so?? (I've created two projects in Eclipse and am trying this) ...

Java servlet deployment error webui-jsf-suntheme

I am receiving the following run-time error in the web browser (Firefox) when attempting to run a deployed Java servlet on a Linux server: unterminated string literal dojo.provide("webui.suntheme.browser");w...wGroupsContainer,_41f.rowGroups[i],"last I believe the problem is related to webui-jsf-suntheme. I can confirm that the appl...

JCombobox editable enabled

What is the difference between the setEditable() and the setEnabled() in a jCombobox? Can a combobox be editable but not enabled and other way around? In which situation would you use which method? Can you imagine a situation in which you would do setEnabled(false) together with setEditable(true)? ...

How to use xml-apis in web application that will be running under JBoss 5.1?

We need to use jasper reports in web application under JBoss on AIX. Today we get a problem when we tried to add xml-apis to WEB-INF/lib - JBoss did not start at all. What should we do in order to use xml-apis under JBoss? PS. As far as I know we need org.w3c.dom.xpath.XPathEvaluator and org.w3c.dom.svg.* ...

Mailer utlity in java

hello guys, I am using java mailer utility to send mails in my application. When ever there is any invalid mail id we are getting deliver failure notice. Is there any way to stop that failure notice? Please help in this. ...

XML Data is sorted

I am constructing XML code using Java. See my code snippet. Document document = null; String xml = ""; ReportsDAO objReportsDAO = null; try { logger.info("Getting XML data for Consumable Report Starts..."); objReportsDAO = new ReportsDAO(); List consumableDTOLst = objReportsDAO.getConsumableData(issuedBy, issuedTo, employee...