More exceptions

i need to catch the exceptions if the input is not a number, not an integer, and out of range. I am not sure how to determine between the 1st 2 exceptions. i know i should use parseDouble and parseInt but how do both of these fit in?
here is what i have so far, and help would be great.
Thanks,
Peter
import javax.swing.*;
public class Prompter
    private int max;
    public Prompter(int m)
        max = m;
    public int getNumber() throws Exception
        int num = 0;
        String inputStr;
        while (true)
        inputStr = JOptionPane.showInputDialog("Enter an integer from 1 to " + max);
        try {
            num = Integer.parseInt(inputStr);
            if (num < 1 || num > max)
                throw new Exception("Input out of bounds");
                return num;
        }catch (NumberFormatException ex) {
            JOptionPane.showMessageDialog(null, "This is not a number");
}

if the input is "abc" it should produce "abc is not a
number", if the input is "3.14" it should produce
"3.14 us not an integer" if the input is "0" it
should produce "0 is out of range"First try to parse a double out of the input String. If that fails, it wasn't a number. If it passes, try to parse an int out of the original String. If that fails, it's not an integer. If it passes, check the range.

Similar Messages

  • I made music purchases in indian store from 6months and now i see all my music purchases are removed from my purchases and i am not able to find them any more except few recent purchases.. i invested lot of money now i see all are lost.. what can i do?

    i made music purchases in indian store from 6months and now i see all my music purchases are removed from my purchases and i am not able to find them any more except few recent purchases.. i invested lot of money now i see all are lost.. what can i do?

    Have you failed to maintain a backup copy of your content?

  • Exception error_message in rfc function module

    Hi all,
    I am getting a short dump Raise exception in my R/3 system when calling a RFC function module in R/3 for printing  a label in LOFTWARE. The error analysis shows the that exception condition 'Nlink exception' condition raised . The rfc destination is working fine  and also i have included the predefined exceptions system_failure and communication_failure and also I have used RFC_PING function module before calling teh rfc for printing . Yet it is giving short dump.
    I heard that if we include one more exception error_message with return code 99
    ie exceptions
        system_failure = 1
        communictaion_failure = 2
        error_message = 99. there will be no short dump.
    Can anyone explain me why the return code for exception error_message is not 3 but 99 and also what is the significance of this.
    Need your help.

    from dump no information is available also it last occured 5 days ago so refreshed from our system..
    I want to know what is the importance of the return code 99 here...
    can anyone clarify this concept and aslo genrally in rfc exception handling communication_failure and system_failure can handle all type of exceptions then why error_message exception is added with a return code of 99..

  • No specific exceptions in standard ExchangeFaultData message for any ES?

    Hi,
    I am trying to implement various enterprise services in ERP backend, but whenever a service return one or more exceptions, I always get an empty exception message. Eg:
    <n0:ExchangeFaultData xmlns:n0="http://sap.com/xi/SRM/SE/Global" xmlns:prx="urn:sap.com:proxy:SRA:/1SAI/TAS570F727BD12E0D378A86:701:2008/06/06">
    <standard>
      <faultText />
      </standard>
      </n0:ExchangeFaultData>
    If I debug the method I can see that several exceptions are raised and specified in diverse structures, but for some reason these aren't converted into the standard fault message type for the ES. I suspect that I am missing some simple configuration.
    Any suggestions?
    Many thanks,
    Emil

    Hi,
    This could be the problem of confilting namespace or combinations.
    in receive action just check that right message interface is configured at Inbound side.
    just check any place void ?
    1)just check the name as case sensitive.
    2)Just check is there interface belongs to right software component.
    3)Just check mapping assigned to the right combination or not.
    its better to cross check all the component are assigned to right place or not.
    ****if helpful then rewards points
    Regards,
    Sumit Gupta

  • PeerGone Exception while Recieving the message over t3 protocol

    Hallo Every body. I'm having a swing based application which accessing the database through a DataSource on a ManagedServer. I'm recieving more Message length than default given by the Weblogic Server. i've changed the setting to more than that length. Now i've got one more exception is
    java.io.IOException: A complete message could not be read on socket: 'weblogic.rjvm.t3.MuxableSocketT3@170573:Socket[addr=10.0.0.76/10.0.0.76,port=7003,localport=4596]', in the configured timeout period of '60' secs
    weblogic.rjvm.PeerGoneException: ; nested exception is:
         java.io.IOException: A complete message could not be read on socket: 'weblogic.rjvm.t3.MuxableSocketT3@170573:Socket[addr=10.0.0.76/10.0.0.76,port=7003,localport=4596]', in the configured timeout period of '60' secs     at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:191)
         at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:315)
         at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:250)
         at com.pass.project.passis.ejb.reportserver.ReportServerStateless_pb6kw6_EOImpl_900_WLStub.getMarketingReport(Ljava.lang.String;Ljava.util.Vector;Ljava.util.Vector;)Ljava.util.List;(Unknown Source)
         at com.pass.project.passis.client.model.ejb.ReportServerModelImpl.getMarketingReport(ReportServerModelImpl.java:347)
         at com.pass.project.passis.client.model.MarketingReportModel.generateReport(MarketingReportModel.java:138)
         at com.pass.project.passis.client.dlgMarketingActivities.doRefresh(dlgMarketingActivities.java:1087)
         at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.InitialMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
         at com.pass.project.passis.client.dlgMarketingActivities.handleEvent(dlgMarketingActivities.java:379)
         at com.pass.component.eventhandling.EventDispatcher.informListeners(EventDispatcher.java:48)
         at com.pass.component.eventhandling.AsynchronousEventDispatcher.flush(AsynchronousEventDispatcher.java:61)
         at com.pass.component.eventhandling.EventFacade.flush(EventFacade.java:264)
         at com.pass.component.menubar.MenuAction.actionPerformed(MenuAction.java:44)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
         at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
         at java.awt.Component.processMouseEvent(Component.java:5488)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3093)
         at java.awt.Component.processEvent(Component.java:5253)
         at java.awt.Container.processEvent(Container.java:1966)
    Caused by: java.io.IOException: A complete message could not be read on socket: 'weblogic.rjvm.t3.MuxableSocketT3@170573:Socket[addr=10.0.0.76/10.0.0.76,port=7003,localport=4596]', in the configured timeout period of '60' secs
         at weblogic.socket.SocketMuxer$TimerListenerImpl.timerExpired(SocketMuxer.java:931)
         at weblogic.timers.internal.TimerImpl.run(TimerImpl.java:259)
         at weblogic.work.ExecuteRequestAdapter.execute(ExecuteRequestAdapter.java:21)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)
    [12/13/06 9:50:49 AM D] com.pass.project.passis.client.model.MarketingReportModel.generateReport(MarketingReportModel.java:147) <AWT-EventQueue-0>:
    i've changed the ManagedServer's Complete Message Timeout to 480(max value). Still Same problem
    if anybody is having the solution regarding this problem please mail to me on [email protected], [email protected], [email protected]

    Babu, the PeerGoneException is wrapper for just about any failure on the t3 transport or remote JVM. Try the following:
    Turn on t3/RMI debugging on the WLS server (using the console: server->debug) or try adding the some of the RMI and and General debug parameters listed here:
    http://dev2dev.bea.com/blog/hoos/archive/2007/01/weblogic_server.html
    And post your log here.
    Also my PGE was down to missing security principles on the remote JVM:
    http://forums.bea.com/bea/thread.jspa?threadID=400000738&messageID=400002805#400002805
    <p>
    Hussein Badakhchani
    London Middleware
    </p>

  • Exception Description: Entity class [] has no primary key....

    Received the following error in jdeveloper - some info on how to fix would be greatly appreciated
    [EclipseLink/JPA Client] Adding Java options: -javaagent:C:\oracle\MiddlewareNew\jdeveloper\modules\oracle.toplink_11.1.1\eclipselink.jar
    C:\Oracle\MiddlewareNew\jdk160_05\bin\javaw.exe -client -classpath C:\JDeveloper\mywork\APP_CM_AUTONUM_GEN\.adf;C:\JDeveloper\mywork\APP_CM_AUTONUM_GEN\SAM_CM_AUTONUM_GEN\classes;C:\oracle\MiddlewareNew\jdeveloper\modules\oracle.toplink_11.1.1\toplink.jar;C:\oracle\MiddlewareNew\jdeveloper\modules\oracle.toplink_11.1.1\antlr.jar;C:\oracle\MiddlewareNew\modules\com.bea.core.antlr.runtime_2.7.7.jar;C:\oracle\MiddlewareNew\modules\javax.persistence_1.0.0.0_1-0.jar;C:\oracle\MiddlewareNew\jdeveloper\modules\oracle.toplink_11.1.1\eclipselink.jar;C:\oracle\MiddlewareNew\jdeveloper\modules\oracle.xdk_11.1.1\xmlparserv2.jar;C:\oracle\MiddlewareNew\jdeveloper\modules\oracle.xdk_11.1.1\xml.jar;C:\oracle\MiddlewareNew\modules\javax.jsf_1.2.0.0.jar;C:\oracle\MiddlewareNew\modules\javax.ejb_3.0.1.jar;C:\oracle\MiddlewareNew\modules\javax.enterprise.deploy_1.2.jar;C:\oracle\MiddlewareNew\modules\javax.interceptor_1.0.jar;C:\oracle\MiddlewareNew\modules\javax.jms_1.1.1.jar;C:\oracle\MiddlewareNew\modules\javax.jsp_1.1.0.0_2-1.jar;C:\oracle\MiddlewareNew\modules\javax.jws_2.0.jar;C:\oracle\MiddlewareNew\modules\javax.activation_1.1.0.0_1-1.jar;C:\oracle\MiddlewareNew\modules\javax.mail_1.1.0.0_1-1.jar;C:\oracle\MiddlewareNew\modules\javax.xml.soap_1.3.1.0.jar;C:\oracle\MiddlewareNew\modules\javax.xml.rpc_1.2.1.jar;C:\oracle\MiddlewareNew\modules\javax.xml.ws_2.1.1.jar;C:\oracle\MiddlewareNew\modules\javax.management.j2ee_1.0.jar;C:\oracle\MiddlewareNew\modules\javax.resource_1.5.1.jar;C:\oracle\MiddlewareNew\modules\javax.servlet_1.0.0.0_2-5.jar;C:\oracle\MiddlewareNew\modules\javax.transaction_1.0.0.0_1-1.jar;C:\oracle\MiddlewareNew\modules\javax.xml.stream_1.1.1.0.jar;C:\oracle\MiddlewareNew\modules\javax.security.jacc_1.0.0.0_1-1.jar;C:\oracle\MiddlewareNew\modules\javax.xml.registry_1.0.0.0_1-0.jar;C:\oracle\MiddlewareNew\wlserver_10.3\server\lib\weblogic.jar -javaagent:C:\oracle\MiddlewareNew\jdeveloper\modules\oracle.toplink_11.1.1\eclipselink.jar SAM.CMAUTONUMGENClient
    java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:323)
         at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:338)
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.eclipse.persistence.internal.jpa.deployment.JavaSECMPInitializerAgent.initializeFromAgent(JavaSECMPInitializerAgent.java:45)
         at org.eclipse.persistence.internal.jpa.deployment.JavaSECMPInitializerAgent.premain(JavaSECMPInitializerAgent.java:38)
         ... 6 more
    Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 1.0.2 (Build 20081024)): org.eclipse.persistence.exceptions.EntityManagerSetupException
    Exception Description: Predeployment of PersistenceUnit [SAM_CM_AUTONUM_GEN] failed.
    Internal Exception: Exception [EclipseLink-7161] (Eclipse Persistence Services - 1.0.2 (Build 20081024)): org.eclipse.persistence.exceptions.ValidationException
    Exception Description: Entity class [class oracle.SamCmAutonumGen] has no primary key specified. It should define either an @Id, @EmbeddedId or an @IdClass. If you have defined PK using any of these annotations then please make sure that you do not have mixed access-type (both fields and properties annotated) in your entity class hierarchy.
         at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:870)
         at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.callPredeploy(JPAInitializer.java:101)
         at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.initPersistenceUnits(JPAInitializer.java:149)
         at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.initialize(JPAInitializer.java:135)
         at org.eclipse.persistence.internal.jpa.deployment.JavaSECMPInitializer.initializeFromAgent(JavaSECMPInitializer.java:145)
         ... 12 more
    Caused by: Exception [EclipseLink-28018] (Eclipse Persistence Services - 1.0.2 (Build 20081024)): org.eclipse.persistence.exceptions.EntityManagerSetupException
    Exception Description: Predeployment of PersistenceUnit [SAM_CM_AUTONUM_GEN] failed.
    Internal Exception: Exception [EclipseLink-7161] (Eclipse Persistence Services - 1.0.2 (Build 20081024)): org.eclipse.persistence.exceptions.ValidationException
    Exception Description: Entity class [class oracle.SamCmAutonumGen] has no primary key specified. It should define either an @Id, @EmbeddedId or an @IdClass. If you have defined PK using any of these annotations then please make sure that you do not have mixed access-type (both fields and properties annotated) in your entity class hierarchy.
         at org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:210)
         ... 17 more
    Caused by: Exception [EclipseLink-7161] (Eclipse Persistence Services - 1.0.2 (Build 20081024)): org.eclipse.persistence.exceptions.ValidationException
    Exception Description: Entity class [class oracle.SamCmAutonumGen] has no primary key specified. It should define either an @Id, @EmbeddedId or an @IdClass. If you have defined PK using any of these annotations then please make sure that you do not have mixed access-type (both fields and properties annotated) in your entity class hierarchy.
         at org.eclipse.persistence.exceptions.ValidationException.noPrimaryKeyAnnotationsFound(ValidationException.java:1245)
         at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.validatePrimaryKey(EntityAccessor.java:1173)
         at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.process(EntityAccessor.java:486)
         at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processORMMetadata(MetadataProcessor.java:443)
    FATAL ERROR in native method: processing of -javaagent failed
         at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:303)
         at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:830)
         ... 16 more
    Exception in thread "main" Process exited with exit code 1.

    Hi,
    you may want to try the J2EE forum here on OTN in case you don't get a sufficient answer to the problem.
    Frank

  • Endeca initialize_services give encoding exception

    HI I am in process of creating a new Endeca Product catalog Integration app. I was successfully able to deploy and see the sample Discover-data ref app but this does not seem to create record store in CAS. So I followed the same deployment steps for "discover-data-catalog-integration". I was able to create and deploy app using deployment template in ToolsAndFrameworks but when i initialize the app I get exception mentioned below:
    What could possibly be wrong? which file it is trying to parse that is not right?
    I found "\n" after D: in <app>/test_data\baseline\rs_baseline_data.xml. I removed it but to no avail. It still gives the same exception. Is it a bug?
    Version for CAS and ToolsAndFrameworks is 3.1.1.
    Setting EAC provisioning and performing initial setup...
    [03.22.13 16:13:34] INFO: Checking definition from AppConfig.xml against existing EAC provisioning.
    [03.22.13 16:13:35] INFO: Setting definition for application 'CRS'.
    [03.22.13 16:13:36] INFO: Setting definition for host 'AuthoringMDEXHost'.
    [03.22.13 16:13:36] INFO: Setting definition for host 'LiveMDEXHostA'.
    [03.22.13 16:13:36] INFO: Setting definition for host 'ReportGenerationHost'.
    [03.22.13 16:13:36] INFO: Setting definition for host 'WorkbenchHost'.
    [03.22.13 16:13:36] INFO: Setting definition for host 'ITLHost'.
    [03.22.13 16:13:37] INFO: Setting definition for component 'AuthoringDgraph'.
    [03.22.13 16:13:37] INFO: Setting definition for component 'DgraphA1'.
    [03.22.13 16:13:38] INFO: Setting definition for script 'PromoteAuthoringToLive'.
    [03.22.13 16:13:38] INFO: Setting definition for custom component 'WorkbenchManager'.
    [03.22.13 16:13:38] INFO: Updating provisioning for host 'ITLHost'.
    [03.22.13 16:13:38] INFO: Updating definition for host 'ITLHost'.
    [03.22.13 16:13:38] INFO: [ITLHost] Starting shell utility 'mkpath_-'.
    [03.22.13 16:13:40] INFO: Setting definition for custom component 'IFCR'.
    [03.22.13 16:13:40] INFO: Updating provisioning for host 'ITLHost'.
    [03.22.13 16:13:40] INFO: Updating definition for host 'ITLHost'.
    [03.22.13 16:13:40] INFO: [ITLHost] Starting shell utility 'mkpath_-'.
    [03.22.13 16:13:42] INFO: [ITLHost] Starting shell utility 'mkpath_-'.
    [03.22.13 16:13:44] INFO: Setting definition for component 'LogServer'.
    [03.22.13 16:13:44] INFO: Setting definition for script 'DaySoFarReports'.
    [03.22.13 16:13:44] INFO: Setting definition for script 'DailyReports'.
    [03.22.13 16:13:45] INFO: Setting definition for script 'WeeklyReports'.
    [03.22.13 16:13:45] INFO: Setting definition for script 'DaySoFarHtmlReports'.
    [03.22.13 16:13:45] INFO: Setting definition for script 'DailyHtmlReports'.
    [03.22.13 16:13:45] INFO: Setting definition for script 'WeeklyHtmlReports'.
    [03.22.13 16:13:45] INFO: Setting definition for component 'WeeklyReportGenerator'.
    [03.22.13 16:13:46] INFO: Setting definition for component 'DailyReportGenerator'.
    [03.22.13 16:13:46] INFO: Setting definition for component 'DaySoFarReportGenerator'.
    [03.22.13 16:13:47] INFO: Setting definition for component 'WeeklyHtmlReportGenerator'.
    [03.22.13 16:13:48] INFO: Setting definition for component 'DailyHtmlReportGenerator'.
    [03.22.13 16:13:48] INFO: Setting definition for component 'DaySoFarHtmlReportGenerator'.
    [03.22.13 16:13:49] INFO: Setting definition for script 'BaselineUpdate'.
    [03.22.13 16:13:49] INFO: Setting definition for script 'PartialUpdate'.
    [03.22.13 16:13:49] INFO: Setting definition for component 'ConfigurationGeneratorForge'.
    Exception:
    java.lang.IllegalArgumentException: The char '0xc' after 'D:' is not a valid XML character.
    at org.apache.axis.components.encoding.UTF8Encoder.writeEncoded(UTF8Encoder.java:81)
    at org.apache.axis.encoding.SerializationContext.writeSafeString(SerializationContext.java:1289)
    at org.apache.axis.encoding.ser.SimpleSerializer.serialize(SimpleSerializer.java:104)
    at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1504)
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:980)
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:734)
    at org.apache.axis.encoding.ser.ArraySerializer.serialize(ArraySerializer.java:414)
    at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1504)
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:980)
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:734)
    at org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.java:230)
    at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1504)
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:980)
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:734)
    at org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.java:230)
    at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1504)
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:980)
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:801)
    at org.apache.axis.message.RPCParam.serialize(RPCParam.java:208)
    at org.apache.axis.message.RPCElement.outputImpl(RPCElement.java:433)
    at org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
    at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:139)
    at org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:478)
    at org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
    at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:315)
    at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:269)
    at org.apache.axis.SOAPPart.saveChanges(SOAPPart.java:530)
    at org.apache.axis.attachments.AttachmentsImpl.getAttachmentCount(AttachmentsImpl.java:554)
    at org.apache.axis.Message.getContentType(Message.java:486)
    at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:343)
    at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
    at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
    at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
    at org.apache.axis.client.Call.invoke(Call.java:2767)
    at org.apache.axis.client.Call.invoke(Call.java:2443)
    at org.apache.axis.client.Call.invoke(Call.java:2366)
    at org.apache.axis.client.Call.invoke(Call.java:1812)
    at com.endeca.eac.client.ProvisioningPortSOAPBindingStub.addComponent(ProvisioningPortSOAPBindingStub.java:1068)
    at com.endeca.soleng.eac.toolkit.component.Component.setDefinition(Component.java:838)
    at com.endeca.soleng.eac.toolkit.component.Component.setDefinition(Component.java:815)
    at com.endeca.soleng.eac.toolkit.Controller.provision(Controller.java:691)
    at com.endeca.soleng.eac.toolkit.Controller.execute(Controller.java:235)
    at com.endeca.soleng.eac.toolkit.Controller.main(Controller.java:134)
    Exception:
    java.io.IOException: java.lang.IllegalArgumentException: The char '0xc' after 'D:' is not a valid XML character.
    at org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.java:275)
    at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1504)
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:980)
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:734)
    at org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.java:230)
    at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1504)
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:980)
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:801)
    at org.apache.axis.message.RPCParam.serialize(RPCParam.java:208)
    at org.apache.axis.message.RPCElement.outputImpl(RPCElement.java:433)
    at org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
    at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:139)
    at org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:478)
    at org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
    at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:315)
    at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:269)
    at org.apache.axis.SOAPPart.saveChanges(SOAPPart.java:530)
    at org.apache.axis.attachments.AttachmentsImpl.getAttachmentCount(AttachmentsImpl.java:554)
    at org.apache.axis.Message.getContentType(Message.java:486)
    at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:343)
    at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
    at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
    at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
    at org.apache.axis.client.Call.invoke(Call.java:2767)
    at org.apache.axis.client.Call.invoke(Call.java:2443)
    at org.apache.axis.client.Call.invoke(Call.java:2366)
    at org.apache.axis.client.Call.invoke(Call.java:1812)
    at com.endeca.eac.client.ProvisioningPortSOAPBindingStub.addComponent(ProvisioningPortSOAPBindingStub.java:1068)
    at com.endeca.soleng.eac.toolkit.component.Component.setDefinition(Component.java:838)
    at com.endeca.soleng.eac.toolkit.component.Component.setDefinition(Component.java:815)
    at com.endeca.soleng.eac.toolkit.Controller.provision(Controller.java:691)
    at com.endeca.soleng.eac.toolkit.Controller.execute(Controller.java:235)
    at com.endeca.soleng.eac.toolkit.Controller.main(Controller.java:134)
    Exception:
    AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: java.io.IOException: java.io.IOException: java.lang.IllegalArgumentException: The char '0xc' after 'D:' is not a valid XML character.
    faultActor:
    faultNode:
    faultDetail:
    {http://xml.apache.org/axis/}stackTrace:java.io.IOException: java.io.IOException: java.lang.IllegalArgumentException: The char '0xc' after 'D:' is not a valid XML character.
    at org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.java:275)
    at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1504)
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:980)
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:801)
    at org.apache.axis.message.RPCParam.serialize(RPCParam.java:208)
    at org.apache.axis.message.RPCElement.outputImpl(RPCElement.java:433)
    at org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
    at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:139)
    at org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:478)
    at org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
    at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:315)
    at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:269)
    at org.apache.axis.SOAPPart.saveChanges(SOAPPart.java:530)
    at org.apache.axis.attachments.AttachmentsImpl.getAttachmentCount(AttachmentsImpl.java:554)
    at org.apache.axis.Message.getContentType(Message.java:486)
    at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:343)
    at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
    at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
    at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
    at org.apache.axis.client.Call.invoke(Call.java:2767)
    at org.apache.axis.client.Call.invoke(Call.java:2443)
    at org.apache.axis.client.Call.invoke(Call.java:2366)
    at org.apache.axis.client.Call.invoke(Call.java:1812)
    at com.endeca.eac.client.ProvisioningPortSOAPBindingStub.addComponent(ProvisioningPortSOAPBindingStub.java:1068)
    at com.endeca.soleng.eac.toolkit.component.Component.setDefinition(Component.java:838)
    at com.endeca.soleng.eac.toolkit.component.Component.setDefinition(Component.java:815)
    at com.endeca.soleng.eac.toolkit.Controller.provision(Controller.java:691)
    at com.endeca.soleng.eac.toolkit.Controller.execute(Controller.java:235)
    at com.endeca.soleng.eac.toolkit.Controller.main(Controller.java:134)
    {http://xml.apache.org/axis/}hostname:nodswl0129
    java.io.IOException: java.io.IOException: java.lang.IllegalArgumentException: The char '0xc' after 'D:' is not a valid XML character.
    at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
    at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:317)
    at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:269)
    at org.apache.axis.SOAPPart.saveChanges(SOAPPart.java:530)
    at org.apache.axis.attachments.AttachmentsImpl.getAttachmentCount(AttachmentsImpl.java:554)
    at org.apache.axis.Message.getContentType(Message.java:486)
    at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:343)
    at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
    at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
    at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
    at org.apache.axis.client.Call.invoke(Call.java:2767)
    at org.apache.axis.client.Call.invoke(Call.java:2443)
    at org.apache.axis.client.Call.invoke(Call.java:2366)
    at org.apache.axis.client.Call.invoke(Call.java:1812)
    at com.endeca.eac.client.ProvisioningPortSOAPBindingStub.addComponent(ProvisioningPortSOAPBindingStub.java:1068)
    at com.endeca.soleng.eac.toolkit.component.Component.setDefinition(Component.java:838)
    at com.endeca.soleng.eac.toolkit.component.Component.setDefinition(Component.java:815)
    at com.endeca.soleng.eac.toolkit.Controller.provision(Controller.java:691)
    at com.endeca.soleng.eac.toolkit.Controller.execute(Controller.java:235)
    at com.endeca.soleng.eac.toolkit.Controller.main(Controller.java:134)
    Caused by: java.io.IOException: java.io.IOException: java.lang.IllegalArgumentException: The char '0xc' after 'D:' is not a valid XML character.
    at org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.java:275)
    at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1504)
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:980)
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:801)
    at org.apache.axis.message.RPCParam.serialize(RPCParam.java:208)
    at org.apache.axis.message.RPCElement.outputImpl(RPCElement.java:433)
    at org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
    at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:139)
    at org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:478)
    at org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
    at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:315)
    ... 21 more
    Exception:
    java.lang.IllegalArgumentException: The char '0xc' after 'D:' is not a valid XML character.
    at org.apache.axis.components.encoding.UTF8Encoder.writeEncoded(UTF8Encoder.java:81)
    at org.apache.axis.encoding.SerializationContext.writeSafeString(SerializationContext.java:1289)
    at org.apache.axis.encoding.ser.SimpleSerializer.serialize(SimpleSerializer.java:104)
    at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1504)
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:980)
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:734)
    at org.apache.axis.encoding.ser.ArraySerializer.serialize(ArraySerializer.java:414)
    at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1504)
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:980)
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:734)
    at org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.java:230)
    at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1504)
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:980)
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:734)
    at org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.java:230)
    at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1504)
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:980)
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:801)
    at org.apache.axis.message.RPCParam.serialize(RPCParam.java:208)
    at org.apache.axis.message.RPCElement.outputImpl(RPCElement.java:433)
    at org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
    at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:139)
    at org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:478)
    at org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
    at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:315)
    at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:269)
    at org.apache.axis.SOAPPart.saveChanges(SOAPPart.java:530)
    at org.apache.axis.SOAPPart.getContentLength(SOAPPart.java:229)
    at org.apache.axis.Message.getContentLength(Message.java:510)
    at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:371)
    at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
    at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
    at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
    at org.apache.axis.client.Call.invoke(Call.java:2767)
    at org.apache.axis.client.Call.invoke(Call.java:2443)
    at org.apache.axis.client.Call.invoke(Call.java:2366)
    at org.apache.axis.client.Call.invoke(Call.java:1812)
    at com.endeca.eac.client.ProvisioningPortSOAPBindingStub.addComponent(ProvisioningPortSOAPBindingStub.java:1068)
    at com.endeca.soleng.eac.toolkit.component.Component.setDefinition(Component.java:838)
    at com.endeca.soleng.eac.toolkit.component.Component.setDefinition(Component.java:815)
    at com.endeca.soleng.eac.toolkit.Controller.provision(Controller.java:691)
    at com.endeca.soleng.eac.toolkit.Controller.execute(Controller.java:235)
    at com.endeca.soleng.eac.toolkit.Controller.main(Controller.java:134)
    Exception:
    java.io.IOException: java.lang.IllegalArgumentException: The char '0xc' after 'D:' is not a valid XML character.
    at org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.java:275)
    at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1504)
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:980)
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:734)
    at org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.java:230)
    at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1504)
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:980)
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:801)
    at org.apache.axis.message.RPCParam.serialize(RPCParam.java:208)
    at org.apache.axis.message.RPCElement.outputImpl(RPCElement.java:433)
    at org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
    at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:139)
    at org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:478)
    at org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
    at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:315)
    at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:269)
    at org.apache.axis.SOAPPart.saveChanges(SOAPPart.java:530)
    at org.apache.axis.SOAPPart.getContentLength(SOAPPart.java:229)
    at org.apache.axis.Message.getContentLength(Message.java:510)
    at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:371)
    at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
    at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
    at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
    at org.apache.axis.client.Call.invoke(Call.java:2767)
    at org.apache.axis.client.Call.invoke(Call.java:2443)
    at org.apache.axis.client.Call.invoke(Call.java:2366)
    at org.apache.axis.client.Call.invoke(Call.java:1812)
    at com.endeca.eac.client.ProvisioningPortSOAPBindingStub.addComponent(ProvisioningPortSOAPBindingStub.java:1068)
    at com.endeca.soleng.eac.toolkit.component.Component.setDefinition(Component.java:838)
    at com.endeca.soleng.eac.toolkit.component.Component.setDefinition(Component.java:815)
    at com.endeca.soleng.eac.toolkit.Controller.provision(Controller.java:691)
    at com.endeca.soleng.eac.toolkit.Controller.execute(Controller.java:235)
    at com.endeca.soleng.eac.toolkit.Controller.main(Controller.java:134)
    [03.22.13 16:13:50] SEVERE: Caught an exception while checking provisioning.
    Caused by com.endeca.soleng.eac.toolkit.exception.EacCommunicationException
    com.endeca.soleng.eac.toolkit.component.Component setDefinition - Caught exception while setting component definition.
    Caused by org.apache.axis.AxisFault
    org.apache.axis.AxisFault makeFault - ; nested exception is:
    java.io.IOException: java.io.IOException: java.lang.IllegalArgumentException: The char '0xc' after 'D:' is not a valid XML character.
    Caused by java.io.IOException
    org.apache.axis.encoding.ser.BeanSerializer serialize - java.io.IOException: java.lang.IllegalArgumentException: The char '0xc' after 'D:' is not a valid XML character.
    Failed to setup EAC application.
    D:\folders\installations\endeca\apps\CRS\control>

    Problem is with AppConfig.xml file, check ConfigurationGeneratorForge component configuration. Path defined might be wrong.
    Please provide the configuration here to provide more help.
    If you are asking questions about Guided Search, you might have better luck if you ask questions in Technical Questions
    -Srikanth

  • FOR Loop Exception Handling

    Given the following code:
    for x in my_cursor loop
        begin
            <<stmt_1>>
            <<stmt_2>>
        exception
            when others then
                <<log_error>>
        end;
    end loop;Say there are 5 x's in my_cursor. On element x3, stmt_1 works fine but stmt_2 throws an exception. I'd like to rollback ONLY the work done on x3 (in this case, stmt_1), then continue the loop from the next element, x4. Can this be achieved with some combination of savepoint/rollback?

    As I said, you can put the increment operation at the end of the block when you know no more exceptions could be raised, i.e.
    declare
        cnt number;
        ex  exception;
    begin
        cnt := 0;
        for x in 1..5 loop
            begin
                savepoint s;
                insert into test_tbl values(1/(3-x));
                cnt := cnt+1;
            exception
                when others then
                    rollback to savepoint s;
            end;
        end loop;
        dbms_output.put_line('cnt='||cnt);
    end;You could also increment the counter outside of the PL/SQL block, i.e.
    declare
        cnt number;
        ex  exception;
        num_success number;
    begin
        cnt := 0;
        for x in 1..5 loop
            begin
                num_success := 0;
                savepoint s;
                insert into test_tbl values(1/(3-x));
                num_success := sql%rowcount;
            exception
                when others then
                    rollback to savepoint s;
            end;
            cnt := cnt + num_success;
        end loop;
        dbms_output.put_line('cnt='||cnt);
    end;And you can refactor your code so that the components to hide some of this complexity, i.e.
    SQL> ed
    Wrote file afiedt.buf
      1  create or replace procedure try_insert_test_tbl(
      2    p_val in number,
      3    p_num_success out number )
      4  as
      5    divide_by_zero exception;
      6    pragma exception_init( divide_by_zero, -1476 );
      7  begin
      8    savepoint s;
      9    insert into test_tbl values( 1/(3-p_val ) );
    10    p_num_success := sql%rowcount;
    11  exception
    12    when divide_by_zero
    13    then
    14      p_num_success := 0;
    15* end;
    SQL> /
    Procedure created.
    SQL> ed
    Wrote file afiedt.buf
      1  declare
      2      cnt number;
      3      ex  exception;
      4      num_success number;
      5  begin
      6      cnt := 0;
      7      for x in 1..5 loop
      8          try_insert_test_tbl( x, num_success );
      9          cnt := cnt + num_success;
    10      end loop;
    11      dbms_output.put_line('cnt='||cnt);
    12* end;
    SQL> /
    cnt=4
    PL/SQL procedure successfully completed.There is no way for DCL statements to affect the state of PL/SQL variables. But you can generally structure your code in such a way that this is unnecessary.
    Justin

  • Call global class exception to report prog

    Hi expert,
            In  global class, i write a method in that one exception can be raised. that exception can be called in
    report program. please can you help me.
    Thank you,
    dinesh.

    Hello Dinesh
    If your method has just exceptions defined in its signature and NOT exception classes then you can handle them like you do for function module exceptions.
    However, I assume your method has one or more exception classes defined in its signature. Then you can use the TRY...CATCH...ENDTRY block:
    " Here we are in your report:
    DATA: lo_error    TYPE REF TO cx_root.
    DATA: ld_msg    TYPE bapi_msg.
    TRY.
      CALL METHOD go_myclass->method_with_exceptionclass( ).  " e.g. ZCX_MY_EXCEPTION
    CATCH zcx_my_exception INTO lo_error.
       ld_msg = lo_error->get_longtext( ).
      MESSAGE ld_msg   TYPE 'I'.
    ENDTRY.
    Regards
      Uwe

  • Exception in thread "main" java.lang.NoClassDefFoundError: version

    I am having this problem with all my own work and work I find on other websites. I have read the FAQ and they meantion about a classpath, but I have run soruce code before without the classpath. I have only noticed this problem since i updated from 1.5.0_04 to 1.5.0_06.
    Could anyone help

    I can now run programs locally by using the -classpath .
    But when i try running applets on the web i get this error:
    load: class freemind.main.FreeMindApplet.class not found.
    java.lang.ClassNotFoundException: freemind.main.FreeMindApplet.class
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: open HTTP connection failed.
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         ... 10 more
    Exception in thread "Thread-6" java.lang.NullPointerException
         at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
         at sun.plugin.AppletViewer.showAppletException(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    I have set the user variables on my system to point to the java\jdk1.5.0-06\. i have the path in user varaibles to java\jdk1.5.0-06\bin, like the documentation says. Are these correct?

  • Exceptions when RenderedOp.createInstance();

    I get a huge list of exceptions (below) when I try to render a PlanarImage from a RenderedOp. If I comment the resultOp.createImage() line, the problem goes away.
    The problem also goes away if I comment the getQuadToQuad transform function.
    Interestingly enough, if I do something like transformFilter.rotate(1), then the image renders fine, and no exceptions are thrown. I can see that the image rotates.
    Part of my confusion arises from the units of the arguments in getQuadToQuad. Are these pixles? I'm thinking that because there is mention of a unit square, that these units might be arbitrary. What matters is how WarpPerspective deals with PerspectiveTranform, perhaps? I'm not to sure about the encapsulation structure of the JAI yet.
    Here's my code:
    public class ImageTester extends Frame
         public static RenderedOp createWarpImage(RenderedImage img,     Warp warp)
         {     //taken from java forum      takes source image and warp and provides output operation
              ParameterBlock pb = new ParameterBlock();
              pb.addSource(img);
              pb.add(warp);
              pb.add(Interpolation.getInstance(Interpolation.INTERP_NEAREST));
              return JAI.create("warp", pb);
         }     //from java forum
         public static void main(String[] args)
                 // Read from a file
                  String filePath = "C:\\garbage.bmp";
                  RenderedOp rendOp = FileLoadDescriptor.create(filePath, null, null, null);
                  PlanarImage origImage = rendOp.createInstance(); //extract PlanarImage
                  PerspectiveTransform transformFilter = new PerspectiveTransform(); //setting to this constructor is useless because the variable is reassigned below
                  transformFilter = PerspectiveTransform.getQuadToSquare( //problem looks like it might be on this line
                            0,0,
                            1,0,
                            0,1,
                            1,1);
                   WarpPerspective warp = new WarpPerspective(transformFilter);
                   RenderedOp resultOp = createWarpImage(origImage, warp);
                   PlanarImage image = resultOp.createInstance(); //problem looks like it might be on this line
             // Use a label to display the image
             JFrame frame = new JFrame();
             JLabel label = new JLabel(new ImageIcon(image.getAsBufferedImage()));
             frame.getContentPane().add(label, BorderLayout.CENTER);
             frame.pack();
             frame.setVisible(true);
    }The List of exceptions is:
    Error: One factory fails for the operation "warp"
    Occurs in: javax.media.jai.ThreadSafeOperationRegistry
    java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at javax.media.jai.FactoryCache.invoke(FactoryCache.java:122)
         at javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1674)
         at javax.media.jai.ThreadSafeOperationRegistry.invokeFactory(ThreadSafeOperationRegistry.java:473)
         at javax.media.jai.registry.RIFRegistry.create(RIFRegistry.java:332)
         at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:819)
         at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:770)
         at ImageTester.main(ImageTester.java:44)
    Caused by: java.lang.IllegalArgumentException: The specified dimensional parameter is non-positive.
         at javax.media.jai.ImageLayout.setHeight(ImageLayout.java:447)
         at javax.media.jai.ImageLayout.<init>(ImageLayout.java:185)
         at javax.media.jai.WarpOpImage.getLayout(WarpOpImage.java:190)
         at javax.media.jai.WarpOpImage.<init>(WarpOpImage.java:301)
         at com.sun.media.jai.opimage.WarpNearestOpImage.<init>(WarpNearestOpImage.java:64)
         at com.sun.media.jai.opimage.WarpRIF.create(WarpRIF.java:64)
         ... 11 more
    Exception in thread "main" javax.media.jai.util.ImagingException: All factories fail for the operation "warp"
         at javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1687)
         at javax.media.jai.ThreadSafeOperationRegistry.invokeFactory(ThreadSafeOperationRegistry.java:473)
         at javax.media.jai.registry.RIFRegistry.create(RIFRegistry.java:332)
         at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:819)
         at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:770)
         at ImageTester.main(ImageTester.java:44)
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at javax.media.jai.FactoryCache.invoke(FactoryCache.java:122)
         at javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1674)
         ... 5 more
    Caused by: java.lang.IllegalArgumentException: The specified dimensional parameter is non-positive.
         at javax.media.jai.ImageLayout.setHeight(ImageLayout.java:447)
         at javax.media.jai.ImageLayout.<init>(ImageLayout.java:185)
         at javax.media.jai.WarpOpImage.getLayout(WarpOpImage.java:190)
         at javax.media.jai.WarpOpImage.<init>(WarpOpImage.java:301)
         at com.sun.media.jai.opimage.WarpNearestOpImage.<init>(WarpNearestOpImage.java:64)
         at com.sun.media.jai.opimage.WarpRIF.create(WarpRIF.java:64)
         ... 11 more
    Caused by:
    java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at javax.media.jai.FactoryCache.invoke(FactoryCache.java:122)
         at javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1674)
         at javax.media.jai.ThreadSafeOperationRegistry.invokeFactory(ThreadSafeOperationRegistry.java:473)
         at javax.media.jai.registry.RIFRegistry.create(RIFRegistry.java:332)
         at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:819)
         at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:770)
         at ImageTester.main(ImageTester.java:44)
    Caused by: java.lang.IllegalArgumentException: The specified dimensional parameter is non-positive.
         at javax.media.jai.ImageLayout.setHeight(ImageLayout.java:447)
         at javax.media.jai.ImageLayout.<init>(ImageLayout.java:185)
         at javax.media.jai.WarpOpImage.getLayout(WarpOpImage.java:190)
         at javax.media.jai.WarpOpImage.<init>(WarpOpImage.java:301)
         at com.sun.media.jai.opimage.WarpNearestOpImage.<init>(WarpNearestOpImage.java:64)
         at com.sun.media.jai.opimage.WarpRIF.create(WarpRIF.java:64)
         ... 11 moreEdited by: ggoretkin on Aug 15, 2008 12:36 PM

    Hi Tim
    I'm trying this on Java AXIS
    In the "Cisco Unified Communications Manager Developers Guide for Release 6.0(1).pdf"
    Just went through "Using the AXL API in a .NET Environment" but e-thing seems to be pretty much .NET specific, which wont help me.
    I already changed and tried the stuff mentioned in "Using the AXL API with AXIS" and "Returned Namespace for AXIS and .NET Applications".
    Cheers,
    Simon

  • Invocation time Exception (java.rmi.ConnectException: Connection refused to

    Hi folks,
    SERVER = LINUX
    CLIENT = WINDOWS 200
    JAVA VERSION : 1.4.2
    Object obj = Naming.lookup("rmi://x.x.x.x:5578/MyServer");
    System.out.println("Object ="+obj); // Works fine and return stub as shown in o/p
    MyServer_Stub server = (MyServer_Stub)obj;
    server.validate(); // throws following Connection refused exception
    -----OUTPUT-----
    Object =com.MyServer_Stub[RemoteStub [ref: [endpoint:[x.x.x.x:42360](remote),objID:[a981ca:10722cb9411:-8000, 0]]]]
    java.rmi.ConnectException: Connection refused to host: x.x.x.x.x; nested exception is:
         java.net.ConnectException: Connection refused: connect
         at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:567)
         at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
         at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:101)[
         at com.MyServer_Stub.validate(Unknown Source)/b]
         at tescasees.testbyexample.rmi.MyServerChangesTestApplication.main
    Caused by: java.net.ConnectException: Connection refused: connect
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
         at java.net.Socket.connect(Socket.java:452)
         at java.net.Socket.connect(Socket.java:402)
         at java.net.Socket.<init>(Socket.java:309)
         at java.net.Socket.<init>(Socket.java:124)
         at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
         at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
         at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:562)
         ... 5 more
    Exception in thread "main"
    [b] Why does java system throws exception at invoke time not connection time at lookup time</b]
    Any suggestion...
    Regards,
    Manoj

    > Are you getting this from a lookup()? If so it means the Registry you are looking for at rmi://x.x.x.x:5578 is not present.
    I am getting it at the time when I invoke the method validate on the object returned from lookup.
    --Manoj                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Exceptions declared as inner class.

    1) Is it a good idea to declare
    exceptions as an inner class, of a root class, from which it is actually
    thrown.?
    2. So if there are 6 exceptions which are thrown
    from the methods of the root class, I will declare 6 inner exception
    classes in that root class.
    3. Instead of a root class if I have an interface
    is it ok to declare these exception classes in the interface?
    4. What do you think about this logic?
    There are more Exception classes than our actual classes,
    so it looks bad, why don't we put all the exception classes
    as inner class in one rootException class?

    >
    If the API user does not catch the exception and
    handle it properly then we cannot do much. That isn't what I asked.
    I asked if the application code, not the test code, explicitly has a catch block for each exception.
    For example if you have the following exceptions.
                class BaseException
                class Exception1 extends BaseException
                class Exception2 extends BaseException
    Then that means you have the following code.
                  catch(Exception1 e)
                     // Do something with the exception BESIDES logging it
                  catch(Exception2 e)
                     // Do something with the exception BESIDES logging it
      Notice in the above that the catch block MUST do something besides just log the exception. Logging doesn't count.
    So does your code do this?

  • Uncaught exception :application net_rim_bb_addressbook_app(250) is not responding; process terminated

    hi,
    I found this error in my BB8520 "uncaught exception :application net_rim_bb_addressbook_app(250) is not responding; process terminated" and I can not save or edit contacts in the phonebook. nothing hasserved to reinstall the system to an earlier date. Can you help me please?
    Solved!
    Go to Solution.

    This will work! After doing research you have to delete programs like yahoo messenger and Windows live OFF your phone. They interfere with the address book (Uncaught Exceptions is a program term that comes up when problems arrive). Anything else you don't use or that's not supported by your version needs to go to e.g. Font applications etc. After un-installing these reboot your phone and their you have, no more exceptions. Especially delete yahoo messenger and windows live or else this will not work. I am confident this works bc I just did this, so your welcome in advance. Have a good one

  • Get an System.Exception

    when try to load our videos which use Silverlight.get error:
    "Unable to load media. Error: System.Exception: 4001 An error has occurred."

    Hi,
    First please make sure the source URL is valid. If you're downloading the media file from network, you can verify it by opening the url directly in browser and see if it's accessible. You can also add a MediaFailed event to check more exception message if
    you're using MediaElement to stream videos.
    For more about downloading video,please refer to :
    http://social.msdn.microsoft.com/Forums/en-US/afbb2bc5-043f-4e0e-91c7-25d6c0f543e0/could-not-open-media-file-wmv-file-path-4001-an-error-has-occured
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for