Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!

Ann Klein

Greenhorn
+ Follow
since Sep 21, 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 Ann Klein

SQLquery =
" DECLARE x report_help.seqid%TYPE; " +
" BEGIN " +
" INSERT INTO report_help " +
" ( helptext, creationdate, modifydate ) " +
" VALUES ( ? ,SYSDATE, SYSDATE) " +
" RETURNING x " +
" INTO x; " +
" RETURN; " +
" END;";

int x = 0;
CallableStatement cstmt = null;
try
{
WebLogger.println("SQLquery: " + SQLquery );
cstmt = dbConn.prepareCall(SQLquery);
cstmt.setString(1, v_helptext );
cstmt.registerOutParameter(2, java.sql.Types.TINYINT);
cstmt.executeQuery();
WebLogger.println("x: " + x );
if (rs.next()) {
x = rs.getInt(2);
WebLogger.println("from rs x: " + x );
}
cstmt.close();

getting error on cstmt.executeQuery();
Message: ORA-01006: bind variable does not exist
SQLState: 72000
ErrorCode: 1006
Someone else set up my eclipse environment. I would like to know which of the many Oracle instances available it is pointing to and change the password it is using. Where can I find this in Eclipse? Can I point to two Oracle instances at the same time? How hard is it to switch back and forth?
I found an example at
http://weblogs.java.net/blog/dwalend/archive/2004/11/amazing_xlint.html
<javac compiler="${build.compiler}" srcdir="${source.delivery}" destdir="${build.delivery}" deprecation="yes" debug="yes">
<compilerarg value="-Xlint"/>
<classpath refid="classpath" />
</javac>

seems to have gotten past the compiler
16 years ago
Has Xlint quit working for newer java.

my java -version shows as "1.5.0_04"

I can use -deprecation by itself

I cannot complete my canned Ant build with out using the xlint:unchecked and it is not listed with javac -x
16 years ago
does not work

<javac compiler="${build.compiler}" srcdir="${source.delivery}" destdir="${build.delivery}" debug="on" >
<compilerarg value=" -Xlint:unchecked -Xlint eprecation" />
<classpath refid="classpath" />
</javac>

does not work

<javac compiler="${build.compiler}" srcdir="${source.delivery}" destdir="${build.delivery}" debug="on" >
<compilerarg value=" -Xlint:unchecked -Xlint eprecation" ></compilerarg>
<classpath refid="classpath" />
</javac>

and many other even sillier permutations. I have looked at the documentation and lots of web sites. What incredibly stupid thing am I doing incorrectly.
16 years ago
Coming from the IBM mainframe I got a lot out of Thinking in Java
16 years ago
I am trying to change existing code to JAVA 5 and getting part way there but some paths lead back to modules for which I have no source, only class files. For example com.efsol.util.AtributeContent

Any ideas on how to proceed?
16 years ago
I also broke the Friki Wiki
I wanted to save my data (new pages) on a share drive which is not a server so I entered its address. Start up shows.

Aug 20, 2004 9:44:33 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 4647 ms
JMOS Wiki: located external storage dir 'd072001\jmos\Glossary\pages'
JMOS Wiki: looking for external config file 'd072001\jmos\Glossary\pages\wiki.pr
p'
JMOS Wiki: reading external config file 'd072001\jmos\Glossary\pages\wiki.prp'
JMOS Wiki: updating external config file 'd072001\jmos\Glossary\pages\wiki.prp'
JMOS Wiki: Created File Page Repository at 'd072001\jmos\Glossary\pages\pages'

But before the first page can be displayed a regular expression throws up.

description The server encountered an internal error () that prevented it from fulfilling this request.

The following looks a little funny because '\n' was used to break the line.

java.util.regex.PatternSyntaxException: Illegal/unsupported escape squence near index 20
(\p{Alpha}+) [^\s
\Z}]+)
^
java.util.regex.Pattern.error(Pattern.java:1528)
java.util.regex.Pattern.escape(Pattern.java:1964)
java.util.regex.Pattern.range(Pattern.java:2096)
java.util.regex.Pattern.clazz(Pattern.java:2056)
java.util.regex.Pattern.sequence(Pattern.java:1585)
java.util.regex.Pattern.expr(Pattern.java:1545)
java.util.regex.Pattern.group0(Pattern.java:2297)
java.util.regex.Pattern.sequence(Pattern.java:1573)
java.util.regex.Pattern.expr(Pattern.java:1545)
java.util.regex.Pattern.compile(Pattern.java:1279)
java.util.regex.Pattern.<init>(Pattern.java:1035)
java.util.regex.Pattern.compile(Pattern.java:802)
org.stringtree.regex.Pattern.compile(Pattern.java:18)
org.stringtree.juicer.regex.RegexStringFilter.<init>(RegexStringFilter.java:23)
org.stringtree.juicer.string.DynamicRegexReplaceStringFilter.<init>(DynamicRegexReplaceStringFilter.java:14)
org.stringtree.juicer.string.AugmentRegexReplaceStringFilter.<init>(AugmentRegexReplaceStringFilter.java:22)
org.stringtree.juicer.string.AugmentRegexReplaceStringFilter.<init>(AugmentRegexReplaceStringFilter.java:31)
org.stringtree.juicer.tract.RegexAugmentReplaceTractFilter.<init>(RegexAugmentReplaceTractFilter.java:10)
FilterReplace.init(FilterReplace.java:9)
org.stringtree.juicer.formatter.FromToTransformation.init(FromToTransformation.java:20)
org.stringtree.juicer.formatter.AugmentFromToTransformation.init(AugmentFromToTransformation.java:20)
org.stringtree.juicer.tract.ExternalTractPipeline.createFilter(ExternalTractPipeline.java:90)
org.stringtree.juicer.tract.ExternalTractPipeline.getFilters(ExternalTractPipeline.java:64)
org.stringtree.juicer.tract.ExternalTractPipeline.<init>(ExternalTractPipeline.java:23)
org.stringtree.juicer.tract.ExternalTractPipeline.<init>(ExternalTractPipeline.java:29)
org.stringtree.juicer.formatter.ExternalFormatter.<init>(ExternalFormatter.java:18)
com.efsol.wiki.ClassicToHTMLFilter.<init>(ClassicToHTMLFilter.java:27)
com.efsol.wiki.ClassicToHTMLFilter.<init>(ClassicToHTMLFilter.java:32)
com.efsol.wiki.WikiServlet.resetPolicy(WikiServlet.java:120)
com.efsol.wiki.WikiServlet.setPolicy(WikiServlet.java:63)
com.efsol.wiki.WikiServlet.setBaseDir(WikiServlet.java:202)
com.efsol.wiki.WikiServlet.setRedirect(WikiServlet.java:180)
com.efsol.wiki.WikiServlet.init(WikiServlet.java:231)
javax.servlet.GenericServlet.init(GenericServlet.java:211)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
java.lang.Thread.run(Thread.java:534)

Poking around I am sure my address did it but I cannot figure out how to change the regular expression to allow the address or how to remove the address (short of reinstalling).

Regular Expression was in the original wiki.transform
# remote wiki link
FilterReplace wiki.RemoteWikiLink !(\p{Alpha}+)[^\s\n\Z}]+)!&~1{&1}{&2}!

Any help appreciated.

I also am looking for an explanation of the tilde (~) in above &~1 vs &1

[ August 20, 2004: Message edited by: Ann Klein ]
[ August 20, 2004: Message edited by: Ann Klein ]
17 years ago
more detail
Tutorial shows
<html:form action="submit.do">
org.apache.jasper.JasperException: Cannot retrieve definition for form bean null


<html:form action="submit"
name="submitForm">
org.apache.jasper.JasperException: Must specify type attribute if name is specified

<html:form action="submit"
name="submitForm"
attribute="submitForm">
org.apache.jasper.JasperException: /submit.jsp(24,0) Attribute attribute invalid according to the specified TLD

<html:form action="submitForm">
org.apache.jasper.JasperException: Cannot retrieve mapping for action /submitForm

<html:form action="submit.do"
name="submitForm"
attribute="submitForm">
org.apache.jasper.JasperException: /submit.jsp(24,0) Attribute attribute invalid according to the specified TLD

still wandering
17 years ago
I am working through a tutorial http://javaboutique.internet.com/tutorials/Struts/jsp_page.html
and of course it does not work immediately so I am comparing the bits to struts-blank and struts-example as distributed. My error is:

org.apache.jasper.JasperException: Cannot retrieve definition for form bean null
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
etc

Here are my bits and pieces

SubmitForm.java

package playground;

import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.*;

public final class SubmitForm extends ActionForm {

============

struts-config.xml

<form-beans>
<form-bean name="submitForm"
type="playground.SubmitForm" />
</form-beans>

<global-forwards>
<forward name="submit"
path="/submit.do"/>
</global-forwards>

<action-mappings>
<action path="/submit"
type="playground.SubmitAction"
attribute="submitForm"
scope="request"
input="/submit.jsp"
validate="false">
<forward name="success" path="/submit.jsp"/>
<forward name="failure" path="/submit.jsp"/>
</action>
</action-mappings>

============
Submit.jsp

<html:form action="submit" >
Last Name: <html:text property="lastName"/><br>
Address: <html:textarea property="address"/><br>
Sex: <html:radio property="sex" value="M"/>Male
<html:radio property="sex" value="F"/>Female<br>
Married: <html:checkbox property="married"/><br>
Age: <html:select property="age">
<html ption value="a">0-19</html ption>
<html ption value="b">20-49</html ption>
<html ption value="c">50-</html ption>
</html:select><br>
<html:submit/>
</html:form>

I enter http://localhost/strutsApp/index.jsp

which does
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<logic:redirect forward="submit"/>

the URL changes to http://localhost/strutsApp/submit.do

I tried adding some of the parameters mentioned above to the form but they all produced new errors. For example when I added attribute there was a message about the tld. I have not found discussion of when it is name="myform" and when it is attribute="myform". Also find the changes from dots to slashes in URL/ URI / directory description mysterious.
Any wise words welcome.
17 years ago
Well so much for that theory. Found sourceDataLine.available() and displayed it as REMAINDER.
In PlayThread - cnt= 10000
remainer= 8192
In PlayThread - cnt= 10000
remainer= 6192
In PlayThread - cnt= 10000
remainer= 188
In PlayThread - cnt= 10000
remainer= 2176
In PlayThread - cnt= 8024
remainer= 168

The full buffer is not used every time and the remaining bytes vary without seeming logic.
17 years ago
I get the error on the last iteration of a loop such as follows

while((cnt = audioInputStream.read(
tempBuffer,0,tempBuffer.length)) != -1
&& stopPlayback == false){
System.out.println("In PlayThread - cnt= " +
cnt + "\n");

if(cnt > 0){
//Write data to the internal buffer of
// the data line where it will be
// delivered to the speaker.
sourceDataLine.write(tempBuffer, 0, cnt);
}//end if
}//end while

the display shows the first so many passes of the loop with cnt = 10000
When the last iteration is less than 10000 it is I A.S.S.U.M.E. not an "integral number"

Messy --- is there a cure.
17 years ago