| Java IDEs to deal with security issues |
|
 |
Index ‹ java-programmer
|
- Previous
- 2
- Web Services Client generation using WSDL2Java on the commandlineI use the following command on the commandline in windows. The wsdl
file is a valid one. When i run the command i get errors below. How do
i cater for the InvocationTargetException being thrown.
C:\TEMP\Client>call "%WAS_HOME%\bin\WSDL2Java" -role client -verbose
-output . H
elloWorld.wsdl
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:85)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:58)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:60)
at java.lang.reflect.Method.invoke(Method.java:391)
at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:190)
Caused by: java.lang.NoClassDefFoundError:
com/ibm/wtp/emf/xml/RendererFactory
at
com.ibm.ws.webservices.wsdl.mapping.MappingMetaData.<init>(MappingMet
aData.java:129)
at com.ibm.ws.webservices.wsdl.toJava.Emitter.<init>(Emitter.java:247)
at
com.ibm.ws.webservices.tools.WSDL2Java.createParser(WSDL2Java.java:29
5)
at com.ibm.ws.webservices.wsdl.WSDL2.<init>(WSDL2.java:130)
at com.ibm.ws.webservices.tools.WSDL2Java.<init>(WSDL2Java.java:284)
at com.ibm.ws.webservices.tools.WSDL2Java.main(WSDL2Java.java:470)
... 6 more
I've tried to figure out where the class
com/ibm/wtp/emf/xml/RendererFactory can be found so as to include it in
the classpath, but could not find it. Your assistance will bne greatly
appreciated...
- 8
- Automatic unit and functional testingHi there!
DO you use in your big software projects unit and functional testing?
If so please let me know which technologies are using?
Thanks.
Regards,
Pawel Radecki
- 8
- print pdfs from java java programI seen a handful of libraries that can produce pdfs. I'm looking for a way
to print them and possibly print preview them from a java application. Does
anybody know of a tool that can do that? I'm using iText (if it makes any
difference).
Hmm... just as I was writing this, I saw a mention of another library,
jpedal (jpedal.org) and it says it can "view" them. I'm going to try it out
tonight but I doubt it will do printing.
- 9
- ResourceBundle vs System.getPropertyOur team is trying to decide how to load an IP address and port used
by a single class that creates a socket. This class is invoked in a
servlet container.
My preference is for ResourceBundle. Another developer feels strongly
about System.getProperties.
Any clear rules on which method is best for particular situations?
iksrazal
- 9
- JDO Question : Is it possible to get unique values like DISTINCT in SQL?Hi all,
I use DISTINCT in my SQL queries to get unique values where there
are duplicates in my DB tables. As JDO is a layer on top on JDBC
and it has its own query syntax (I don't think it allows SQL) ... I
was wondering if something like the effect of DISTINCT is possible?
Like if I had a field in my persitance enabled class called
customerName, and it 5 instances had values of
"A","B","B","C","D" ... i would want it to get all of them but only
one of the "B". Is this possible with JDO?
Thanks
----------------------------------------------
Posted with NewsLeecher v1.0 Final
* Binary Usenet Leeching Made Easy
* http://www.newsleecher.com/?usenet
----------------------------------------------
- 9
- Soap - jdk1.5Hi ,
I am looking at writing Soap Client for an application. I had a look
at axis from Apcahe. But it supports only jdk 1.4. I would like to have
an implementation that has the support for jdk1.5.
Your response will be greatly appreciated.
Thanks,
Ranjith
- 9
- Flush ResultSet to BrowserHi. I am querying an Oracle 9i database that in some cases will return
very large resultSets (up to 95,000 rows). I am using Java Server
Faces for my front end but I am having some major performance issues,
for obvious reasons. My question is this: Can I start flushing the
database results to the textarea in the browser before the query
completes to give the illusion of speed? Here's the current slowly
working code. Thanks in advance for your help.
//JSP File Not Including Design Elements
<%-- tpl:put name="bodyarea" --%>
<hx:scriptCollector id="scriptCollector1">
<h:form styleClass="form" id="form1">
<IFRAME id="SaveFrame" style="display:none">
<h:inputTextarea></h:inputTextarea>
</IFRAME>
<BR>
<h:inputTextarea id="txtReportContent"
value="#{pc_Arreports.reportContents}">
</h:inputTextarea>
<BR>
</h:form>
</hx:scriptCollector>
<%-- /tpl:put --%>
//Backing Bean
public void open() throws SQLException, NamingException
//Open a connection to TSEC01
{
if (con != null)
return;
Context ctx = new InitialContext();
ds = (DataSource) ctx.lookup("jdbc/tsec01");
con = ds.getConnection();
}
public void close() throws SQLException, NamingException
// Close the connection and set it to null
{
if (con != null)
return;
con.close();
con = null;
}
public String getReportContents()
// This function is the value bound to txtReportContent in the JSP
{
String strReport = "\n";
ResultSet rs = null;
try
{
setSessionVariables();
String strSQL = "Select T_REPORT_DATA, C_LINE_NUMBER FROM access_review
where C_DOMAIN = '" + domain+ "' AND C_HOST_GROUP = '" + hostgroup +
"' AND D_SENT = '" + datesent + "' AND C_OWNER_GEID = '" + geid + "'
ORDER BY C_LINE_NUMBER";
open();
PreparedStatement stmt = con.prepareStatement(strSQL);
stmt.setFetchSize(100);
rs=stmt.executeQuery();
int i=0;
while (rs.next())
{
strReport += rs.getString(1);
strReport += "\n";
i++;
if (i % 100==0)
{
System.out.flush();
}
}
}
catch(SQLException e)
{
e.getMessage().toString();
}
catch (NamingException e)
{
e.getMessage().toString();
}
finally
{
try
{
close();
}
catch (SQLException e1)
{
e1.printStackTrace();
}
catch (NamingException e1)
{
e1.printStackTrace();
}
}
return strReport;
}
- 9
- JavaMail is not working on FreeBSD 6 (amd64) using linux-sun-jdk14I'm trying to port an application currently running FreeBSD 5.3 (i386)
using jdk14 to FreeBSD 6 (amd64).
First I tried jdk14, with this result:
hallandsen# make -V IGNORE minimal=YES
"is only for i386," "and you are running amd64"
Then I tried linux-sun-jdk14.
It installed successfully, but there seems to be a problem
sending emails with JavaMail.
1 System.out.println("## New MimeMessage");
2 Message msg = new MimeMessage(session);
3 System.out.println("## New MimeMessage passed");
It never reaches line 3, no sign on what's wrong.
Has anyone of you an idea of what to try or am I out of luck ?
Thanks,
Poul
- 10
- Subclassing a text area..I would like to create a component that is based on the TextArea, but I'm
not really sure where to start. Basically this component would behave the
same as a text area, but would highlight certain portions of the entered
text as it is entered e.g. incorrectly spelled words.
I would like to package this as a separate component that I can add to
other projects I'm working on.
Is there a good text that would provide examples on how to do this sort of
thing?
Thanks.
--
Kenneth P. Turvey <email***@***.com>
XMPP: email***@***.com
- 11
- Handling multiple attributes with w3c ElementQuestion from a new java programmer (I inherited this project when our
dedicated java guy left)...
It seems in his XML documents, there is usually only on attribute for
each element..
i.e. <ClubMember officer="T">
and to generate this I use:
Element retVal = DomUtiliy.addElement(parent,
"ClubMember").setAttribute("officer", "T");
In new new case, I'd like to create something like:
<ClubMember officer="T" elite="T" current="F">
and I can't find a method in the org.w3c.dom.* namespace to do such a
thing as .addAttribute to an Element. It seems you can
only .setAttribute. Is there an wasy way to add mutiple elements? An
example out there somewhere?
Joe
- 11
- Problem with JTable displaying dataI have created a JTable with a custom cell renderer for the first
column but the problem is that it won't display the data in the first
column if I use the custom cell renderer, i think i must have missed
out a step or something, because all the data in the second column
displays fine. The code is below...
class DataTable extends JPanel
{
DataTable()
{
this.setLayout(new BorderLayout());
JTable table = new JTable(new DataTableModel());
TableColumn col = table.getColumnModel().getColumn(0);
col.setCellRenderer(new DataTableCellRenderer());
// set table preferences
table.getTableHeader().setResizingAllowed(false);
table.getTableHeader().setReorderingAllowed(false);
table.setCellSelectionEnabled(false);
JScrollPane tableScroll = new JScrollPane(table);
add(tableScroll, BorderLayout.CENTER);
}
}
class DataTableModel extends AbstractTableModel
{
// declare variables
String layerNumber, cu, phi, cohesion, bulkDensity, dryDensity,
submergedDensity, moistureContent, liquidLimit,
plasticLimit, notes, mainType, mainName, mainStrength,
mainConsistency, mainGrainSize, mainMainColour,
mainSecondaryColour, mainPlasticity, mainComments, secondType,
secondName, secondStrength, secondConsistency,
secondGrainSize, secondMainColour, secondSecondaryColour,
secondPlasticity, secondComments, minorType,
minorName, minorStrength, minorConsistency, minorGrainSize,
minorMainColour, minorSecondaryColour,
minorPlasticity, minorComments;
// create data model
String[] columnNames = {"Property", "Value"};
Class[] columnType = {String.class, String.class};
Object[][] data = {{"Layer Number", layerNumber},
{"hello", "hello"},
{"Soil Parameters", ""},
{"Cu", cu},
{"Phi", phi},
/*.......
more data here
....... */
{"Secondary colour", minorSecondaryColour},
{"Plasticity", minorPlasticity},
{"Comments", minorComments}};
public int getColumnCount()
{
return columnNames.length;
}
public int getRowCount()
{
return data.length;
}
public String getColumnName(int col)
{
return columnNames[col];
}
public Object getValueAt(int row, int col)
{
return data[row][col];
}
public Class getColumnClass(int c)
{
return columnType[c];
}
public boolean isCellEditable(int rowIndex, int vColIndex)
{
return false;
}
public void setValueAt(Object aValue, int r, int c)
{
data[r][c] = aValue;
}
}
class DataTableCellRenderer extends JPanel implements TableCellRenderer
{
DataTableCellRenderer()
{
setOpaque(true);
}
public Component getTableCellRendererComponent(JTable table, Object
value, boolean isSelected, boolean hasFocus, int row, int col)
{
setBackground(Color.lightGray);
return this;
}
}
Many thanks
Steve
- 12
- Java algorithm (diff) question.I have two CSV files (file1 and file2).
Each file contains 50,000 + lines. Each line is very long.
The first entry in each line is a key as shown in the example below.
Example:
key1,val1,val2,val3....
key2,val1,val2,val3.....
etc
I would like to do a "diff"(unix like) between file1 and file2 and
find out
the lines that are different. The entries in each file are not
necessarily sorted by key.
Approaches I considered.
1. To load all the entries into a hashmap using the key's as a key and
the rest of the line as a value. This is a problem because of memory.
2. To generate the hashcode for each line and use the key and the
hashcode to
store in a hash map and do the comparison. The problem here is that
two different strings could have the same hashcode (false positive).
Any suggestions would be appreciated.
- 13
- What's the effect in different classpath set?525 wrote:
> when setting the environment variable, one of the steps is to set the
> classpath. Some books use this: classpath=c:\jdk\lib\tools.jar; c:
> \jdk\lib\dt.jar; Anothers use this: c:\jdk\lib . Q: Any
> different?
Neither one works. The environment variable is 'CLASSPATH', not 'classpath',
and you don't put spaces in it.
Even after correcting those errors, the second form will not pick up the JAR
files, nor is the first form isn't necessary because the JARs in the
$JAVA_HOME/lib/ directory don't need to be part of the classpath explicitly.
In any event, all your questions should be answered by the information in the
documentation:
<http://java.sun.com/javase/6/docs/technotes/tools/windows/classpath.html>
I strongly recommend that you do not use the CLASSPATH envar, but use the
-classpath (or -cp) option to your Java tools. CLASSPATH is far too global.
Also, read
<http://java.sun.com/javase/6/docs/technotes/tools/findingclasses.html>
--
Lew
- 13
- [Aaron J Tarter] Re: [comp.lang.java.databases] Derby eclipse installX-From-Line: dt136804 Mon Oct 1 14:04:19 2007
Return-path: <derby-user-return-7747-Dyre.Tjeldvoll=email***@***.com>
Received: from mail-emea.EU.sun.com [192.18.6.130]
by khepri29 with IMAP (fetchmail-6.3.4)
for <dt136804@localhost> (single-drop); Mon, 01 Oct 2007 14:04:19 +0200 (CEST)
Received: from fe-emea-10.sun.com ([192.18.6.120]) by emea3-mail1.uk.sun.com
(Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007))
with ESMTP id <email***@***.com> for
email***@***.com; Mon, 01 Oct 2007 13:03:29 +0100 (BST)
Received: from conversion-daemon.fe-emea-10.sun.com by fe-emea-10.sun.com
(Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007))
id <email***@***.com> for email***@***.com
(ORCPT email***@***.com); Mon, 01 Oct 2007 13:03:29 +0100 (BST)
Received: from phys-emea3-1.uk.sun.com ([192.18.6.12])
by fe-emea-10.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28
2007)) with ESMTP id <email***@***.com> for
email***@***.com (ORCPT email***@***.com); Mon,
01 Oct 2007 13:03:22 +0100 (BST)
Received: from dm-norway-02.uk.sun.com ([129.156.101.226])
by emea3-mail1.uk.sun.com
(Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007))
with ESMTP id <email***@***.com> for
email***@***.com (ORCPT email***@***.com); Mon,
01 Oct 2007 13:03:22 +0100 (BST)
Received: from sunmail2sca.sfbay.sun.com
(sunmail2sca.SFBay.Sun.COM [129.145.155.234]) by dm-norway-02.uk.sun.com
(8.13.6+Sun/8.13.6/ENSMAIL,v2.2) with ESMTP id l91C3LnU022170 for
<email***@***.com>; Mon, 01 Oct 2007 13:03:21 +0100 (BST)
Received: from brm-avmta-1.central.sun.com
(brm-avmta-1.Central.Sun.COM [129.147.4.11]) by sunmail2sca.sfbay.sun.com
(8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l91C3Huc012566 for
<@sunmail2sca.sfbay.sun.com:email***@***.com>; Mon,
01 Oct 2007 05:03:20 -0700 (PDT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
brm-avmta-1.central.sun.com
(Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
id <email***@***.com> for email***@***.com
(ORCPT email***@***.com); Mon, 01 Oct 2007 06:03:18 -0600 (MDT)
Received: from brmea-mail-2.sun.com ([192.18.98.43])
by brm-avmta-1.central.sun.com
(Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
with ESMTP id <email***@***.com> for
email***@***.com (ORCPT email***@***.com); Mon,
01 Oct 2007 06:03:12 -0600 (MDT)
Received: from relay23.sun.com
(relay23.sun.com [192.12.251.54] (may be forged)) by brmea-mail-2.sun.com
(8.13.6+Sun/8.12.9) with ESMTP id l91BrWmB027890 for <email***@***.com>;
Mon, 01 Oct 2007 12:03:12 +0000 (GMT)
Received: from mms22es.sun.com ([150.143.232.34] [150.143.232.34])
by relay23i.sun.com with ESMTP id BT-MMP-458037 for email***@***.com;
Mon, 01 Oct 2007 12:03:12 +0000 (Z)
Received: from relay24.sun.com (relay24.sun.com [192.12.251.74])
by mms22es.sun.com with ESMTP id BT-MMP-622373 for email***@***.com;
Mon, 01 Oct 2007 12:03:11 +0000 (Z)
Received: from mail.apache.org ([140.211.11.2] [140.211.11.2])
by relay24i.sun.com id BT-MMP-9380305 for email***@***.com; Mon,
01 Oct 2007 12:03:11 +0000 (Z)
Received: (qmail 21650 invoked by uid 500); Mon, 01 Oct 2007 12:03:00 +0000
Received: (qmail 21639 invoked by uid 99); Mon, 01 Oct 2007 12:03:00 +0000
Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136)
by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Oct 2007 05:03:00 -0700
Received: from [66.249.82.229] (HELO wx-out-0506.google.com) (66.249.82.229)
by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Oct 2007 12:03:02 +0000
Received: by wx-out-0506.google.com with SMTP id h29so2830201wxd for
<email***@***.com>; Mon, 01 Oct 2007 05:02:40 -0700 (PDT)
Received: by 10.90.25.3 with SMTP id 3mr3851411agy.1191240159658; Mon,
01 Oct 2007 05:02:39 -0700 (PDT)
Received: by 10.90.73.18 with HTTP; Mon, 01 Oct 2007 05:02:39 -0700 (PDT)
Date: Mon, 01 Oct 2007 08:02:39 -0400
From: Aaron J Tarter <email***@***.com>
Subject: Re: [comp.lang.java.databases] Derby eclipse install
In-reply-to: <email***@***.com>
Sender: derby-user-return-7747-Dyre.Tjeldvoll=email***@***.com
To: Derby Discussion <email***@***.com>
Reply-to: Derby Discussion <email***@***.com>
Message-id: <email***@***.com>
Precedence: bulk
Delivered-to: mailing list email***@***.com
Received-SPF: pass (athena.apache.org: domain of email***@***.com designates
66.249.82.229 as permitted sender)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com;
s=beta;
h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references;
bh=4nJqjbnOPHbOvXrgOwHuBqbTzFfyBpX2uNx21rwmH58=;
b=J2940lqNvl+JKosK8yjpjMp5jH4PCQ3QHwaZxUI+lJI9r3NaNmnSmAdMYdy2FumCnVPKVyzA2xD+yozG+wjCtvc9REEtRt8d0cG1jho1Eiu6lEd3CsV15wsYeEq1xFK6ItJ7Nv/Rd+WV+Cb4h/lEnR+KILhl/IqM2ciAGF5Ni0g=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta;
h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references;
b=KBegy42M97TSeUa8vxZ7dtGnjhf89y6d+b0LFd9aFTidjgiL/K5RAo/k1IqJ5C74TjjgYSD+doT3a87b4keblO1yJLm5larXr5RV184hGOsU/uHSPdVdnB23vkKEsfVDNwz2mMyaMfmx8F2dF+9PIMt4txaZkutsjA9Hmvw3114=
X-PMX-Version: 5.2.0.264296
X-ASF-Spam-Status: No,
hits=2.0 required=10.0 tests=HTML_MESSAGE,NORMAL_HTTP_TO_IP,SPF_PASS
X-Spam-Check-By: apache.org
X-Virus-Checked: Checked by ClamAV on apache.org
References: <email***@***.com>
Mailing-List: contact email***@***.com; run by ezmlm
List-Post: <mailto:email***@***.com>
List-Unsubscribe: <mailto:email***@***.com>
List-Help: <mailto:email***@***.com>
List-Id: <derby-user.db.apache.org>
Original-recipient: rfc822;email***@***.com
Lines: 91
Xref: khepri29 derby.user:6155
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="===-=-="
--===-=-=
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
You should see the menu items after restarting. If you do not, then open
the eclipse workspace/.metadata/.log to look for any errors/exceptions that
might be causing the problem. Also, you can look in Help>About Eclipse
SDK>Configuration Details at the Plug-in registry section. Each registered
plug-in will be listed there with a status message next to it like
Activated, Resolved, Inactive, etc.
On 10/1/07, email***@***.com <email***@***.com> wrote:
>
> I just realized that I had snipped the actual question in the reply I
> sent to comp.lang.java.databases. Here is the full post. Sorry about
> that.
>
>
>
> ---------- Forwarded message ----------
> From: Russell171 <email***@***.com>
> To:
> Date: Sun, 30 Sep 2007 03:11:49 +0000 (GMT)
> Subject: Derby eclipse install
> The install instructions for Derby 10.3.1.4 in Eclipse 3.3 implies that
> it is as simple as having the Eclipse\plugins directory containing these
> three directories:
> org.apache.derby.core_10.3.1, org.apache.derby.ui_1.1.1, and
> org.apache.derby.plugin.doc_1.1.1, as obtained from extracting the zip
> files. And afterwards, the Apache Derby menu item should appear when the
> project folder is right-clicked.
>
> In my case, that does not happen. There must be something small which is
> understood by experienced users, who write the instructions, that is not so
> obvious for beginners.
>
> Can someone point me in the right direction? Thanks.
>
>
>
> --
> dt
>
> However, experience shows that for many people and many applications a
> dose of paranoia is reasonable - Bjarne Stroustrup
>
>
--
Regards,
Aaron J Tarter
--===-=-=
Content-Type: text/html; charset=iso-8859-1
Content-Disposition: inline
You should see the menu items after restarting. If you do not, then open the eclipse workspace/.metadata/.log to look for any errors/exceptions that might be causing the problem. Also, you can look in Help>About Eclipse SDK>Configuration Details at the Plug-in registry section. Each registered plug-in will be listed there with a status message next to it like Activated, Resolved, Inactive, etc.
<br><br><div><span class="gmail_quote">On 10/1/07, <b class="gmail_sendername"><a href="mailto:email***@***.com">email***@***.com</a></b> <<a href="mailto:email***@***.com">email***@***.com</a>> wrote:
</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style="direction: ltr;">I just realized that I had snipped the actual question in the reply I
<br>sent to comp.lang.java.databases. Here is the full post. Sorry about<br>that.<br><br></div><br><br>---------- Forwarded message ----------<br>From: Russell171 <<a href="mailto:email***@***.com">email***@***.com
</a>><br>To: <br>Date: Sun, 30 Sep 2007 03:11:49 +0000 (GMT)<br>Subject: Derby eclipse install<br>
<div bgcolor="#ffffff">
<div><font face="Arial" size="2">The install instructions for Derby <a href="http://10.3.1.4" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">10.3.1.4</a> in
Eclipse 3.3 implies that it is as simple as having the Eclipse\plugins
directory containing these three directories:</font></div>
<div><font size="-0"><font face="Arial" size="2">org.apache.derby.core_10.3.1,
org.apache.derby.ui_1.1.1, and org.apache.derby.plugin.doc_1.1.1, as obtained
from extracting the zip files. And afterwards, the Apache Derby
menu item should appear when the project folder is
right-clicked.</font></font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">In my case, that does not happen. There must be
something small which is understood by experienced users, who write the
instructions, that is not so obvious for beginners.</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Can someone point me in the right direction?
Thanks.</font></div></div>
<br><br><br>--<br>dt<br><br>However, experience shows that for many people and many applications a<br>dose of paranoia is reasonable - Bjarne Stroustrup<br><br></blockquote></div><br><br clear="all"><br>-- <br>Regards,<br>
Aaron J Tarter
--===-=-=--
--
dt
However, experience shows that for many people and many applications a
dose of paranoia is reasonable - Bjarne Stroustrup
- 15
- An enum mystery solvedI was baffled why the compiler would not let enum constructors access
the enum's static variables.
I consider it a bug, but an understandable bug.
I think the reason is the enum invokes the constructors for the enum
constants in static init code. Somebody was worried that the static
initialisation would not be complete. Yet it is quite safe since the
enum constants are the last bit of static init.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
|
| Author |
Message |
arvind_c_98

|
Posted: 2004-5-10 21:11:00 |
Top |
java-programmer, Java IDEs to deal with security issues
I am Aravind.Can someone suggest some Java and .NET IDEs that have
features which would help in dealing with different security issues
such as buffer overflow,SQL injection,cross site scripting etc...?.
Aravind
|
| |
|
| |
 |
JoshuaBranch AS

|
Posted: 2004-5-13 7:28:00 |
Top |
java-programmer >> Java IDEs to deal with security issues
Aravind wrote:
> I am Aravind.Can someone suggest some Java and .NET IDEs that have
> features which would help in dealing with different security issues
> such as buffer overflow,SQL injection,cross site scripting etc...?.
>
> Aravind
Those issues are all very different, and I'm not sure an IDE is the tool
for managing them. If you are looking for prevention, then developers
understanding those issues is primary. Code review by those that
understand those issues is next. Then, there are tools that can try to
attack your site. Or, you can have someone try to attack your site from
the outside.
Regarding each issue you described:
- Buffer overflow: There are no buffer overflows in Java. The JVM
should always do bounds checking.
- SQL Injection: There are several best practices:
1. Never receive SQL snippets from the client. This includes all
request processing.
2. Only include client supplied parameters in the WHERE clause, and
always on one side of a comparison, representing a value.
4. When possible, use logic to translate minimal client-side
parameters to their full server-side representation. For example,
if there are two possible orders, then have the client supply a 1 or 2,
and then translate those into your corresponding column list used in
your ORDER BY. This way, the client never directly supplies the columns
you are plugging into the SQL.
5. Validate those client supplied parameters. If you have SALES > x
in your WHERE clause, and the client is supplying X, then validate that
X is numeric.
6. Isolate all dynamic SQL generation. This gives you a central
place to enforce the rules that ensure that SQL injection is not
possible. For example, this is where you might translate ordinal values
to actual lists of fields. You might also accept strong-typed
parameters there that will be included carefully in SQL. For the sales
example, it could accept only a number. With this isolation, your web
developers can do no harm because they will reference the safe API.
Someone that understands the security implications can extend the API as
web developer requirements are created.
- Cross-site scripting: This is a tough one, as it is all performed
client-side, and the user usually has to perform actions innocently.
Since cross-site scripting usually steals cookie information, the best
precaution is to
a> not include sensitive information in cookies. With today's
browsers, user's don't need their passwords saved in cookie format.
Absolutely do not store credit card and other sensitive data in cookies.
This should all be stored server-side.
b> do not rely entirely on cookies for security. They are useful for
maintaining session state, but you can add extra features, such as
binding a session to the user's IP address. You then have each request
filtered to verify it is coming from the same IP. When it comes from a
different IP, you invalidate the session and issue a security alert.
There might be remote cases where this is not practical, but I haven't
run into those cases yet. User IP's tend to be static during an HTTP
session. The only drawback is it doesn't protect from user A hijacking
user B behind the same proxy. But, at least you prevent 99.99% of the
world from being able to hijack your user's session.
How can an IDE help you with these issues? They are complex, and
require concerted high level effort in application design. The best
thing to do is develop an application framework that applies the
prevention principles, and standardize on it. Ensure that your
framework does not limit functionality or put an undo burden on
developers, or they might be tempted to work around it to meet a deadline.
___________
Erik Sliman
http://www.JoshuaBranch.com
mailto:email***@***.com
|
| |
|
| |
 |
arvind_c_98

|
Posted: 2004-5-13 16:49:00 |
Top |
java-programmer >> Java IDEs to deal with security issues
JoshuaBranch AS <email***@***.com> wrote in message news:<email***@***.com>...
> Aravind wrote:
> > I am Aravind.Can someone suggest some Java and .NET IDEs that have
> > features which would help in dealing with different security issues
> > such as buffer overflow,SQL injection,cross site scripting etc...?.
> >
> > Aravind
>
> Those issues are all very different, and I'm not sure an IDE is the tool
> for managing them. If you are looking for prevention, then developers
> understanding those issues is primary. Code review by those that
> understand those issues is next. Then, there are tools that can try to
> attack your site. Or, you can have someone try to attack your site from
> the outside.
>
> Regarding each issue you described:
>
> - Buffer overflow: There are no buffer overflows in Java. The JVM
> should always do bounds checking.
>
> - SQL Injection: There are several best practices:
> 1. Never receive SQL snippets from the client. This includes all
> request processing.
> 2. Only include client supplied parameters in the WHERE clause, and
> always on one side of a comparison, representing a value.
> 4. When possible, use logic to translate minimal client-side
> parameters to their full server-side representation. For example,
> if there are two possible orders, then have the client supply a 1 or 2,
> and then translate those into your corresponding column list used in
> your ORDER BY. This way, the client never directly supplies the columns
> you are plugging into the SQL.
> 5. Validate those client supplied parameters. If you have SALES > x
> in your WHERE clause, and the client is supplying X, then validate that
> X is numeric.
> 6. Isolate all dynamic SQL generation. This gives you a central
> place to enforce the rules that ensure that SQL injection is not
> possible. For example, this is where you might translate ordinal values
> to actual lists of fields. You might also accept strong-typed
> parameters there that will be included carefully in SQL. For the sales
> example, it could accept only a number. With this isolation, your web
> developers can do no harm because they will reference the safe API.
> Someone that understands the security implications can extend the API as
> web developer requirements are created.
>
> - Cross-site scripting: This is a tough one, as it is all performed
> client-side, and the user usually has to perform actions innocently.
> Since cross-site scripting usually steals cookie information, the best
> precaution is to
>
> a> not include sensitive information in cookies. With today's
> browsers, user's don't need their passwords saved in cookie format.
> Absolutely do not store credit card and other sensitive data in cookies.
> This should all be stored server-side.
>
> b> do not rely entirely on cookies for security. They are useful for
> maintaining session state, but you can add extra features, such as
> binding a session to the user's IP address. You then have each request
> filtered to verify it is coming from the same IP. When it comes from a
> different IP, you invalidate the session and issue a security alert.
> There might be remote cases where this is not practical, but I haven't
> run into those cases yet. User IP's tend to be static during an HTTP
> session. The only drawback is it doesn't protect from user A hijacking
> user B behind the same proxy. But, at least you prevent 99.99% of the
> world from being able to hijack your user's session.
>
> How can an IDE help you with these issues? They are complex, and
> require concerted high level effort in application design. The best
> thing to do is develop an application framework that applies the
> prevention principles, and standardize on it. Ensure that your
> framework does not limit functionality or put an undo burden on
> developers, or they might be tempted to work around it to meet a deadline.
>
> ___________
> Erik Sliman
> http://www.JoshuaBranch.com
> mailto:email***@***.com
Thanks for the reply.It helped me a lot.
Aravind
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- MySQL Select help neededHi All,
Trying to work out the correct sql statement
If I have a table that contains the column partpostcode and has these
entries,
PE10
PE15
PE1
What I want to do is select those rows where the partpostcode exists in
a given parameter,...
i.e something liek.
Select * where partpostcode IS CONTAINED IN "PE10 1AF"
sadly there are no IS CONTAINED IN keywords, but i'm not sure how to do
it using LIKE or IN...
Any comments ?
Thanks,
- 2
- Problem wih the progressbar in statusbar with frames in IEHi, i've an anoying problem.
SITUATION
I created a webpage with CSP (crystal Enterprise ASP pages) and
Javascript. The page consists of frames. When someone pushes a button
in one frame (grouping of cubes and reports) i load another frame with
report and cube links. When someone pushes a report or a Cube link an
ActiveX or a DHTML viewer is started.
THE PROBLEM
The problem is that when someone pushes a button in the GroupFrame the
reports and cube links are loaded correctly, but the progressbar below
in the statusbar keeps running. It's showing that not everything is
loaded yet, but everything is loaded!!!
The next time when i push a button in the group frame all the links
are corerectly loaded but now there's is no progressbar (so correct)
and then the next time when i push the link in the groupframe again
Again a progressbar is continously shown (what the heck??!!)
It has something to do with frames because when i load the information
in a pop up screen it doesn't show a progressing progress bar.
I hope that someone can help me with this problem..
Thx
Hennie
- 3
- Drag and drop an URLHello,
can you give an advice please? I learned how to drag and drop an URL from my
web browser to my Java application. But it does not work as I would like.
For example if I drop URL http://java.sun.com/ my application receives
http://java.sun.com/Java Technology where "Java Technology" is not the part
of URL but page title. Is there any way how to receive pure URL without the
page title? I worry that by cutting off everything after the last slash I
can damage some URLs. I use DataFlavor.stringFlavor.
Thank you! Vojta
- 4
- Setting column titles in JTable, TableDialogEditDemo exampleHello,
This is no doubt a really dumb question, but I don't see where in the
example TableDialogEditDemo.java (from Sun's Java examples) that we "tell"
the table to have one fixed row, to make it grey, and to use getColumnName()
for the column headers? (Stated another way, what would I do differently if
I didn't want the column titles to be grey, for instance?) The full java
listing is below.
Thanks,
Richard Ulrich
/*
* TableDialogEditDemo.java is a 1.4 application that requires these files:
* ColorRenderer.java
* ColorEditor.java
*/
import javax.swing.JComponent;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.table.AbstractTableModel;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
/**
* This is like TableDemo, except that it substitutes a
* Favorite Color column for the Last Name column and specifies
* a custom cell renderer and editor for the color data.
*/
public class TableDialogEditDemo extends JPanel {
private boolean DEBUG = false;
public TableDialogEditDemo() {
super(new GridLayout(1,0));
JTable table = new JTable(new MyTableModel());
table.setPreferredScrollableViewportSize(new Dimension(500, 70));
//Create the scroll pane and add the table to it.
JScrollPane scrollPane = new JScrollPane(table);
//Set up renderer and editor for the Favorite Color column.
table.setDefaultRenderer(Color.class,
new ColorRenderer(true));
table.setDefaultEditor(Color.class,
new ColorEditor());
//Add the scroll pane to this panel.
add(scrollPane);
}
class MyTableModel extends AbstractTableModel {
private String[] columnNames = {"First Name",
"Favorite Color",
"Sport",
"# of Years",
"Vegetarian"};
private Object[][] data = {
{"Mary", new Color(153, 0, 153),
"Snowboarding", new Integer(5), new Boolean(false)},
{"Alison", new Color(51, 51, 153),
"Rowing", new Integer(3), new Boolean(true)},
{"Kathy", new Color(51, 102, 51),
"Knitting", new Integer(2), new Boolean(false)},
{"Sharon", Color.red,
"Speed reading", new Integer(20), new Boolean(true)},
{"Philip", Color.pink,
"Pool", new Integer(10), new Boolean(false)}
};
public int getColumnCount() {
return columnNames.length;
}
public int getRowCount() {
return data.length;
}
public String getColumnName(int col) {
return columnNames[col];
}
public Object getValueAt(int row, int col) {
return data[row][col];
}
/*
* JTable uses this method to determine the default renderer/
* editor for each cell. If we didn't implement this method,
* then the last column would contain text ("true"/"false"),
* rather than a check box.
*/
public Class getColumnClass(int c) {
return getValueAt(0, c).getClass();
}
public boolean isCellEditable(int row, int col) {
//Note that the data/cell address is constant,
//no matter where the cell appears onscreen.
if (col < 1) {
return false;
} else {
return true;
}
}
public void setValueAt(Object value, int row, int col) {
if (DEBUG) {
System.out.println("Setting value at " + row + "," + col
+ " to " + value
+ " (an instance of "
+ value.getClass() + ")");
}
data[row][col] = value;
fireTableCellUpdated(row, col);
if (DEBUG) {
System.out.println("New value of data:");
printDebugData();
}
}
private void printDebugData() {
int numRows = getRowCount();
int numCols = getColumnCount();
for (int i=0; i < numRows; i++) {
System.out.print(" row " + i + ":");
for (int j=0; j < numCols; j++) {
System.out.print(" " + data[i][j]);
}
System.out.println();
}
System.out.println("--------------------------");
}
}
/**
* Create the GUI and show it. For thread safety,
* this method should be invoked from the
* event-dispatching thread.
*/
private static void createAndShowGUI() {
//Make sure we have nice window decorations.
JFrame.setDefaultLookAndFeelDecorated(true);
//Create and set up the window.
JFrame frame = new JFrame("TableDialogEditDemo");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//Create and set up the content pane.
JComponent newContentPane = new TableDialogEditDemo(); //This is an
extension of JPanel
newContentPane.setOpaque(true); //content panes must be opaque
frame.setContentPane(newContentPane);
//Display the window.
frame.pack();
frame.setVisible(true);
}
public static void main(String[] args) {
//Schedule a job for the event-dispatching thread:
//creating and showing this application's GUI.
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
createAndShowGUI();
}
});
}
- 5
- Classes in jar can't load - why?I've just created a jar-file containing some classes that I've made. I have
made this jar file in Idea IntelliJ's AntBuild. However, when I try to use
the jar file in a project I get the following message:
cannot access Teleadress.DMP2004.DTDClasses.CompanyResult
bad class file
D:\IdeaProjects\DTDFileTest\lib\DMP2004_DTDClasses.jar(Teleadress/DMP2004/DT
DClasses/CompanyResult.class)
class file contains wrong Class: CompanyResult
Please remove or make sure it appears in the correct subdirectory of the
classpath
The thing is that it works perfectly when I open the jar-file with WinZip
and copy all the class-files to the classes folder in my project. Moreover
when I write Teleadress.DMP2004.DTDClasses. the autocomplete function shows
a list of all my classes including CompanyResult. However, as soon as I
chose CompanyResult it turns red meaning it can't be found. This is also the
case with all the other classes in my jar.
Why is this? I've checked other jars and the only thing that is different is
the manifest-file which in my case is more or less empty.
- 6
- Casting from Object to intHi there!
I'm developing a method which receives two Object parameters, and I need
to cast one of them to int. How can I do it?
public method(Object a, Object b){
this.b = (int)b; // doesn't work!
this.a = a;
}
Thanks in advance!
- 7
- CLASSPATH help using classes and jar files.I am new to java, what is the correct way to define CLASSPATH for the
files like test.class or test.jar. In unix if I want to provide a
PATH to an executable like /userfiles/test.exe I would do the
following:
PATH=/userfiles
This provides a directory to search for.
In JAVA, I thought it was the same, but in some instances on our system
I see it point to the exact class file. For example:
CLASSPATH=/userfiles/test.class
Shouldn't it be CLASSPATH=/userfiles ?
The same for JAR files. Should it be CLASSPATH=/userfiles, or
CLASSPATH=/userfiles/test.jar
Thanks.
- 8
- Eclipse and assertI am using Eclipse. I want to enable assert in my code. I alrready have
the compiler set to use Jave 5.0. How do I configure the build and run
to use the correct switch to enable assert evaluations?
- 9
- selective page accessI just need a, "it can be done" answer. I want to build a web
application, which will allow users to access pages, based on four
different user attributes, namely, "department", "trading partner
type", "designation", and "customer". I want to allow declarative
access, meaning I want even lay administrators to edit a configuration
text file so that a new or old user's profile can be changed. Can this
be done just with Tomcat and Struts, or do I need to used EJBs?
Thanks,
Yasaswi
- 10
- JGSS Kerberos issuesI'm trying to implement single sign-on using jCIFS. I'm having
difficulties with Kerberos on some clients. For some reason, the web
browser on my machine defaults to NTLM authentication, and that's
working fine. The problem I'm having is when a client tries to use
Kerberos to authenticate. I've tried setting jCIFS flags to turn off
Kerberos, to no avail. I've read the documentation and configured
Kerberos accordingly. I just can't get past this error. Relevant info
below:
Environment:
JBoss 4.0.1sp1/WinXP/JDK 1.4.2_07
Kerberos properties:
javax.security.auth.useSubjectCredsOnly=false
jcifs.http.enableNegotiate=false
java.security.krb5.realm=VTIC.COM
java.security.krb5.kdc=agil02.vtic.com
sun.security.krb5.debug=true
jcifs.spnego.servicePrincipal=HTTP/email***@***.com
jcifs.spnego.servicePassword=xxxxxxxxx
javax.security.auth.useSubjectCredsOnly=false
Error message:
2006-03-03 10:41:45,043 INFO [STDOUT] Negotiate
YIIE6AYGKwYBBQUCoIIE3DCCBNigJDAiBgkqhkiC9xIBAgIGCSqGSIb3EgECAgYKKwYBBAGCNwICCqKCBK4EggSqYIIEpgYJKoZIhvcSAQICAQBuggSVMIIEkaADAgEFoQMCAQ6iBwMFACAAAACjggPBYYIDvTCCA7mgAwIBBaEKGwhWVElDLkNPTaImMCSgAwIBAqEdMBsbBEhUVFAbE3dzLWx1bXBraW4udnRpYy5jb22jggN8MIIDeKADAgEXoQMCARGiggNqBIIDZrffE8Fnkd+d+z4KN/T3rGs/8tZ84bxy3aR16SMrfZicPfsA0pyMsFjwpl9KTDZt8LnT6ujlph5xyEC9or5SswLB/XNSe23uuEBX7F80qZZhvcVOkMlaxI8L5xK+773TNMqCYRL0UGWI2ac8PhbrN6Q5RSatAh4sf4aF54ZcvkRH70Dt6r3oH2blBQ4l6oGk4TMZeXw6HIabNFi1/11kcbFfifeWS0+M4hPC9OD+9h8GA/Q1CL0LAWPr+MWT4lZeZ95XQWjNUQh0ZbKtiaaB8j5nQtwhNhRAeu+jay35NH0DnpZLwklCf8sqP+3AfTLBcGFcO7hWfxBMoae4vYfZ1MIkNlInmM+nUBEhhRJ1Vy0KR6/A6TxUo7tuifXpyhmOZPYYkx7xUmqR7F3zmezq60BLS5vjYcVkxlJa5la8jh6PZ/NWrOKR/stUhNyjLCO+TSuy8ZJUjJfaK7V6ONpqSvagHU9Qws/az5CvH/csC01MzhaQuuPfmug5Ebl2VxC2OnOtMi7+9MnDu6zWyUHhvNYGNcsG0KxK6WzP6PGvaQFwlK1qoed2w/8ucZSrjiA4jVZw2ferpc5uZAMyi0aczJwk/xTjPS+yLb4VOH65+TrUdRlCOp9RMNz/A5kzI0KorrEuiN6dptP/Rs5lVjMwBSWQp5/+QB22lHPeP6l0Gex15i+bbQ1ljYdYL76ApzvvimRLjd1I4DNmNNMkuWsXNXHaTCXSDbO+quktPpZS5uw1kIEFNSSQ5nDmAcxbBL0T8SbHirs4kC4ZPhRsYnbeSIQFHpkrEAL699wVvNxairKh/3i6GuVx2Ct2u8xHUkoJs/csawLJigJu1c0FXIxTUEP6ak7aCpTtC9FFbERKJi66Pr710s7aiq0UeCGCP6jKyb/6KsjgL98DrdJiwwHFqiYZDqud7IwAn1HI+3VHI155kw6B2ciRtkRfsHfiv3V7oQoY8fM3Uy90ksV4TJ8tPNvwIsoZo62u4VBcc7d+fYHa1hSM2n2OYUnqVzN5fIG2fodInSMCzRVdrfx8e8HCGkXGqLUkSojNwqa/Paswa5V4+QuXtkGda+htIJyfHbNM6F4AxXXk0f0Ti0RpKL/0fWfJswL7kkwgQ8J8lVeDNXoJZSOdIcN4u10i3E95JoENjPh0m7r9paSBtjCBs6ADAgEXooGrBIGoYcaOOfV1qU0ouvj9Vv6x07iOih9H+UMZknk/u4YSzMySrVrQfaXNh0bZEO/vJ6EF9WEOSWfkjbjxTtOkMdJlyKA6VZHqwIfT3b9E0eL/I19uG8nYl4qM1OaQ2m3JoBscIEP8dTDu23910B9svUw6V8NsjGmOSVB3FMkj3iBQU0Pmvh9igKfbQEt6bs3NReSBlEZwvk/9Z1TH+3sa6AQNNcCVuhreuXXK
2006-03-03 10:41:58,715 INFO [STDOUT]
jcifs.spnego.AuthenticationException: Error performing Kerberos
authentication: java.lang.reflect.InvocationTargetException
2006-03-03 10:41:58,715 INFO [STDOUT] at
jcifs.spnego.Authentication.processKerberos(Authentication.java:447)
2006-03-03 10:41:58,715 INFO [STDOUT] at
jcifs.spnego.Authentication.processSpnego(Authentication.java:346)
2006-03-03 10:41:58,715 INFO [STDOUT] at
jcifs.spnego.Authentication.process(Authentication.java:235)
2006-03-03 10:41:58,715 INFO [STDOUT] at
jcifs.http.Negotiate.authenticate(Negotiate.java:47)
2006-03-03 10:41:58,715 INFO [STDOUT] at
com.agilquest.onboard.auth.IntegratedSsoHelper.authenticateNtlm(IntegratedSsoHelper.java:154)
2006-03-03 10:41:58,715 INFO [STDOUT] at
com.agilquest.onboard.sso.IntegratedSsoFilter.doFilter(IntegratedSsoFilter.java:93)
2006-03-03 10:41:58,715 INFO [STDOUT] at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
2006-03-03 10:41:58,715 INFO [STDOUT] at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
2006-03-03 10:41:58,715 INFO [STDOUT] at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
2006-03-03 10:41:58,715 INFO [STDOUT] at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
2006-03-03 10:41:58,715 INFO [STDOUT] at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
2006-03-03 10:41:58,715 INFO [STDOUT] at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
2006-03-03 10:41:58,715 INFO [STDOUT] at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
2006-03-03 10:41:58,715 INFO [STDOUT] at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
2006-03-03 10:41:58,715 INFO [STDOUT] at
org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:66)
2006-03-03 10:41:58,731 INFO [STDOUT] at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
2006-03-03 10:41:58,731 INFO [STDOUT] at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
2006-03-03 10:41:58,731 INFO [STDOUT] at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
2006-03-03 10:41:58,731 INFO [STDOUT] at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:54)
2006-03-03 10:41:58,731 INFO [STDOUT] at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
2006-03-03 10:41:58,731 INFO [STDOUT] at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
2006-03-03 10:41:58,731 INFO [STDOUT] at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
2006-03-03 10:41:58,731 INFO [STDOUT] at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
2006-03-03 10:41:58,731 INFO [STDOUT] at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
2006-03-03 10:41:58,731 INFO [STDOUT] at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
2006-03-03 10:41:58,731 INFO [STDOUT] at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535)
2006-03-03 10:41:58,731 INFO [STDOUT] at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
2006-03-03 10:41:58,731 INFO [STDOUT] at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
2006-03-03 10:41:58,731 INFO [STDOUT] at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
2006-03-03 10:41:58,731 INFO [STDOUT] at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
2006-03-03 10:41:58,731 INFO [STDOUT] at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
2006-03-03 10:41:58,731 INFO [STDOUT] at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
2006-03-03 10:41:58,731 INFO [STDOUT] at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
2006-03-03 10:41:58,731 INFO [STDOUT] at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
2006-03-03 10:41:58,731 INFO [STDOUT] at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
2006-03-03 10:41:58,731 INFO [STDOUT] at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
2006-03-03 10:41:58,731 INFO [STDOUT] at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
2006-03-03 10:41:58,731 INFO [STDOUT] at
java.lang.Thread.run(Thread.java:534)
2006-03-03 10:41:58,731 INFO [STDOUT] Caused by:
java.lang.reflect.InvocationTargetException
2006-03-03 10:41:58,731 INFO [STDOUT] at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2006-03-03 10:41:58,731 INFO [STDOUT] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2006-03-03 10:41:58,731 INFO [STDOUT] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2006-03-03 10:41:58,731 INFO [STDOUT] at
java.lang.reflect.Method.invoke(Method.java:324)
2006-03-03 10:41:58,731 INFO [STDOUT] at
jcifs.spnego.Authentication$ServerAction.run(Authentication.java:511)
2006-03-03 10:41:58,731 INFO [STDOUT] at
jcifs.spnego.Authentication.processKerberos(Authentication.java:430)
2006-03-03 10:41:58,731 INFO [STDOUT] ... 37 more
2006-03-03 10:41:58,746 INFO [STDOUT] Caused by: GSSException: No
valid credentials provided (Mechanism level: Failed to find any
Kerberos Key)
2006-03-03 10:41:58,746 INFO [STDOUT] at
sun.security.jgss.krb5.Krb5AcceptCredential.getInstance(Krb5AcceptCredential.java:82)
2006-03-03 10:41:58,746 INFO [STDOUT] at
sun.security.jgss.krb5.Krb5MechFactory.getCredentialElement(Krb5MechFactory.java:75)
2006-03-03 10:41:58,746 INFO [STDOUT] at
sun.security.jgss.GSSManagerImpl.getCredentialElement(GSSManagerImpl.java:149)
2006-03-03 10:41:58,746 INFO [STDOUT] at
sun.security.jgss.GSSCredentialImpl.add(GSSCredentialImpl.java:334)
2006-03-03 10:41:58,746 INFO [STDOUT] at
sun.security.jgss.GSSCredentialImpl.<init>(GSSCredentialImpl.java:44)
2006-03-03 10:41:58,746 INFO [STDOUT] at
sun.security.jgss.GSSManagerImpl.createCredential(GSSManagerImpl.java:102)
2006-03-03 10:41:58,746 INFO [STDOUT] ... 43 more
Any help is appreciated,
Chris
- 11
- ant-regexpI would like to use the following regexp:
<replaceregexp flags="g" match="\n\[\s&&[^\n]]+" replace="\\\\n">
<fileset dir="/home/public/dbs/regexp"
includes="applicationLogMessages.properties"/>
</replaceregexp>
unfortunately, eclipse marks this as an error as soon as i type a "&".
my goal is to replace all NEWLINEs where the new line starts with a
WHITESPACE with a \n, but keep it on the same line.
if the next line is empty(simply a NEWLINE) i want to do nothing!
how can i achieve this (without using &)?
thankful for all hints.
david
- 12
- Need Javahi i just reinstalled my windows xp and went to go on a site on the internet
and it said i need to install java.
any ideas where to get this from?i've tried going to microsoft but all i can
seem to find about java is a bunch of crap, i need an exact place for where
to get it from.
any ideas would help
cheers
blair
- 13
- Java and X509 Certificates .. help!!Hello,
I need some help! I would like to know if it is possible to get, from
the browser (web client), the server X509 certificate used by it in an
already SSL established session with the client (browser). As in the
server side, with your application you can get the client X509
certificate used by the client in order to authenticate himself, it
should be an analogous process or API in the web client to get the
server certificate.
The aim is to develop some client script (preferable JavaScript, but
could be with Java Applet) in order to deal with the server X509
certificate fields.
Can you help me? Thanks in advance!!
Best regards,
- 14
- Consuming Web ServicesCan someone point me to a decent resource about consuming a web service
in Java? Or maybe reccomend a book?
Thanks,
Scott
- 15
- Broken behavior of java.io.File()I'm seeing several examples of broken behavior with java.io.File():
* mkdirs() sometimes returns false, despite succeeding (the directories
exist afterward on the
filesystem)
* exists() and isDirectory() sometimes return false when called on a
File object right after a
mkdirs() after which the directory and its parents existed, as
observed using Winblows
Exploder.
What is going on here? Is there even a way to test for the existence of
a directory with 100% accuracy?
|
|
|