The AbstractMethodError I received with OC4J and EJB Session Beans.
We have this fairly screwed up development envirnment where there is only one OC4J instance for 5 developers which is really what caused this problem.
Someone would deploy the application, and before starting the application I would upload my version of the jar file which contains the EJB classes. Apparently , Oracle creates the wrapper classes which implement the remote interface at deployment, not when the OC4J instance is started and therefor my personal EJB classes was not having its additional methods wrapped.
Solution: Do not modify EJB classes once they are deployed.
Wednesday, November 30, 2005
Tuesday, June 14, 2005
How often do you use final?
I ran across a Source Code Scanner called PMD in the last Dr Dobbs issue. There are two rules that seem to generate a lot of warnings. They are LocalVariableCouldBeFinal and MethodArgumentCouldBeFinal (http://pmd.sourceforge.net/rules/optimizations.html)
In the terms of Method Arguments and local varaibles, I found that the final modifyer means that the variable will not be reassigned.
I find that pretty much all my MethodArguments should be final and a majority of my Local Variables should be final. Unfortunately, defining everything as final takes extra work (all that typing) and also causes some code clutter.
Any comments on how strictly I should use the final modifier?
In the terms of Method Arguments and local varaibles, I found that the final modifyer means that the variable will not be reassigned.
I find that pretty much all my MethodArguments should be final and a majority of my Local Variables should be final. Unfortunately, defining everything as final takes extra work (all that typing) and also causes some code clutter.
Any comments on how strictly I should use the final modifier?
Tuesday, April 26, 2005
Object Oriented Question
Lets say I have some interfaces which make up a framework:
public interface Gum {
public String getFlavor();
}
public interface Package {
public Gum getGum();
}
public interface
There are no setter methods because the values may be set/retrieved different ways.
And I have a particular implementation
public class GumImpl implements Gum{
private String flavor;
public String getFlavor() { return this.flavor; }
public void setFlavor(String flavor) { this.flavor = flavor; }
}
public class PackageImpl implements Package{
private GumImpl gum;
public GumImpl getGum(){return this.gum;}
public void setGum(GumImpl gum){ this.gum = gum; }
}
First of all, notice that I am returning GumImpl from my PackageImpl.getGum and the interface defines that Package.getGum() should return a Gum type. To me, this seems appropriate because that classes that interact with the implementation shouldn't have to deal/cast to the from the interface to the implementation.
Does anyone have an opinion if changing the method signature to return a subclass like this is appropriate?
I am having problems using various tools with this approach such as Spring and Netbeans. Spring will complain that the PackageImpl is read-only.
public interface Gum {
public String getFlavor();
}
public interface Package {
public Gum getGum();
}
public interface
There are no setter methods because the values may be set/retrieved different ways.
And I have a particular implementation
public class GumImpl implements Gum{
private String flavor;
public String getFlavor() { return this.flavor; }
public void setFlavor(String flavor) { this.flavor = flavor; }
}
public class PackageImpl implements Package{
private GumImpl gum;
public GumImpl getGum(){return this.gum;}
public void setGum(GumImpl gum){ this.gum = gum; }
}
First of all, notice that I am returning GumImpl from my PackageImpl.getGum and the interface defines that Package.getGum() should return a Gum type. To me, this seems appropriate because that classes that interact with the implementation shouldn't have to deal/cast to the from the interface to the implementation.
Does anyone have an opinion if changing the method signature to return a subclass like this is appropriate?
I am having problems using various tools with this approach such as Spring and Netbeans. Spring will complain that the PackageImpl is read-only.
Thursday, April 14, 2005
Loading an XSL Stylesheet in Java
Just a friendly reminder that if you are using an XSL Stylesheet which contains xsl:include elements that are relative to the including stylesheet and you wish to load it as a javax.xml.transform.stream.StreamSource, you should not load it using the StreamSource constructor that takes as a java.io.Reader or java.io.InputStream. You should load it using the File or SystemId (URL) constructor.
The reason is, that if you load it as a Reader or an InputStream object, the object in charge of resolving the included elements does not know relative path.
The reason is, that if you load it as a Reader or an InputStream object, the object in charge of resolving the included elements does not know relative path.
Thursday, March 24, 2005
XSL Stylesheet Building
I have a complex XML schema and the HTML output is supposed to display all schema elements. I started to hand edit it using Oxygen but it is taking way too long. Does anyone know of an application to help generate an arbitrary XSL from a schema.
Wednesday, March 23, 2005
Advancing the XML:DB api for XML databases
Monday, July 26, 2004
Looking at NCDC links
NCDC had a lot of good links. Our first reaction was that they probably had many high level links in the metadata. So I checked it out...
288/597 have NOAA Server More Info links(not FGDC compliant), and they were low level
128/597 have NOAA Server Preview links (not FGDC compliant) and they are low level.
140/597 have NOAA Server Obtain links (not FGDC compliant) and they are low level.
314/597 have Online linkage URLs and they are low level.
475/597 have Network resource name but ~390 of them point to http://www.ncdc.noaa.gov
Also note that 88 record have recently migrated from NGDC to NCDC where all of the obove links were filled out.
288/597 have NOAA Server More Info links(not FGDC compliant), and they were low level
128/597 have NOAA Server Preview links (not FGDC compliant) and they are low level.
140/597 have NOAA Server Obtain links (not FGDC compliant) and they are low level.
314/597 have Online linkage URLs and they are low level.
475/597 have Network resource name but ~390 of them point to http://www.ncdc.noaa.gov
Also note that 88 record have recently migrated from NGDC to NCDC where all of the obove links were filled out.
Fixed a bug from charles
Fixed a bug reported by charles which resulted in another bug being found in the Blue Angle libraries.
Friday, July 23, 2004
Components in Components
Finally received a bug fix that allows for saving a record that has components in components.
Wednesday, July 21, 2004
dictionary
Worked with John Relph to figure out that the record set did not specify a dictionary to use. Need to add that to the documentatioin.
Friday, July 16, 2004
back to the search functionality
Tom Wanuga tells me the BMSRecordSearchFilter.FIELD_USER_UID takes the responsibility of searching for an owner uid.
I have now sent them a bug report because pushing a BMSOperator with FIELD_USER_UID does not work.
I have now sent them a bug report because pushing a BMSOperator with FIELD_USER_UID does not work.
Working with digester
I am getting this error:
java.lang.NoSuchMethodException: No such accessible method: addLink() on object: gov.noaa.mm.validate.HttpLinkValidation
But there seems to be an addLink public method on HttpLinkValidation.
I was using "*/element" instead of "root/element". I changed it to not use the * and it works. I guess I just don't quite understand the *.
java.lang.NoSuchMethodException: No such accessible method: addLink() on object: gov.noaa.mm.validate.HttpLinkValidation
But there seems to be an addLink public method on HttpLinkValidation.
I was using "*/element" instead of "root/element". I changed it to not use the * and it works. I guess I just don't quite understand the *.
Thursday, July 15, 2004
How to upgrade to nmmr 4.x.
I am working on adding a section to the developers docs on how to upgrade to NMMR 4.x.
Wednesday, July 14, 2004
Meetings all day today.
Met with Tino, Doug, Amy, Ted, Ken, and Karen. We discussed class metadata architacture and submition agreements.
Then I met with John Carone and talked about HDF and THREADS.
Then I met with John Carone and talked about HDF and THREADS.
Small amount of metadata documentation
I updated some pages at http://www.ngdc.noaa.gov/metadata
such as the extensions page. I also tidied up the index page.
such as the extensions page. I also tidied up the index page.
Meetings all day today.
Met with Tino, Doug, Amy, Ted, Ken, and Karen. We discussed class metadata architacture and submition agreements.
Then I met with John Carone and talked about HDF and THREADS.
Then I met with John Carone and talked about HDF and THREADS.
Meetings all day today.
Met with Tino, Doug, Amy, Ted, Ken, and Karen. We discussed class metadata architacture and submition agreements.
Then I met with John Carone and talked about HDF and THREADS.
Then I met with John Carone and talked about HDF and THREADS.
Tuesday, July 13, 2004
NMMR Meeting
Had a meeting with Tino, Amy, Doug and Ken. Talked about the NMMR and such. I thought it went well.
Stylesheet page
I am going to document the stylesheets. I will place it at http://www.ngdc.noaa.gov/metadata/xslt
Some documentation on Class Metadata
I need to make some documentation for class metadata. I will place it in the directory http://www.ngdc.noaa.gov/metadata/class
Subscribe to:
Posts (Atom)