SWF LOADER null pointer exception

Hello,
I an trying to load and stop a SWF video.
The video loads perfectly but when I click on stop, it gives me a null pointer exception.
The thing is this, in STOP, the variable asociation:
                var mc : MovieClip = loader.content as MovieClip;
gives me as a result null (mc:null) , so when I excecute  mc.stop(); it gives me a null pointer exception.
Why is mc null? if the content exists and loads?
thank you VERY MUCH!
Agustina
CODE
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="1280" height="720" xmlns:views="code.views.*" xmlns:controllers="code.controllers.*" backgroundColor="#000000" creationComplete="OnCreationComplete()">
          <mx:Script>
          <![CDATA[
                    import mx.core.UIComponent;
                    private var loader:Loader;
                    private function OnCreationComplete():void
                              var url : String ="flashvideos/Advertising.swf";
                              loader = new Loader();
                              var request:URLRequest = new URLRequest(url);
                              loader.load(request);
                              loaderHolder.rawChildren.addChild(loader as DisplayObject);
                    private function onStop():void
                         var mc : MovieClip = loader.content as MovieClip;
                         mc.stop();
                    private function onPlay():void
                         var mc : MovieClip = loader.content as MovieClip;
                         mc.play();
]]>
          </mx:Script>
<mx:VBox width="100%" height="100%" horizontalAlign="center" verticalAlign="middle">
                    <mx:Canvas id="loaderHolder" width="500" height="500"/>
                         <mx:Button label="Stop" click="onStop()"/>
                         <mx:Button label="Play" click="onPlay()"/>
</mx:VBox>
</mx:Canvas>

If the swf is not an AS3/FP9 SWF (or newer) it will not be a MovieClip.

Similar Messages

  • Null pointer exception in native code

    Hi
    We are running JRockit 1.4.2 and we are having a lot of crashes recently. All of them have this error
    Error Message: Null pointer exception in native code
    Signal info : si_signo=11, si_code=1
    but the location of the crash differs. Our last one occured in java.util.Hashmap.get(). Another common element is that they appear to occur after deserialisation.
    Has anyone else had similar problems?
    Any help much appreciated.
    Thanks,
    Dave
    Thread Stack Trace:
    at java/util/HashMap.get(Optimized Method)@0x1c9b350
    at java/io/ObjectStreamClass.lookup(Optimized Method)@0x7e6fbde
    at java/io/ObjectStreamClass.initProxy(Unknown Source)@0x5feef04
    at java/io/ObjectInputStream.readProxyDesc(Optimized Method)@0xaa7b0ec
    at java/io/ObjectInputStream.readObject(Optimized Method)@0xa7bee63
    at java/rmi/MarshalledObject.get(Optimized Method)@0xbfe238c
    at org/jnp/interfaces/MarshalledValuePair.get(MarshalledValuePair.java:28)@0x263b571
    at org/jnp/interfaces/NamingContext.lookup(Optimized Method)@0xb08cfe1
    at org/jnp/interfaces/NamingContext.lookup(Optimized Method)@0xbf57275

    Thanks for the reply.
    The version is
    BEA WebLogic JRockit(TM) 1.4.2_04 JVM (build ari-29212-20040415-1332-linux-ia32, Native Threads, GC strategy: parallel)
    I have opened a support case but here is the contents of the dump file. Thanks again for any help.
    ===== BEGIN DUMP =============================================================
    JRockit dump produced after 2 days, 03:50:51 on Tue Jan 18 22:27:28 2005
    Additional information is available in:
    /home/ebask11/rel_15_59912-jb-3.2.3-2.19/bin/jrockit.26704.dump
    /home/ebask11/rel_15_59912-jb-3.2.3-2.19/bin/core
    Please send the file(s), information about your system
    setup and the program you were running to [email protected]. Thank you.
    Error Message: Null pointer exception in native code
    Signal info : si_signo=11, si_code=1
    Version : BEA WebLogic JRockit(TM) 1.4.2_04 JVM ari-29212-20040415-1332-linux-ia32
    Threads / GC : Native Threads, GC strategy: parallel
    : mmHeap->data = 0x20000000, mmHeap->top = 0x40000000
    : mmStartCompaction = 0x20000000, mmEndCompaction = 0x22800000
    Number CPUs : 2
    Tot Phys Mem : 4107608064
    OS version : Red Hat Linux release 7.3 (Valhalla)
    Linux version 2.4.22ow1np-ht (root@devbgb0211) (gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-110)) #8 SMP Mon Oct 13 19:54:55 GMT 2003
    State : JVM is running
    Command Line : -Djava.class.path=. -Djava.security.manager=java.rmi.RMISecurityManager -Xmx512m -Xms512m -Djmx.host=prdlog2 -Duser.timezone=GMT -Dprogram.name=run.sh -Djava.class.path=/home/ebask11/live_jboss/server/default/syslib:/home/ebask11/live_jboss/server/default/syslib/jce.zip:/home/ebask11/live_jboss/bin/run.jar:/usr/java/bea/jdk/1.4.2/lib/tools.jar -Dsun.java.command=org.jboss.Main -c default
    Environment : JAVA_HOME=/usr/java/bea/jdk/1.4.2, java.home=/usr/java/bea/jdk/1.4.2/jre, java.class.path=/home/ebask11/live_jboss/server/default/syslib:/home/ebask11/live_jboss/server/default/syslib/jce.zip:/home/ebask11/live_jboss/bin/run.jar:/usr/java/bea/jdk/1.4.2/lib/tools.jar, java.library.path=/usr/java/bea/jdk/1.4.2/jre/lib/i386/jrockit:/usr/java/bea/jdk/1.4.2/jre/lib/i386:/usr/java/bea/jdk/1.4.2/jre/../lib/i386
    C Heap : Good; no memory allocations have failed
    Registers:
    EAX = 33115950 EBX = 25252a50
    ECX = 00000002 EDX = 200da968
    ESI = 21aba548 EDI = 21aba548
    ESP = 0ac20000 EIP = 00000000
    EBP = 21aba548 EFL = 00010206
    CS = 0023 DS = 002b ES = 002b
    SS = 002b FS = 0357 GS = 0357
    Stack:
    0ac20000 :01c9b350 200da968 200da970 200da930 200da920 07e6fbde
    0ac20018 :2233ff08 0adc6cb8 200da936 00000000 00000000 21aba548
    0ac20030 :00000000 25a3c710 24f42f30 200da920 05feef04 21aba548
    0ac20048 :00000000 200f35d8 0aa7b0ec 00000000 271a5318 00000000
    0ac20060 :00000010 00000000 24f19bc8 24f19590 271a5318 0adc6cb8
    0ac20078 :271a5368 245b2710 271a5318 00000001 00000000 200f35d8
    0ac20090 :24f42f30 00000000 21aba548 00000000 00000000 0adc6cb8
    0ac200a8 :0a7bee63 24f1a3b0 00000000 0aa8003e 24f19d78 245b2710
    0ac200c0 :24f1a3f0 0adc6cb8 0b0df368 00000001 24f19d10 ffffffff
    0ac200d8 :24f19cc8 24f19d10 0bfe238c 00000003 205e68f8 245b2710
    0ac200f0 :245b2710 245b26f8 245b1e70 00000000 0b08d69b 00000000
    0ac20108 :205e1590 245b1e70 24f14a70 24f14428 24f144e0 24f14740
    0ac20120 :0000000a 24f14428 0bf57275 00000003 0aa7712b 00000030
    0ac20138 :258174e0 0adc6cb8 00000000 24f13fe0 00000000 258339f8
    0ac20150 :87effc53 00000101 0378e84b 258174e0 0378e525 24f13fe0
    0ac20168 :2585f4e8 2585f4e8 0378e21d 2a280920 24f13fe0 00000001
    0ac20180 :24f128a8 00000000 00000000 2585f4e8 24ed15c8 0378db6f
    0ac20198 :24ed1598 24ed16a0 05ed9299 24ed1730 20085640 24ed15c8
    0ac201b0 :24eb9bc0 00000000 24ed1730 24e9c5a0 24ed15c8 00000000
    0ac201c8 :24eb9b80 391182e8 24e9c5b0 00000000 391182e8 08006231
    0ac201e0 :00000000 24e9c5a0 24e9c5b0 08005bea 00000000 24e9c5a0
    0ac201f8 :24e9c5b0 31a26218 24ec68e8 00000027 0adc6cb8 0000001d
    0ac20210 :00000000 24e9c5a0 24ec6848 27986b80 24e9c5a0 24e9c5b0
    0ac20228 :27968208 24e9c5a0 24e9c5a0 31a263b0 0800fe11 24e9c5b0
    0ac20240 :368dd1e0 24e9c5b0 24e9c5a0 00c448bc 04ab64f4 24e9c5b0
    0ac20258 :0470ae51 24e9c5b0 24ec62e8 ffffffff 24e9c5b0 368dd1e0
    0ac20270 :ffffffff 00000002 3196a2f8 24e9c5a0 24eb9440 0bd5d31a
    0ac20288 :24e9c5b0 24eb9440 0bfa0e4a 24e9c5b0 24e9c5a0 24e9c5b0
    0ac202a0 :03fb5c09 24e9c5b0 24ec6238 00000000 00000000 00000000
    0ac202b8 :00000000 22921d98 24ec6368 25a3c710 03fbdb83 24e9c5b0
    0ac202d0 :03fbdb67 24e9c5b0 0c9ff12c 0adc6cb8 27a28c98 042e5528
    0ac202e8 :00000000 24ec6368 24ec6368 0c0b7c86 24e9c5b0 03fbda44
    0ac20300 :24e9c5a0 24e9c5b0 24e9c5a0 24eb9440 24e9c5a0 24eb9440
    0ac20318 :04ab631e 24e9c5b0 24e9c5b0 368eb0c8 254cd0b0 24e9c5a0
    0ac20330 :24e9c5a0 24eb9440 0bfa0f23 24e9c5b0 24eb9440 24e9c5b0
    0ac20348 :0adc6d44 24e9c5b0 368eb0c8 368eb0c8 368eb0c8 368eb0c8
    0ac20360 :368eb0c8 22921d98 24eb9610 25a3c710 03fbdb83 24e9c5b0
    0ac20378 :03fbdb67 24e9c5b0 0c9ff12c 0adc6cb8 254c4c70 00000000
    0ac20390 :00000000 24eb9610 24eb9610 0c0b7c86 24e9c5b0 03fbda44
    0ac203a8 :24e9c5a0 24e9c5b0 24e9c5a0 24eb9440 00000000 00000001
    0ac203c0 :03fbcc0d 24e9c5b0 07fbaf2f 00000000 24eb9440 3196a3f8
    0ac203d8 :3196a070 24e9c5a0 00000000 24e9c5b0 368dd1e0 24e9c5b0
    0ac203f0 :24e44550 24798b78 00000101 87effc52 00000000 3196a268
    0ac20408 :07fbc349 24e44550 24eb9430 24eb9430 24e44550 02787424
    0ac20420 :24e44550 3196a070 24798b78 0bf9dde1 24e44550 03fbc71d
    0ac20438 :24e44550 24e44550 24e9c698 2f5c12c0 2f5c1cd8 00000004
    0ac20450 :2f5c14a8 07fbc349 24e44550 24e9cc48 00000000 2f5c1d38
    0ac20468 :03fbc428 24e44550 24798b78 24e9cc48 24e44550 00000004
    0ac20480 :2f5c14a8 07fbc371 24e44550 24e9cc48 00000004 09bc5570
    0ac20498 :03fb98ad 24e44550 200a4008 3419b0e0 00000000 24e9c698
    0ac204b0 :24798b78 24e44550 24798b78 24e44550 24e9cc48 319fd4e0
    0ac204c8 :00000004 2f5c14a8 07fbc371 24e44550 24e9cc48 24798b78
    0ac204e0 :24798b78 03fb8a7a 24e44550 3419f128 24e9cc48 24e44550
    0ac204f8 :00000004 2f5c14a8 07fbc371 24e44550 24e9cc48 31a34d88
    0ac20510 :00000101 03fb8934 24e44550 24798b78 87effc52 24e9cc48
    0ac20528 :00000004 2f5c14a8 07fbc371 24e44550 24e9cc48 24e9cc48
    0ac20540 :24e44550 02787424 24e44550 2f5c12c0 24e44550 0bf9dde1
    0ac20558 :24e44550 03fb8875 24e44550 24798b78 00000000 2f5c12c0
    0ac20570 :0bf23542 24e44550 0adc6cb8 22961f38 24798b78 24e9c5c8
    0ac20588 :25a3c710 25a3c710 22921d98 24e44550 00000004 229629e0
    0ac205a0 :07fbc349 24e44550 24e9c688 24798b78 24e44550 0bf2376a
    0ac205b8 :24e44550 00000000 229496f0 00000004 229629e0 07fbc371
    0ac205d0 :24e44550 24e9c688 24e44550 0280d39c 0278d370 24e44550
    0ac205e8 :00000040 24798b78 27f4b688 00000030 229490a0 00000004
    0ac20600 :229629e0 07fbc371 24e44550 24e9c688 3196a070 00000000
    0ac20618 :0bfa040d 24e44550 00000000 00000000 0ad52e9c 22965b90
    0ac20630 :24798b78 00000008 00000000 200c7480 00000000 000e3274
    0ac20648 :00000000 00000000 24798b78 24e44550 24e9c688 00000004
    0ac20660 :229629e0 07fbc371 24e44550 24e9c688 00000004 24e9c688
    0ac20678 :0bf9c372 24e44550 0adc6cb8 25a3c710 00000019 228a5da0
    0ac20690 :00000101 87effc52 01c9b3aa 7025a84b 229127d8 22911f18
    0ac206a8 :229127d8 0bf9e5eb 0adc6cb8 22965b90 24798b78 246934c8
    0ac206c0 :22962a40 24e44550 00000000 00000004 229629e0 07fbc371
    0ac206d8 :24e44550 24e9c688 24e9c688 24e44550 02787424 24e44550
    0ac206f0 :22961f38 0233875c 0bf9dde1 24e44550 02787686 24e44550
    0ac20708 :24798b78 24e44550 22917728 00000000 22912938 07fbc349
    0ac20720 :24e44550 24e9c590 24e9c590 24e44550 02787424 24e44550
    0ac20738 :247963d8 24798b78 0bf9dde1 24e44550 0275384d 24e44550
    0ac20750 :24791f18 24e44550 24e44550 2298ae60 24791348 24791f18
    0ac20768 :0000000a 247963d8 0bf987e2 24791f18 24798b60 0adc6cb8
    0ac20780 :24791348 247912c8 00000055 0adc6cb8 24791b38 24796468
    0ac20798 :247919e0 24791f18 24791348 22981450 24e11ad0 2298d1e0
    0ac207b0 :247912c8 247912c8 0adc6cb8 0bf993f2 24e11ad0 247912c8
    0ac207c8 :24e11b10 0000000d 07cbea65 00000000 0ad52e9c 25a3c710
    0ac207e0 :24e11ad0 247912c8 247912b0 22981450 41ed8d4e 00000002
    0ac207f8 :22981d60 25a3c710 25a3c6e8 22981450 02751c10 24e11ad0
    Code:
    Loaded modules:
    (* denotes the module causing the exception)
    0x08048000-0x0804cd66 /usr/java/bea/jdk/1.4.2/bin/java
    0x00127000-0x0013343a /lib/i686/libpthread.so.0
    0x0013c000-0x0015ca02 /lib/i686/libm.so.6
    0x0015e000-0x0015fbac /lib/libdl.so.2
    0x42000000-0x4212b962 /lib/i686/libc.so.6
    0x00161000-0x003293cf /usr/java/bea/jdk/1.4.2/jre/lib/i386/jrockit/libjvm.so
    0x003c7000-0x003cff0d /lib/libnss_files.so.2
    0x00c29000-0x00c29ffa /usr/lib/gconv/ISO8859-1.so
    0x00c2b000-0x00c3afa5 /usr/java/bea/jdk/1.4.2/jre/lib/i386/libverify.so
    0x01211000-0x012309cf /usr/java/bea/jdk/1.4.2/jre/lib/i386/libjava.so
    0x01233000-0x0124485a /lib/libnsl.so.1
    0x01505000-0x0150e012 /lib/libnss_nisplus.so.2
    0x01625000-0x01627c71 /lib/libnss_dns.so.2
    0x01b0e000-0x01b1b990 /lib/libresolv.so.2
    0x00ddc000-0x00ddc6e9 /usr/java/bea/jdk/1.4.2/jre/lib/i386/librmi.so
    0x0196e000-0x019715c1 /usr/java/bea/jdk/1.4.2/jre/lib/i386/libioser12.so
    Java Thread ID = 0x00003500, lastJavaFrame = (nil), Name = TP-Processor32
    Thread Stack Trace:
    at java/util/HashMap.get(Optimized Method)@0x1c9b350
    at java/io/ObjectStreamClass.lookup(Optimized Method)@0x7e6fbde
    at java/io/ObjectStreamClass.initProxy(Unknown Source)@0x5feef04
    at java/io/ObjectInputStream.readProxyDesc(Optimized Method)@0xaa7b0ec
    at java/io/ObjectInputStream.readObject(Optimized Method)@0xa7bee63
    at java/rmi/MarshalledObject.get(Optimized Method)@0xbfe238c
    at org/jnp/interfaces/MarshalledValuePair.get(MarshalledValuePair.java:28)@0x263b571
    at org/jnp/interfaces/NamingContext.lookup(Optimized Method)@0xb08cfe1
    at org/jnp/interfaces/NamingContext.lookup(Optimized Method)@0xbf57275
    at javax/naming/InitialContext.lookup(Optimized Method)@0xaa7712b
    at com/lastminute/ebasket/basket/JNDIHostedEJBObjectsFactory.lookupBasketHome(JNDIHostedEJBObjectsFactory.java:352)@0x378e84b
    at com/lastminute/ebasket/basket/JNDIHostedEJBObjectsFactory.findBasket(JNDIHostedEJBObjectsFactory.java:310)@0x378e21d
    at com/lastminute/ebasket/basket/JNDIHostedEJBObjectsFactory.findBasket(JNDIHostedEJBObjectsFactory.java:250)@0x378db6f
    at com/lastminute/ebasketx/ui/servlet/AddToBasketAction.perform(AddToBasketAction.java:101)@0x5ed9299
    at org/apache/struts/action/Action.execute(Optimized Method)@0x8006231
    at org/apache/struts/action/RequestProcessor.processActionPerform(RequestProcessor.java:484)@0x5ed8fe1
    at org/apache/struts/action/RequestProcessor.process(Optimized Method)@0x8004b71
    at org/apache/struts/action/ActionServlet.process(Optimized Method)@0x800fe11
    at org/apache/struts/action/ActionServlet.doGet(ActionServlet.java:507)@0x4ab64f4
    at javax/servlet/http/HttpServlet.service(HttpServlet.java:740)@0x470ae51
    at javax/servlet/http/HttpServlet.service(Optimized Method)@0xbd5d31a
    at org/apache/catalina/core/ApplicationFilterChain.internalDoFilter(Optimized Method)@0xbfa0e4a
    at org/apache/catalina/core/ApplicationFilterChain.access$000(ApplicationFilterChain.java:98)@0x3fbdb83
    at org/apache/catalina/core/ApplicationFilterChain$1.run(ApplicationFilterChain.java:176)@0x3fbdb67
    at jrockit/vm/AccessController.do_privileged_exc(Optimized Method)@0xc9ff12c
    at jrockit/vm/AccessController.doPrivileged(Optimized Method)@0xc0b7c86
    at org/apache/catalina/core/ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172)@0x3fbda44
    at com/lastminute/ebasketx/ui/helper/SessionFilter.doFilter(SessionFilter.java:56)@0x4ab631e
    at org/apache/catalina/core/ApplicationFilterChain.internalDoFilter(Optimized Method)@0xbfa0f23
    at org/apache/catalina/core/ApplicationFilterChain.access$000(ApplicationFilterChain.java:98)@0x3fbdb83
    at org/apache/catalina/core/ApplicationFilterChain$1.run(ApplicationFilterChain.java:176)@0x3fbdb67
    at jrockit/vm/AccessController.do_privileged_exc(Optimized Method)@0xc9ff12c
    at jrockit/vm/AccessController.doPrivileged(Optimized Method)@0xc0b7c86
    at org/apache/catalina/core/ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172)@0x3fbda44
    at org/apache/catalina/core/StandardWrapperValve.invoke(StandardWrapperValve.java:256)@0x3fbcc0d
    at org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Optimized Method)@0x7fbc349
    at org/apache/catalina/core/StandardPipeline.invoke(StandardPipeline.java:480)@0x2787424
    at org/apache/catalina/core/ContainerBase.invoke(Optimized Method)@0xbf9dde1
    at org/apache/catalina/core/StandardContextValve.invoke(StandardContextValve.java:191)@0x3fbc71d
    at org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Optimized Method)@0x7fbc349
    at org/jboss/web/tomcat/security/JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:220)@0x3fbc428
    at org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Optimized Method)@0x7fbc371
    at org/apache/catalina/authenticator/AuthenticatorBase.invoke(AuthenticatorBase.java:494)@0x3fb98ad
    at org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Optimized Method)@0x7fbc371
    at org/apache/catalina/valves/CertificatesValve.invoke(CertificatesValve.java:246)@0x3fb8a7a
    at org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Optimized Method)@0x7fbc371
    at org/jboss/web/tomcat/tc4/statistics/ContainerStatsValve.invoke(ContainerStatsValve.java:76)@0x3fb8934
    at org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Optimized Method)@0x7fbc371
    at org/apache/catalina/core/StandardPipeline.invoke(StandardPipeline.java:480)@0x2787424
    at org/apache/catalina/core/ContainerBase.invoke(Optimized Method)@0xbf9dde1
    at org/apache/catalina/core/StandardContext.invoke(StandardContext.java:2417)@0x3fb8875
    at org/apache/catalina/core/StandardHostValve.invoke(Optimized Method)@0xbf23542
    at org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Optimized Method)@0x7fbc349
    at org/apache/catalina/valves/ErrorDispatcherValve.invoke(Optimized Method)@0xbf2376a
    at org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Optimized Method)@0x7fbc371
    at org/apache/catalina/valves/ErrorReportValve.invoke(ErrorReportValve.java:172)@0x278d370
    at org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Optimized Method)@0x7fbc371
    at org/jboss/web/tomcat/security/SecurityAssociationValve.invoke(Optimized Method)@0xbfa040d
    at org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Optimized Method)@0x7fbc371
    at org/apache/catalina/valves/AccessLogValve.invoke(Optimized Method)@0xbf9c372
    at org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Optimized Method)@0x7fbc371
    at org/apache/catalina/core/StandardPipeline.invoke(StandardPipeline.java:480)@0x2787424
    at org/apache/catalina/core/ContainerBase.invoke(Optimized Method)@0xbf9dde1
    at org/apache/catalina/core/StandardEngineValve.invoke(StandardEngineValve.java:174)@0x2787686
    at org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Optimized Method)@0x7fbc349
    at org/apache/catalina/core/StandardPipeline.invoke(StandardPipeline.java:480)@0x2787424
    at org/apache/catalina/core/ContainerBase.invoke(Optimized Method)@0xbf9dde1
    at org/apache/coyote/tomcat4/CoyoteAdapter.service(CoyoteAdapter.java:197)@0x275384d
    at org/apache/jk/server/JkCoyoteHandler.invoke(Optimized Method)@0xbf987e2
    at org/apache/jk/common/HandlerRequest.invoke(Optimized Method)@0xbf993f2
    at org/apache/jk/common/ChannelSocket.invoke(ChannelSocket.java:673)@0x2751c10
    at org/apache/jk/common/ChannelSocket.processConnection(Optimized Method)@0x7fb5e35
    at org/apache/jk/common/SocketConnection.runIt(Optimized Method)@0xbf99f01
    at org/apache/tomcat/util/threads/ThreadPool$ControlRunnable.run(ThreadPool.java:677)@0x224f434
    at java/lang/Thread.run(Optimized Method)@0x7e7473a
    at java/lang/Thread.startThreadFromVM(Optimized Method)@0x1c9c0da
    --- End of stack trace
    Additional information is available in:
    /home/ebask11/rel_15_59912-jb-3.2.3-2.19/bin/jrockit.26704.dump
    /home/ebask11/rel_15_59912-jb-3.2.3-2.19/bin/core
    Please send the file(s), information about your system
    setup and the program you were running to [email protected]. Thank you.

  • Null pointer exception in native code. error 52 in Weblogic8.1

    Hi all,
    I'm using WLS 8.1SP5 with 1.4.2_08 and having this dump once a day, when people is working. I tryed google, but no luck. Can someone can help please?
    ===== BEGIN DUMP =============================================================
    JRockit dump produced after 5 days, 00:39:42 on Mon Oct 01 16:59:00 2007
    Additional information is available in:
    D:\web\bea\user_projects\domains\APIA_Prod\jrockit.2188.dump
    D:\web\bea\user_projects\domains\APIA_Prod\jrockit.2188.mdmp
    If you see this dump, please open a support case with BEA and
    supply as much information as you can on your system setup and
    the program you were running. You can also search for solutions
    to your problem at http://forums.bea.com in
    the forum jrockit.developer.interest.general.
    Error code: 52
    Error Message: Null pointer exception in native code
    Version : BEA WebLogic JRockit(TM) 1.4.2_08 JVM R24.5.0-61 ari-49095-20050826-1856-win-ia32
    Threads / GC : Native Threads, GC strategy: parallel
    : mmHeap->data = 0x00B60000, mmHeap->top = 0x40B60000
    : mmStartCompaction = 0x1EB60000, mmEndCompaction = 0x23B60000
    CPU : Intel Pentium 4 (HT)
    Number CPUs : 8
    Tot Phys Mem : 4025999360
    OS version : Microsoft Windows Server 2003 Service Pack 1 (Build 3790)
    State : JVM is shutting down
    Command Line : -Djava.class.path=.;C:\Program Files\Java\j2re1.4.2_05;C:\Program Files\Java\j2re1.4.2_05\lib;C:\Program Files\Java\j2re1.4.2_05\lib\tools.jar -Djrockit.launcher.type=jrockit.shipment -Xms1024m -Xmx1024m -Xgc:parallel -Xcleartype:local -Dweblogic.management.server=http://10.128.12.23:7001 -Dbea.home=D:\web\bea -Dweblogic.RootDirectory=D:\web\bea\user_projects\domains\APIA_Prod -Djava.class.path=.;D:\web\bea\jdk142_08\lib\tools.jar;D:\web\bea\WEBLOG~1\server\lib\weblogic_sp.jar;D:\web\bea\WEBLOG~1\server\lib\weblogic.jar -Djava.security.policy==D:\web\bea\WEBLOG~1\server\lib\weblogic.policy -Dweblogic.Name=Apia_Svr1 -Dweblogic.system.BootIdentityFile=D:\web\bea\WEBLOG~1\common\nodemanager\NodeManagerLogs\NodeManagerInternal\bootFile_APIA_Prod_Apia_Svr1 -Dweblogic.system.NodeManagerBoot=true -Dweblogic.system.NodeManagerAddress=null::5555 -Dweblogic.nodemanager.ServerStartTime=1190834358456 -Dweblogic.security.SSL.ignoreHostnameVerification=false -Dweblogic.ReverseDNSAllowed=false -Dsun.java.command=weblogic.Server
    Environment : JAVA_HOME=C:\Program Files\Java\j2re1.4.2_05, java.home=d:\web\bea\jrockit81sp5_142_08\jre, java.class.path=.;D:\web\bea\jdk142_08\lib\tools.jar;D:\web\bea\WEBLOG~1\server\lib\weblogic_sp.jar;D:\web\bea\WEBLOG~1\server\lib\weblogic.jar, java.library.path=d:\web\bea\jrockit81sp5_142_08\bin;.;C:\WINDOWS\system32;C:\WINDOWS;D:\web\bea\WEBLOG~1\server\bin;D:\web\bea\jdk142_08\bin;D:\web\bea\jdk142_08\jre\bin;C:\Program Files\VERITAS\NetBackup\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Java\j2re1.4.2_05\bin
    C Heap : Good; no memory allocations have failed
    Registers (from context struct at 0x41D6F488/0x41D6F5A4):
    Converted EIP: 41eafe45
    EAX = 00001e90 EBX = 009db42c
    ECX = 003c1e90 EDX = 00000000
    ESI = 71c14280 EDI = 00000000
    EIP = 41eafe45 ESP = 41d6f870
    EBP = 41d6f880 EFL = 00010a03
    CS = 001b DS = 0023 ES = 0023
    SS = 0023 FS = 003b GS = 0000
    Stack:
    41d6f870 :00000000 00000000 003c95a8 003c1e90 00000000 004e91e1
    41d6f888 :0000008f 00000000 41d6f8c4 009db42c 00000001 00000000
    41d6f8a0 :41b802e0 4cfa3940 012b5068 4d87a5cc 012b5068 00000000
    41d6f8b8 :012b5068 41b81710 4ccfcdda 009b9ba8 004e9244 012b5310
    41d6f8d0 :0054deca 012b5315 4ccfc945 0000008f 50a0f1e8 009db42c
    41d6f8e8 :00000000 012b5258 4ccfcb33 012b5315 0000008f 012b5258
    41d6f900 :4ccfca44 012b525d 00000000 009b9ba8 41d6f918 41b823f8
    41d6f918 :4ccfc980 00553ff5 ffffffff 00000010 00000000 41d6f9e4
    41d6f930 :4d1126e8 009b9c34 41d6fa48 41d6f978 009b9c34 437faab0
    41d6f948 :fffffffe 00000002 fffffffe 00000000 41d6f978 00570b50
    41d6f960 :00000000 009b9ba8 00090000 009b9c34 00000001 7c8302e7
    41d6f978 :00000000 00570b50 fffffff8 00000001 0000008f 0000008c
    41d6f990 :437faaf0 00000000 00000000 00000000 00000000 41d6f918
    41d6f9a8 :41b823c0 ffffffff 437f9fc0 437faab0 009b9c34 4ccfc980
    41d6f9c0 :0000008f 41d6f918 00000001 00000001 00000010 00000000
    41d6f9d8 :00000000 41d6f918 009b9c34 009b9ba8 00533bb1 009b9c34
    41d6f9f0 :50a0f1b8 4d1126e8 00000000 41d6fa44 005539c0 41d6fa48
    41d6fa08 :009b9ba8 437f9fc0 41d6fa50 009b9c34 0059065c 50a0f1b8
    41d6fa20 :00535583 009b9c34 437faab0 00000000 41d6fa44 005539c0
    41d6fa38 :00000001 41d6fa48 00533729 41d6fa68 00000000 00000000
    41d6fa50 :0000008f 00569db2 009b9c34 437f9fd4 437faab0 0000008f
    41d6fa68 :009b9ba8 009b9c34 0000000f 00000002 00569ef7 0000008f
    41d6fa80 :009b9ba8 0056a38d 009b9ba8 009b9ba8 41d6ff80 009b9ba8
    41d6fa98 :7ffde000 009b9c34 41d6ff98 00525ca0 00572cf0 00000000
    41d6fab0 :00000000 00000000 00000000 00000000 00000000 00000000
    41d6fac8 :00000000 00000000 00000000 00000000 00000000 00000000
    41d6fae0 :00030178 00000269 00000000 00000000 00000000 00000000
    41d6faf8 :00000000 00000000 00000000 00000000 00000000 00000000
    41d6fb10 :00000000 00000000 00000000 00000000 00000000 00000000
    41d6fb28 :00000000 00000000 00037c28 00000000 00000000 00000000
    41d6fb40 :00000000 00000013 00000000 00037c20 00030168 00000042
    41d6fb58 :00037c20 00000013 00030178 00000000 00000098 00000000
    41d6fb70 :00030000 009d6850 00000210 4100fbbc 00000098 4100f980
    41d6fb88 :00380000 41d6f988 00000000 41d6fbd4 7c82f680 7c82fb28
    41d6fba0 :ffffffff 7c82fb23 7c3423aa 771f123c 00000000 00000002
    41d6fbb8 :771f0000 41d6fc10 00095e70 00000001 00000000 41d6fca8
    41d6fbd0 :771f46c9 771f1240 ffffffff 771f123c 771f11e8 771f0000
    41d6fbe8 :00000002 00000000 00000000 41d6fc10 00000001 41d6fc1c
    41d6fc00 :7c82257a 771f0000 00000001 00000000 00000001 00000000
    41d6fc18 :00097f98 00000001 00000000 41d6fcb8 7c81a81b 7c889d94
    41d6fc30 :7c81b26f 00000000 7ffdc000 00000000 00000000 00000000
    41d6fc48 :00000000 00000000 00000000 00000000 00000000 00000000
    41d6fc60 :00000000 00000024 00000001 00000000 00000000 00000070
    41d6fc78 :ffffffff ffffffff 7c81a7dc 7c81a7a4 00000000 00000000
    41d6fc90 :00097f98 771f11a0 00000418 000000f5 009dc120 41d6fecc
    41d6fca8 :7c82fda6 7c82fb23 0000040c 0000040c 009b9ba8 7c822054
    41d6fcc0 :7c81b23f 41d6fd28 00000000 009dbad8 00000000 00000000
    41d6fcd8 :00000000 00000000 00000000 00000000 00000000 00000000
    41d6fcf0 :00000000 00000000 00000000 41d6fcc4 00000000 41d6fff4
    41d6fd08 :7c82f680 009dc530 ffffffff 7c81b23f 7c8211b4 0000000c
    41d6fd20 :41d6fd28 00000001 00010017 00000000 00000000 00380178
    41d6fd38 :00000000 00000000 00000000 00000005 f7547000 0000010d
    41d6fd50 :000007ff 00000001 624e4d43 00000060 ae19faa4 009dc120
    41d6fd68 :e4d11360 e24e4d43 00000005 0000000e e310e008 ffffffff
    41d6fd80 :3b9aca07 e33dd7e8 3b9aca07 3b9aca07 00380178 1a30eb0a
    41d6fd98 :009dc538 8093d69b 009d99e8 00000000 00380178 c0000034
    41d6fdb0 :808ad480 00000000 00000038 009d99f0 00000023 00000000
    41d6fdc8 :00000000 009dbad8 00000000 00000000 0056f660 00000000
    41d6fde0 :77e6b5f3 0000001b 00000200 41d6fffc 00000023 00000698
    41d6fdf8 :0000076a e47bbbf0 00000090 00000006 00000005 f7547000
    41d6fe10 :ae19fbd4 e131ec08 ae19fbd8 d3f0fe22 d3f0fe22 000000f5
    41d6fe28 :8093cb16 e131ec08 e105bf1c 00000025 ae19fbd0 009d99f0
    41d6fe40 :e105bfb0 ae19fbd4 8093cb6e 3b9aca07 e131ec08 8083a8f5
    41d6fe58 :00000000 00000000 80a78be3 badb0d00 80010031 00000005
    41d6fe70 :009dc120 00000005 c0502000 009dccd8 77ce8221 00000083
    41d6fe88 :00000000 009dc118 ae19fba8 00000418 009dc118 009dc120
    41d6fea0 :00380178 00000001 00000418 0000ad58 00380000 41d6fcb0
    41d6feb8 :f772fa00 41d6fefc 7c82f680 7c82fb28 ffffffff 7c82fb23
    41d6fed0 :7c3416b3 00380000 00000000 7c3416b8 0000040c 00000000
    41d6fee8 :009b9ba8 ffffffff 41d6ff3c 41d6fee0 41d6ff40 41d6ff98
    41d6ff00 :7c34240d 7c37a2a8 ffffffff 7c3416b8 7c3416db 0000040c
    41d6ff18 :7c3416f8 0000040c 00000000 00504b4d 0000040c 0107e577
    41d6ff30 :41d6ff6c 0057de91 009b9ba8 009b9ba8 00003000 00000140
    41d6ff48 :41d6ff64 41d6ffa0 0056f1f9 41c70000 00003000 009b9ba8
    41d6ff60 :009db8b0 009b9ba8 0056e9c2 7c821dd4 009b9ba8 009b9ba8
    41d6ff78 :009b9ba8 00572ce9 41d6ffa0 00572ded 77e6eccd 009dbad8
    41d6ff90 :009dbad8 7ffde000 41d6ffdc 00525ca0 41d6ffec 0056f6c7
    41d6ffa8 :009b9ba8 00000000 00000000 00000740 009dbaf4 77e6608b
    41d6ffc0 :00000740 00000000 00000000 009dbad8 c9792963 41d6ffc4
    41d6ffd8 :000d4193 ffffffff 77e6b7d0 77e66098 00000000 00000000
    Code:
    41eafd45 :00000000 00000000 00000000 00000000 00000000 00000000
    41eafd5d :00000000 00000000 ff4e4be0 00ffffff 007ffdc0 00000000
    41eafd75 :34001590 0041eafd 98000000 d041eaff 0077e6b7 0077e6bb
    41eafd8d :a4000000 4241eafd 2877e6ba ff000007 00ffffff 68000000
    41eafda5 :0c41d6f8 280056e6 ff000007 0fffffff 48001d1a 8000aece
    41eafdbd :00006093 987ffda0 c0005710 98004fe0 38009da3 0041eafe
    41eafdd5 :40000000 9841eafe f8009da3 0001c83c e0000000 0001c83c
    41eafded :17000000 80004f66 38006093 3841eafe 2041eafe 00f7c4ca
    41eafe05 :da7ffda0 20004f20 c0f7c4ca 00004fe0 00000000 b5000000
    41eafe1d :98004f2e 98009da3 00009da3 9841eaff 58009da3 00303fe0
    41eafe35 :00000000 50000000 0000570b 98000000 00009da3 00000000
    41eafe4d :80000000 f5006093 388083a8 5041eafe 0000570b 98000000
    41eafe65 :31009da3 00800100 60000000 00005c0e 58000000 5041eafe
    41eafe7d :0000570b 98000000 00009da3 00000000 d0000000 00005c0e
    41eafe95 :31000000 00800100 00000000 00000000 ff000000 00ffffff
    41eafead :00000000 cc000000 0080a78b e0f7757a 78adbbab 5041eafe
    41eafec5 :0000570b 98000000 b7009da3 608083e6 2888736a 90005c0e
    41eafedd :7888736a 5041eafe 0000570b 98000000 3c009da3 0041eaff
    41eafef5 :20000000 00005c0f 80000010 f041eaff 0000572c 84000000
    41eaff0d :917c8218 ff77e41a 3cffffff 4041eaff 4041eaff 64000001
    41eaff25 :f041eaff 6c009de2 2d41eaff 0600540a 98000000 f0009da3
    41eaff3d :00009de2 40000030 64000001 a041eaff f941eaff 000056f1
    Loaded modules:
    (* denotes the module causing the exception)
    0x7c800000-0x7c8bffff C:\WINDOWS\system32\ntdll.dll
    0x77e40000-0x77f41fff C:\WINDOWS\system32\kernel32.dll
    0x77f50000-0x77febfff C:\WINDOWS\system32\ADVAPI32.dll
    0x77c50000-0x77ceefff C:\WINDOWS\system32\RPCRT4.dll
    0x77ba0000-0x77bf9fff C:\WINDOWS\system32\MSVCRT.dll
    0x00410000-0x0061afff d:\web\bea\jrockit81sp5_142_08\jre\bin\jrockit\jvm.dll
    0x76aa0000-0x76accfff C:\WINDOWS\system32\WINMM.dll
    0x77c00000-0x77c47fff C:\WINDOWS\system32\GDI32.dll
    0x77380000-0x77411fff C:\WINDOWS\system32\USER32.dll
    0x7c8d0000-0x7d0d3fff C:\WINDOWS\system32\SHELL32.dll
    0x77da0000-0x77df1fff C:\WINDOWS\system32\SHLWAPI.dll
    0x71c00000-0x71c16fff C:\WINDOWS\system32\WS2_32.dll
    0x71bf0000-0x71bf7fff C:\WINDOWS\system32\WS2HELP.dll
    0x7c340000-0x7c395fff C:\WINDOWS\system32\MSVCR71.dll
    0x71bc0000-0x71bc7fff C:\WINDOWS\system32\rdpsnd.dll
    0x771f0000-0x77200fff C:\WINDOWS\system32\WINSTA.dll
    0x71c40000-0x71c97fff C:\WINDOWS\system32\NETAPI32.dll
    0x76b70000-0x76b7afff C:\WINDOWS\system32\PSAPI.DLL
    0x77420000-0x77522fff C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.3790.2778_x-ww_A8F04F11\comctl32.dll
    0x76f50000-0x76f62fff C:\WINDOWS\system32\Secur32.dll
    0x00b30000-0x00b48fff d:\web\bea\jrockit81sp5_142_08\jre\bin\java.dll
    0x00b50000-0x00b5dfff d:\web\bea\jrockit81sp5_142_08\jre\bin\verify.dll
    0x71b20000-0x71b60fff C:\WINDOWS\System32\mswsock.dll
    0x76ed0000-0x76efefff C:\WINDOWS\system32\DNSAPI.dll
    0x76f80000-0x76f87fff C:\WINDOWS\system32\rasadhlp.dll
    0x42c30000-0x42c34fff D:\web\bea\weblogic81\server\bin\wlntio.dll
    0x68000000-0x6802efff C:\WINDOWS\system32\rsaenh.dll
    0x00a90000-0x00a95fff D:\web\bea\jrockit81sp5_142_08\jre\bin\ioser12.dll
    0x02800000-0x028c0fff d:\web\bea\jrockit81sp5_142_08\jre\bin\dbghelp.dll
    0x77b90000-0x77b97fff C:\WINDOWS\system32\VERSION.dll
    Java Thread ID = 0x00000100, lastJavaFrame = 0x41D6F8E0, Name = (Signal Handler)
    Thread Stack Trace:
    at _vmShutdown+225()@0x004E91E1
    at java/lang/Shutdown.halt(Native Method)@0x4CCFC910
    at java/lang/Shutdown.exit(Unknown Source)@0x4CCFCA44

    You would need to get BEA support, after verifying you are on a supported configuration (http://edocs.bea.com/jrockit/jrdocs/suppPlat/supp_142.html).
    Otherwise you may need to try update 10, or use Sun JVM.

  • Null pointer exception with Lists

    Hi,
    I have got a problem with java.util.List. It is giving Null pointer exception whenever I try to add after extracting from my XML file.I have written the code like this:
    List year; //Global variable
    List loaddatas; //Global variable
    Element e1; //Global
    loaddatas=root.getChild("Load").getChildren("LoadData");
    int k=loaddatas.size();
    for(int i=0;i<loaddatas.size();i++)
    e1=(Element)loaddatas.get(i);
    year.add(i,Integer.valueOf(e1.getChildText("Year"))); // I am getting exception here.....
    root is root element in XML file.
    I am able to display "Integer.valueOf(e1.getChildText("Year"))" correctly.
    Anybody please tell me how to solve this.
    Thanks,
    Sai Ram

    Looks like somebody forgot to learn to program before starting to write code....
    List list = new ArrayList();

  • Returning vector and null pointer exception

    Hi, I'm writing a mailing program which so far is working fine, but I have now run into a problem which is completely throwing me. My mailer needs to be able to load multiple attachments - and also to be able to deal with an HTML text which contains multiple images. In each case, what I'm trying to do is to put the attachments and the images into separate vectors and process them through an iterator. The logic, at least, I hope is correct.
    I can get my code to compile but it keeps throwing a null pointer exception a runtime. Somehow, I just can't get it to pass the vector from one part of the code to another.
    Can anyone help me? I've tried various things, none of which seem to work. My code, as it stands, is posted in a skeletal form below.
    Thanks for any ideas:
    public class MailSender
       // declare various variables, including:   
         Vector embeddedImages;
         String HTMLString;
        public MailSender()
            setup();
        private void setup()
         //this part of the program sets up the various parts of the mail  (to, from, body etc)    
          HTMLString = "blah blah blah";  //sample HTMLString   
           Vector embeddedImages = null; //is this correct?
            if (HTMLString.length() > 0)
                processHTMLString(HTMLString);
         private String procesHTMLString(String htmlText)
            Vector embeddedImages = new Vector(); // I construct my vector here, is this correct?
            //Here I process the HTML string to extract the images
            //get the file path of the image and pass it to the vector
            addToVector(imageFile);
            return HTMLString;
        public Vector addToVector(String imageFile)
            embeddedImages.add(imageFile);
            return embeddedImages;
        private void send()
            //this part does the sending of the mail
            //at some part in this method I need to get at the contents of the vector:
            //but this part isn't working, I keep getting a null pointer exception
            Iterator singleImage = embeddedImages.iterator();
            while (singleImage.hasNext())
        public static void main(String[] args)
            MailSender ms = new MailSender();
            ms.send();
            System.out.println("MailSender is done ");
    }

    >>>>while they don't have a clue on how the language and/or programming in general works.
    Thank you, salpeter, for your esteemed estimation of my programming competence.
    >>>What I'm wondering is: how come people always start building applications... blah blah
    The reason being, is that it happens to be my job.
    OK, I'm perhaps slower than most and there are things I don't yet understand but I get paid probably about a tenth of what you do (and maybe even less). I regard it as a kind of apprenticeship which, after a past life having spent twenty years packing crates in a warehouse, is worth the sacrifice. Six months ago I'd never written a line of code in my life and everything I've learned since has been from books, the good people in these forums, and a lot of patient trial and error. It's hard work, but I'll get there.
    I say this, only as encouragement to anyone else who is trying to learn java and hasn't had the benefit of IT training at school and a four year computing course at university paid for by the parents, and for whom the prohibitive cost (in both time and money) of most java courses would never allow them to get on this ladder.
    Excuse my somewhat acerbic posting, but comments such as yours tend to provoke...
    Thank you EverNewJoy for explaining this to me. I haven't had time yet to try it out, but at least the concept now is clear to me.

  • [svn] 3779: Continue fix for BLZ-262: null pointer exception on redeploy of web app/servlet.

    Revision: 3779
    Author: [email protected]
    Date: 2008-10-21 10:23:55 -0700 (Tue, 21 Oct 2008)
    Log Message:
    Continue fix for BLZ-262: null pointer exception on redeploy of web app/servlet.
    Remove finally block in servlet init() as the call to destroy() in the catch block will clear ThreadLocals
    if there is an error. Move it to the end of try block instead since the init() thread doesn't need any
    thread locals set.
    Log the startup error before calling destroy() in init() catch clause.
    QA: Yes
    Doc: No
    Ticket Links:
    http://bugs.adobe.com/jira/browse/BLZ-262
    Modified Paths:
    blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/MessageBrokerServlet.java

    Hello!
    I had a similar problem under WebLogic 6.1 SP4 after deploying a war-file with
    a bug.
    After deploying the corrected file, it seemed that the old version was deployed
    again.
    Perhaps this behaviour will help you to load the new application/ejb:
    - undeploy
    - remove from targets
    - move to targets
    - deploy
    Claudia
    "Marco" <[email protected]> wrote:
    >
    hi all,
    i have found a werid problem in deploying applications in Solaris 8
    for weblogic
    7.0.
    i have deployed one EJB, and the first time i access it (thru teh web
    app embedded
    in the .ear) it gave me a null pointer exception because i was failing
    to lookup
    one environment variable.
    so, i fix the code, rebuild the ear and redeployed, and the same error
    happened
    again.
    i am sure i did not do any mistakees because i have put some system.err
    statements
    in the bean code to show the workflow, and when i have deployed it on
    Window 2k
    the statemens appeared.
    but in solaris they didnot appear, and i got the same exception that
    i had before..
    it looks like wls is caching teh ejb, because whenever i redeploy it
    (adding more
    and more system.err statements) it always execute the faulty code of
    when deployed
    the very first time.
    anyone can help?
    regards
    marco

  • Jbo null pointer exception whilst creating an AM

    Hello,
    I am trying to create some EO's,VO's and associated AM. At the end of the creation, I tend to get the following error
    Load Error
    Exception: oracle.jbo.dt.objects.JboException(java.lang.NullPointerException).
    The creation of EO's runs smooth, but if I decide to create the associated VO's and the AM, the application hangs, and I have to kill it before I can move forward.
    Please guide me

    I am sorry I was ambiguous in my previous post.
    I am trying to create a EO/VO/AM triplet for a host of tables using JDev 11g, and the tables under the 'mct' database.
    I followed the following steps to create my triplet.
    1. Using the EO wizard, I selected a host of tables, for instance, MCT_CONFIG_CONTACT_CENTER_VL from the MCT db
    2. Following the usual steps, I tend to get the null pointer exception, with a 'load error' for one of the classes contained in a zip file, which I do not think I'm using, in the creation of the EO.
    In the light of the above scenario, can you please guide me?

  • Mediatracker (waitforid) - null pointer exception

    Ok in the run event..
             try {
              if(CURLOAD<=47) {
              try {
              im[CURLOAD] = getImage(new URL(URLtoUse, LNKS[CURLOAD]));
              } catch(MalformedURLException e) {
                   System.out.println("Error loading images.");
                   s="Error loading images.";
              System.out.println("Curload: "+String.valueOf(CURLOAD));
              tracker.addImage(im[CURLOAD], CURLOAD);
              tracker.waitForID(CURLOAD);
              CURLOAD++;
              //tracker.waitForID(1);
             } catch (InterruptedException e) {
              return;
             }CURLOAD will be 0-47, but on 0 it it gives a null pointer exception on the line "tracker.waitForID(CURLOAD);" anyone know why? I thought I would assign a new mediatracker id for every image loaded.. but it doesn't feel like working :(

    tracker is my mediatracker, and waitForID is a built-in java function.. it waits until the image is done loading (or is supposed to)
    Edit: Solved by myself... forgot to set LNKS array
    Edited by: Dazappa on Apr 7, 2008 9:24 PM

  • EJB2JSP Null Pointer Exception

    When running the EJB2JSP tool, File | New, Open the EJB JAR and get
              two null pointer exceptions, stack trace:
              java.lang.NullPointerException
              at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:279)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:290)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
              at weblogic.servlet.ejb2jsp.Utils.createBeanDescriptor(Utils.java:347)
              at weblogic.servlet.ejb2jsp.Utils.createDefaultDescriptor(Utils.java:318)
              at weblogic.servlet.ejb2jsp.Utils.createDefaultDescriptor(Utils.java:270)
              at weblogic.servlet.ejb2jsp.gui.Main.loadFromPaths(Main.java:390)
              at weblogic.servlet.ejb2jsp.gui.Main.doNew(Main.java:377)
              at weblogic.servlet.ejb2jsp.gui.Main$5.run(Main.java:574)
              at weblogic.servlet.ejb2jsp.gui.MainWorker.run(Main.java:759)
              at java.lang.Thread.run(Thread.java:484)
              error occurred: java.lang.NullPointerException
              java.lang.NullPointerException
              at weblogic.servlet.ejb2jsp.gui.Main.doNew(Main.java:378)
              at weblogic.servlet.ejb2jsp.gui.Main$5.run(Main.java:574)
              at weblogic.servlet.ejb2jsp.gui.MainWorker.run(Main.java:759)
              at java.lang.Thread.run(Thread.java:484)
              Used setEnv.sh to setup my environment... any ideas?
              

    Update, this doesn't work on any platform and it's only my ejb jar's,
              the petstore jar's that come w/ weblogic load up fine.
              [email protected] (Bruton, Sean) wrote in message news:<[email protected]>...
              > When running the EJB2JSP tool, File | New, Open the EJB JAR and get
              > two null pointer exceptions, stack trace:
              >
              > java.lang.NullPointerException
              > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:279)
              > at java.lang.ClassLoader.loadClass(ClassLoader.java:290)
              > at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
              > at weblogic.servlet.ejb2jsp.Utils.createBeanDescriptor(Utils.java:347)
              > at weblogic.servlet.ejb2jsp.Utils.createDefaultDescriptor(Utils.java:318)
              > at weblogic.servlet.ejb2jsp.Utils.createDefaultDescriptor(Utils.java:270)
              > at weblogic.servlet.ejb2jsp.gui.Main.loadFromPaths(Main.java:390)
              > at weblogic.servlet.ejb2jsp.gui.Main.doNew(Main.java:377)
              > at weblogic.servlet.ejb2jsp.gui.Main$5.run(Main.java:574)
              > at weblogic.servlet.ejb2jsp.gui.MainWorker.run(Main.java:759)
              > at java.lang.Thread.run(Thread.java:484)
              > error occurred: java.lang.NullPointerException
              > java.lang.NullPointerException
              > at weblogic.servlet.ejb2jsp.gui.Main.doNew(Main.java:378)
              > at weblogic.servlet.ejb2jsp.gui.Main$5.run(Main.java:574)
              > at weblogic.servlet.ejb2jsp.gui.MainWorker.run(Main.java:759)
              > at java.lang.Thread.run(Thread.java:484)
              >
              > Used setEnv.sh to setup my environment... any ideas?
              

  • Null pointer exception using ImageIO

    Hi all I'm not sure this belongs here or in the applet forum, but if don't belong here I'll move it. Anyway My question is this, I am trying to load an image into an applet before I was just doing this
    public static Image getImage(String filename){
              if (applet == null)
                  return null; // for now
             else
                  return applet.getImage(applet.getDocumentBase(), filename);
         }Since then I've discovered ImageIO and have switched to this
    public static BufferedImage getImage(String filename){
              BufferedImage img = null;
              //File image = new File(filename);
              try{
                   //img = ImageIO.read(applet.getDocumentBase().getClass().getResource(filename));
                   //img = ImageIO.read(image);
                   img = ImageIO.read(ImageHandler.getFile(filename));
              }catch(IOException e){
                   e.printStackTrace();
                   return null;
              return img;Now my problem is that this is giving me a null pointer exception, each of the 3 times I try to load up the img variable I get a NPE and I cannot figure out why. I know the file is where its supposed to be and I know it is not corrupt since it works with the other code. So my question is why am I getting an exception with the second piece of code? Any advice or suggestions are appreciated thanks in advance.

    Well that was part of the problem, thanks for that I didn't catch that at first, but now it just created a new exception in that I'm getting a illegal argument exception saying that the input == null. Here is the entire class I should have posted it in the first place sorry
    import java.applet.Applet;
    import java.awt.image.BufferedImage;
    import java.io.File;
    import java.io.IOException;
    import java.net.MalformedURLException;
    import java.net.URL;
    import javax.imageio.ImageIO;
    public class ImageHandler {
         static Applet applet = null;
         public static void setApplet(Applet applet){
              ImageHandler.applet = applet;
         public static BufferedImage getImage(String filename){
              BufferedImage img = null;
              if(applet == null){
                   System.out.println("Applet is null");//for testing
                   return null; //for now
              }else{
                   try{
                        img = ImageIO.read(applet.getDocumentBase().getClass().getResource(filename));
                   }catch(IOException e){
                        e.printStackTrace();
                        return null;
                   return img;
    }The applet gets set in another class here:
    ImageHandler.setApplet(this);so unless I'm missing something (obviously I am or I won't be here lol) the applet is not null here is the errors I get again thanks for the help you've already given anymore is appreciated.
    java.lang.IllegalArgumentException: input == null!
         at javax.imageio.ImageIO.read(Unknown Source)
         at ImageHandler.getImage(ImageHandler.java:27)
         at BackgroundImages.<init>(BackgroundImages.java:17)
         at BackGrounds.<init>(BackGrounds.java:17)
         at MainGame.init(MainGame.java:51)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)

  • Adding a new UDF throws a null pointer exception and modifying user.xml

    Hello,
    I have a two part question.
    i. I am trying to add a UDF (using Advanced>User Configuration..Attributes) to a fully configured OIM i.e. oim with reconciliation and provisioning from and to resources but it throws a null pointer exception. Look at the log, I see
    ===============Excerpt form the log file==========
    [2012-01-26T11:28:14.447-05:00] [oim_server1] [NOTIFICATION] [] [oracle.iam.platform.authz.impl] [tid: [ACTIVE].ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 0000JKQq8vZ8dpC5nFk3yZ1Evvpt000LzY,0] [APP: oim#11.1.1.3.0] [dcid: c62f3a4b80d21e6f:ef93519:134587d39c4:-7ffd-0000000000022a3e] [[
    ---Stack Trace Begins[[This is not an exception. For debugging purposes]]---
    oracle.iam.platform.authz.impl.OESAuthzServiceImpl.doCheckAccess(OESAuthzServiceImpl.java:210)
    oracle.iam.platform.authz.impl.OESAuthzServiceImpl.hasAccess(OESAuthzServiceImpl.java:188)
    oracle.iam.platform.authz.impl.OESAuthzServiceImpl.hasAccess(OESAuthzServiceImpl.java:180)
    oracle.iam.platform.authz.impl.AuthorizationServiceImpl.hasAccess(AuthorizationServiceImpl.java:173)
    oracle.iam.configservice.impl.ConfigManagerImpl.checkAuthorization(ConfigManagerImpl.java:1899)
    oracle.iam.configservice.impl.ConfigManagerImpl.addAttribute(ConfigManagerImpl.java:177)
    oracle.iam.configservice.api.ConfigManagerEJB.addAttributex(Unknown Source)
    ... 21 lines skipped..
    oracle.iam.configservice.api.ConfigManager_5u0nrx_ConfigManagerRemoteImpl.addAttributex(ConfigManager_5u0nrx_ConfigManagerRemoteImpl.java:864)
    ... 13 lines skipped..
    oracle.iam.configservice.api.ConfigManagerDelegate.addAttribute(Unknown Source)
    oracle.iam.configservice.agentry.config.CreateAttributeActor.perform(CreateAttributeActor.java:266)
    oracle.iam.consoles.faces.mvc.canonic.Model.perform(Model.java:547)
    oracle.iam.consoles.faces.mvc.admin.Model.perform(Model.java:324)
    oracle.iam.consoles.faces.mvc.canonic.Controller.doPerform(Controller.java:255)
    oracle.iam.consoles.faces.mvc.canonic.Controller.doSelectAction(Controller.java:178)
    oracle.iam.consoles.faces.event.NavigationListener.processAction(NavigationListener.java:97)
    ... 24 lines skipped..
    oracle.iam.platform.auth.web.PwdMgmtNavigationFilter.doFilter(PwdMgmtNavigationFilter.java:115)
    ... weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    oracle.iam.platform.auth.web.OIMAuthContextFilter.doFilter(OIMAuthContextFilter.java:100)
    ... 15 lines skipped..
    weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    ---Stack Tracefor this call Ends---
    [2012-01-26T11:28:14.447-05:00] [oim_server1] [NOTIFICATION] [IAM-1010010] [oracle.iam.platform.authz.impl] [tid: [ACTIVE].ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 0000JKQq8vZ8dpC5nFk3yZ1Evvpt000LzY,0] [APP: oim#11.1.1.3.0] [dcid: c62f3a4b80d21e6f:ef93519:134587d39c4:-7ffd-0000000000022a3e] [arg: 1] [arg: null] [arg: USER_MANAGEMENT_CONFIG] [arg: CREATE_ATTRIBUTE] ********** Entering the Authorization Segment with parameters:: LoggedInUserId = 1, target resourceID = null, Feature = USER_MANAGEMENT_CONFIG, Action = CREATE_ATTRIBUTE **********
    [2012-01-26T11:28:14.448-05:00] [oim_server1] [NOTIFICATION] [IAM-1010021] [oracle.iam.platform.authz.impl] [tid: [ACTIVE].ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 0000JKQq8vZ8dpC5nFk3yZ1Evvpt000LzY,0] [APP: oim#11.1.1.3.0] [dcid: c62f3a4b80d21e6f:ef93519:134587d39c4:-7ffd-0000000000022a3e] [arg: [InternalObligation: name: noop, values: [true], convertToObligation: false, InternalObligation: name: noop, values: [true], convertToObligation: false]] Validating the Internal Obligations: [InternalObligation: name: noop, values: [true], convertToObligation: false, InternalObligation: name: noop, values: [true], convertToObligation: false]
    [2012-01-26T11:28:14.448-05:00] [oim_server1] [NOTIFICATION] [IAM-1010022] [oracle.iam.platform.authz.impl] [tid: [ACTIVE].ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 0000JKQq8vZ8dpC5nFk3yZ1Evvpt000LzY,0] [APP: oim#11.1.1.3.0] [dcid: c62f3a4b80d21e6f:ef93519:134587d39c4:-7ffd-0000000000022a3e] ---------- The list of Internal Obligation is satisfied, returning TRUE ----------
    [2012-01-26T11:28:14.448-05:00] [oim_server1] [NOTIFICATION] [IAM-1010026] [oracle.iam.platform.authz.impl] [tid: [ACTIVE].ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 0000JKQq8vZ8dpC5nFk3yZ1Evvpt000LzY,0] [APP: oim#11.1.1.3.0] [dcid: c62f3a4b80d21e6f:ef93519:134587d39c4:-7ffd-0000000000022a3e] [arg: Decision :PERMIT\nObligations from policy: ] ********** Exiting the Authorization Segment with result Decision :PERMIT[[
    =============Excerpt ends==============
    Is there a reason why this is and how do I get by it.
    ii. Can I just add the field directly within the MDS>file/user.xml? Would there be an issue with changing an existing attribute metadata using the user.xml?

    Pradeep thank you for your response. it was helpful. However, I also found the responses to both my questions.
    i. The null pointer exception was due to using a complex query I was using in the LOV query. I tried a simple query and that worked fine.
    ii. For modifying the user defined attributes one can consult the following forum post:
    OIM 11g - Change UDF Field Type form String to LOV
    Thanks

  • REG : Null Pointer Exception for RFC values

    Hi All,
    I am facing peculiar erro in code.I need to check the null entries in SAP server then it should be replaced by space and if not null then should be replaced by the value in backend.But it is throwing null pointer exception
    I am using equalsignore case(null) and trim for space.
    I am not getting why its is throwing null pointer  exception.Kindly advise
    Regards,
    Anupama

    Hi
    Use
    String f = null ;
    if(f!==null)
    Wdcomponent.getMessageManager.ReportException ("this will cause null pointer exception  "+ f.length());
    Better to give it any Constant like
    priveate static final String NULL_CHECK  = "DEL_VAL12";
    rather than space ,at the time of chceking see if it has  DEL_VAL12 if true then put the actual data else let it be there.
    Best Regards
    Satish Kumar

  • Why am I receiving Null pointer Exception Error.

    why am I receiving Null pointer Exception Error.
    Hi I am developing a code for login screen. There is no syntex error as such ut I am receving the aove mentioned error. Can some one please help me ??
    ------------ Main.java------------------
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.sql.*;
    public class Main implements ActionListener
    Frame mainf;
    MenuBar mb;
    MenuItem List,admitform,inquiry,exit,helpn;
    Menu newm,update,help;
    Inquiry iq;
    Admit ad;
    // HosHelp hp;
    Howuse hu;
    Register reg;
    Main()
    mainf=new Frame(" Engg College V/S Mumbai University ");
         mb=new MenuBar();
         newm=new Menu(" New ");
         update=new Menu(" Update ");
         help=new Menu(" Help ");
         List=new MenuItem("List");
         admitform=new MenuItem("Admit");
         inquiry=new MenuItem("Inquiry");
         exit=new MenuItem("Exit");
         helpn=new MenuItem("How to Use?");
    newm.add(List);
                   newm.add(admitform);
    newm.add(inquiry);
                   newm.add(exit);
         help.add(helpn);
              mb.add(newm);
              mb.add(update);
              mb.add(help);
    mainf.setMenuBar(mb);
                   exit.addActionListener(this);
                   List.addActionListener(this);
         inquiry.addActionListener(this);
         admitform.addActionListener(this);
    helpn.addActionListener(this);
         mainf.setSize(400,300);
         mainf.setVisible(true);
    public void actionPerformed(ActionEvent ae)
    if (ae.getSource()==List)
              reg=new Register();
         if(ae.getSource()==inquiry)
         iq=new Inquiry();
    if(ae.getSource()==admitform)
         ad=new Admit();
              if(ae.getSource()==helpn)
              hu=new Howuse();
              if(ae.getSource()==exit)
         mainf.setVisible(false);
    public static void main(String args[])
              new Main();
    -------------Register.java---------------------------
    import java.awt.*;
    import java.awt.event.*;
    import java.sql.*;
    public class Register implements ActionListener//,ItemListener
    Label id,name,login,pass,repass;
    Button ok,newu,cancel,check;
    Button vok,iok,lok,mok,sok; //buttons for dialog boxes
    TextField idf,namef,loginf,passf,repassf;
    Dialog valid,invlog,less,mismat,acucreat;
    Frame regis;
    Checkbox admin,limit;
    CheckboxGroup type;
    DBconnect db;
    Register()
         db=new DBconnect();
    regis=new Frame("Registeration Form");
              type=new CheckboxGroup();
              admin=new Checkbox("Administrator",type,true);
              limit=new Checkbox("Limited",type,false);
              id=new Label("ID :");
    name=new Label("Name :");
         login=new Label("Login :");
         pass=new Label("Password :");
         repass=new Label("Retype :");
    idf =new TextField(20); idf.setEnabled(false);
         namef=new TextField(30); namef.setEnabled(false);
    loginf=new TextField(30); loginf.setEnabled(false);
         passf=new TextField(30); passf.setEnabled(false);
         repassf=new TextField(30); repassf.setEnabled(false);
    ok=new Button("OK"); ok.setEnabled(false);
         newu=new Button("NEW");
    cancel=new Button("Cancel");
         check=new Button("Check Login"); check.setEnabled(false);
    vok=new Button("OK");
         iok=new Button("OK");
              lok=new Button("OK");
              mok=new Button("OK");
              sok=new Button("OK");
    valid=new Dialog(regis,"Login name is valid !");
         invlog=new Dialog(regis,"Login name already exist!");
         less=new Dialog(regis,"Password is less than six characters !");
    mismat=new Dialog(regis,"password & retyped are not matching !");
    acucreat=new Dialog(regis,"You have registered successfully !");
         regis.setLayout(null);
    //     regis.setBackground(Color.orange);
    valid.setLayout(new FlowLayout());
         invlog.setLayout(new FlowLayout());
         less.setLayout(new FlowLayout());
         mismat.setLayout(new FlowLayout());
    acucreat.setLayout(new FlowLayout());
    id.setBounds(35,50,80,25); //(left,top,width,hight)
    idf.setBounds(125,50,40,25);
    name.setBounds(35,85,70,25);
    namef.setBounds(125,85,150,25);
    login.setBounds(35,120,80,25);
    loginf.setBounds(125,120,80,25);
    check.setBounds(215,120,85,25);
         pass.setBounds(35,155,80,25);
    passf.setBounds(125,155,80,25);
    repass.setBounds(35,190,80,25);
    repassf.setBounds(125,190,80,25);
    admin.setBounds(35,225,100,25);
    limit.setBounds(145,225,100,25);
              ok.setBounds(45,265,70,25);
         newu.setBounds(135,265,70,25);
    cancel.setBounds(225,265,70,25);
         passf.setEchoChar('*');
    repassf.setEchoChar('*');
         regis.add(id);
         regis.add(idf);
    regis.add(name);
         regis.add(namef);
         regis.add(login);
         regis.add(loginf);
         regis.add(check);
    regis.add(pass);
         regis.add(passf);
    regis.add(repass);
         regis.add(repassf);
         regis.add(ok);
         regis.add(newu);
         regis.add(cancel);
    regis.add(admin);
         regis.add(limit);
    valid.add(vok);
         invlog.add(iok);     
         less.add(lok);
         mismat.add(mok);
    acucreat.add(sok);
    ok.addActionListener(this);
         newu.addActionListener(this);
    check.addActionListener(this);
    cancel.addActionListener(this);
         // limit.addItemListener(this);
         //admin.addItemListener(this);
              vok.addActionListener(this);
              iok.addActionListener(this);
         lok.addActionListener(this);
         mok.addActionListener(this);
         sok.addActionListener(this);
    regis.setLocation(250,150);
    regis.setSize(310,300);
    regis.setVisible(true);
         public void actionPerformed(ActionEvent ae)
         if(ae.getSource()==check)
              try{
                   String s2=loginf.getText();
    ResultSet rs=db.s.executeQuery("select* from List");
                        while(rs.next())
                   if(s2.equals(rs.getString(2).trim()))
    //                    invlog.setBackground(Color.orange);
                             invlog.setLocation(250,150);
                             invlog.setSize(300,100);
                   cancel.setEnabled(false);
    ok.setEnabled(false);
    check.setEnabled(false);
                        invlog.setVisible(true);
                             break;
                        else
                        //     valid.setBackground(Color.orange);
                             valid.setLocation(250,150);
                             valid.setSize(300,100);
                   cancel.setEnabled(false);
    ok.setEnabled(false);
    check.setEnabled(false);
                   valid.setVisible(true);
                        }catch(Exception e)
                   e.printStackTrace();
    if(ae.getSource()==newu)
         try{
              ResultSet rs=db.s.executeQuery("select max(ID) from List");
         while(rs.next())
    String s1=rs.getString(1).trim();
                   int i=Integer.parseInt(s1);
    i++;
                   String s2=""+i;
    idf.setText(s2);
                   newu.setEnabled(false);
                   namef.setText(""); namef.setEnabled(true);
              loginf.setText(""); loginf.setEnabled(true);
              passf.setText(""); passf.setEnabled(true);
              repassf.setText(""); repassf.setEnabled(true);
              ok.setEnabled(true);
                   check.setEnabled(true);
                   }catch(Exception e)
              e.printStackTrace();
         if(ae.getSource()==ok)
              try
              String s1=idf.getText();
              String s2=loginf.getText();
              String s3=passf.getText();
         String s4=repassf.getText();
         int x=Integer.parseInt(s1);
         int t;
         if(type.getSelectedCheckbox()==admin)
              t=1;
              else
              t=0;
    ResultSet rs=db.s1.executeQuery("select* from List");
                   while(rs.next())
                   if(s2.equals(rs.getString(2).trim()))
                        invlog.setBackground(Color.orange);
                        invlog.setLocation(250,150);
                        invlog.setSize(300,100);
                   cancel.setEnabled(false);
    ok.setEnabled(false);
    check.setEnabled(false);
                        invlog.setVisible(true);
                        break;
                   else
                        if (s3.length()<6)
                        less.setBackground(Color.orange);
                             less.setLocation(250,150);
                             less.setSize(300,100);
                   ok.setEnabled(false);
                        cancel.setEnabled(false);
                        check.setEnabled(false);
                        less.setVisible(true);
    else if(!(s3.equals(s4)))
                        mismat.setBackground(Color.orange);
                        mismat.setLocation(250,150);
                        mismat.setSize(300,100);
                        ok.setEnabled(false);
                        cancel.setEnabled(false);
                        check.setEnabled(false);
                        mismat.setVisible(true);
                        else
    db.s1.execute("insert into User values("+x+",'"+s2+"','"+s3+"',"+t+")");
                        acucreat.setBackground(Color.orange);
                        acucreat.setLocation(250,150);
                        acucreat.setSize(300,100);
                        regis.setVisible(false);
                        acucreat.setVisible(true);
                   }//else
              }//while
                   } //try
              catch(Exception e1)
              // e1.printStackTrace();
              if (ae.getSource()==cancel)
              regis.setVisible(false);
              if (ae.getSource()==vok)
              ok.setEnabled(true);
                   cancel.setEnabled(true);
    check.setEnabled(true);
                   valid.setVisible(false);
              if (ae.getSource()==iok)
              ok.setEnabled(true);
                   cancel.setEnabled(true);
    check.setEnabled(true);
                   invlog.setVisible(false);
              if (ae.getSource()==lok)
              less.setVisible(false);
                   cancel.setEnabled(true);
    ok.setEnabled(true);
    check.setEnabled(true);
              if (ae.getSource()==mok)
              mismat.setVisible(false);
                   cancel.setEnabled(true);
    ok.setEnabled(true);
    check.setEnabled(true);
    if (ae.getSource()==sok)
              acucreat.setVisible(false);
              ok.setEnabled(false);
                   newu.setEnabled(true);
                   regis.setVisible(true);
         public static void main(String args[])
         new Register();
    -----------DBConnect.java------------------------------------
    import java.sql.*;
    public class DBconnect
    Statement s,s1;
    Connection c;
    public DBconnect()
    try
         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              c=DriverManager.getConnection("jdbc:odbc:Sonal");
              s=c.createStatement();
    s1=c.createStatement();
         catch(Exception e)
         e.printStackTrace();
    ----------Login.java----------------
    import java.awt.*;
    import java.awt.event.*;
    import java.sql.*;
    public class Login implements ActionListener
    Frame log;
    Label login,pass;
    TextField loginf,passf;
    Button ok,cancel;
    Dialog invalid;
    Button iok;
    Register reg;
    DBconnect db;
    Main m;
    Login()
    db=new DBconnect();
         log=new Frame();
         log.setLocation(250,210);
         login=new Label("Login :");
    pass=new Label("Password :");
         loginf=new TextField(20);
         passf=new TextField(20);
         passf.setEchoChar('*');
         ok=new Button("OK");
         // newu=new Button("New User");
         cancel=new Button("CANCEL");
         iok=new Button(" OK ");
    invalid=new Dialog(log,"Invalid User!");
    //log.setBackground(Color.cyan);
    //log.setForeground(Color.black);
         log.setLayout(null);
         // iok.setBackground(Color.gray);
         invalid.setLayout(new FlowLayout());
         login.setBounds(35,50,70,25); //(left,top,width,hight)
         loginf.setBounds(105,50,100,25);
         pass.setBounds(35,85,70,25);
         passf.setBounds(105,85,70,25);
         ok.setBounds(55,130,70,25);
    // newu.setBounds(85,120,80,25);
    cancel.setBounds(145,130,70,25);
    log.add(login);
    log.add(loginf);
    log.add(pass);
    log.add(passf);
    log.add(ok);
    // log.add(newu);
    log.add(cancel);
         invalid.add(iok);//,BorderLayout.CENTER);
    ok.addActionListener(this);
    // newu.addActionListener(this);
    cancel.addActionListener(this);
         iok.addActionListener(this);
    log.setSize(300,170);
    log.setVisible(true);
    public void actionPerformed(ActionEvent a)
    if(a.getSource()==ok)
         try{
              String l=loginf.getText();
              String p=passf.getText();
              ResultSet rs=db.s.executeQuery("select * from List");
              while(rs.next())
              if(l.equals(rs.getString(2).trim())&& p.equals(rs.getString(3).trim()))
                        String tp=rs.getString(4).trim();
                             int tp1=Integer.parseInt(tp);
    log.setVisible(false);
    if(tp1==1)
                             m=new Main();
                        // m.List.setEnabled(true);
                             else
                             m=new Main();
                             m.List.setEnabled(false);
                        break;
    else
                   invalid.setBackground(Color.orange);
                   invalid.setSize(300,100);
                   invalid.setLocation(250,210);
                   cancel.setEnabled(false);
              ok.setEnabled(false);
                   invalid.setVisible(true);
                   }catch(Exception e1)
                   e1.printStackTrace();
         if (a.getSource()==cancel)
         log.setVisible(false);
         if (a.getSource()==iok)
         invalid.setVisible(false);
         loginf.setText("");
         passf.setText("");
         cancel.setEnabled(true);
    ok.setEnabled(true);
         public static void main(String[] args)
         new Login();
    -------------inquiry.java---------------------------------
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import java.util.Date;
    import java.text.*;
    import java.sql.*;
    public class Inquiry implements ActionListener
    Frame inqry;
    Label name,addr;
    TextField namef,addrf;
    Button ok,cancel,dok;
    Dialog invalid;
    Frame result; //Result of the inquiry....
    Label lrname,lraddr,lward,lrdate,lcdate;
    TextField rname,raddr,ward,rdate,cdate;
    Date d;
    DateFormat df;
    Button rok,rcancel;
    Dialog success;
    Button rdok;
    DBconnect db;
    Inquiry()
              db=new DBconnect();
              inqry=new Frame("Inquiry Form");
              inqry.setLayout(null);
    inqry.setBackground(Color.cyan);
              name=new Label(" NAME ");
              addr=new Label("ADDRESS");
              namef=new TextField(20);
              addrf=new TextField(20);
              ok=new Button("OK");
              cancel=new Button("CANCEL");
              dok=new Button("OK");
              invalid=new Dialog(inqry,"Invalid Name or Address !");
              invalid.setSize(300,100);
         invalid.setLocation(300,180);
              invalid.setBackground(Color.orange);
              invalid.setLayout(new FlowLayout());
    result=new Frame(" INQUIRY RESULT "); //Result Window......
    result.setLayout(null);
    result.setBackground(Color.cyan);
    lcdate=new Label(" DATE ");
         lrname=new Label(" NAME ");
    lraddr=new Label(" ADDRESS ");
         lward=new Label(" WARD ");
         lrdate=new Label(" ADMIT-DATE ");
    cdate=new TextField(10);
         rname=new TextField(20);
    rname.setEnabled(false);
         raddr=new TextField(20);
         raddr.setEnabled(false);
         ward=new TextField(20);
         ward.setEnabled(false);
         rdate=new TextField(10);
         rdate.setEnabled(false);
         cdate=new TextField(20);
         d=new Date();
         df=DateFormat.getDateInstance(DateFormat.MEDIUM,Locale.KOREA);
         cdate.setText(df.format(d));
         cdate.setEnabled(false);
    rok=new Button(" OK ");
         rcancel=new Button("CANCEL");
              name.setBounds(40,50,50,25);
    namef.setBounds(120,50,130,25);
    addr.setBounds(40,100,60,25);
    addrf.setBounds(120,100,80,25);
    ok.setBounds(60,145,70,25);
              cancel.setBounds(140,145,70,25);
              lcdate.setBounds(200,50,60,25); //Result Window......
    cdate.setBounds(270,50,80,25);      
    lrname.setBounds(35,85,70,25);
    rname.setBounds(140,85,180,25);
    lraddr.setBounds(35,120,80,25);
         raddr.setBounds(140,120,100,25);
    lward.setBounds(35,155,80,25);
    ward.setBounds(140,155,100,25);
    lrdate.setBounds(30,190,80,25);
    rdate.setBounds(140,190,80,25);
    rok.setBounds(70,240,70,25);
    rcancel.setBounds(170,240,70,25);
              inqry.add(name);
              inqry.add(namef);
              inqry.add(addr);
              inqry.add(addrf);
              inqry.add(ok);
              inqry.add(cancel);
    invalid.add(dok);
         result.add(lcdate); //Result Window......
         result.add(cdate);
              result.add(lrname);
              result.add(rname);
              result.add(lraddr);
              result.add(raddr);
              result.add(lward);
              result.add(ward);
              result.add(lrdate);
              result.add(rdate);
              result.add(rok);
              result.add(rcancel);
         ok.addActionListener(this);
         cancel.addActionListener(this);
         dok.addActionListener(this);
    rok.addActionListener(this); //Result Window......
         rcancel.addActionListener(this);
         inqry.setSize(280,180);
         inqry.setLocation(300,180);
         inqry.setVisible(true);
              result.setSize(400,280); //Result Window......
         result.setLocation(200,150);
         result.setVisible(false);
              public void actionPerformed(ActionEvent ae)
                   if(ae.getSource()==ok)
                   try
                             String nm=namef.getText();
                             String ad=addrf.getText();
                             inqry.setVisible(false);
                             ResultSet rs=db.s.executeQuery("select * from Billinformation");
                             while(rs.next())
                                  String nm1=rs.getString(2).trim();
                                  String ad1=rs.getString(3).trim();
                                  int k=0;
                                  if((nm1.equals(nm))&&(ad1.equals(ad)))
                             String adm=rs.getString(5).trim();
                             String wr=rs.getString(6).trim();
                             String bd=rs.getString(8).trim();
                                  String wrb=wr+"-"+bd;
    result.setVisible(true);
                                  rname.setText(nm1);
                             raddr.setText(ad1);
                             ward.setText(wrb);
                             rdate.setText(adm);
    k=1;
                                  break;
                                  }//if
                             else if(k==1)
                             invalid.setVisible(true);
                             }//while
    }//try
                             catch(Exception e)
                             e.printStackTrace();
                        } //getsource ==ok
                   if(ae.getSource()==cancel)
    inqry.setVisible(false);
                        if(ae.getSource()==rok) //Result Window......
                        namef.setText("");
                             addrf.setText("");
                             result.setVisible(false);
                        inqry.setVisible(true);
    if(ae.getSource()==rcancel)
    result.setVisible(false);
                        if(ae.getSource()==dok)
                        namef.setText("");
                             addrf.setText("");
                             invalid.setVisible(false);
                             inqry.setVisible(true);
         public static void main(String args[])
              new Inquiry();
    PLease Help me !!
    I need this urgently.

    can you explain what your program tries to do... and
    at where it went wrong..Sir,
    We are trying to make an project where we can make a person register in our data base & after which he/she can search for other user.
    The logged in user can modify his/her own data but can view other ppl's data.
    We are in a phase of registering the user & that's where we are stuck. The problem is that after the login screen when we hit register (OK- button) the data are not getting entered in the data base.
    Can u please help me??
    I am using "jdk1.3' - studnet's edition.
    I am waiting for your reply.
    Thanks in advance & yr interest.

  • Null pointer exception and servlet

    I cant figure out why i am getting a null pointer exception. this works if i keep my form output in the same class as my driving servlet. All i did was break off the html display to a new form and i get a null pointer exception.
    this is just an excerpt. no reason to post the whole form.
    Here are my two classes...
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.*;
    import java.text.*;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.*;
    import org.w3c.dom.Document;
    import org.w3c.dom.DOMException;
    import org.w3c.dom.Element;
    public class myServlet extends HttpServlet
       implements SingleThreadModel {
            displayScreen myAddressBook;
            HttpServletRequest request;
            HttpServletResponse response;
            String displayForm = "DISPLAYFORM";
            String addForm     = "ADDFORM";
            String editForm    = "EDITFORM";
         // get function
        public void doGet(HttpServletRequest request, HttpServletResponse response)
        throws IOException, ServletException
              request = this.request;
              response = this.response;
            displayScreen myAddressBook = new displayScreen(this.request,this.response);
            myAddressBook.sendAddressBook(request,response,false,displayForm);
    public void doPost(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
         errorMsg = "";
         errCount=0;
         //stores address book in hashmap. Not currently using Address Book object
         request = this.request;
        response = this.response;
         if ((request.getParameterValues("submit")[0].equals("Next")))
            myAddressBook.sendAddressBook(request,response,false,displayForm);
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.*;
    import java.text.*;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.*;
    public class displayScreen {
         int errCount;
         String errorMsg;
         String displayForm = "DISPLAYFORM";
         String addForm     = "ADDFORM";
         String editForm    = "EDITFORM";
         HttpServletRequest request;
         HttpServletResponse response;
           displayScreen (HttpServletRequest request, HttpServletResponse response) {
               request = this.request;
               response = this.response;
    public void sendAddressBook (HttpServletRequest request, HttpServletResponse response,boolean FileError,String formType)
             throws ServletException, IOException {
            request = this.request;
            response = this.response;
         response.setContentType("text/html");  /*****/ I GET A NULL POINTER EXCEPTION RIGHT HERE!!!!!!
    }

    anyway to write the system.err to an html screen with
    a servlet?Why would you ask that? Surely you should have asked "Any way to write a stack trace to an HTML screen from a servlet?"
    And in fact there is. I am sure you have not yet looked up the Exception class and the versions of its printStackTrace() method. But when you do, you will see that there are printStackTrace(PrintStream) and printStackTrace(PrintWriter). And you know how to write HTML (or text in general) to the servlet response so that it shows up in the client's browser, right? I will let you figure out how to put those things together.

  • Null Pointer Exception and Illegal Arguement when ran with Wireless Toolkit

    The following code throws a null pointer exception after it tried to initialize the textBox. I am not sure if there is something I am not importing, or if it's just because I'm sick and my head is cloudy. :-}.
    I am using Wireless Toolkit 2.2 and Java 5.0
    Anyhelp would be appreicated. Thank You.
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    public class TacticalTestMain extends MIDlet implements CommandListener {
         private Display display;
         private Form formMain;
         private TextBox tbHelp;          //Text Box for help Command
         private Command cmExit;          //A button to exit midLet
         private Command cmBack;          //Go "back" to main form
         private Command cmHelp;          //Ask for help
         public TacticalTestMain()
              display = Display.getDisplay(this);
              formMain = new Form("Tactical Survey Program");
              cmExit = new Command("Exit", Command.SCREEN, 1);
              cmBack = new Command("Back", Command.BACK, 1);
              cmHelp = new Command("Help", Command.HELP, 1);
              formMain.addCommand(cmExit);
              formMain.addCommand(cmBack);
              formMain.addCommand(cmHelp);
              formMain.setCommandListener(this);
              System.out.println("Before Create Text Box");
              //Create the help textBox with a max of 25 charecters
              tbHelp = new TextBox("HeLp", "You can press the back button", 25, 0);
              tbHelp.addCommand(cmBack);
              tbHelp.setCommandListener(this);
              System.out.println("AfTER Create Text Box");               
         }//end constructor
         public void startApp()
              System.out.println("Inside StartApp()");
              display.setCurrent(formMain);
         }//end startApp()
         public void pauseApp()
         }//end pauseApp
         public void destroyApp(boolean unconditional)
              notifyDestroyed();
         }//end destroyApp()
         //Check to see if the exit button was selected
         public void commandAction(Command c, Displayable d)
              System.out.println("Inside commandAction()");
              String sLabel = c.getLabel();
              if(sLabel.equals("Exit"))
                   destroyApp(true);
    Errors from the KToolbar:
    Running with storage root DefaultColorPhone
    Before Create Text Box
    Unable to create MIDlet TacticalTestMain
    java.lang.IllegalArgumentException
         at javax.microedition.lcdui.TextField.setChars(+105)
         at javax.microedition.lcdui.TextField.setString(+27)
         at javax.microedition.lcdui.TextField.<init>(+134)
         at javax.microedition.lcdui.TextBox.<init>(+74)
         at TacticalTestMain.<init>(+134)
         at java.lang.Class.runCustomCode(+0)
         at com.sun.midp.midlet.MIDletState.createMIDlet(+19)
         at com.sun.midp.midlet.Selector.run(+22)
    Execution completed.
    743701 bytecodes executed
    23 thread switches
    741 classes in the system (including system classes)
    4071 dynamic objects allocated (120440 bytes)
    2 garbage collections (91412 bytes collected)

    Hi zoya,
    Here is the problem:
    tbHelp = new TextBox("HeLp", "You can press the back button", 25, 0);
    This line declares a maximum textbox size of 25 but in reality he is declaring a textbox of size 29.
    Thats why it is throwing the illegal argument.
    happy coding :)

Maybe you are looking for

  • CS4 Resizing in InDesign to odd %'s

    Since I need to resize 4 ads into 27 mostly different sizes ... is there something like there was Resize It (if that is the right name) for Quark ... only for InDesign? So that things size correctly without having to go in and tweek photos and re-mov

  • Shift Planning (PP61) in SAP. How to automate the process of entering  data

    Hi Friends, With using PP61 tcode we can able to enter data manually. I want to upload data from excel file. Is there any automation process? like any programs are function modules will useful? Many thanks in advance for the solution.

  • R/3 Hierarchy not extracting into BW properly!

    Hi, Can anyone suggest anything regarding the following... I am working in a SAP BW v3.5 environment and I need to extract a hierarchy from R/3. A new hierarchy was built in R/3 based upon 0Account and was originally extracted into BW OK. Changes wer

  • Can't use inherited method with JButton

    I am trying to use the getActionListeners() method on a JButton. The method is inherited from the AbstractButton class. However, when I try to compile with this line... ActionListener CurrentListeners[] = OKButton.getActionListeners();I get the follo

  • 5.1 audio support on K7N420

    I have the K7N420 board that came with an add-on card for 5.1 speaker support.  I recently bought 5.1 speakers, but I can only get the front speakers to work.  I verified that the BIOS and jumpers settings are correct, and I have updated all drivers.