| Applet won't work on the Internet, yet it works on my hard drive!!! |
|
 |
Index ‹ java-programmer
|
- Previous
- 1
- [PATCH] jdk1.4.2, getsockname(), and ECONNRESET
--Apple-Mail-4--662330866
Content-Type: multipart/mixed; boundary=Apple-Mail-3--662330884
--Apple-Mail-3--662330884
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=ISO-8859-1;
format=flowed
In j2se/src/solaris/native/sun/nio/ch/Net.c, getsockname() is called to=20=
determine the local address and port of a socket.
Under both Linux and Solaris, getsockname() will only fail if invalid=20
arguments are provided. If getsockname() returns an error, Java throws=20=
a java.lang.Error.
On FreeBSD, getsockname() will also return an error with errno set to=20
ECONNRESET if the connection has been reset by the peer. Consequently,=20=
Java throws a java.lang.Error.
The only way to handle this without an API change is to check for=20
ECONNRESET; In the attached patch, if errno is set to=A0ECONNRESET we=20
fill in the sockaddr structure with a port of 0, an IP of INADDR_ANY,=20
and clear out the error.
Also, any comments on the thread-safe resolver patch?
Thanks,
-landonf
--Apple-Mail-3--662330884
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream; x-unix-mode=0644;
name="getsockname-1.diff"
Content-Disposition: attachment;
filename=getsockname-1.diff
Only in getsockname: cscope.out
diff -ru bsdjdk/j2se/src/solaris/native/sun/nio/ch/Net.c getsockname/j2se/src/solaris/native/sun/nio/ch/Net.c
--- bsdjdk/j2se/src/solaris/native/sun/nio/ch/Net.c Fri May 13 18:04:33 2005
+++ getsockname/j2se/src/solaris/native/sun/nio/ch/Net.c Sun May 29 01:32:32 2005
@@ -118,8 +118,30 @@
SOCKADDR sa;
int sa_len = SOCKADDR_LEN;
if (getsockname(fdval(env, fdo), (struct sockaddr *)&sa, &sa_len) < 0) {
+#ifdef _BSD_SOURCE
+ /*
+ * XXXBSD:
+ * ECONNRESET is specific to the BSDs. We can not return an error,
+ * as the calling Java code with raise a java.lang.Error given the expectation
+ * that getsockname() will never fail. According to the Single UNIX Specification,
+ * it shouldn't fail. As such, we just fill in generic values.
+ */
+ if (errno == ECONNRESET) {
+ struct sockaddr_in *sin;
+ sin = (struct sockaddr_in *) &sa;
+ bzero(sin, sizeof(*sin));
+ sin->sin_len = sizeof(struct sockaddr_in);
+ sin->sin_family = AF_INET;
+ sin->sin_port = htonl(0);
+ sin->sin_addr.s_addr = INADDR_ANY;
+ } else {
+ handleSocketError(env, errno);
+ return -1;
+ }
+#else /* _BSD_SOURCE */
handleSocketError(env, errno);
return -1;
+#endif /* _BSD_SOURCE */
}
return NET_GetPortFromSockaddr((struct sockaddr *)&sa);
}
@@ -131,8 +153,30 @@
int sa_len = SOCKADDR_LEN;
int port;
if (getsockname(fdval(env, fdo), (struct sockaddr *)&sa, &sa_len) < 0) {
+#ifdef _BSD_SOURCE
+ /*
+ * XXXBSD:
+ * ECONNRESET is specific to the BSDs. We can not return an error,
+ * as the calling Java code with raise a java.lang.Error with the expectation
+ * that getsockname() will never fail. According to the Single UNIX Specification,
+ * it shouldn't fail. As such, we just fill in generic values.
+ */
+ if (errno == ECONNRESET) {
+ struct sockaddr_in *sin;
+ sin = (struct sockaddr_in *) &sa;
+ bzero(sin, sizeof(*sin));
+ sin->sin_len = sizeof(struct sockaddr_in);
+ sin->sin_family = AF_INET;
+ sin->sin_port = htonl(0);
+ sin->sin_addr.s_addr = INADDR_ANY;
+ } else {
+ handleSocketError(env, errno);
+ return NULL;
+ }
+#else /* _BSD_SOURCE */
handleSocketError(env, errno);
return NULL;
+#endif /* _BSD_SOURCE */
}
return NET_SockaddrToInetAddress(env, (struct sockaddr *)&sa, &port);
}
--Apple-Mail-3--662330884--
--Apple-Mail-4--662330866
content-type: application/pgp-signature; x-mac-type=70674453;
name=PGP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (Darwin)
iD8DBQFCuF1nlplZCE/15mMRAlrDAJ9rqNEWNaX6iAmWW4AQEZUVz4lX1gCfVig7
+Kz1+xJm32a/fQVBsibMm2Y=
=tLoZ
-----END PGP SIGNATURE-----
--Apple-Mail-4--662330866--
- 1
- Generics error messagesRoedy Green <email***@***.com> writes:
> Let me see if I follow:
>
> Collection<? extends Automobile> a = new ArrayList<Automobile>( 10 );
>
> a.add( new Automobile() );
Not allowed. The signature of "add" on Collection<T> is "void add(T)".
The type of "a" doesn't say what type parameter was used to create the
instance that it refers to, only that the parameter was some subclass
of Automobile.
The instance might be an ArrayList<Car>. In that case, the signature
of the actual add method would be "void add(Car)" and it would be
an error to pass an Automobile to it.
> a.add( new Car() ); // blocked
Also blocked, for the same reason, since the type parameter of the
actual instance might not be Car or a superclass of Car.
Generally, if something is only known to have type
SomeClass<? extends Foo>
then you can't call methods that expects values of the type
parameter's type, because you don't know what type that is.
Opposite, if something is only known to have a type
SomeClass<? super Foo>
then you can't (as usefully) call methods that return something
of the type paremeter's type (however, you do know that it's
at least an Object :).
> So strangely Collection<? extends Automobile> means the exact
> opposite.
>
> it means Collection<only Automobile no Cars or Trucks>
No, Liskov's Substitution Principle still holds. You can use an
instance of Car anywhere you expect an Automobile, because a Car *is*
an Automobile. If you have a Collection that you can add Automobiles
to, you can also add Cars. A type of such a collection would be
Collection<? super Automobile>
or just
Collection<Automobile>
What doesn't hold is that Collection<Car> is a Collection<Automobile>.
Neither is a subtype of the other. Instead you have a subtype diagram
that looks like this:
Collection<? extends Automobile>
/ \
Collection<Automobile> Collection<? extends Car>
/
Collection<Car>
(and:
Collection<? super Car>
/ \
Collection<? super Automobile> Collection<Car>
\
Collection<Automobile>
which doesn't draw very well on the same diagram :)
/L
--
Lasse Reichstein Nielsen - email***@***.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
- 1
- JKS and PKCS12Could someone point me to some good documentation on the differences
between JKS and PKCS12.
Thanks
- 1
- convert DER encoded cert to PEM encoded certhi
i read a certificate from a smartcard with the pkcs#11 API. i get the
certificate in a hex string DER encoded. how can i convert a hex-string
from a DER encoded certificate to e PEM encoded certificate.
i try the method Certificate cert = cf.generateCertificate(fis);
but i works just for base64 encoded certs
-----BEGIN CERTIFICATE-----
MIIDgjCCAuugAwIBAgIBGzANBgkqhkiG9w0BAQUFADB+MQswCQYDVQQGEwJDSDEL
MAkGA1UECBMCWkgxEDAOBgNVBAcTB1p1ZXJpY2gxFTATBgNVBAoTDE1hcmMgVGVz
dCBDQTEXMBUGA1UECxMOVGVzdCBDQ .....
-----END CERTIFICATE-----
i have this sting:
30820345308202aea003020102020102300d06092a864886f70d01 ....
has anyone a idea?
thanks
carla
- 1
- Applet looking for class file improperlyI was having a peek at the error log on my website and discovered all
kinds of errors of this form:
[Thu Jan 12 01:13:59 2006] [error] [client 84.58.217.241] File does
not exist:
net:/com/mindprod/www/jgloss/com.html/mindprod/borders/Borders.class,
referer: http://mindprod.com/jgloss/border.html
that corresponds to
<applet code="com.mindprod.borders.Borders.class"
archive="../applets/borders.jar" width="430" height="250" alt="JPanel
Borders">
Need Java to see this.
</applet><p>
It looks like the browser is asking the server for the class even
though it has been given an archive. I don't know what browser(s) do
this.
Perhaps I should not tell it the main class, and trust the manifest.
Even so the name is screwed up. They added an .html to the first leg
of the package name.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
- 1
- Real world use of CVS within JDeveloperDoes anyone have anything good to say about JDeveloper's use of CVS?
I've previously used WSAD but due to constraints (OracleAS webapp) I
want to use JDev but I'm trying to see how a team of developers would
really work as a team with CVS code control.
I've just checked in an edit on a file on one of the team PCs but I
can't see any quick and convenient way of detecting the change on
another PC. Worse still - when I edited the same file on another PC and
then tried to commit the change - it just throws an error message
stating "failed to commit to the CVS repository" / "cvs server:
Up-to-date check failed for ... cvs [server aborted]: correct above
errors first!"
This then forces me down the line of going back to find the jdev 'cvs
update' menu option to merge the changes together - and then re-edit
the CVS entries to re-fix the code. ... And then the update doesn't let
me edit the differences - it's all or nothing with jdev!
This is all a little high-maintenance; WSAD does it so much better
(with comparison edits and allowing you to selectively copy parts of
the file changes instead of the whole thing.
Does this sound familiar or have I got this wrong?
Any thoughts on a better way of doing things if I just can't change
IDE.
Many thanks
- 3
- JTable column headers - how?How do you show column headers on a JTable. I'm using j2se 5.0.
I thought this would do it;
// Sets up the table.
private JTable setupTable()
{
// The columns and data.
Vector<String> columns= new Vector<String>();
Vector<Vector> data= new Vector<Vector>();
// Get the columns.
// Note well: this relies on SyslogRecord knowing it's own data
members.
String[] dataMembers= SyslogRecord.getDataMemberNames();
// First we want a "Seen" column.
columns.add("Seen");
// Now add the rest.
for (int i= 0; i < dataMembers.length; i++)
columns.add(dataMembers[i].toString());
// Add the data
Iterator it= syslog.iterator();
while (it.hasNext())
{
Vector<String> v= new Vector<String>();
SyslogRecord sr= (SyslogRecord)it.next();
// Add the "Seen" value 1st.
v.add("No");
v.add(DateWrapper.toString(sr.getDate()));
v.add(sr.getMachine());
v.add(sr.getUser());
v.add(sr.getMessage());
data.add(v);
}
// Need to set the data model for the table.
DefaultTableModel tModel= new DefaultTableModel();
tModel.setDataVector(data,columns);
JTable jt= new JTable();
jt.setModel(tModel);
return jt;
}
This compiles fine but when I run it, I get all of my data, but no
column headers!
Any ideas?
Thanks,
John
- 4
- Transpose in javaHi, I have a large table in postgres database. I need to create a
screen in Java to view this table but it hast to be transposed. I'm
wondering if it's better to transpose it in Postgres or Java could do
it for me. Which is a better approach? What is the best way to
transpose a table in Java? What is the best way to transpose it in
Postgress.
Your help is greatly appreciated.
Thanks
NK
- 5
- Web Usage MiningHi friends,
I am working on the project of Web usage mining. I am currently doing
the below modules..
1. Users next request prediction.
2. Transasction Clustering using k - means cluster algorithm.
For the above i have used server log data as a data set in ECLF. I
need ur suggestions and discussions reg the above. Is anybody
interested in working with WUM or did some work in WUM.. U can free to
share ur experience and difficulties you faced during the projects..
Advance Thanks...
Reg,
Seenu
- 6
- Smoking assertions?With regard to assertions it appears that the compiler default has
changed from 1.4 to 1.5. The 1.5 default compiles as-if "-source
1.5" instead of the old 1.4 way "-source 1.3".
All well and good but 1.5 doesn't appear to let me compile with
"-source 1.3" to have an identifier named "assert". Apparently you
could do this with 1.4. If I try to 1.5 compile with "-source 1.3"
it returns the error that "assert is a keyword, try compiling
with -source 1.4, blah blah".
Does anybody know if this is correct and why they removed the
ability to compile as 1.3?
- 7
- carriage return in hex 0DHi,
I need some help in writing Java code in representing carriage returns
in Hex 0D. I've written a program in Java on an Unix system that
passes data to a Stratus machine via TCP/IP socket. The data I send to
the Stratus box needs to have carriage returns in it, which I've
written in Java as "\r", but the Stratus box does not seem to
recognize it. It is expecting a hex 0D instead.
Does anyone know how to code in Java to pass a hex 0D?
Thanks in advance for any advice you can provide.
Pat
- 10
- Who is the best WebSphere Studio or Oracle JDeveloper??Can anybody tell me which IDE tools, Web Sphere, JDeveloper or etc, is the
best for the enterprise applications.
I know that JDEveloper have good IDE for map database object but I am
interesting for web presentation, which has the best framework part for web
component, JSP, servlet and etc. I know that in WebSphereStudio can put
plug-in for Struts framework, but it's look very difficult for develop and
support.
ilica
_________
"If A is a success in life, then A equals x plus y plus z. Work is x; y is
play; and z is keeping your mouth shut."
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.515 / Virus Database: 313 - Release Date: 1.9.2003
- 10
- Java 3D without OpenGL or Direct3D?Hello,
I'd like to use Java 3D applications on my Windows 2000 notebook that
has not got a 3D graphic adapter.
Is it possible to get Java 3D run using software rendering without 3D
acceleration? This mode is possible in most of computer games so I
thought this might be possible with Java 3D, too.
Best regards,
Sebastian
- 10
- JZEE.COM for J2EE ?
Hi,
I'm selling the domain JZEE.COM. "JZEE" appears to be the popular, spoken
expression of Sun's J2EE product, so it might make a good domain for a Java
forum or the like. Anyway, I'm keener to see the domain used appropriately
than getting a few extra $$$ for it. It will not be expensive.
http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=3080246726
Thanks,
Simon Sheppard
- 11
- Printing from a text panei am making a small RTF word processor and trying to print from a
JTextPane.The setPrintable method is giving me problems as i dont know
what to pass to it
protected void printData()
{
getJMenuBar().repaint();
try
{
PrinterJob printJob = PrinterJob.getPrinterJob();
printJob.setPrintable();
if(!printJob.printDialog())
return;
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR ) );
printJob.print();
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR ) );
}
catch(PrinterException e)
{
e.printStackTrace();
System.err.println("Printing error" + e.toString() );
}
}
|
| Author |
Message |
gajo

|
Posted: 2004-3-2 4:17:00 |
Top |
java-programmer, Applet won't work on the Internet, yet it works on my hard drive!!!
Hi!
I have uploaded this (first in my life) applet on the Internet, along with
the HTML file for its viewing. On my hard drive I've opened the HTML with
Internet Explorer and Opera, and it works ok. Then I uploaded it on the
internet, and when I opened the Web site I got an "Invalid bytecode" message
in Opera. I've contacted the owner of the site and he says he has also
downloaded my html and .class on his hard drive and it ain't working for
him.
So what am I doing wrong? Is it that I have compiled with Java 1.4.1? I've
also uploaded the files on another web space provider, and it didn't work
there either.
This is the url:
http://www.freewebs.com/csabaland/java/pogadjanje_reci.html
You can also download the .class and .java, which is reci.java, and check it
out yourself.
Can someone tell me why isn't this working?
Gajo
|
| |
|
| |
 |
Andrew Thompson

|
Posted: 2004-3-1 9:15:00 |
Top |
java-programmer >> Applet won't work on the Internet, yet it works on my hard drive!!!
On Mon, 1 Mar 2004 21:16:35 +0100, gajo wrote:
> Hi!
>
> I have uploaded this (first in my life)
It's a pity you cannot be
so selective in your
multi-posting. Please do not
multi-post.
I will assume Sudsy's answer on
c.l.j.p solved the problem.
--
Andrew Thompson
* http://www.PhySci.org/ Open-source software suite
* http://www.PhySci.org/codes/ Web & IT Help
* http://www.1point1C.org/ Science & Technology
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- Question about BigIntegers and byte[] inputI have a byte[] as an input
8B F2 99 7D 67 F1 7C 15 B2 99 2C 2E 33 DD C6 65
2D CD E7 2B
and I feed it into a BigInteger so that I can do simply compares and
easy formatting. However, when I call the toString(16) I get
74 0d 66 82 98 0e 83 ea 4d 66 d3 d1 cc 22 39 9a d2 32 18 d5
I am sure, in it's own way, it is "right" but I need to understand why
this is occurring. Since these values represent hashes I will be for
sure asked by they are the same as what was recorded for them.
Christian
http://christian.bongiorno.org
- 2
- UML to JavaHello all,
Does anybody knows a good tutorial for beginners to Make java code out of
UML?
Irlan
- 3
- static methods dont inherit (was: Constructor inheritance)"Andrew McDonagh" wrote...
: isamura wrote:
:
: snipped.
:
: > :
: > Can you clarify. Do you mean subclass can't inherit static methods either?
: >
: > ..K
: >
: Correct.
:
: Static methods don't belong to an object like normal (aka Instance)
: methods, they belong to the Class.
:
: When calling a static method you: 'Class.myStaticMethod()'
:
: there's no object, so no Vtable to use to look through.
:
This is going off-topic so I will change the thread topic.
That is puzzling since the following compiles and runs (JDK 1.42):
public static myStaticMethod(); // defined in ClassA
ClassB extends ClassA
ClassB.myStaticMethod(); // no problem
Please explain...
.K
- 4
- Font dialog objectHello all..
Just wondering if there is a Font dialog object in Java. Looking at the
API's I did not see one.
Thanks in Advance...
IchBin
__________________________________________________________________________
'The meeting of two personalities is like the contact of two chemical
substances: if there is any reaction, both are transformed.'
- Carl Gustav Jung, (1875-1961), psychiatrist and psychologist
- 5
- Applet is not able to call a URLHello!
I try to make a HTTP Connection through a Applet. The Url is inside
the same CodeBase.
Error message: java.net.UnknownHostException: https://www.unserserver.de
HttpMethod method = null;
try {
URL url = new URL(sUrl);
HostConfiguration hostConfig = new HostConfiguration();
hostConfig.setHost(url.getHost(), url.getPort(), url.getProtocol());
HttpClientParams httpClientParams = new HttpClientParams();
HttpClient httpClient = new HttpClient();
httpClient.setHostConfiguration(hostConfig);
httpClient.setParams(httpClientParams);
method = new GetMethod();
method.setQueryString(url.getQuery());
method.setPath(url.getPath());
int resultCode = httpClient.executeMethod(method);
} catch (Exception e) {
System.out.println(e);
}
I have configured the JVM to use the default settings of the browser,
to connect through the proxy.
Without proxy on my own workstation it works, but for the customer it
doesn't work, allthough he saids, that he has configured the same
settings for the JVM.
Any ideas?
best regards
Alexa
- 6
- servlet communicationi`m using servlet technology in a very unusual way and i`m now
searching for a better solution:
there is a server, a embedded device and a user, which logs onto the
server, for access to the embedded device. the server now calls the
embedded device via gsm, to tell the embedded device to connect to the
internet and callback. after that, the data from the embedded device is
transfered to the server and displayed as a html-file. this is now done
via polling the application context, where all online-devices are
stored.
problem now is: i want to figure out a better way, how to get the
server or rather the html file, which is refreshed every 15 seconds, to
see if the device is online now, to know.
is there some way to exchange the data between this servlets?
- 7
- How to make CLASSPATH behave like PATH on Windows?Windows (XP and NT) allows one to specify environmental variable
(such as PATH and CLASSPATH) at both the SYSTEM-wide level
as well as at the per-USER level.
And the behavior has always been that the value of one's PATH list is
the concatenation of those two ENV specifications.
So, the $64 question is: Is there some way to coerce the resulting
CLASSPATH list to also be a concatenation of both the SYSTEM
and the USER's lists?
(Hopefully, some sort of registry hack can accomplish this!?)
The reason I ask is that today, after installing a Sun 'product' called
JMF (Java Media Framework), it BROKE my existing CLASSPATH
setup. The reason it BROKE it was that BEFORE the installation,
I had my CLASSPATH defined (only) at the SYSTEM level, and it
got inherited into my USER level. But, the (stupid?) JMF kit decided
to 'add' some stuff of its own to the USER classpath, and since one
didn't exist at all, it created one and put its stuff in it.
BUT the unwanted side-effect of that (brilliant?) idea was that now
the only resulting CLASSPATH that the users have is this new one that
the kit created and all the existing entries on the SYSTEM-wide defn
of CLASSPATH now get tossed into the bit-bucket.
Any SUN Java architects out there who can rule on this? Is this a
bug or a feature of the JMF kit? (A registry hack or something similar
for a workaround would be nice.)
Cheers...
Dave
- 8
- SAX with JAXPHi,
I want to parse a XML document with SAX (using JAXP) and found lot's of
examples of parsing from a file. But... I have the XML in a String variable
and want to parse from there. All the 'parse' methods from the SAXParse
class receive a File, or a InputStream, or a URI... I don't want to create a
file just to be able to parse the XML (for performance reasons).
Any help appreciated,
Araxes Tharsis
- 9
- Jaxb and xsd Help requestedHi,
I'm having problems compiling the classes generated by Jaxb when using
the schema below. (Note the xsd below is part of a bigger xsd file i
just pulled out the section that was giving me issues ). If anyone can
see a problem with the xsd defined below I would appreicate the
information.
The inner interface defined within the generated java class is causing
me issues. The error I get is "Nested type GuestCountType hides an
enclosing type". i would appreciate any help with this.
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:complexType name="GuestCountType">
<xs:sequence>
<xs:element name="GuestCount" maxOccurs="99">
<xs:complexType>
<xs:attributeGroup ref="GuestCountGroup"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="IsPerRoom" type="xs:boolean" use="optional"/>
</xs:complexType>
<xs:complexType name="RoomStayCandidateType">
<xs:sequence>
<xs:element name="GuestCounts" type="GuestCountType" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:attributeGroup name="GuestCountGroup"/>
</xs:schema>
//
// This file was generated by the JavaTM Architecture for XML
Binding(JAXB) Reference Implementation, v1.0.4-b18-fcs
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of
the source schema.
// Generated on: 2006.05.06 at 09:47:52 EDT
//
package generated;
/**
* Java content class for GuestCountType complex type.
* <p>The following schema fragment specifies the expected content
contained within this java content object. (defined at
file:/C:/xsdfiles/test.xsd line 4)
* <p>
* <pre>
* <complexType name="GuestCountType">
* <complexContent>
* <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="GuestCount" maxOccurs="99">
* <complexType>
* <complexContent>
* <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
* <attGroup ref="{}GuestCountGroup"/>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </sequence>
* <attribute name="IsPerRoom"
type="{http://www.w3.org/2001/XMLSchema}boolean" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*/
public interface GuestCountType {
/**
* Gets the value of the isPerRoom property.
*
*/
boolean isIsPerRoom();
/**
* Sets the value of the isPerRoom property.
*
*/
void setIsPerRoom(boolean value);
/**
* Gets the value of the GuestCount property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the
GuestCount property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getGuestCount().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link generated.GuestCountType.GuestCountType}
*
*/
java.util.List getGuestCount();
/**
* Java content class for anonymous complex type.
* <p>The following schema fragment specifies the expected content
contained within this java content object. (defined at
file:/C:/xsdfiles/test.xsd line 7)
* <p>
* <pre>
* <complexType>
* <complexContent>
* <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
* <attGroup ref="{}GuestCountGroup"/>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*/
public interface GuestCountType {
}
}
- 10
- Attempting to connect to Oracle error...I was attempting to connect to an Oracle instance using the
classes12.zip Oracle thin driver using SQuirrel 1.1final1
[http://squirrelsql.org]. I kept receiving the following Java
Exception:
java.sql.SQLException: Protocol violation
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:639)
at oracle.jdbc.ttc7.O3log.receive2nd(O3log.java:529)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:217)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:156)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:231)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:208)
at net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.getConnection(SQLDriverManager.java:99)
at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.execute(OpenConnectionCommand.java:112)
at net.sourceforge.squirrel_sql.client.mainframe.action.ConnectToAliasCommand$SheetHandler.run(ConnectToAliasCommand.java:345)
at net.sourceforge.squirrel_sql.fw.util.TaskExecuter.run(TaskExecuter.java:65)
at java.lang.Thread.run(Thread.java:536)
SQuirreL was successfully connecting to other Oracle instances, just
not this particular one. I work for a large organization with
multiple Oracle servers. Additionally, the company has just merged
with another company. And it is the other company's server that I am
unable to successfully connect to.
After going through a number of other tangents (network issues, jdbc
configuration details, etc.), I decided to download the classes12.zip
file from Oracle again just in case there was some difference from the
one I already had.
Once the download completed, I checked the file dates within
classes12.zip and their dates were all 2001/Mar/20. Then I went to
the "old" classes12.zip I was currently using in my project and the
file dates within were 1999/Jun/14. Surprise!!!
I did a quick reconfigure of SQuirreL to use the "new" classes12.zip
and was able to connect to the "problem" DB. Apparently there was
some sort of update since I had last dl'ed classes12.zip from Oracle.
Uh...same bloody file name, "classes12.zip", different versions. WTF?
I am confused why Oracle would choose to name the zip the same name
and not increment it when they change it. Grrr! It sure makes it
difficult to talk about "versions" with their naming convention.
And why doesn't Oracle use the industry standard .jar format and
naming convention? Their being "rogue" makes this even more confusing
and frustrating.
Hope you find my travails useful.
Jim
- 11
- Multiple web applications, single virtual hostHello everyone,
I am attempting to create access logs on a per web application basis,
using a single virtual host in my server.xml file. Here is what I
have so far:
<Host name="www.mysite.com" autoDeploy="false"
deployOnStartup="false"
deployXML="false">
<alias>www.mysite.com</alias>
<Valve
className="org.apache.catalina.valves.AccessLogValve"
prefix="mysite_access" suffix=".log"
pattern="common"
directory="${jboss.server.home.dir}/log"/>
<Context path="" docBase="html" debug="0" reloadable="true"/>
<DefaultContext cookies="true" crossContext="true"
override="true"/>
<Context path="/Web1" docBase="C:\jboss-4.0.1RC2\server\default
\deploy" debug="0" reloadable="true">
<Valve
className="org.apache.catalina.valves.AccessLogValve"
directory="${jboss.server.home.dir}/log"
prefix="my_web1" suffix=".log" resolveHosts="false" pattern="combined"/
>
</Context>
<Context path="/images" appBase="" docBase="C:
\jboss-4.0.1RC2\server\default\images" debug="99">
</Context>
<Context path="/Web2" docBase="C:\jboss-4.0.1RC2\server\default
\deploy" debug="0" reloadable="true">
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="${jboss.server.home.dir}/log"
prefix="my_web2" suffix=".log" resolveHosts="false" pattern="combined"/
>
</Context>
</Host>
Everything is working as it should, except that when I hit www.mysite.com/Web1
or www.mysite.com/Web2 the only log that gets updated is
mysite_access.
Can someone please explain to me how to go about writing to the
my_web1.log and my_web2.log files for those applications?
Thanks,
Monica
- 12
- jdk 5 generic, why not the other way arround for (T[] e, Collection<T> c)Hi,
I'm trying to understand the generic concept. The following confused
me:
public static void main(String arg[])
{
Object[] oa = new Object [10];
Collection<Object> co = new ArrayList<Object>();
String[] sa = new String[10];
Collection<String> cs = new ArrayList<String>();
method(sa, co); //1
method(oa, co); //2
method(oa,cs); // 3, compile error:
//<T>method(T[],java.util.Collection<T>) in Test cannot be applied to
// (java.lang.Object[],java.util.Collection<java.lang.String>)
// method(oa,cs);
}
static <T> void method(T[]e, Collection<T> c)
{ //do nothing }
The #2 is obvious, but why #1 is ok and #3 is wrong?
- 13
- java front end that creates database appsDoes there exist a java front end like this database admin tool:
http://qform.sourceforge.net/
but that also allows you to create database applications (similar to
Rekall if you are familiar with that, uses python)
ie. allows you to create your own forms for data input input etc,
provides reporting, scripting etc
Thanks
Wayne
- 14
- Processing of java-common_0.27_amd64.changesjava-common_0.27_amd64.changes uploaded successfully to localhost
along with the files:
java-common_0.27.dsc
java-common_0.27.tar.gz
java-common_0.27_all.deb
Greetings,
Your Debian queue daemon
--
To UNSUBSCRIBE, email to email***@***.com
with a subject of "unsubscribe". Trouble? Contact email***@***.com
- 15
- ROW ID problemHi,
I am wtiting JAVA application and getting datas from MS SQL.
This is the code:
QueryDataSet ds = new QueryDataSet();
ds.setQuery(new com.borland.dx.sql.dataset.QueryDescriptor
(db,"select * from myTable"));
In myTable there is one column defined as "primary key".
But dataset(ds) does not get rowID automatically. I have
to disable updateRowID in MetaDataUpdate for dataset, and
then set rowID to the column manually
I had no problem in Sybase, but now I have changed to MS
SQL. Any idea? May be it is some connection property I
have not checked out?
Thanks beforehand.
|
|
|