Greg Schultz

Greenhorn
+ Follow
since Oct 08, 2003
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Greg Schultz

John,

I haven't deployed a Horizontal Cluster, but we do have a single, 2 node cluster that is having issues.

Did you cluster HA and Web Sessions? Our issue manifests itself by one side of the cluster quickly running OutOfMemory, then the other side almost right after does the same thing.

We are also seeing the error below in the logs. We are using JBoss 4.0.5, Hibernate 3.0. Did you have any issues with your cluster?

2008-02-14 17:48:13,947 WARN [org.jboss.web.tomcat.tc5.session.InstantSnapshotManager./express] (TP-Processor3171 Failed to replicate session InW3zDz-aHNRy1MkZHd8kg**.node2
java.lang.RuntimeException: JBossCacheService: exception occurred in cache put ...
at org.jboss.web.tomcat.tc5.session.JBossCacheWrapper.put(JBossCacheWrapper.java:150)
at org.jboss.web.tomcat.tc5.session.JBossCacheService.putSession(JBossCacheService.java:315)
at org.jboss.web.tomcat.tc5.session.JBossCacheClusteredSession.processSessionRepl(JBossCacheClusteredSession.java:121)
at org.jboss.web.tomcat.tc5.session.JBossCacheManager.processSessionRepl(JBossCacheManager.java:1093)
at org.jboss.web.tomcat.tc5.session.JBossCacheManager.storeSession(JBossCacheManager.java:648)
at org.jboss.web.tomcat.tc5.session.InstantSnapshotManager.snapshot(InstantSnapshotManager.java:49)
at org.jboss.web.tomcat.tc5.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:98)
at org.jboss.web.tomcat.tc5.session.JvmRouteValve.invoke(JvmRouteValve.java:84)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)


TIA,

Greg
11 years ago
In reading and trying to fully understand the information contained in sun's J2EE Core Patterns, there are references, in code and paragraph's, to RequestHelper and CommandHelper classes/interfaces. Unfortunately I cannot find any thorough sample code of there definition and usage from a Struts Action Class.

Does anyone have a few samples or a good link on this?

TIA,
Greg
14 years ago
Thanks Scott,

I used the first and simplest form

String configDir = System.getProperty( "my.property.dir" );. But rather than place it into the startup script, since I also have access to the Weblogic Console I placed the following in the Arguements field on the Configuration.Remote Start tab for each server instance, DEV and TEST.

-Dappname.filestore.dir=/home/user/domain/server/filestore/


Greg
14 years ago
I have an application that will run on multiple server instances, DEV, TEST and eventually PROD. All of my resource properties and application switches are defined in .properties files, but are read from the file system using rather than ResourceBundles. This allows me to change application functionality without modify and re-deploying the WEB or EJB portions of the application. The only resource I need is "The location within the filesystem where the properties are". Currently that is the only item that is in an Application.properties file and read using ResourceBundle.

Does any one have know of a way to put this one "element" in the JNDI for each server instance so it doesn't have to be kept in a ResourceBundle.?

tia,
Greg
14 years ago
I am currently trying to use Mapforce from www.altova.com. It bascially loads an XML file into java classes that it generates based on a Mapping file that you create by tying XSD elements to Database Columns.

Thus far it is working great, but it is commercial.

Greg
Thanks Dmitry, that worked great. There are a couple of more issues, if you don't mind.

I added this to get all other nodes.

<xsl:template match="*">
<xsl:copy-of select="@*"/>
<xsl:copy>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>

It works fine except for a couple of tags.

A tag with attributes but no elements,

<nj:Version major="6.0" minor="0.0"/>

becomes

<nj:Version/>

And this section, where dimension has one attribute and three elements,

<nj ackageDimensions>
<nj:EstimatedDimensions UOM="inch">
<nj:Height>55</nj:Height>
<nj:Length>55</nj:Length>
<nj:Width>55</nj:Width>
</nj:EstimatedDimensions>
<nj:ActualDimensions UOM="inch">
<nj:Height>53</nj:Height>
<nj:Length>53</nj:Length>
<nj:Width>49</nj:Width>
</nj:ActualDimensions>
</nj ackageDimensions>

becomes

<nj ackageDimensions UOM="inch">
<nj:EstimatedDimensions>
<nj:Height>55</nj:Height>
<nj:Length>55</nj:Length>
<nj:Width>55</nj:Width>
</nj:EstimatedDimensions>
<nj:ActualDimensions>
<nj:Height>53</nj:Height>
<nj:Length>53</nj:Length>
<nj:Width>49</nj:Width>
</nj:ActualDimensions>
</nj ackageDimensions>


Any ideas?

Thanks very much for your help,

Greg
I am very new to XSLT and having a difficult time in transforming some. I have an XML input stream that contains

<xj:CODAmount currency="USD">0.0</xj:CODAmount>

I need to transform this into

<xj:CODAmount currency="USD">
<xj:amount>0.0</xj:amount>
</xj:CODAmount>


Does anyone have an easy way to do this. I have initially tried

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:nj="http://www.xj.com" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xsl utput method="xml" version="1.0" encoding="utf-8" omit-xml-declaration="no" indent="no" />
<xsl:template match="*">
<xsl:element name="{name()}">
<xsl:apply-templates select="*|@*"/>
<xsl:if test="text()">
<xsl:value-of select="."/>
</xsl:if>
</xsl:element>
</xsl:template>
</xsl:stylesheet>

but the result is ending up like this:

<xj:CODAmount>USD0.0</xj:CODAmount>


TIA,
Greg
Can your post the JSP form code and submit button code?
15 years ago
See Java Language Specification:
http://java.sun.com/docs/books/jls/second_edition/html/conversions.doc.html#189955
5.1.2 Widening Primitive Conversion
The following 19 specific conversions on primitive types are called the widening primitive conversions:
byte to short, int, long, float, or double
short to int, long, float, or double
char to int, long, float, or double
int to long, float, or double
long to float or double
float to double

Greg
[ January 06, 2004: Message edited by: Greg Schultz ]
15 years ago
Are you sure you only get a blank page? You are probably continually re-loading the page with that statement block. Try putting it in a function that gets called by your submit button.

Greg
Based on your statement you are using unix/linux? If . (that is DOT), the current directory is not on your path statement you need to execute it like this ./startup.sh
Greg
15 years ago
I have created, my First, Swing/AWT application. It does a search through jar and zip files looking for a class. My problem is this. I am passing a reference to two textareas to the search class. The search class is updating the left and right textarea's but they are not being refreshed until the entire search has completed. I think this is because I am performing the search outside of the actionPerformed, but I'm not sure how to go about fixing the problem. The actionPerformed method is listed below..

void jButton_Search_actionPerformed(ActionEvent e) {
String[] args = new String[3];
args[0] = "-a";
args[1] = jTextPath.getText();
args[2] = jTextPattern.getText();
int i = jComboBox_SearchType.getSelectedIndex();
switch (i) {
case 0:
args[0] = "-a";
args[1] = jTextPath.getText();
break;
case 1:
args[0] = "-c";
args[1] = jTextPath.getText();
break;
case 2:
args[0] = "-s";
args[1] = jTextPath.getText();
break;
case 3:
args[0] = "-d";
args[1] = jTextPath.getText();
break;
}
System.out.println(args[0]);
System.out.println(args[1]);
System.out.println(args[2]);
jTextArea_Search.append("\nStarting ZipSearch...\n");
JZSearch js = new JZSearch();
js.doZipSearch(args, jTextArea_Search, jTextArea_Found);
jTextArea_Search.append("\nCompleted ZipSearch...\n");
}

Do I need to use a thread for the call to JZSearch?
TIA,
Greg
I have created, my First, Swing/AWT application. It does a search through jar and zip files looking for a class. My problem is this. I am passing a reference to two textareas to the search class. The search class is updating the left and right textarea's but they are not being refreshed until the entire search has completed. I think this is because I am performing the search outside of the actionPerformed, but I'm not sure how to go about fixing the problem. The actionPerformed method is listed below..

void jButton_Search_actionPerformed(ActionEvent e) {
String[] args = new String[3];
args[0] = "-a";
args[1] = jTextPath.getText();
args[2] = jTextPattern.getText();
int i = jComboBox_SearchType.getSelectedIndex();
switch (i) {
case 0:
args[0] = "-a";
args[1] = jTextPath.getText();
break;
case 1:
args[0] = "-c";
args[1] = jTextPath.getText();
break;
case 2:
args[0] = "-s";
args[1] = jTextPath.getText();
break;
case 3:
args[0] = "-d";
args[1] = jTextPath.getText();
break;
}
System.out.println(args[0]);
System.out.println(args[1]);
System.out.println(args[2]);
jTextArea_Search.append("\nStarting ZipSearch...\n");
JZSearch js = new JZSearch();
js.doZipSearch(args, jTextArea_Search, jTextArea_Found);
jTextArea_Search.append("\nCompleted ZipSearch...\n");
}

Do I need to use a thread for the call to JZSearch?
TIA,
Greg
15 years ago
Add this line to your c:\config.sys file
SHELL=C:\command.com C:\ /P /E:32768
This cleared up that problem here on some win95 machines.
Greg
15 years ago