Help with helloworld example

Hi,
I'm new to web services. I downloaded and tried the helloworld program. it worked fine. To figure out how everything works, i copied all the files from the tutorial, deleted which I thought was not necessary and tried to compile and deploy the service. but it is not working.
It is not creating any class files.
It says 'RmiModeler error: java.lang.ClassNotFoundException' in run-wscompile. (I think its tied to prev one)
And 'XML reader error: java.io.EOFException' in run-wsdeploy.
can anyone tell me what am I doing wrong.
Thank you.
/*HelloIF.java: */
package HelloWS;
import java.rmi.Remote;
import java.rmi.RemoteException;
public interface HelloIF extends Remote
public String sayHello(String s) throws RemoteException;
/* HelloImpl: */
package HelloWS;
import java.xml.rpc.server.ServiceLifecycle;
public class HelloImpl implements HelloIF, ServiceLifecycle
public String message ="Hello";
public String sayHello(String s)
return message + s;
/*build.properties*/
username=asdf
password=asdf
host=localhost
secure.port=8443
url=http://localhost/manager
example=helloservice
war.path=C:/HelloWS/hello-jaxrpc.war
portable.war=hello-jaxrpc-portable.war
hello.endpoint=http://localhost/hello-jaxrpc/hello
secure.endpoint=http://localhost/secure-jaxrpc/hello
mutualauth.endpoint=https://localhost:8443/secure-mutualauth/hello
client.jar=client.jar
config.wsdl.file=config-wsdl.xml
jwsdp.home=C:/jwsdp
jwsdp.shared=${jwsdp.home}/jwsdp-shared
jaxp.home=${jwsdp.home}/jaxp
jaxrpc.home=${jwsdp.home}/jaxrpc
saaj.home=${jwsdp.home}/saaj
wscompile.dir=${jaxrpc.home}/bin
wsdeploy.dir=${jaxrpc.home}/bin
javamail.jar=${jwsdp.shared}/lib/mail.jar
jaf.jar=${jwsdp.shared}/lib/activation.jar
jaxp-api.jar=${jaxp.home}/lib/jaxp-api.jar
dom.jar=${jaxp.home}/lib/endorsed/dom.jar
sax.jar=${jaxp.home}/lib/endorsed/sax.jar
xalan.jar=${jaxp.home}/lib/endorsed/xalan.jar
xercesImpl.jar=${jaxp.home}/lib/endorsed/xercesImpl.jar
jaxrpc-api.jar=${jaxrpc.home}/lib/jaxrpc-api.jar
jaxrpc-impl.jar=${jaxrpc.home}/lib/jaxrpc-impl.jar
commons-logging.jar=${jwsdp.shared}/lib/commons-logging.jar
saaj-api.jar=${saaj.home}/lib/saaj-api.jar
saaj-impl.jar=${saaj.home}/lib/saaj-impl.jar
relaxngDatatype.jar=${jwsdp.shared}/lib/relaxngDatatype.jar
xsdlib.jar=${jwsdp.shared}/lib/xsdlib.jar
jax-qname.jar=${jwsdp.shared}/lib/jax-qname.jar
ant.jar=${jwsdp.home}/apache-ant/lib/ant.jar
/*build.xml*/
<project name="jaxrpc-tutorial" default="build" basedir=".">
<property file="build.properties"/>
<path id="compile.classpath">
<pathelement location="${javamail.jar}"/>
<pathelement location="${jaf.jar}"/>
<pathelement location="${jaxp-api.jar}"/>
<pathelement location="${dom.jar}"/>
<pathelement location="${sax.jar}"/>
<pathelement location="${xalan.jar}"/>
<pathelement location="${xercesImpl.jar}"/>
<pathelement location="${jaxrpc-api.jar}"/>
<pathelement location="${jaxrpc-impl.jar}"/>
<pathelement location="${commons-logging.jar}"/>
<pathelement location="${saaj-api.jar}"/>
<pathelement location="${saaj-impl.jar}"/>
<pathelement location="${relaxngDatatype.jar}"/>
<pathelement location="${xsdlib.jar}"/>
<pathelement location="${jax-qname.jar}"/>
<pathelement location="${ant.jar}"/>
<pathelement location="build/shared"/>
</path>
<path id="run.classpath">
<path refid="compile.classpath"/>
<pathelement location="dist/client.jar"/>
</path>
<taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask" />
<taskdef name="undeploy" classname="org.apache.catalina.ant.UndeployTask" />
<taskdef name="list" classname="org.apache.catalina.ant.ListTask" />
<taskdef name="start" classname="org.apache.catalina.ant.StartTask" />
<taskdef name="stop" classname="org.apache.catalina.ant.StopTask" />
<taskdef name="install" classname="org.apache.catalina.ant.InstallTask"/>
<taskdef name="reload" classname="org.apache.catalina.ant.ReloadTask"/>
<taskdef name="remove" classname="org.apache.catalina.ant.RemoveTask"/>     
<target name="build" depends="build-service"
     description="Executes the targets needed to build the service.">
</target>
<target name="build-service" depends="clean,compile-service,generate-sei-service,
setup-web-inf,package-service,process-war"
description="Executes the targets needed to build the service.">
</target>
<target name="clean"
description="Removes the build directory">
<delete dir="build" />
</target>
<target name="compile-service" depends="prepare"
description="Compiles the server-side source code">
<echo message="Compiling the server-side source code...."/>
<javac srcdir="src" destdir="build/hellows">      
<classpath refid="compile.classpath"/>
</javac>
</target>
<target name="prepare"
description="Creates the build directory" >
<echo message="Creating the required directories...." />
<mkdir dir="build/hellows" />
</target>
<target name="generate-sei-service"
description="Runs wscompile to generate the model file">
<antcall target="run-wscompile">
<param name="param1" value="-define -d build -nd build
-classpath build config-interface.xml
-model build/model.gz" />
</antcall>
<delete file="build/MyHelloService.wsdl" />
</target>
<target name="setup-web-inf"
description="Copies files to build/WEB-INF">
<echo message="Setting up build/WEB-INF...." />
<delete dir="build/WEB-INF" />
<copy todir="build/WEB-INF/classes/hellows">
<fileset dir="build/hellows" />
<fileset dir="build/hellows" />
</copy>
<copy file="build/model.gz" todir="build/WEB-INF" />
<copy file="web.xml" todir="build/WEB-INF" />
<copy file="jaxrpc-ri.xml" todir="build/WEB-INF" />
</target>
<target name="package-service" depends="prepare-dist"
description="Packages the WAR file">
<echo message="Packaging the WAR...." />
<delete file="dist/hello-jaxrpc-portable.war" />
<jar jarfile="dist/hello-jaxrpc-portable.war" >
<fileset dir="build" includes="WEB-INF/**" />
</jar>
</target>
<target name="prepare-dist"
description="Creates the dist directory" >
<echo message="Creating the required directories...." />
<mkdir dir="dist" />
</target>
<target name="process-war" depends="set-wsdeploy"
description="Runs wsdeploy to generate the ties and
create a deployable WAR file">
<delete file="dist/hello-jaxrpc.war" />
<antcall target="run-wsdeploy">
<param name="param1" value="-o dist/hello-jaxrpc.war dist/hello-jaxrpc-portable.war" />
</antcall>
</target>
<target name="set-wsdeploy" >
<condition property="wsdeploy" value="${wsdeploy.dir}/wsdeploy.bat">
<os family="windows" />
</condition>
<condition property="wsdeploy" value="${wsdeploy.dir}/wsdeploy">
<not>
<os family="windows" />
</not>
</condition>
</target>
<target name="set-wscompile" >
<condition property="wscompile" value="${wscompile.dir}/wscompile.bat">
<os family="windows"/>
</condition>
<condition property="wscompile" value="${wscompile.dir}/wscompile">
<not>
<os family="windows"/>
</not>
</condition>
</target>
<target name="run-wscompile" depends="prepare,set-wscompile"
description="Runs wscompile">
<echo message="Running wscompile:"/>
<echo message=" ${wscompile} ${param1}"/>
<exec executable="${wscompile}">
<arg line="${param1}"/>
</exec>
</target>
<target name="run-wsdeploy" depends="prepare,set-wsdeploy"
description="Runs wsdeploy">
<echo message="Running wsdeploy:"/>
<echo message=" ${wsdeploy} ${param1}"/>
<exec executable="${wsdeploy}">
<arg line="${param1}"/>
</exec>
</target>
</project>
/*config-interface.xml*/
<?xml version="1.0" encoding="UTF-8"?>
<configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
<service name="MyHelloService"      
targetNamespace="urn:Foo"
typeNamespace="urn:Foo"
packageName="hellows">
<interface name="hellows.HelloIF"/>     
</service>
</configuration>
/*jaxrpc-ri.xml*/
<?xml version="1.0" encoding="UTF-8"?>
<webServices xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/dd"
     version="1.0"
     targetNamespaceBase="urn:Foo"
     typeNamespaceBase="urn:Foo"
     urlPatternBase="/ws">
<endpoint     name="MyHello"
     displayName="HelloWorld Service"
     description="A simple web service"
     interface="HelloWS.HelloIF"
     model="/WEB-INF/model.gz"
     implementation="HelloWS.HelloImpl"/>
<endpointMapping endpointName="MyHello" urlPattern="/hello"/>
</webServices>
/*web.xml*/
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE
     web-app
     PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
     "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">
<web-app>
<display-name>Hello World Application</display-name>
<description>A web application containing a simple JAX-RPC endpoint</description>
<session-config><session-timeout>60</session-timeout>
</session-config>
</web-app>

I would encourage you to go through the tutorial
setup process again. The only time you should have
this is issues is as a resulty of missing / wrong
env.

Similar Messages

  • ? help with cgiauth example

    I have been playing with the cgiauth example located in /opt/SUNWics5/cal/csapi/authsdk and am having some trouble.
    I am a little confused what I should use for the ADMINNAME that is passed to CEXP_Init as well as the second parameter pszldapMarchAttrib. I have tried a variety of known good values and known bad values and the routine always returns a success value. I can't make it return a -1 for a bad ADMIN(NAME/PASSWD) pair.
    This then causes a problem when I try to call CEXP_GenerateLoginURL because it never returns a valid url. I can login in another window and fake the url to test if the html/cgi interface works properly. It does. The problem is that I can't generate a successful LoginURL or get Init to return an error.
    Any ideas or hints?
    pat

    No Sorry.  This would still pick up unwanted orders.   If I want to exclude orders with A and B Item categories and I use your logic I would still pick up orders that had A, B, and C Item categories.
    I need only orders where they do not contain A or B Item Categories..  So an Order that has line items with A, B, and C item categories should be excluded.  Filtering just A and B would still return this order.
    Can anyone help with this?  Thanks!

  • Help with Java Examples

    Dear All
    Does anyone know any websites where i can java programs examples from, ive been set an assignement to design a stock control system, but DONT want copy and i cant copy the program as i have to do a report and a presetation of why i choose to do certain things even if its not working 100%
    Cheers

    I'm not sure if you'll find what you're looking for but http://www.planet-source-code.com/ is a place with many examples.

  • Help with logic example

    I apologize in advance for the formatting. I have the following data in the fact tables:
    Account     SigneData     TimeID     CostCenter     Customer     Platform
    ASSESSMENTPCT     0.12     20090000     NO_CC     ALASKA_EXPL     OVERHEAD_PLATFORM
    ASSESSMENTPCT     0.34     20090000     NO_CC     CANADA_EXPL     OVERHEAD_PLATFORM
    ASSESSMENTPCT     0.25     20090000     NO_CC     L48_EXPL     OVERHEAD_PLATFORM
    ASSESSMENTPCT     0.06     20090000     NO_CC     NORWAY_EXPL     OVERHEAD_PLATFORM
    ASSESSMENTPCT     0.08     20090000     NO_CC     UK_EXPL     OVERHEAD_PLATFORM
    ASSESSMENTPCT     0.15     20090000     NO_CC     VENEZUELA_EXPL     OVERHEAD_PLATFORM
    P_TRAVEL     100     20090100     NH471     ASSESSED_CUSTOMER     SST_4D_SEISSVYDGN
    P_TRAVEL     200     20090100     NH471     ASSESSED_CUSTOMER     SST_SMARTFIELDS
    and need to created logic to produce the following results:
    Account     SigneData     TimeID     CostCenter     Customer     Platform
    P_TRAVEL     12     20090100     NH471     ALASKA_EXPL     SST_4D_SEISSVYDGN
    P_TRAVEL     34     20090100     NH471     CANADA_EXPL     SST_4D_SEISSVYDGN
    P_TRAVEL     25     20090100     NH471     L48_EXPL     SST_4D_SEISSVYDGN
    P_TRAVEL     6     20090100     NH471     NORWAY_EXPL     SST_4D_SEISSVYDGN
    P_TRAVEL     8     20090100     NH471     UK_EXPL     SST_4D_SEISSVYDGN
    P_TRAVEL     15     20090100     NH471     VENEZUELA_EXPL     SST_4D_SEISSVYDGN
    P_TRAVEL     24     20090100     NH471     ALASKA_EXPL     SST_SMARTFIELDS
    P_TRAVEL     68     20090100     NH471     CANADA_EXPL     SST_SMARTFIELDS
    P_TRAVEL     50     20090100     NH471     L48_EXPL     SST_SMARTFIELDS
    P_TRAVEL     12     20090100     NH471     NORWAY_EXPL     SST_SMARTFIELDS
    P_TRAVEL     16     20090100     NH471     UK_EXPL     SST_SMARTFIELDS
    P_TRAVEL     30     20090100     NH471     VENEZUELA_EXPL     SST_SMARTFIELDS
    Any ideas? I know I can use the LOOKUP or GET functions to get the data, but I am stuck with regard to the fact that I have multiple. Thanks Craig
    Update: I may not have been clear, so I wanted to add some notes. This is an allocation, of sorts. The first six records represent the percentage that each customer will be allocated. The last two records represent each of the two amounts, by platform dimension, that must be allocated. The result takes the percentage for each customer, multiplies it by the corresponding amount for P_Travel, and creates a P_Travel amount for each customer for each platform.
    Any insight, thoughts, direction, theory, examples, etc. would be greatly appreciated.
    Edited by: Craig Tennant on May 27, 2008 11:06 PM

    It sounds like you should create a script logic based on running an allocation.
    Something like (obviously dont know your dimensions but made a fair attempt at it!):
    *RUNALLOCATION
          *FACTOR=USING/TOTAL
          *NAME=Travel
          *DESCRIPTION=Allocate Travel amounts
            *DIM Account            WHAT=P_TRAVEL;        WHERE=<<<;            USING=ASSESSMENTPCT;        TOTAL=<<<;                         
            *DIM Costcenter              WHAT=NH471;         WHERE=<<<;     USING=NO_CC;                 TOTAL=<<<;              
            *DIM Customer        WHAT=ASSESSED_CUSTOMER;                 WHERE=BAS(ALL_CUSTOMERS);              USING=<<<;              TOTAL=<<<;              
             *DIM Platform              WHAT=BAS(All_platform);         WHERE=<<<;     USING=<<<;                 TOTAL=<<<;  
    *ENDALLOCATION
    *COMMIT
    Does this help?

  • Need help with AcqVoltageSamples_IntClkAnalogStart example

    When running this VB.NET example without any modifications, I get this error:
    Property: NI.DAQmx.StartTrigger.Type
    You have requested: ...AnalogEdge
    You can select: DigitalEdge, None
    Out of the box, the example specifies trigger source PFI0.
    What do I need to do for this example to run?
    Thanks.

    Usually, this error indicates that the DAQ card you are using does not support triggering on an analog signal. Since our DAQ cards that do support analog triggers can trigger on PFI0, this is probably your problem. If you have a digital signal to use for your trigger, change the "task.Triggers.StartTrigger.ConfigureAnalogEdgeTrigger" call in the example to call "task.Triggers.StartTrigger.ConfigureDigitalEdgeTrigger". If you need trigger on an analog signal, I would contact your sales engineer about replacing your card with one that has the necessary analog trigger circuitry.
    Tony H.
    Measurement Studio

  • Help with Deployment Example Comm Suite 6 Update 1 on Single Host

    Our site would like to evaluate Sun's Collaboration Suite, but we are unable to get the eval copy working.
    We are installing the SPARC version.
    I went through the install and got to "Verify the Installation".
    cd /var/opt/SUNWwbsvr7/admin-server/bin
    ./stopserv
    ./startserv
    cd /var/opt/SUNWwbsvr7/https-wireless.comms.beta.com/bin
    ./stopserv
    ./startserv
    The last startserv threw some errors (shown below), but said "successfully started".
    http://<host>:8080/amconsole does not work..says "Not found"
    http://<host> gives "http status 500"
    I also tried https://<host>:8989..and that seems to work fine.
    Any help would be appreciated.
    Thanks
    # ./stopserv
    server not running
    # ./startserv
    Sun Java System Web Server 7.0U1 B07/18/2007 15:51
    info: CORE3016: daemon is running as super-user
    info: CORE5076: Using [Java HotSpot(TM) Server VM, Version 1.5.0_12] from [Sun Microsystems Inc.]
    info: WEB0100: Loading web module in virtual server [<host>] at [amserver]
    warning: WEB6100: locale-charset-info is deprecated, please use parameter-encoding
    failure: WebModule[amserver]StandardWrapper.Throwable
    java.lang.ExceptionInInitializerError
    at com.sun.identity.authentication.UI.LoginLogoutMapping.initializeAuth(LoginLogoutMapping.java:89)
    at com.sun.identity.authentication.UI.LoginLogoutMapping.init(LoginLogoutMapping.java:74)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1165)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:994)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4731)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:5123)
    at com.sun.webserver.connector.nsapi.WebModule.start(WebModule.java:182)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1224)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:924)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1224)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:520)
    at org.apache.catalina.startup.Embedded.start(Embedded.java:917)
    at com.sun.enterprise.web.PwcWebContainer.onStartup(PwcWebContainer.java:70)
    at com.sun.webserver.connector.nsapi.WebContainer.start(WebContainer.java:472)
    at com.sun.webserver.init.J2EERunner.confPostInit(J2EERunner.java:304)
    Caused by: java.lang.NullPointerException
    at com.sun.identity.authentication.service.AuthD.<clinit>(AuthD.java:206)
    ... 15 more
    failure: WebModule[amserver]PWC1396: Servlet /amserver threw load() exception
    java.lang.ExceptionInInitializerError
    at com.sun.identity.authentication.UI.LoginLogoutMapping.initializeAuth(LoginLogoutMapping.java:89)
    at com.sun.identity.authentication.UI.LoginLogoutMapping.init(LoginLogoutMapping.java:74)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1165)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:994)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4731)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:5123)
    at com.sun.webserver.connector.nsapi.WebModule.start(WebModule.java:182)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1224)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:924)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1224)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:520)
    at org.apache.catalina.startup.Embedded.start(Embedded.java:917)
    at com.sun.enterprise.web.PwcWebContainer.onStartup(PwcWebContainer.java:70)
    at com.sun.webserver.connector.nsapi.WebContainer.start(WebContainer.java:472)
    at com.sun.webserver.init.J2EERunner.confPostInit(J2EERunner.java:304)
    Caused by: java.lang.NullPointerException
    at com.sun.identity.authentication.service.AuthD.<clinit>(AuthD.java:206)
    ... 15 more
    info: HTTP3072: http-listener-1: http://<host>:8080 ready to accept requests
    info: CORE3274: successful server startup

    ala_umn wrote:
    I did have trouble with the Identity Suite 5 Update 1 install and ended up uninstalling that and repeating that step.Cleaning up after a failed JES5u1 install/deployment is difficult e.g. "uninstalling" Access Manager does not remove entries/configuration from the Directory Server instance. I usually just re-install Solaris afresh and start again.
    The directory server instance was running, but I did a stop/start-slapd just to be sure. The error you provided indicates there was an authentication problem, usually to the Directory Server instance. There can be any number of causes of this problem including the directory server not running, or the AM authentication details e.g. cn=dsameuser/cn=puser being inconsistent between the DS instance and AM configuration.
    Regards,
    Shane.

  • Help with Purse example

    Hello.
    i managed to run the purse example supplied in java kit 2_2_2.
    However, as i tried to migrate the involved files into another folder and run it, i ran into this problem during runtime.
    Receiving initial reference... java.rmi.StubNotFoundException: classes.PurseImpl_Stub
    All the neccessary packages names and jcwde_rmi.app paths has been modified but to no avail.
    Can someone tell me the problem please?

    My apologies, this is what a correct output should look like as compared to my earlier post:
    Receiving initial reference... OK
    Getting the balance... Balance = 0
    Crediting 20...
    Debiting 15...
    Getting the new balance... Balance = 5
    Setting account number equal to 54321...
    Getting the account number... 5 4 3 2 1
    Trying to set incorrect (too long) account number. Expecting to get UserExcepti
    n with code=0x6002
    Received UserException javacard.framework.UserException
    Reason code = 0x6002
    ___________________________________________________

  • Help with FMS Example

    I was going through the tutorial documentated at
    http://www.adobe.com/devnet/flashmediaserver/articles/on_demand_player.html
    by Mr Robert Sandie. Despite following every step that was
    described in the tutorial, whenever I click on the
    "OnDemandPlayer.html" page, a warning message that reads
    The following local application on your computer or network
    "..\OnDemandPlayer.swf" is trying to communicate with this
    Internet-enabled location "dev.cyprus.shorecomp.net" ...
    The screen fails to display the video supposed to be stream
    from my FMS instance (white screen).
    I have gone through the codes but there isn't a single place
    that I can find "dev.cyprus.shorecomp.net" being declared.
    Does anyone knows where I got it wrong? Thank you guys for
    your kind assistance.

    JayCharles : A million thanks for your explaination.
    I sort of just needed a very very basic demonstration of the
    streaming capabilities in FMS and I actually got my solution from
    this thread.
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=15&catid=578&threadid =1236998&enterthread=y

  • Help With HelloWorld

    I am new to Java Programming. I am still trying to run my first programming "Hello World".
    While I do my first application and it is not work.
    C:\java>java HelloWorldApp
    Exception in thread "main" java.lang.ClassFormatError: Truncated class file
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$000(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    Could not find the main class: HelloWorldApp. Program will exit.

    I still get this message
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    C:\Documents and Settings\AJ Ryan>cd C:\java
    C:\java>dir
    Volume in drive C has no label.
    Volume Serial Number is 94A6-255A
    Directory of C:\java
    03/28/2009 08:34 PM <DIR> .
    03/28/2009 08:34 PM <DIR> ..
    03/28/2009 03:03 PM 0 cd
    03/28/2009 03:03 PM 0 dir
    03/28/2009 03:03 PM 0 Hello
    03/28/2009 03:03 PM 0 HelloWorldApp
    03/28/2009 03:03 PM 0 HelloWorldApp.class
    03/28/2009 08:34 PM 269 HelloWorldApp.java
    03/28/2009 04:25 PM 275 HolaMundoWorld.java
    03/28/2009 03:03 PM 0 java
    03/20/2009 08:04 PM 76,633,496 jdk-6u12-windows-i586-p.exe
    03/28/2009 08:28 PM 76,658,072 jdk-6u13-windows-i586-p.exe
    03/28/2009 03:06 PM 0 jdk6
    03/28/2009 03:03 PM 0 Microsoft
    12 File(s) 153,292,112 bytes
    2 Dir(s) 42,542,907,392 bytes free
    C:\java>java HelloWorldApp
    Exception in thread "main" java.lang.ClassFormatError: Truncated class file
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$000(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    Could not find the main class: HelloWorldApp. Program will exit.
    C:\java>

  • Help With Geodetic Rectangular Query Please

    I'm new to spatial so I appreciate your help.
    I have a 3D geodetic coordinate system defined that is index in 2D (lon & lat).
    I want to do a query that returns all points (lat, lon, alt) within the rectangle described by the query.
    I read in the "Oracle Spatial User's Guide" that this rectangle must have 5 points (since I'm using geodetic).
    I have not found a good example of how to format the query. Can you help with an example?

    here is an example which assume a wgs-84 coordinate system (srid=8307). Note that altitude will be ignored.
    select col1,col2,etc
    from geom_table
    where sdo_relate(geom,mdsys.sdo_geometry(2003,8307,NULL,
    mdsys.sdo_elem_info_array(1,1003,1),
    mdsys.sdo_ordinate_array(-70.05,40.8, -69.05,40.8, -69.05,41.2, -70.05,41.2, -70.05,40.8)),
    'mask=anyinteract querytype=window') = 'TRUE';

  • Help with MenuBuilder

    Hi All -
    I'm looking for help with and examples of MenuBuilder
    projects. I have a product tour that is comprised of 4 scenarios. I
    have created the scenarios as .exe files in Captivate. I would like
    to use MenuBuilder to launch those .exe files. However, as best I
    can tell, the only thing I can do with MenuBuilder is have a list
    of 4 links that launch the .exes. I would like additional text to
    describe the scenarios and perhaps rollovers on each of the links.
    Is there any way to do this or samples of other things people have
    done with MenuBuilder?
    thanks -
    David

    Hi Erik
    For starters, Captivate does not create movies in HTML
    format. It always creates them in .SWF format. Are you possibly
    noticing the fact you can create an additional HTML page used to
    display your .SWF movie and assuming the movie is in HTML format?
    Is this Captivate 1 or Captivate 2? I ask because you are
    talking about "the same underlying files".
    One suggestion I would make is to totally forego MenuBuilder
    in favor of Jesse Warden's Captivate Player.
    Developer
    Center Article
    Player
    Update Page
    Cheers... Rick

  • Help with Upload file to Server Examples

    I have been working with the examples for how to upload a file to the server. Though i got the example to work. there is one more thing i need to do. i need to allow the user to be able to select multiple files.  In the example when you click on Upload, it opens a MS window to allow you to select a file. This example does not allow you to select more then one file though. I found another example for selecting multiple files but this one differs very much in that the person who make it "Ryan Favro" created a whole new GUI window to select multiple files. those his example works great, i dont want a special window to select files, i want the MS window to do it.
    Is there a way to make the original example that uses the MS window to allow the user to select multiple files ?
    I have attached the example that uses the MS window.

    Hi,
    Use this code. May be it helps u.
    fileuploadapp.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:com="test.*" layout="absolute"
        creationComplete="initApp()" viewSourceURL="srcview/index.html">
        <mx:Script>
            <![CDATA[
                import mx.controls.Alert;
                private const _strDomain:String = new String("http://localhost:8400/");
                private const _strUploadScript:String = new String(_strDomain + "ProcessFileUp/UploadFile");
                // Initalize
                private function initApp():void {
                    Security.allowDomain(_strDomain);
            ]]>
        </mx:Script>
        <mx:Canvas width="400" height="300" horizontalCenter="0" verticalCenter="0">
            <com:FileUpload
                width="100%" height="100%"
                uploadUrl="{_strUploadScript}"
                uploadComplete="Alert.show('File(s) have been uploaded.', 'Upload successful')"
                uploadIOError="Alert.show('IO Error in uploading file.', 'Error')"
                uploadSecurityError="Alert.show('Security Error in uploading file.', 'Error')"/>
        </mx:Canvas>
    </mx:Application>
    fileuoload.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:com="*"
        layout="vertical" width="100%" minWidth="400" height="100%" minHeight="200"
        title="Upload Files" creationComplete="initCom()">
        <mx:Metadata>
            [Event(name="uploadComplete", type="flash.events.Event")]
            [Event(name="uploadProgress", type="flash.events.ProgressEvent")]
            [Event(name="uploadCancel", type="flash.events.Event")]
            [Event(name="uploadIOError", type="flash.events.IOErrorEvent")]
            [Event(name="uploadSecurityError", type="flash.events.SecurityErrorEvent")]
        </mx:Metadata>
        <mx:Script>
            <![CDATA[
                import mx.controls.*;
                import mx.managers.*;
                import mx.events.*;
                import flash.events.*;
                import flash.net.*;
                private var _strUploadUrl:String;
                private var _refAddFiles:FileReferenceList;   
                private var _refUploadFile:FileReference;
                private var _arrUploadFiles:Array;
                private var _numCurrentUpload:Number = 0;           
                // Set uploadUrl
                public function set uploadUrl(strUploadUrl:String):void {
                    _strUploadUrl = strUploadUrl;
                // Initalize
                private function initCom():void {
                    _arrUploadFiles = new Array();               
                    enableUI();
                    uploadCheck();
                // Called to add file(s) for upload
                private function addFiles():void {
                    _refAddFiles = new FileReferenceList();
                    _refAddFiles.addEventListener(Event.SELECT, onSelectFile);
                    _refAddFiles.browse();
                // Called when a file is selected
                private function onSelectFile(event:Event):void {
                    var arrFoundList:Array = new Array();
                    // Get list of files from fileList, make list of files already on upload list
                    for (var i:Number = 0; i < _arrUploadFiles.length; i++) {
                        for (var j:Number = 0; j < _refAddFiles.fileList.length; j++) {
                            if (_arrUploadFiles[i].name == _refAddFiles.fileList[j].name) {
                                arrFoundList.push(_refAddFiles.fileList[j].name);
                                _refAddFiles.fileList.splice(j, 1);
                                j--;
                    if (_refAddFiles.fileList.length >= 1) {               
                        for (var k:Number = 0; k < _refAddFiles.fileList.length; k++) {
                            _arrUploadFiles.push({
                                name:_refAddFiles.fileList[k].name,
                                size:formatFileSize(_refAddFiles.fileList[k].size),
                                file:_refAddFiles.fileList[k]});
                        listFiles.dataProvider = _arrUploadFiles;
                        listFiles.selectedIndex = _arrUploadFiles.length - 1;
                    if (arrFoundList.length >= 1) {
                        Alert.show("The file(s): \n\n• " + arrFoundList.join("\n• ") + "\n\n...are already on the upload list. Please change the filename(s) or pick a different file.", "File(s) already on list");
                    updateProgBar();
                    scrollFiles();
                    uploadCheck();
                // Called to format number to file size
                private function formatFileSize(numSize:Number):String {
                    var strReturn:String;
                    numSize = Number(numSize / 1000);
                    strReturn = String(numSize.toFixed(1) + " KB");
                    if (numSize > 1000) {
                        numSize = numSize / 1000;
                        strReturn = String(numSize.toFixed(1) + " MB");
                        if (numSize > 1000) {
                            numSize = numSize / 1000;
                            strReturn = String(numSize.toFixed(1) + " GB");
                    return strReturn;
                // Called to remove selected file(s) for upload
                private function removeFiles():void {
                    var arrSelected:Array = listFiles.selectedIndices;
                    if (arrSelected.length >= 1) {
                        for (var i:Number = 0; i < arrSelected.length; i++) {
                            _arrUploadFiles[Number(arrSelected[i])] = null;
                        for (var j:Number = 0; j < _arrUploadFiles.length; j++) {
                            if (_arrUploadFiles[j] == null) {
                                _arrUploadFiles.splice(j, 1);
                                j--;
                        listFiles.dataProvider = _arrUploadFiles;
                        listFiles.selectedIndex = 0;                   
                    updateProgBar();
                    scrollFiles();
                    uploadCheck();
                // Called to check if there is at least one file to upload
                private function uploadCheck():void {
                    if (_arrUploadFiles.length == 0) {
                        btnUpload.enabled = false;
                        listFiles.verticalScrollPolicy = "off";
                    } else {
                        btnUpload.enabled = true;
                        listFiles.verticalScrollPolicy = "on";
                // Disable UI control
                private function disableUI():void {
                    btnAdd.enabled = false;
                    btnRemove.enabled = false;
                    btnUpload.enabled = false;
                    btnCancel.enabled = true;
                    listFiles.enabled = false;
                    listFiles.verticalScrollPolicy = "off";
                // Enable UI control
                private function enableUI():void {
                    btnAdd.enabled = true;
                    btnRemove.enabled = true;
                    btnUpload.enabled = true;
                    btnCancel.enabled = false;
                    listFiles.enabled = true;
                    listFiles.verticalScrollPolicy = "on";
                // Scroll listFiles to selected row
                private function scrollFiles():void {
                    listFiles.verticalScrollPosition = listFiles.selectedIndex;
                    listFiles.validateNow();
                // Called to upload file based on current upload number
                private function startUpload():void {
                    if (_arrUploadFiles.length > 0) {
                        disableUI();
                        listFiles.selectedIndex = _numCurrentUpload;
                        scrollFiles();
                        // Variables to send along with upload
                        var sendVars:URLVariables = new URLVariables();
                        sendVars.action = "upload";
                        var request:URLRequest = new URLRequest();
                        request.data = sendVars;
                        request.url = _strUploadUrl;
                        request.method = URLRequestMethod.POST;
                        _refUploadFile = new FileReference();
                        _refUploadFile = listFiles.selectedItem.file;
                        _refUploadFile.addEventListener(ProgressEvent.PROGRESS, onUploadProgress);
                           _refUploadFile.addEventListener(Event.COMPLETE, onUploadComplete);
                        _refUploadFile.addEventListener(IOErrorEvent.IO_ERROR, onUploadIoError);
                          _refUploadFile.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onUploadSecurityError);
                        _refUploadFile.upload(request, "file", false);
                // Cancel and clear eventlisteners on last upload
                private function clearUpload():void {
                    _refUploadFile.removeEventListener(ProgressEvent.PROGRESS, onUploadProgress);
                    _refUploadFile.removeEventListener(Event.COMPLETE, onUploadComplete);
                    _refUploadFile.removeEventListener(IOErrorEvent.IO_ERROR, onUploadIoError);
                    _refUploadFile.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, onUploadSecurityError);
                    _refUploadFile.cancel();
                    _numCurrentUpload = 0;
                    updateProgBar();
                    enableUI();
                // Called on upload cancel
                private function onUploadCanceled():void {
                    clearUpload();
                    dispatchEvent(new Event("uploadCancel"));
                // Get upload progress
                private function onUploadProgress(event:ProgressEvent):void {
                    var numPerc:Number = Math.round((event.bytesLoaded / event.bytesTotal) * 100);
                    updateProgBar(numPerc);
                    var evt:ProgressEvent = new ProgressEvent("uploadProgress", false, false, event.bytesLoaded, event.bytesTotal);
                    dispatchEvent(evt);
                // Update progBar
                private function updateProgBar(numPerc:Number = 0):void {
                    var strLabel:String = (_numCurrentUpload + 1) + "/" + _arrUploadFiles.length;
                    strLabel = (_numCurrentUpload + 1 <= _arrUploadFiles.length && numPerc > 0 && numPerc < 100) ? numPerc + "% - " + strLabel : strLabel;
                    strLabel = (_numCurrentUpload + 1 == _arrUploadFiles.length && numPerc == 100) ? "Upload Complete - " + strLabel : strLabel;
                    strLabel = (_arrUploadFiles.length == 0) ? "" : strLabel;
                    progBar.label = strLabel;
                    progBar.setProgress(numPerc, 100);
                    progBar.validateNow();
                // Called on upload complete
                private function onUploadComplete(event:Event):void {
                    _numCurrentUpload++;               
                    if (_numCurrentUpload < _arrUploadFiles.length) {
                        startUpload();
                    } else {
                        enableUI();
                        clearUpload();
                        dispatchEvent(new Event("uploadComplete"));
                // Called on upload io error
                private function onUploadIoError(event:IOErrorEvent):void {
                    clearUpload();
                    var evt:IOErrorEvent = new IOErrorEvent("uploadIoError", false, false, event.text);
                    dispatchEvent(evt);
                // Called on upload security error
                private function onUploadSecurityError(event:SecurityErrorEvent):void {
                    clearUpload();
                    var evt:SecurityErrorEvent = new SecurityErrorEvent("uploadSecurityError", false, false, event.text);
                    dispatchEvent(evt);
                // Change view state
                private function changeView():void {
                    currentState = (currentState == "mini") ? "" : "mini";
            ]]>
        </mx:Script>
        <mx:states>
            <mx:State name="mini">
                <mx:SetProperty name="height" value="60"/>
                <mx:SetProperty name="minHeight" value="60"/>
                <mx:SetStyle target="{btnView}" name="icon" value="@Embed('assets/application_put.png')"/>
            </mx:State>
        </mx:states>
        <mx:transitions>
            <mx:Transition fromState="*" toState="*">
                <mx:Resize target="{this}" duration="1000"/>
            </mx:Transition>
        </mx:transitions>
        <mx:Canvas width="100%" height="100%">
            <mx:DataGrid id="listFiles" left="0" top="0" bottom="0" right="0"
                allowMultipleSelection="true" verticalScrollPolicy="on"
                draggableColumns="false" resizableColumns="false" sortableColumns="false">
                <mx:columns>
                    <mx:DataGridColumn headerText="File" dataField="name" wordWrap="true"/>
                    <mx:DataGridColumn headerText="Size" dataField="size" width="75" textAlign="right"/>
                </mx:columns>
            </mx:DataGrid>
        </mx:Canvas>
        <mx:ControlBar horizontalAlign="center" verticalAlign="middle">
            <mx:Button id="btnAdd" toolTip="Add file(s)" click="addFiles()" icon="@Embed('assets/add.png')" width="26"/>
            <mx:Button id="btnRemove" toolTip="Remove file(s)" click="removeFiles()" icon="@Embed('assets/delete.png')" width="26"/>
            <mx:ProgressBar id="progBar" mode="manual" label="" labelPlacement="center" width="100%"/>
            <mx:Button id="btnCancel" toolTip="Cancel upload" icon="@Embed('assets/cancel2.png')" width="26" click="onUploadCanceled()"/>
            <mx:Button label="Upload" toolTip="Upload file(s)" id="btnUpload" click="startUpload()" icon="@Embed('assets/bullet_go.png')"/>
            <mx:Button id="btnView" toolTip="Show/Hide file(s)" icon="@Embed('assets/application_get.png')" width="26" click="changeView()"/>
        </mx:ControlBar>   
    </mx:Panel>
    Regards,
         Shivang

  • In Data Quality transform please explain Associate transform with the help of any example.

    In Data Quality transform please explain Associate transform with the help of any example.

    Hi Neha,
    If we are using multiple match transforms and consolidate the final output we will use associate transform .
    Let me explain with one example based on data quality blue prints for USA .
    We have customer/vendor data .     We need to find the duplicates .
    1. First  we will find the duplicates  on   Name and Address
    2. Second  we will find the duplicates on Name and Email
    3. Third we will find the duplicates on Name and Phone
    Here why we need to find the duplicates in multiple stages . If we are finding the duplicates on combination of  Name, Address, Email and Phone  we may not get proper duplicates   as we are finding the potential duplicates . That's why we are finding the duplicates on different combinations .
    In this case we will get the different group numbers for each match combination . Each combination name is there .
    We want to consolidate and give the group number to the whole set of duplicates . We will pass these  3 match groups to associative transform and generate the  consolidated match group for the input data.
    I hope you understand the concept .
    Thanks & Regards,
    Ramana.

  • Help with "DAC Configure for Quadrature Mode.vi" in "ni5640R Frequency Translation" Example

    Hi there:
    I am also using the the NI PCI-5640R and I've been "studying" the
    program: "Frequency Translation", my intention is to modify it and
    produce a  closed-loop between I and O. 
    I am also interested in transferring what i am reading through the
    input port, directly to the output port but filtered AND with a
    phase-shift (final Objective: Q-Control). 
    I need to visualize the signal in the HOST, so I need both FIFOS (DMA
    FIFO and  Local FIFO), and the "Quadrature Mode DAC Configure"
    I would like to know:
    1. How can I directly transfer the data acquired through the ADC port
    into the DAC?  (it is unclear due to the Event structure in the
    "Frequency Translation" example)
    2.
    How can I configure the "Quadrature Mode DAC Configure.vi" for it to
    bandpass-filter the signal comming from the ADC at a given frequency
    and BW, specified by the user in the HOST? I have read that it is possible to filter a signal comming to the DAC using DUCs (Digital Upconverters) Does anyone has more info about this topic?
    3. Is it possible to
    configure the "Quadrature Mode DAC Configure.vi" to produce a
    phase-shifted signal (phase shift also specified by user in the host)
    I've
    been working for almost 2 months trying to program the 5640R, doing
    examples, and modifying them.  After playing with different examples
    I've come up to the conclusion that the "Frequency Translation" example
    is the one that best-suites my application.  My problem now is that I
    AM LOST because i need more information regarding the configuration
    parameters of ALL the different VI's inside the NI-5640R VI Tree  to
    exploit them correctly, specially the "Quadrature Mode DAC
    Configure.vi".
    Can anyone please help me?
    Cheers...Antonio

    Hello again:
    Jerry:
    1. I referred to the Event structure, but in the HOST, but now, with your commentary and Philippe's explanation i've undestood better the concept.
    2. Regarding the filtering, I read the datasheet of the AD6654 (DAC from "Analog Devices" which is part of the n5640r) and in pages 36 and 37, it explains with an example, the possibility of designing a Bandpass CIC Filter by changing the interpolation (or decimation) factor of the DUC (or DDC).  The filter can't be fully customized (the rejection and passband are limited to an "Alias rejection Table" in page 36), but it could fit the application to filter certain frequencies.
    I also tryed what you guys suggested, meaning: I designed a simple digital bandpass butterworth IIR filter in the FPGA target inside a 3rd SCTL with a faster clock (i.e. "Top level timing source") and using a 2nd Local FIFO.  The filter was done with FPGA discrete delays (z^-n) departing from a "differences equation" [y(n) = x(n-1)+x(n)+0.9996858*y(n-1)].  But I have problems with the 0.99... constant which is always rounded to 1 (check the pic).  I changed the variable's type and digits of precision, but it still rounds up to 1 Any suggestions?
    3. I was thinking as well of shifting the phase (as Jerry said) by configurating the NCO in the DAC.  Again, more information is given in AD6654's datasheet  (page 35).  I will quote the info:
    "The phase offset register can be written with a value that is added as an offset to the phase accumulator of the NCO.  This 16 bit register is interpreted as 16-bit unregistered integer.  A 0x0000 in this register corresponds to a 0 radian offset and a 0xFFF corresponds to an offset of 2pi*(1 -  1/2^16) radians.  This register allows multiple NCOs (multiple channels) to be sinchronized to produce complex sinusoids with a known steady phase difference:"
    Any ideas of how to program this register inside the "ni5640r ADC Configure NCO" to have a fixed phase offset of 90º?
    Thanx in advance for your replies
    'till the next post...Antonio
    Attachments:
    Digital IIR.JPG ‏122 KB

  • Help with parse... see example

    Hey,
    I need some help with this, i'm writing a program which reads from a database and when it does, It does some validation.
    My problem is this: I need to convert it from a date to string (or string to date, it doesn't matter). I get an error saying it is an undefined data type. please see the examples of my code
    So for example, cost works, when i convert to int. For parseInt illustrated here
         //Cost
         public void setCost(String sCostA) throws Exception {
              try{
                   Validation.IsValid(sCostA + "","N","M","","","0","");
                   iCost = Integer.parseInt(sCostA);
              }catch (Exception e){
                   throw new Exception("Cost Invalid:\n"+e);
         public void setCost(int iCostA) throws Exception {
              try{
                   Validation.IsValid(iCostA + "","N","M","","","0","");
                   iCost = iCostA;
              }catch (Exception e){
                   throw new Exception("Cost Invalid:\n"+e);
         }While if i try date, it doesn't work. Here is my code...
         //Expire_Date
         public void setExpire_Date(String sExpire_DateA) throws Exception {
              try{
                   Validation.IsValid(sExpire_DateA + "","D","O","","","0","");
                   dtExpire_Date = Date.parseDate(sExpire_DateA);
              }catch (Exception e){
                   throw new Exception("Date_Given Invalid:\n"+e);
         public void setExpire_Date(Date dtExpire_DateA) throws Exception{
              try{
                   Validation.IsDate(dtExpire_DateA + "O");
                   dtExpire_Date = dtExpire_DateA;
              }catch (Exception e){
                   throw new Exception ("Expire_Date is an Invalid Date:\n"+e);
         }I know there should be a way to fix this, i hope someone can help me
    If there is any more info you require please let me know
    Thanks in advance
    Lutty182

    I don't quite understand what you are doing but converting between a data and a string you might want to look at SimpleDateFormat.

Maybe you are looking for