Dyna Form +Validator Framework--- peculair problem with java.lang.Integer

In my struts application , i m using Dyna Action form,and Validator framework
<form-bean
name="myDynaForm"
type="org.apache.struts.validator.DynaValidatorForm">
<form-property name="name" type="java.lang.String"/>
<form-property name="phoneNo" type="java.lang.Integer"/>
</form-bean>
Now if user does not enter name , then a error meassage is dispalyed,
and aslo this time phoneNo shows 0.
why 0 is displayed here?
Can anybody tell me

Hi all,
If my memory serves me well, the exception is thrown because the application needs a working calendar for a person provided in time mangement. Make sure the correct infotypes are used. Also the organization structure needs to be set up correctly. The manager needs someone to approve and the employee needs someone to get approved by.
Regards, Marcel.

Similar Messages

  • Problems with java.lang.Double in a Pojo

    Hi!
    I'm getting some problems with a Double (wrapper class) in a sub-report related with a Pojo.
    The exception has more than 100 lines.
    It's starts with:
    at com.crystaldecisions.sdk.occa.report.application.ds.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.if(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
         at br.inf.teorema.javautils.util.CrystalReportsUtils.export(CrystalReportsUtils.java:520)
    Caused by: com.crystaldecisions.sdk.occa.report.application.b6: Valor nulo inesperado localizado para o membro Produto.getAliquotaICMS. (UNEXPECTED NULL VALUE ... )
    at com.crystaldecisions.sdk.occa.report.application.b6.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.de.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.de.if(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.de.getDouble(Unknown Source)
    and ends with:
    [JRCCommunicationAdapter]  detected an exception: Erro inesperado do conector do banco de dados (UNEXPECTED ERROR WITH DATABASE CONNECTOR )
         at com.crystaldecisions.reports.queryengine.Row.char(Unknown Source)
         at com.crystaldecisions.reports.queryengine.Row.getValue(Unknown Source)
         at com.crystaldecisions.reports.datalayer.a$d.getValue(Unknown Source)
         at com.crystaldecisions.reports.saveddata.saveddata.SavedData.a(Unknown Source)
         at com.crystaldecisions.reports.saveddata.a.a(Unknown Source)
         at com.crystaldecisions.reports.saveddata.a.a(Unknown Source)
         at com.crystaldecisions.reports.basicdataengine.a.p(Unknown Source)
         at com.crystaldecisions.reports.basicdataengine.a.a(Unknown Source)
    It occurs when my Double has null value. When I put "0.0", there are no problems.
    Anyway, in specifics contexts, null != 0.0.
    I think it's a bug. Someone encountered the same problem?

    Sorry for my insistence, but this problem occurs only for me?
    I will explain better.
    If I have a report that show the value of a Double field, the getter method should be:
    public Double getMyField() {
        return myField;
    But if myField == null, I can't generate the report.
    So, I did:
    public Double getMyField() {
        if (myField == null) {
            myField = 0.0d;
        return myField;
    I wish don't need to do this correction in getter method.
    CR do not works this way with Double?
    I have tested, and String works fine.

  • Problems with java.lang.Class in JDK1.3

    Hi,
    I have 3 problems with the reflection in java.lang.Class:
    1) In the specification of method java.lang.Class.getDeclaredFields() is wrote:
    "Returns .... This includes public, protected, default (package) access, and private fields ..."
    This means, that all private fields should be return too. But some private methods are not given back. ????
    2) In java.lang.Class.getDeclaredMethods()
    some public methods are not return. ????
    3) In java.lang.Class.getDeclaredMethods()
    If Class is an interface. The same problem like 2) ????
    Are they errors of java.lang.Class in JDK1.3 ????
    Thanks & sincerely.

    Not sure it makes a difference, but you left off the last part of the quote:
    This includes public, protected, default (package) access, and private classes and interfaces declared by the class, but excludes inherited classes and interfaces.
    Are these missing methods from inherited classes, or are they declared in the class itself?

  • Ugly problem with java.lang.reflect.InvocationTargetException

    Hello,
    I am writing a web service which connects to WebSphere MQ queue manager and puts a message on a queue.
    I use Eclipse and as usual I followed more or less the hints given at:
    http://www.eclipse.org/webtools/jst/components/ws/1.5/tutorials/BottomUpWebService/BottomUpWebService.html
    I have chosen Tomcat 5.5.20 as target server (had to, because otherwise it does not create a server-config.wsdd file), the web service WSDL thingies and the client were created successfully.
    I have created WAR files and everything went fine when I tested the thing on JBoss.
    Bad things started after I deployed the things on the Tomcat server. When I start the client I receive java.lang.reflect.InvocationTargetException as a result. The web service itself does not generate any exception, but the client does (I'll post the dump later..).
    During the debug it turned that the exception is generated at the moment when the web service program tries to call any of the WebSphere functions.
    Now - 1st obvious thing was to check if I have com.ibm.mq.jar in the WEB-INF/lib directory inside my WAR files. Yep! There it was.
    So.. if the thing works just fine on JBoss and it booms on Tomcat I wonder whats the hack here? I copied all of the MQ libraries i have from JBOSS_HOME/lib to CATALINA_HOME/shared/lib and CATALINA_HOME/common/lib. Well.. that's quite ugly, because all necessary jars are inside the WEB-INF/lib directory. Anyway nothing of the above helped me running the thing on Tomcat.
    Do you have any suggestions or have anyone of you ever had such problem?
    Here are the exception dump and part of the code:
      - Setting up MQ environment:
         - Setting hostname...
    An AxisFault exception occured: java.lang.reflect.InvocationTargetException
    AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: java.lang.reflect.InvocationTargetException
    faultActor:
    faultNode:
    faultDetail:
         {http://xml.apache.org/axis/}hostname:ghjvk0j
    java.lang.reflect.InvocationTargetException
         at org.apache.axis.message.SOAPFaultBuilder.create
    Fault(SOAPFaultBuilder.java:222)
         at org.apache.axis.message.SOAPFaultBuilder.endElement(
    SOAPFaultBuilder.java:129)
         at org.apache.axis.encoding.DeserializationContext.endElement(
    DeserializationContext.java:1087)
         at org.apache.xerces.parsers.AbstractSAXParser.endElement(
    Unknown Source)
         at org.apache.xerces.impl.XMLNSDocumentScannerImpl.
    scanEndElement(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScanne
    rImpl$Fragment ContentDispatcher.dispatch(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerI
    mpl.scanDocument(Unknown Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
    Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
    Source)
         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
    Source)
         at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse
    (Unknown Source)
         at javax.xml.parsers.SAXParser.parse(Unknown Source)
         at org.apache.axis.encoding.DeserializationContext.parse(
    DeserializationContext.java:227)
         at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
         at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
         at org.apache.axis.handlers.soap.
    MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
         at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
         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 pl.pzu.services.TfiAuthenticationSoapBindingStub.
    verify(TfiAuthenticationSoapBindingStub.java:245)
         at pl.pzu.services.TfiAuthenticationProxy.
    verify(TfiAuthenticationProxy.java:45)
         at org.apache.jsp.sampleTfiAuthenticationProxy.
    Result_jsp._jspService(Result_jsp.java:158)
         at org.apache.jasper.runtime.HttpJspBase.
    service(HttpJspBase.java:97)
         at javax.servlet.http.HttpServlet.
    service(HttpServlet.java:802)
         at org.apache.jasper.servlet.JspServletWrapper.
    service(JspServletWrapper.java:334)
         at org.apache.jasper.servlet.JspServlet.
    serviceJspFile(JspServlet.java:314)
         at org.apache.jasper.servlet.JspServlet.
    service(JspServlet.java:264)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
    (ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(
    ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(
    StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke
    (StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(
    StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(
    ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(
    StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(
    CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(
    Http11Processor.java:869)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11Connec
    tionHandler.processConnection(Http11BaseProtocol.java:664)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(Pool
    TcpEndpoint.java:527)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(Lea
    derFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
    ThreadPool.java:684)
         at java.lang.Thread.run(Unknown Source)There is the part of the web service code where the event occurs:
         public void writeMessage(String message,
    String message_ID) throws Exception
              System.out.println("      - Setting up MQ environment: ");
              try
                   System.out.println("      - Setting hostname...");
         NEXT LINE CAUSES THE CLIENT TO THROW
         This is the first call to any WebSphere assets.
         During debug It says the it is unable to inspect the MQEnvironment
         object...
                   MQEnvironment.hostname = m_config.getQMHost();
                   System.out.println("      - Setting port...");
                   MQEnvironment.port = m_config.getQMPort();
                   System.out.println("      - Setting channel...");
                   MQEnvironment.channel = m_config.getQMChannel();
         }I think that if it works on JBoss and it doesn't on Tomcat it is not coding problem, but rather a configuration...
    Thanx for any ideas or help from ur side.

    Did you have any success on this?
    I also have the same problem with Tomcat 6.
    I had Tomcat 5.0 working with this code, but when we migrated to Tomcat 6.0, I am getting this exception on the clent side. I figured out that it is occuring on invoking WebSphere MQ call from the code.
    Thanks

  • Problem with java.lang.OutOfMemoryError

    hi
    i am developping a web application
    i am using jfreechart in my jsf application to generate statistic diagrams
    to update my diagrams i am calling the methode ChartUtilities.saveChartAsPNG(file1, chart, 400, 300, null) every 10 seconds
    my application become more and more slow and the cpnsommatio of memory is more and more important until getting this exception:
    javax.faces.el.EvaluationException: java.lang.OutOfMemoryError: Java heap space
         at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
         at javax.faces.component.UICommand.broadcast(UICommand.java:387)
         at org.ajax4jsf.component.AjaxActionComponent.broadcast(AjaxActionComponent.java:55)
         at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321)
         at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:296)
         at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:253)
         at org.ajax4jsf.component.AjaxViewRoot.processDecodes(AjaxViewRoot.java:409)
         at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78)
         at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at TimeoutFilter.doFilter(TimeoutFilter.java:64)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177)
         at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267)
         at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380)
         at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.OutOfMemoryError: Java heap space
         at java.awt.image.DataBufferInt.<init>(Unknown Source)
         at java.awt.image.Raster.createPackedRaster(Unknown Source)
         at java.awt.image.DirectColorModel.createCompatibleWritableRaster(Unknown Source)
         at java.awt.image.BufferedImage.<init>(Unknown Source)
         at org.jfree.chart.JFreeChart.createBufferedImage(JFreeChart.java:1407)
         at org.jfree.chart.JFreeChart.createBufferedImage(JFreeChart.java:1389)
         at org.jfree.chart.ChartUtilities.writeChartAsPNG(ChartUtilities.java:183)
         at org.jfree.chart.ChartUtilities.saveChartAsPNG(ChartUtilities.java:320)
         at SWIMLogStatistiques.generateChartMethod(SWIMLogStatistiques.java:98)
         at SWIMmoduleStatistiques.generateChartMethod(SWIMmoduleStatistiques.java:39)
         at ListModules.mesServicesAttributs(ListModules.java:199)
         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 org.apache.el.parser.AstValue.invoke(AstValue.java:172)
         at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
         at org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
         at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
         at javax.faces.component.UICommand.broadcast(UICommand.java:387)
         at org.ajax4jsf.component.AjaxActionComponent.broadcast(AjaxActionComponent.java:55)
         at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321)
         at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:296)
         at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:253)
         at org.ajax4jsf.component.AjaxViewRoot.processDecodes(AjaxViewRoot.java:409)
         at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78)
         at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    after doing some searches, i found that the solution is to change the memory allocated for the JVM but in my case, the memory consommed by my application is increasing along with time.
    i think that the problem is with:*ChartUtilities.saveChartAsPNG(file1, chart, 400, 300, null);*:does this instruction consume a lot of memory and how can i resolve thos problem?

    riadhhwajdii wrote:
    i am using jfreechart in my jsf application to generate statistic diagrams
    to update my diagrams i am calling the methode ChartUtilities.saveChartAsPNG(file1, chart, 400, 300, null) every 10 seconds
    my application become more and more slow and the cpnsommatio of memory is more and more important until getting this exception:This bit (slowing down over several cycles of the code)..and this bit:
    after doing some searches, i found that the solution is to change the memory allocated for the JVM but in my case, the memory consommed by my application is increasing along with time.(increasing memory simply delays the exception), are usually a pointer that you have a memory leak somewhere.
    i think that the problem is with:*ChartUtilities.saveChartAsPNG(file1, chart, 400, 300, null);*:does this instruction consume a lot of memory and how can i resolve thos problem?Take some heap dumps (especially when the out of memory occurs) and stick them in a memory analyser. Just because the exception is being thrown during saveChartAsPNG() does not mean that's the culprit. All that means is it was the final straw.

  • Problems with java.lang.NoClassDefFound error *solved*

    realising my stupidity I have solved the problem
    I am quite new to java and I have been using the Java for Dummies book to help me to learn it. I decided to use the command line tools instead of an IDE and hadn't encountered any problems until recently. I took a break from learning Java after reaching the end of the book but have decided to come back to it. The problem now is that when I run my programs I get the following error:
    Exception in thread "main" java.lang.NoClassDefFoundError: helloworld (wrong anme: HelloWorld)
         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.doPriviledged(Native Method)
         at java.net.URLClassLoader.findClass(Unknown Source)
         at sun.misc.Launcher$AppClassLoader.localClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    This occurs from a simple hello world program:
    class HelloWorld
       public static void main(String[] args)
          System.out.println("Hello, World!");
    }I have no idea what the problem is, although by looking at similar threads it would appear that it may be something to do with the classpath variables however I do not know much about this as I followed a tutorial on the internet to set the classpath up.
    Edited by: this_is_phil on Jun 19, 2008 11:11 AM

    this_is_phil wrote:
    Exception in thread "main" java.lang.NoClassDefFoundError: helloworld (wrong anme: HelloWorld)This part of the error message means you typed in "helloworld" but the class that java found was named HelloWorld. In Java, those are different - java is case sensitive. It will work if you enter HelloWorld.

  • Problem with  java.lang.reflect in Eclipse

    I'm just reading java tutorial about that library, but when i'm trying to execute those example program's e.g
    import java.lang.reflect.Constructor;
    import java.lang.reflect.Type;
    import static java.lang.System.out;
    public class ConstructorSift {
        public static void main(String... args) {
         try {
             Class<?> cArg = Class.forName(args[1]);
             Class<?> c = Class.forName(args[0]);
             Constructor[] allConstructors = c.getDeclaredConstructors();
             for (Constructor ctor : allConstructors) {
              Class<?>[] pType  = ctor.getParameterTypes();
              for (int i = 0; i < pType.length; i++) {
                  if (pType.equals(cArg)) {
                   out.format("%s%n", ctor.toGenericString());
                   Type[] gpType = ctor.getGenericParameterTypes();
                   for (int j = 0; j < gpType.length; j++) {
                   char ch = (pType[j].equals(cArg) ? '*' : ' ');
                   out.format("%7c%s[%d]: %s%n", ch,
                        "GenericParameterType", j, gpType[j]);
                   break;
    // production code should handle this exception more gracefully
         } catch (ClassNotFoundException x) {
         x.printStackTrace();
    in Eclipse i've got nothing in my output console :/
    no errors, no warnings, no text ..... (it was terminated correctly)
    Can somebody tell me what should I do to make it work properly ?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Hi,
    In program arguments, you should not have ConstructorSift but only java.util.Formatter and java.util.Locale.
    (Eclipse : run dialog | arguments tab | program arguments)
    This is the output you should get:
    $ java ConstructorSift java.util.Formatter java.util.Locale
    public java.util.Formatter(java.util.Locale)
    *GenericParameterType[0]: class java.util.Locale
    public java.util.Formatter(java.lang.Appendable,java.util.Locale)
    GenericParameterType[0]: interface java.lang.Appendable
    *GenericParameterType[1]: class java.util.Locale
    public java.util.Formatter(java.lang.String,java.lang.String,java.util.Locale) throws java.io.FileNotFoundException,java.io.UnsupportedEncodingException
    GenericParameterType[0]: class java.lang.String
    GenericParameterType[1]: class java.lang.String
    *GenericParameterType[2]: class java.util.Locale
    public java.util.Formatter(java.io.File,java.lang.String,java.util.Locale) throws java.io.FileNotFoundException,java.io.UnsupportedEncodingException
    GenericParameterType[0]: class java.io.File
    GenericParameterType[1]: class java.lang.String
    *GenericParameterType[2]: class java.util.Locale
    public java.util.Formatter(java.io.OutputStream,java.lang.String,java.util.Locale) throws java.io.UnsupportedEncodingException
    GenericParameterType[0]: class java.io.OutputStream
    GenericParameterType[1]: class java.lang.String
    *GenericParameterType[2]: class java.util.Locale
    Hope that help,
    Jack

  • Early problems with Java on my Macbook.

    Hi, I am a former high school computer science student and I'm having problems with Java as I've recently moved from Windows to a Mac. The following is a letter I wrote to my prior computer science teacher but he does not seem to be responding. I think all you need to know is that DrawHouse and JumpingJacks are simple Java programs we made in class that utilize an object called DrawingTool (which is a graphics environment). DrawingTool is contained in gpdraw.jar and also was contained in our class' apcslib.jar. Also, FileInput is a class contained in apcslib.jar.
    I basically transferred all my JAR files (apcslib.jar, etc.) from my Windows computer to my Mac. I didn't think anything was wrong or corrupted with them because they're the same JAR files that I used for my Java programs on my Windows comp in high school and when I run those Java programs now, they still work. But for some reason if I try to run, say, DrawHouse or JumpingJacks with those same programs on my Macbook, it gives me the following errors on runtime (it compiles fine).
    Exception in thread "main" java.lang.NullPointerException
         at apcslib.DrawingTool.move( DrawingTool.java:456)
         at java.awt.Component.setLocation( Component.java:1705)
         at java.awt.Window.init( Window.java:289)
         at java.awt.Window.<init>( Window.java:318)
         at java.awt.Frame.<init>( Frame.java:419)
         at java.awt.Frame.<init>( Frame.java:384)
         at javax.swing.JFrame.<init>( JFrame.java:150)
         at apcslib.DrawingTool.<init>( DrawingTool.java:45)
         at apcslib.DrawingTool.<init>( DrawingTool.java:106)
         at JumpingJacks.main( JumpingJacks.java:35)
    So I thought, maybe I'm not importing the JAR files correctly. But if I import gsdraw.jar or a different apcslib.jar that I downloaded from some random teacher's website on the internet (and that also happens to have DrawingTool in it) then it compiles and runs fine. So I thought, ok, maybe it's a problem with this one particular apcslib.jar that I transferred from my Windows computer. But like I said, DrawHouse and JumpingJacks run fine on my windows comp, and most ridiculous of all, I tried running Tasmania on my Macbook (which uses the FileInput class from your apcslib.jar) and THAT works fine! So to recap, I'm not importing the JAR files wrong and at times there doesn't seem to be anything wrong with the apcslib.jar you gave us and probably not anything wrong with my IDE, seeing that importing of other JAR files works fine (I'm using eclipse and/or xcode, and the same problem occurs with both). Now of course, I could just go ahead and use the apcslib that I downloaded from the internet, but it's very inconvenient since it doesn't match your own apcslib's contents (for example, it doesn't have FileInput). By the way, I've also tried adding the JARS directly to the Java Extensions instead of importing them as external JARS, but that doesn't solve the problem. I've also attached the apcslib.jar in case you think that it's somehow corrupted or something....
    Do you have any idea about what could be wrong or where I should go from here?
    Thanks for all your help!
    Bryan Huh

    Thanks for the reply, but if it is a problem with how
    I'm using DrawingTool, then shouldn't it run with
    errors on my Windows comp too?Maybe, maybe not. If you're doing something that's correct on one but not the other - using file names for Windows on Linux Mac), for instance.
    The same EXACT source
    code will compile and run fine on my Windows comp,
    but run with errors on my Macbook. And if it's a bug
    with DrawingTool, then shouldn't my Windows comp also
    encounter the problem and run with errors?No. the DT programmer could have done the same thing, using code that's correct on Windows but not on Linux. Or there could be a difference in the Java versions on the couputers and code that's valid in the later version is failing in the earlier, or vice versa.

  • Problem with Java after Software Update to 10.5.7

    Hi,
    I am facing problem with Java after having run Software upgrades.
    Here is the whole story. I recently moved to iMac 10.5.6 from PowerPc 10.4. On this new machine I was having problem running a 3rd party application, which requires JVM. As this application worked well on Tiger, I decided to upgrade JVM on my iMAC using Software Upgrade(was I insane!!). As I like my systems to be updated (as with linux on my personal machine) I clicked "install all". As a result I have the following upgrades run on my machine:
    2009-05-20 13:12:01 +0200: Installed "Mac OS X Update Combined" (10.5.7)
    2009-05-20 13:12:10 +0200: Installed "Remote Desktop Client Update" (3.2.2)
    2009-05-20 13:12:26 +0200: Installed "Java For Mac OS X 10.5 Update 2" (1.0)
    2009-05-20 13:58:36 +0200: Installed "Java for Mac OS X 10.5 Update 3" (1.0)
    2009-05-20 13:58:44 +0200: Installed "AirPort Utility Software Update 2009-001" (5.4.1)
    2009-05-20 13:59:07 +0200: Installed "QuickTime" (7.6)
    2009-05-20 13:59:22 +0200: Installed "iPhoto Update" (7.1.5)
    2009-05-20 13:59:28 +0200: Installed "iLife Support" (9.0.2)
    2009-05-20 13:59:38 +0200: Installed "iDVD Update" (7.0.3)
    2009-05-20 13:59:58 +0200: Installed "iTunes" (8.1.1)
    But now, simply running $java on the prompt hangs, i.e. it takes no action.
    $ which java
    /usr/bin/java
    $ ls -ltr /usr/bin/java
    May 20 15:09 /usr/bin/java -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java
    $java (no response)
    Here is the output of $ top
    PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE VSIZE
    703 java 98.8% 0:38.54 3 110 72 480K 184K 1964K 40M
    Any clues?
    Details of JavaVM on my machine
    $ pwd
    /System/Library/Frameworks/JavaVM.framework/Versions
    $ ls -ltr
    total 56
    drwxr-xr-x 3 root wheel 102 Dec 2 2007 1.3.1
    lrwxr-xr-x 1 root wheel 3 Aug 31 2008 1.4.1 -> 1.4
    drwxr-xr-x 8 root wheel 272 Aug 31 2008 1.4.2
    drwxr-xr-x 8 root wheel 272 Aug 31 2008 1.5.0
    lrwxr-xr-x 1 root wheel 5 May 20 13:12 1.3 -> 1.3.1
    lrwxr-xr-x 1 root wheel 5 May 20 13:12 1.4 -> 1.4.2
    lrwxr-xr-x 1 root wheel 5 May 20 13:12 1.5 -> 1.5.0
    drwxr-xr-x 8 root wheel 272 May 20 13:12 1.6.0
    lrwxr-xr-x 1 root wheel 5 May 20 13:12 1.6 -> 1.6.0
    drwxr-xr-x 8 root wheel 272 May 20 13:12 A
    lrwxr-xr-x 1 root wheel 1 May 20 14:57 Current -> A
    lrwxr-xr-x 1 root wheel 3 May 20 14:59 CurrentJDK -> 1.5
    Any suggestions? Is there a cleaner approach to uninstall Java on Mac then a simpl "move to thrash"!
    cheers

    Hi,
    I am facing problem with Java after having run Software upgrades.
    Here is the whole story. I recently moved to iMac 10.5.6 from PowerPc 10.4. On this new machine I was having problem running a 3rd party application, which requires JVM. As this application worked well on Tiger, I decided to upgrade JVM on my iMAC using Software Upgrade(was I insane!!). As I like my systems to be updated (as with linux on my personal machine) I clicked "install all". As a result I have the following upgrades run on my machine:
    2009-05-20 13:12:01 +0200: Installed "Mac OS X Update Combined" (10.5.7)
    2009-05-20 13:12:10 +0200: Installed "Remote Desktop Client Update" (3.2.2)
    2009-05-20 13:12:26 +0200: Installed "Java For Mac OS X 10.5 Update 2" (1.0)
    2009-05-20 13:58:36 +0200: Installed "Java for Mac OS X 10.5 Update 3" (1.0)
    2009-05-20 13:58:44 +0200: Installed "AirPort Utility Software Update 2009-001" (5.4.1)
    2009-05-20 13:59:07 +0200: Installed "QuickTime" (7.6)
    2009-05-20 13:59:22 +0200: Installed "iPhoto Update" (7.1.5)
    2009-05-20 13:59:28 +0200: Installed "iLife Support" (9.0.2)
    2009-05-20 13:59:38 +0200: Installed "iDVD Update" (7.0.3)
    2009-05-20 13:59:58 +0200: Installed "iTunes" (8.1.1)
    But now, simply running $java on the prompt hangs, i.e. it takes no action.
    $ which java
    /usr/bin/java
    $ ls -ltr /usr/bin/java
    May 20 15:09 /usr/bin/java -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java
    $java (no response)
    Here is the output of $ top
    PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE VSIZE
    703 java 98.8% 0:38.54 3 110 72 480K 184K 1964K 40M
    Any clues?
    Details of JavaVM on my machine
    $ pwd
    /System/Library/Frameworks/JavaVM.framework/Versions
    $ ls -ltr
    total 56
    drwxr-xr-x 3 root wheel 102 Dec 2 2007 1.3.1
    lrwxr-xr-x 1 root wheel 3 Aug 31 2008 1.4.1 -> 1.4
    drwxr-xr-x 8 root wheel 272 Aug 31 2008 1.4.2
    drwxr-xr-x 8 root wheel 272 Aug 31 2008 1.5.0
    lrwxr-xr-x 1 root wheel 5 May 20 13:12 1.3 -> 1.3.1
    lrwxr-xr-x 1 root wheel 5 May 20 13:12 1.4 -> 1.4.2
    lrwxr-xr-x 1 root wheel 5 May 20 13:12 1.5 -> 1.5.0
    drwxr-xr-x 8 root wheel 272 May 20 13:12 1.6.0
    lrwxr-xr-x 1 root wheel 5 May 20 13:12 1.6 -> 1.6.0
    drwxr-xr-x 8 root wheel 272 May 20 13:12 A
    lrwxr-xr-x 1 root wheel 1 May 20 14:57 Current -> A
    lrwxr-xr-x 1 root wheel 3 May 20 14:59 CurrentJDK -> 1.5
    Any suggestions? Is there a cleaner approach to uninstall Java on Mac then a simpl "move to thrash"!
    cheers

  • Problem with Java after System Upgrade to 10.5.7

    Hi,
    I am facing problem with Java after having run Software upgrades.
    Here is the whole story. I recently moved to iMac 10.5.6 from PowerPc 10.4. On this new machine I was having problem running a 3rd party application, which requires JVM. As this application worked well on Tiger, I decided to upgrade JVM on my iMAC using Software Upgrade(was I insane!!). As I like my systems to be updated (as with linux on my personal machine) I clicked "install all". As a result I have the following upgrades run on my machine:
    2009-05-20 13:12:01 +0200: Installed "Mac OS X Update Combined" (10.5.7)
    2009-05-20 13:12:10 +0200: Installed "Remote Desktop Client Update" (3.2.2)
    2009-05-20 13:12:26 +0200: Installed "Java For Mac OS X 10.5 Update 2" (1.0)
    2009-05-20 13:58:36 +0200: Installed "Java for Mac OS X 10.5 Update 3" (1.0)
    2009-05-20 13:58:44 +0200: Installed "AirPort Utility Software Update 2009-001" (5.4.1)
    2009-05-20 13:59:07 +0200: Installed "QuickTime" (7.6)
    2009-05-20 13:59:22 +0200: Installed "iPhoto Update" (7.1.5)
    2009-05-20 13:59:28 +0200: Installed "iLife Support" (9.0.2)
    2009-05-20 13:59:38 +0200: Installed "iDVD Update" (7.0.3)
    2009-05-20 13:59:58 +0200: Installed "iTunes" (8.1.1)
    But now, simply running $ java on the prompt hangs, i.e. it takes no action.
    $ which java
    /usr/bin/java
    $ ls -ltr /usr/bin/java
    May 20 15:09 /usr/bin/java -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java
    $java (no response)
    Here is the output of $ top
    PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE VSIZE
    703 java 98.8% 0:38.54 3 110 72 480K 184K 1964K 40M
    Any clues?
    cheers

    Hi man,
    In the wake of this java problem I resorted to keep working on my old machine, and today in my spare time I tried to fix this new machine.
    So I execute $java on prompt, and then try to check the files it has opened, using lsof -p pid
    I see it referring to
    /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/bin/java
    isn't this usually the JAVA_HOME
    However, executing $/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/bin/java
    hangs!!
    but
    $/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java
    works!!
    $ pwd
    /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin
    $ ./java -version
    java version "1.6.0_07"
    Java(TM) SE Runtime Environment (build 1.6.0_07-b06-153)
    Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_07-b06-57, mixed mode)
    So, I changed the links as follows
    borgraf:Versions raveesh$ l
    total 72
    drwxr-xr-x 3 root wheel 102 Mar 6 2008 1.3.1
    lrwxr-xr-x 1 root wheel 3 May 21 19:42 1.4.1 -> 1.4
    drwxr-xr-x 8 root wheel 272 May 21 19:42 1.6.0
    lrwxr-xr-x 1 root wheel 3 May 21 19:44 OldCurrentJDK -> 1.5
    lrwxr-xr-x 1 root wheel 5 May 21 19:44 1.4 -> 1.4.2
    lrwxr-xr-x 1 root wheel 5 May 21 19:44 1.3 -> 1.3.1
    lrwxr-xr-x 1 root wheel 5 May 21 19:44 1.5 -> 1.5.0
    drwxr-xr-x 8 root wheel 272 May 21 19:44 1.4.2
    drwxr-xr-x 8 root wheel 272 May 21 19:44 1.5.0
    lrwxr-xr-x 1 root wheel 5 May 21 19:44 1.6 -> 1.6.0
    lrwxr-xr-x 1 root wheel 1 May 21 19:44 OldCurrent -> A
    drwxr-xr-x 8 root wheel 272 May 21 19:44 A
    lrwxr-xr-x 1 root wheel 3 Jun 4 17:14 CurrentJDK -> 1.6
    lrwxr-xr-x 1 root wheel 3 Jun 4 17:21 Current -> 1.6
    Linking my Current and CurrentJDK to 1.6 and it works!
    However, shall that be the reason!
    what is in your /Versions/Current/
    I got the following
    $ ls /System/Library/Frameworks/JavaVM.framework/Versions/Current
    CodeResources Frameworks JavaVM
    Commands Headers Resources
    There is no /Home in here, which is usually the case for /1.5 or /1.6
    Anyways, things seems to work for the moment. Lets see if I get problem with using Java.
    thanks

  • Problems with java logging utility

    Hi,
    I am having a few problems with java's logging framework.
    When I create a logger using
    Logger log = Logger.getLogger("my.com");
    and log my messages using this "log" object, the messages are logged to System.err which is my console. But when I add a Filehandler to this Logger object, I get log messages both in the file and the standard error.
    The problem is that I want to supress logging to the standard error but do not know how to do this. I tried a few things:
    1) If I close the standard error (System.err.close() ), things work fine but I can't afford doing this since other parts of my application might use System.err for some purpose.
    2) I thought that , by default, a ConsoleHandler object is added to the Logger object. So I thought I might get around the problem if I close() this ConsoleHandler object. But, to my surprise, log.getHandlers() returns an empty array by default. So there is no ConsoleHandler attached to it.
    Any info. regarding it will be very much appreciated.
    Thanks,
    Arch.

    Logger.setUseParentHandlers(false)

  • Problems with java 6/7

    Having a problem with Java 6/7, could use a little help.
    I was on a website that said I don't have 7 installed, so I went to the Java site and did a verify, it says I have 1.6.0_65, so I did the install for 7.55. The install said everything worked fine, but when I go back to the Java site to verify, it still says I am runing 1.6.0_65. I searched for instructions on how to uninstall version 6, it said:
    rm ~/Library/Caches/Java/deployment.properties
    sudo rm -rf /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0
    sudo rm /System/Library/Frameworks/JavaVM.framework/Versions/1.6
    I tried this, but Java still says I'm on 6. Any ideas how to update to 7?

    You have to restart the machine and make sure Java is "enabled" in the Safari preferences.

  • Problem with Java and Windows (Mainly Vista and UAC)

    Hi all,
    I am having a problem with a program that I've devoloped. The program itself is packaged as a jar and I plan to deploy it across multiple platforms eventually however right now i am only concerned about windows based systems. I have made an installer for a windows baised systems using NSIS to install the software files. I made the installer as I need several java packages to be installed so the program would work (JAI, J3D, JAI ImageIO) and I also require the program to have fileassociations on windows.
    I know that this is not what java is about, however the majority of the users will be on windows baised systems so I've decided that OS specific installers is the best option.
    During the process I have noticed that there are several key problem with java for this type of application!
    The first issue that I have come across is getting file associations to work on java. As a .jar is not an excutable it is not possible to directly associate a filetype with it in java so to overcome this I currently run the program from a .bat files and also the program requires large memory so this also allows me to run the program with -xmx. The batch file that I use is :
    <code>
    cd PATH TO PROGRAM
    start javaw -Dsun.java2d.noddraw=true -Xmn100M -Xms500M -Xmx1000M -jar "PATH TO PROGRAM\program.jar" %1 -vram 134217728
    pause;
    </code>
    Ok so all this appears to work fine and allows windows to have file associations and start the program and thats all works perfectly but this is a non-ideal solution. Has anyone got any advice on improving this?
    The next problem that I have appears to be a problem with Vista and UAC (user access control). When a user installs the program and installs the program into the program files directory I found that the program did not work and kept saying that I did not have access to the files in the current directory. This is a problem as I read and write settings files during program execution.
    On a Vista system UAC prevents file write operations into the Program Files directory unless the program has requested elevated status even if the user is a full administrator. The probem is that there appears to be no real way to achieve this under java that I'm aware of...
    Has anyone else had this probem and has a suitable solution?
    Any advice on these issues would realy be appricated.
    Regards
    Joey

    Ok so i've kinda found a solution, its not ideal but its very good. I found this program called Elevate
    A link to the site I got it was
    http://www.wintellect.com/cs/blogs/jrobbins/archive/2007/03/27/elevate-a-process-at-the-command-line-in-vista.aspx
    This program allows you start java with a UAC dialog for high access using
    Elevate java -jar myjar.jar
    This then allows you to have full access using java... I guess it could be dangerous but it does the job.

  • Problem with java and pogo games

    i use mozilla and now with the problems with java and hackers cannot play my pogo games,what can i do? i disabled my java i tried java 6 doesnt work or is not safe,what is a safe way to play games on pogo that use java?

    Oracle has released a Java 7 Update 11 to address security vulnerabilities and you should update to that version.
    *https://support.mozilla.org/kb/how-to-use-java-if-its-been-blocked
    See also:
    *http://kb.mozillazine.org/Java#Windows_installation_issues
    You can find the latest Java version on the Oracle website.
    See Java Platform > Java SE 7U11 and Java 6U38 (Download JRE)
    *http://www.oracle.com/technetwork/java/javase/downloads/index.html

  • Problem with java swing button and loop

    Problem with java swing button and loop
    I�m using VAJ 4.0. and I�m doing normal GUI application. I have next problem.
    I have in the same class two jswing buttons named start (ivjGStart) and stop (ivjGStop) and private static int field named Status where initial value is 0. This buttons should work something like this:
    When I click on start button it must do next:
    Start button must set disenabled and Stop button must set enabled and selected. Field status is set to 1, because this is a condition in next procedure in some loop. And then procedure named IzvajajNeprekinjeno() is invoked.
    And when I click on stop button it must do next:
    Start button must set enabled and selected and Stop button must set disenabled.
    Field status is set to 0.
    This works everything fine without loop �do .. while� inside the procedure IzvajajNeprekinjeno(). But when used this loop the start button all the time stay (like) pressed. And this means that a can�t stop my loop.
    There is java code, so you can get better picture:
    /** start button */
    public void gStart_ActionEvents() {
    try {
    ivjGStart.setEnabled(false);
    ivjGStop.setEnabled(true);
    ivjGStop.setSelected(true);
    getJTextPane1().setText("Program is running ...");
    Status = 1;
    } catch (Exception e) {}
    /** stop button */
    public void gStop_ActionEvents() {
    try {
    ivjGStart.setEnabled(true);
    ivjGStart.setSelected(true);
    ivjGStop.setEnabled(false);
    getJTextPane1().setText("Program is NOT running ...");
    Status = 0;
    } catch (Exception e) {
    /** procedure IzvajajNeprekinjeno() */
    public void IzvajajNeprekinjeno() {  //RunLoop
    try {
    int zamik = 2000; //delay
    do {
    Thread.sleep(zamik);
    PreberiDat(); //procedure
    } while (Status == 1);
    } catch (Exception e) {
    So, I'm asking what I have to do, that start button will not all the time stay pressed? Or some other aspect of solving this problem.
    Any help will be appreciated.
    Best regards,
    Tomi

    This is a multi thread problem. When you start the gui, it is running in one thread. Lets call that GUI_Thread so we know what we are talking about.
    Since java is task-based this will happen if you do like this:
    1. Button "Start" is pressed. Thread running: GUI_Thread
    2. Event gStart_ActionEvents() called. Thread running: GUI_Thread
    3. Method IzvajajNeprekinjeno() called. Thread running: GUI_Thread
    4. Sleep in method IzvajajNeprekinjeno() on thread GUI_Thread
    5. Call PreberiDat(). Thread running: GUI_Thread
    6. Check status. If == 1, go tho 4. Thread running: GUI_Thread.
    Since the method IzvajajNeprekinjeno() (what does that mean?) and the GUI is running in the same thread and the event that the Start button has thrown isn't done yet, the program will go on in the IzvajajNeprekinjeno() method forever and never let you press the Stop-button.
    What you have to do is do put either the GUI in a thread of its own or start a new thread that will do the task of the IzvajajNeprekinjeno() method.
    http://java.sun.com/docs/books/tutorial/uiswing/index.html
    This tutorial explains how to build a multi threaded gui.
    /Lime

Maybe you are looking for

  • Using JOIN Function with NULL Dynamic Parameters

    I have a report with utilizes dynamic parameters but will not run if any of the parameters are null.  I am also using the JOIN function to print out the values of these parameters. If the user doesn't enter in all the parameters, can the report still

  • Double-click in ALV grid should take to BSP application

    Hi, In the portals, in an application, R/3 ALV grid is displayed. On double clicking one of the entries in the list, corresponding transaction in R/3 is opened and the details are displayed. Now, instead of opening the transaction in R/3, Correspondi

  • Unknown caller/Unknown  - special ring/photo?

    how can i sent up my iPhone to have a "special" ring & photo when it comes up with "Unknown" caller? please help.

  • I have buy iphone5 in china, but back side i cannot see FFC

    i have buyed iphone5 in china but on back i cannot see FFC & CE logo, i can see only CCC & 10 logo, as you know in china lot of copy, i like to know weather without this FCC & CE logo is iphone 5 is copy or original?

  • Authorization Check of Multiproviders

    Dear all, we have a scenario like this: Two Basiscube (A & B) with two authorization objects created in RSSM (AUT_A and AUT_B). The assignment in RSSM is like this: Cube A checked by AUT_A Cube B checked by AUT_B No we created a Multiprovider where A