Search Results

Search found 37403 results on 1497 pages for 'java ee panel'.

Page 7/1497 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Round-up: Embedded Java posts and videos

    - by terrencebarr
    I’ve been collecting links to some interesting blog posts and videos related to embedded Java over the last couple of weeks. Passing  these on here: Freescale blog – The Embedded Beat: “Let’s make it real – Internet of Things” Simon Ritter’s blog: “Mind Reading with Raspberry Pi” NightHacking with Steve Chin and Terrence Barr: “Java in the Internet of Things” NightHacking with Steve Chin and Alderan Robotics: “The NAO Robot” Java Magazine: “Getting Started with Java SE for embedded devices on Raspberry Pi” OTN video interview: “Java at ARM TechCon” OPN Techtalk with MX Entertainment: “Using Java and MX’s GrinXML Framework to build Blu-ray Disc and media applications” Oracle PartnerNetwork Blog: “M2M Architecture: Machine to Machine – The Internet of Things – It’s all about the Data” YouTube Java Channel: “Understanding the JVM and Low Latency Applications” Cheers, – Terrence Filed under: Mobile & Embedded Tagged: blog, iot, Java, Java Embedded, Raspberry Pi, video

    Read the article

  • What's about Java?

    - by Silviu Turuga
    What is Java? In very short words, Java is a programming language that let you make an application that can be run on different operating systems, no matter we are talking about Windows, Mac OS, Linux or even embedded devices, such as RaspberryPi. When you compile a Java program, instead of getting a binary output as you get on other programming languages, you'll get a Java intermediate code, called Java bytecode. This is interpreted at run time, by a virtual machine that is specifically for the hardware and operating system you are using. What Java do i need? There are 5 major versions of Java: Java SE(Standard Edition) - this is what I'll use on most of my tutorials. Most of the examples will run on Java 6, but for others you'll need Java 7. Java EE (Enterprise Edition) - used for enterprise development Java ME (Micro Edition) - for running Java on mobile and different embedded devices such as PDAs, TV set-top boxes, printers, etc. Java Embedded - for some embedded devices such as Raspberry Pi, where the resources are limited JavaFX - to develop rich content User Interfaces. This is also something that will use a lot. More detailed information can be found on Oracle's website If you just want to run java applications you'll need the JRE (Java Runtime Environment) installed. If you want to program and create new applications, then you'll need the JDK (Java Development Kit).  How to check if Java is already installed? From command line, if you are on Windows, or from Terminal on Mac enter the following: java -version You should get something like this, if you have java installed on your system: java version "1.6.0_37" Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-11M3909) Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode) Note: your current Java version might be different from mine. More information https://www.java.com/en/download/faq/whatis_java.xml http://en.wikipedia.org/wiki/Java_(programming_language) Next steps Install Java SDK Chose an IDE. I recommend NetBeans as it is very easy to use and also let you quickly create the GUI of your application Alternatives are Eclipse, Komodo Edit (for Mac), etc. There are plenty of solutions both free or paid. Resources on web Oracle Tutorials - lot of tutorials and useful resources JavaRanch - forum about java

    Read the article

  • Migrating JSF 1.2 to 2.x resulted in java.lang.NullPointerException at com.sun.faces.config.InitFacesContext.cleanupInitMaps

    - by nudastack
    I'm in process of migrating a JSF 1.2 application to JSF 2.x. My application is using the following APIs: maven-jetty-plugin (version 6.1.10) maven-compiler-plugin (version 2.3.1) myfaces-api & -impl (version 1.2.7) jsf-facelets (version 1.1.14) richfaces (version 3.3.3) javax servlet jstl (version 1.2) javax servlet-api (version 2.5) and some other plugins as well. I updated the versions in faces-config.xml file and removed Facelets 1.1.14 libs and replaced MyFaces 1.2 by JSF 2.x libs, however the application didn't work. It threw the following exception: Could not instantiate listener org.apache.myfaces.webapp.StartupServletContextListener java.lang.ClassNotFoundException: org.apache.myfaces.webapp.StartupServletContextListener at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230) at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:375) at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:337) at org.mortbay.jetty.handler.ContextHandler.loadClass(ContextHandler.java:1035) at org.mortbay.jetty.webapp.WebXmlConfiguration.initListener(WebXmlConfiguration.java:629) at org.mortbay.jetty.webapp.WebXmlConfiguration.initWebXmlElement(WebXmlConfiguration.java:367) at org.mortbay.jetty.plus.webapp.AbstractConfiguration.initWebXmlElement(AbstractConfiguration.java:190) at org.mortbay.jetty.webapp.WebXmlConfiguration.initialize(WebXmlConfiguration.java:289) at org.mortbay.jetty.plus.webapp.AbstractConfiguration.initialize(AbstractConfiguration.java:133) at org.mortbay.jetty.webapp.WebXmlConfiguration.configure(WebXmlConfiguration.java:222) at org.mortbay.jetty.plus.webapp.AbstractConfiguration.configure(AbstractConfiguration.java:113) at org.mortbay.jetty.webapp.WebXmlConfiguration.configureWebApp(WebXmlConfiguration.java:180) at org.mortbay.jetty.plus.webapp.AbstractConfiguration.configureWebApp(AbstractConfiguration.java:96) at org.mortbay.jetty.plus.webapp.Configuration.configureWebApp(Configuration.java:124) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1217) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:510) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448) at org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:110) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152) at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) at org.mortbay.jetty.Server.doStart(Server.java:222) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.java:132) at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:371) at org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:307) at org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRunMojo.java:203) at org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:184) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) 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.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) at org.codehaus.classworlds.Launcher.main(Launcher.java:47) 2013-07-02 14:39:15.590::WARN: Unknown realm: default 2013-07-02 14:39:15.651::INFO: No Transaction manager found - if your webapp requires one, please configure one. SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See StaticLoggerBinder for further details. Tem 02, 2013 2:39:22 PM com.sun.faces.config.ConfigureListener contextInitialized INFO: Initializing Mojarra 2.2.0 ( 20130502-2118 https://svn.java.net/svn/mojarra~svn/tags/2.2.0@11930) for context '' Tem 02, 2013 2:39:22 PM com.sun.faces.config.ConfigureListener contextInitialized WARNING: JSF1059: WARNING! The com.sun.faces.verifyObjects feature is to aid developers not using tools. It shouldn''t be enabled if using an IDE, or if this application is being deployed for production as it will impact application start times. log4j:WARN No appenders could be found for logger (org.ajax4jsf.renderkit.ChameleonRenderKitFactory). log4j:WARN Please initialize the log4j system properly. log4j:WARN See #noconfig for more info. Tem 02, 2013 2:39:26 PM com.sun.faces.config.ConfigureListener contextInitialized SEVERE: Critical error during deployment: java.lang.NoSuchMethodError: org.mortbay.jetty.annotations.AnnotationParser.parseAnnotations(Lorg/mortbay/jetty/webapp/WebAppContext;Ljava/lang/Class;Lorg/mortbay/jetty/plus/annotation/RunAsCollection;Lorg/mortbay/jetty/plus/annotation/InjectionCollection;Lorg/mortbay/jetty/plus/annotation/LifeCycleCallbackCollection;)V at com.sun.faces.vendor.Jetty6InjectionProvider.inject(Jetty6InjectionProvider.java:93) at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:695) at javax.faces.FactoryFinder.getImplementationInstance(FactoryFinder.java:572) at javax.faces.FactoryFinder.access$500(FactoryFinder.java:140) at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:1120) at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:379) at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:328) at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:236) at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:435) at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:214) at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:540) at org.mortbay.jetty.servlet.Context.startContext(Context.java:135) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:510) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448) at org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:110) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152) at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) at org.mortbay.jetty.Server.doStart(Server.java:222) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.java:132) at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:371) at org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:307) at org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRunMojo.java:203) at org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:184) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) 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.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) at org.codehaus.classworlds.Launcher.main(Launcher.java:47) 2013-07-02 14:39:26.652::WARN: Failed startup of context org.mortbay.jetty.plugin.Jetty6PluginWebAppContext@64dacd55{/,C:\Users\zmn\workspace\tracker-web\src\main\webapp} java.lang.RuntimeException: java.lang.NoSuchMethodError: org.mortbay.jetty.annotations.AnnotationParser.parseAnnotations(Lorg/mortbay/jetty/webapp/WebAppContext;Ljava/lang/Class;Lorg/mortbay/jetty/plus/annotation/RunAsCollection;Lorg/mortbay/jetty/plus/annotation/InjectionCollection;Lorg/mortbay/jetty/plus/annotation/LifeCycleCallbackCollection;)V at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:273) at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:540) at org.mortbay.jetty.servlet.Context.startContext(Context.java:135) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:510) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448) at org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:110) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152) at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) at org.mortbay.jetty.Server.doStart(Server.java:222) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.java:132) at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:371) at org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:307) at org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRunMojo.java:203) at org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:184) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) 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.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) at org.codehaus.classworlds.Launcher.main(Launcher.java:47) Caused by: java.lang.NoSuchMethodError: org.mortbay.jetty.annotations.AnnotationParser.parseAnnotations(Lorg/mortbay/jetty/webapp/WebAppContext;Ljava/lang/Class;Lorg/mortbay/jetty/plus/annotation/RunAsCollection;Lorg/mortbay/jetty/plus/annotation/InjectionCollection;Lorg/mortbay/jetty/plus/annotation/LifeCycleCallbackCollection;)V at com.sun.faces.vendor.Jetty6InjectionProvider.inject(Jetty6InjectionProvider.java:93) at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:695) at javax.faces.FactoryFinder.getImplementationInstance(FactoryFinder.java:572) at javax.faces.FactoryFinder.access$500(FactoryFinder.java:140) at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:1120) at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:379) at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:328) at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:236) at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:435) at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:214) ... 42 more How is this caused and how can I solve it? Here is the web.xml content: <context-param> <param-name>log4jConfigLocation</param-name> <param-value>WEB-INF/log4j.properties</param-value> </context-param> <welcome-file-list> <welcome-file>portal/html/index.xhtml</welcome-file> </welcome-file-list> <context-param> <param-name>org.apache.myfaces.ERROR_HANDLING</param-name> <param-value>false</param-value> </context-param> <context-param> <param-name>javax.faces.DEFAULT_SUFFIX</param-name> <param-value>.xhtml</param-value> </context-param> <!-- Special Debug Output for Development --> <context-param> <param-name>facelets.DEVELOPMENT</param-name> <param-value>false</param-value> </context-param> <context-param> <param-name>facelets.REFRESH_PERIOD</param-name> <param-value>2</param-value> </context-param> <context-param> <param-name>com.sun.faces.validateXml</param-name> <param-value>true</param-value> </context-param> <context-param> <param-name>com.sun.faces.verifyObjects</param-name> <param-value>true</param-value> </context-param> <context-param> <param-name>javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE</param-name> <param-value>true</param-value> </context-param> <!-- Richfaces --> <context-param> <param-name>javax.faces.STATE_SAVING_METHOD</param-name> <param-value>server</param-value> </context-param> <context-param> <param-name>org.richfaces.SKIN</param-name> <param-value>tracker</param-value> </context-param> <!-- Richfaces end --> <context-param> <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name> <param-value>com.sun.facelets.FaceletViewHandler</param-value> </context-param> <filter> <display-name>RichFaces Filter</display-name> <filter-name>richfaces</filter-name> <filter-class>org.ajax4jsf.Filter</filter-class> <init-param> <param-name>createTempFiles</param-name> <param-value>false</param-value> </init-param> <init-param> <param-name>maxRequestSize</param-name> <param-value>512000</param-value> </init-param> </filter> <filter-mapping> <filter-name>richfaces</filter-name> <servlet-name>Faces Servlet</servlet-name> <dispatcher>REQUEST</dispatcher> <dispatcher>FORWARD</dispatcher> <dispatcher>INCLUDE</dispatcher> </filter-mapping> <listener> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class> </listener> <listener> <listener-class>com.omega.src.util.InitializeListener</listener-class> </listener> <servlet> <servlet-name>Faces Servlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>*.xhtml</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>loginPage.xhtml</welcome-file> </welcome-file-list> <login-config> <auth-method>BASIC</auth-method> </login-config> and dependencies in pom.xml content: <dependencies> <dependency> <groupId>com.sun.faces</groupId> <artifactId>jsf-api</artifactId> <version>2.2.0</version> </dependency> <dependency> <groupId>com.sun.faces</groupId> <artifactId>jsf-impl</artifactId> <version>2.2.0</version> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>jstl</artifactId> <version>1.2</version> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.5</version> </dependency> <dependency> <groupId>org.richfaces.framework</groupId> <artifactId>richfaces-api</artifactId> <version>3.3.3.Final</version> </dependency> <dependency> <groupId>org.richfaces.framework</groupId> <artifactId>richfaces-impl</artifactId> <version>3.3.3.Final</version> </dependency> <dependency> <groupId>org.richfaces.ui</groupId> <artifactId>richfaces-ui</artifactId> <version>3.3.3.Final</version> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.16</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> <version>3.6.8.Final</version> </dependency> <dependency> <groupId>postgresql</groupId> <artifactId>postgresql</artifactId> <version>9.1-901.jdbc4</version> </dependency> <dependency> <groupId>javassist</groupId> <artifactId>javassist</artifactId> <version>3.12.1.GA</version> </dependency> <dependency> <groupId>com.googlecode.gmaps4jsf</groupId> <artifactId>gmaps4jsf-core</artifactId> <version>1.1.4</version> </dependency> <dependency> <groupId>net.sf.jasperreports</groupId> <artifactId>jasperreports</artifactId> <version>4.5.0</version> </dependency> <dependency> <groupId>net.sourceforge.jexcelapi</groupId> <artifactId>jxl</artifactId> <version>2.6.12</version> </dependency> </dependencies>

    Read the article

  • PHP/Java Bridge java.lang.NoSuchMethodException

    - by m1sk
    I have setup PHP/Java Bridge with working examples in netbeans tomcat directory. What doesnt work is using custom JAR Here is my code: package com.micha; public class Hello1Bean { public Hello1Bean() {} String hi() {return "This is my hello message";} String hello(String name) {return "Hello" + name;} } And the php code <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title></title> </head> <body> <?php require_once ("java/Java.inc"); $world = new Java("com.micha.Hello1Bean"); echo java_values($world->hi()); echo "Hello Working Thingy\n\n"; ?> </body> </html> When I check http://localhost:8084/JavaBridge/mytest.php: javax.servlet.ServletException: java.lang.RuntimeException: PHP Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: Invoke failed: [[o:Hello1Bean]]->hi. Cause: java.lang.NoSuchMethodException: hi(). Candidates: [] VM: 1.6.0_25@http://java.sun.com/" at: #-6 php.java.bridge.JavaBridge.checkM(JavaBridge.java:1085) #-5 php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1024) #-4 php.java.bridge.Request.handleRequest(Request.java:417) #-3 php.java.bridge.Request.handleRequests(Request.java:500) #-2 php.java.bridge.http.ContextRunner.run(ContextRunner.java:145) #-1 php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60) #0 C:\Users\Micha\.netbeans\7.1.2\apache-tomcat-7.0.22.0_base\webapps\JavaBridge\java\Java.inc(232): java_ThrowExceptionProxyFactory->getProxy(2, 'com.micha.Hello...', 'T', true) #1 C:\Users\Micha\.netbeans\7.1.2\apache-tomcat-7.0.22.0_base\webapps\JavaBridge\java\Java.inc(360): java_Arg->getResult(true) #2 C:\Users\Micha\.netbeans\7.1.2\apache-tomcat-7.0.22.0_base\webapps\JavaBridge\java\Java.inc(366): java_Client->getWrappedResult(true) #3 C:\Users\Micha\.netbean in C:\Users\Micha\.netbeans\7.1.2\apache-tomcat-7.0.22.0_base\webapps\JavaBridge\java\Java.inc on line 195 php.java.servlet.fastcgi.FastCGIServlet.handle(FastCGIServlet.java:499) php.java.servlet.fastcgi.FastCGIServlet.doGet(FastCGIServlet.java:521) javax.servlet.http.HttpServlet.service(HttpServlet.java:621) javax.servlet.http.HttpServlet.service(HttpServlet.java:722) org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393) php.java.servlet.PhpCGIFilter.doFilter(PhpCGIFilter.java:126) Before I had a ClassNotFoundException so it knows there is a a class but for some odd reason I cant call the function. ( if I replace "com.micha.Hello1Bean" with some class that doesnt exist then I get that exception)

    Read the article

  • java.io.FileNotFoundException: /target/test.log

    - by sword101
    Greetings all I am using Apache Camel and Apache CXF in this example: http://camel.apache.org/better-jms-transport-for-cxf-webservice-using-apache-camel.data/cxfcamelexample.zip I followed the readme and when tried to run the client & server classes i got this exception: log4j:ERROR setFile(null,true) call failed. java.io.FileNotFoundException: /target/test.log (No such file or directory) at java.io.FileOutputStream.openAppend(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:177) at java.io.FileOutputStream.<init>(FileOutputStream.java:102) at org.apache.log4j.FileAppender.setFile(FileAppender.java:289) at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:163) at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:256) at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:132) at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:96) at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:654) at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:612) at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:509) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:415) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:441) at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:470) at org.apache.log4j.LogManager.<clinit>(LogManager.java:122) at org.apache.log4j.Logger.getLogger(Logger.java:104) at org.apache.commons.logging.impl.Log4JLogger.getLogger(Log4JLogger.java:283) at org.apache.commons.logging.impl.Log4JLogger.<init>(Log4JLogger.java:108) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.apache.commons.logging.impl.LogFactoryImpl.createLogFromClass(LogFactoryImpl.java:1040) at org.apache.commons.logging.impl.LogFactoryImpl.discoverLogImplementation(LogFactoryImpl.java:838) at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:601) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:333) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:307) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:645) at org.springframework.context.support.AbstractApplicationContext.<init>(AbstractApplicationContext.java:146) at org.springframework.context.support.AbstractRefreshableApplicationContext.<init>(AbstractRefreshableApplicationContext.java:84) at org.springframework.context.support.AbstractRefreshableConfigApplicationContext.<init>(AbstractRefreshableConfigApplicationContext.java:59) at org.springframework.context.support.AbstractXmlApplicationContext.<init>(AbstractXmlApplicationContext.java:58) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:136) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93) at com.example.customerservice.impl.CustomerServiceClient.main(CustomerServiceClient.java:34) so any ideas, how to solve this exception ?

    Read the article

  • Ubuntu 10.04 - unable to install Arduino

    - by Newbie
    Hello! At the moment, I try to install Arduino on my Ubuntu 10.04 (32 Bit) computer. I downloaded the latest release at http://arduino.cc/en/Main/Software, cd'ed to the directory and unziped the package. When I try to run ./arduino , I get following error: Exception in thread "main" java.lang.ExceptionInInitializerError at processing.app.Base.main(Base.java:112) Caused by: java.awt.HeadlessException at sun.awt.HeadlessToolkit.getMenuShortcutKeyMask(HeadlessToolkit.java:231) at processing.core.PApplet.<clinit>(Unknown Source) ... 1 more Here is my java -version output: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.5) (6b20-1.9.5-0ubuntu1~10.04.1) OpenJDK Server VM (build 19.0-b09, mixed mode) Any suggestions on this? I try to install arduino without the 'arduino' package. I tried to install it with apt-get (sudo apt-get install arduino). When I try to start arduino (using arduino command) will cause following error: Exception in thread "main" java.lang.ExceptionInInitializerError at processing.app.Preferences.load(Preferences.java:553) at processing.app.Preferences.load(Preferences.java:549) at processing.app.Preferences.init(Preferences.java:142) at processing.app.Base.main(Base.java:188) Caused by: java.awt.HeadlessException at sun.awt.HeadlessToolkit.getMenuShortcutKeyMask(HeadlessToolkit.java:231) at processing.core.PApplet.<clinit>(PApplet.java:224) ... 4 more Update: I saw that I installed several versions of jre (sun and open). So I uninstalled the open jre. Now, when calling arduino I get a new error: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1028) at gnu.io.CommPortIdentifier.<clinit>(CommPortIdentifier.java:123) at processing.app.Editor.populateSerialMenu(Editor.java:965) at processing.app.Editor.buildToolsMenu(Editor.java:717) at processing.app.Editor.buildMenuBar(Editor.java:502) at processing.app.Editor.<init>(Editor.java:194) at processing.app.Base.handleOpen(Base.java:698) at processing.app.Base.handleOpen(Base.java:663) at processing.app.Base.handleNew(Base.java:578) at processing.app.Base.<init>(Base.java:318) at processing.app.Base.main(Base.java:207)

    Read the article

  • Java issues on OpenVZ Ubuntu 11.04 (.jar/.sh files)

    - by IWillNotChange
    I've had a whole line of messes with java and .jar files. I've tried both OpenJDK (from software installer) and about three repositories for Sun. /Desktop# java -jar -Xmx1024m ss.jar Exception in thread "main" java.awt.HeadlessException at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:173) at java.awt.Window.<init>(Window.java:476) at java.awt.Frame.<init>(Frame.java:419) at java.awt.Frame.<init>(Frame.java:384) at javax.swing.JFrame.<init>(JFrame.java:174) at org.powerbot.bd.<init>(Unknown Source) at org.powerbot.Boot.main(Unknown Source) Two separate errors: ~/Desktop# ./ss.sh [SEVERE] org.server.Boot: Default heap size of 490m too small, restarting with 768m and about 30 different crashes were it just "aborts" with a huge file dump. Each time I've tried something a little different, whether it be updating Java or just changing -Xmx1024 to -Xmx1024m to get rid of the heap. Personally I think it has something to do with OpenVZ, but Google hasn't saved me this time, I need someone who can get to the bottom of my problem. java -version java version "1.6.0_26" Java(TM) SE Runtime Environment (build 1.6.0_26-b03) Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode) is my current install. Running ss.sh gives me: (I'd post the entire log but its long) # # A fatal error has been detected by the Java Runtime Environment: # # SIGILL (0x4) at pc=0x00002b14278e6fa0, pid=9301, tid=47365590714112 # # JRE version: 6.0_26-b03 # Java VM: Java HotSpot(TM) 64-Bit Server VM (20.1-b02 mixed mode linux-amd64 compressed oops) # Problematic frame: # C [ld-linux-x86-64.so.2+0x14fa0] _dl_make_stack_executable+0x2b50 # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # I'm willing to let someone who knows what they are talking about view it and try and sort this out. Any help would be appreciated, I've about pulled all my hair Googling to no avail.

    Read the article

  • Tapestry / JDBC - Storing Date

    - by Ben
    So Im using Tapestry and trying to store a date from a beaneditform into a simple Access database. It wont work, Im getting Null pointer exceptions and I cannot understand why. String onSuccess() { System.out.println("in on success!"); String nextPage = null; try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); connection = DriverManager.getConnection("jdbc:odbc:FYP_Users"); DateFormat df = new SimpleDateFormat("dd/MM/yyyy"); Date ed = occasion.getEventDate(); String reportDate = df.format(ed); statement.executeUpdate("INSERT INTO Events (UserName, EventName, EventDate, EventTime, EventDetails, People, Rating) " + "VALUES ('" + login.getUserName() + "', '" + occasion.getEventName()+ "', '" + reportDate + "', '" + occasion.getEventTime() + "', '" + occasion.getEventDetails() + "', '" + occasion.getPeople() + "', '"+ "1" +"')"); connection.close(); occasion = new Occasion(); //occasion.setUserName(occasion.getUserName()); occasion.setEventName(occasion.getEventName()); occasion.setEventDate(occasion.getEventDate()); occasion.setEventTime(occasion.getEventTime()); occasion.setEventDetails(occasion.getEventDetails()); occasion.setPeople(occasion.getPeople()); //occasion.setRating(occasion.getRating()); nextPage = "UserIndex"; } catch (SQLException e) {e.printStackTrace();} catch (ClassNotFoundException e) {e.printStackTrace();} return nextPage; } Stack trace java.util.Calendar.setTime(Unknown Source) java.text.SimpleDateFormat.format(Unknown Source) java.text.SimpleDateFormat.format(Unknown Source) java.text.DateFormat.format(Unknown Source) myappj.pages.CreateOccasion.onSuccess(CreateOccasion.java:61) myappj.pages.CreateOccasion.dispatchComponentEvent(CreateOccasion.java) org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:902) org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1081) org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.triggerContextEvent(InternalComponentResourcesImpl.java:263) org.apache.tapestry5.corelib.components.Form._$advised$onAction(Form.java:398) org.apache.tapestry5.corelib.components.Form$onAction$invocation_128ef468876.invokeAdvisedMethod(Form$onAction$invocation_128ef468876.java) org.apache.tapestry5.internal.services.AbstractComponentMethodInvocation.proceed(AbstractComponentMethodInvocation.java:71) org.apache.tapestry5.ioc.internal.services.LoggingAdvice.advise(LoggingAdvice.java:37) org.apache.tapestry5.internal.transform.LogWorker$1.advise(LogWorker.java:54) org.apache.tapestry5.internal.services.AbstractComponentMethodInvocation.proceed(AbstractComponentMethodInvocation.java:80) org.apache.tapestry5.corelib.components.Form.onAction(Form.java) org.apache.tapestry5.corelib.components.Form.dispatchComponentEvent(Form.java) org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:910) org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1081) org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:75) org.apache.tapestry5.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42) $ComponentEventRequestHandler_128ef45bf4a.handle($ComponentEventRequestHandler_128ef45bf4a.java) org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42) $ComponentEventRequestHandler_128ef45bf4a.handle($ComponentEventRequestHandler_128ef45bf4a.java) org.apache.tapestry5.services.TapestryModule$36.handle(TapestryModule.java:2164) $ComponentEventRequestHandler_128ef45bf4a.handle($ComponentEventRequestHandler_128ef45bf4a.java) $ComponentEventRequestHandler_128ef45bea5.handle($ComponentEventRequestHandler_128ef45bea5.java) org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handleComponentEvent(ComponentRequestHandlerTerminator.java:43) $ComponentRequestHandler_128ef45be99.handleComponentEvent($ComponentRequestHandler_128ef45be99.java) org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:46) $Dispatcher_128ef45be9b.dispatch($Dispatcher_128ef45be9b.java) $Dispatcher_128ef45be92.dispatch($Dispatcher_128ef45be92.java) org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:245) org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26) $RequestHandler_128ef45be93.service($RequestHandler_128ef45be93.java) org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:778) $RequestHandler_128ef45be93.service($RequestHandler_128ef45be93.java) org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:767) $RequestHandler_128ef45be93.service($RequestHandler_128ef45be93.java) org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85) $RequestHandler_128ef45be93.service($RequestHandler_128ef45be93.java) myappj.services.AppModule$1.service(AppModule.java:90) $RequestFilter_128ef45be8e.service($RequestFilter_128ef45be8e.java) $RequestHandler_128ef45be93.service($RequestHandler_128ef45be93.java) org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90) org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81) org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85) org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103) $RequestHandler_128ef45be93.service($RequestHandler_128ef45be93.java) $RequestHandler_128ef45be88.service($RequestHandler_128ef45be88.java) org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:197) org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53) $HttpServletRequestHandler_128ef45be8a.service($HttpServletRequestHandler_128ef45be8a.java) org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62) $HttpServletRequestFilter_128ef45be87.service($HttpServletRequestFilter_128ef45be87.java) $HttpServletRequestHandler_128ef45be8a.service($HttpServletRequestHandler_128ef45be8a.java) org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:726) $HttpServletRequestHandler_128ef45be8a.service($HttpServletRequestHandler_128ef45be8a.java) $HttpServletRequestHandler_128ef45be85.service($HttpServletRequestHandler_128ef45be85.java) org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:127) org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:722) org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:404) org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) org.mortbay.jetty.Server.handle(Server.java:324) org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842) org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648) org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395) org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

    Read the article

  • Primefaces: java.lang.ClassCastException: java.util.HashMap cannot be cast to ClassObject

    - by razegarra
    I have a problem with p:dataTable in Primefaces, I can not find the error. Class UsuarioAsig: public class UsuarioAsig { private BigDecimal codigopersona; private String nombre; private String paterno; private String materno; private String login; private String observacion; private String tipocontrol; private String externo; private String habilitado; private String nombreperfil; private BigDecimal codigousuario; ...get and set...} Class UsuarioAsigListaDataModel: public class UsuarioAsigListaDataModel extends ListDataModel<UsuarioAsig> implements SelectableDataModel<UsuarioAsig> { public UsuarioAsigListaDataModel(){} public UsuarioAsigListaDataModel(List<UsuarioAsig> data){super(data);} @Override public UsuarioAsig getRowData(String rowKey) { @SuppressWarnings("unchecked") List<UsuarioAsig> listaUsuarioAsigLectura = (List<UsuarioAsig>) getWrappedData(); for (UsuarioAsig usuarioAsig : listaUsuarioAsigLectura) { if (usuarioAsig.getCodigopersona().equals(rowKey)) { return usuarioAsig; } } return null; } @Override public Object getRowKey(UsuarioAsig usuarioAsig) { return usuarioAsig.getCodigopersona(); }} Controller UsuarioAsigController: @Controller("usuarioAsigController") @Scope(value = "session") public class UsuarioAsigController { private List<UsuarioAsig> listaUsuarioAsig; private HashMap<String, Object> selUsuarioAsig; private UsuarioAsigListaDataModel mediumUsuarioAsigModel; @Autowired UsuarioService usuarioService; ... public List<UsuarioAsig> getListaUsuarioAsig() { listaUsuarioAsig = usuarioService.selectAsig(); return listaUsuarioAsig; } public void setListaUsuarioAsig(List<UsuarioAsig> listaUsuarioAsig) { this.listaUsuarioAsig = listaUsuarioAsig; } public void setMediumUsuarioAsigModel(UsuarioAsigListaDataModel mediumUsuarioAsigModel) { this.mediumUsuarioAsigModel = mediumUsuarioAsigModel; } public UsuarioAsigListaDataModel getMediumUsuarioAsigModel() { listaUsuarioAsig = usuarioService.selectAsig(); mediumUsuarioAsigModel = new UsuarioAsigListaDataModel(listaUsuarioAsig); return mediumUsuarioAsigModel; } public void onRowSelect(SelectEvent event) { FacesMessage msg = new FacesMessage("Usuario seleccionado", ((UsuarioAsig) event.getObject()).getNombre()); FacesContext.getCurrentInstance().addMessage(null, msg); } } the error is generated when you click on one of the lines of datatable: asiginst.xhtml: <h:form id="form"> <p:growl id="msgs" showDetail="true" /> <p:dataTable id="usuarioAsigListaDataModel" var="usuarioAsig" value="#{usuarioAsigController.mediumUsuarioAsigModel}" rowKey="#{usuarioAsig.codigopersona}" selection="#{usuarioAsigController.selUsuarioAsig}" selectionMode="single" paginator="true" rows="10"> <p:ajax event="rowSelect" listener="#{usuarioAsigController.onRowSelect}" update=":form:msgs" /> <p:column headerText="Código" style="width:10%">#{usuarioAsig.codigopersona}</p:column> <p:column headerText="Nombre" style="width:32%">#{usuarioAsig.nombre}</p:column> <p:column headerText="Apellidos" style="width:32%">#{usuarioAsig.paterno} #{usuarioasig.materno}</p:column> <p:column headerText="Tipo Control" style="width:20%">#{usuarioAsig.tipocontrol}</p:column> <p:column headerText="Habilitado" style="width:6%">#{usuarioAsig.habilitado}</p:column> </p:dataTable> </h:form> THE ERROR IS GENERATED: WARNING: asiginst.xhtml @51,103 listener="#{usuarioAsigController.onRowSelect}": java.lang.ClassCastException: java.util.HashMap cannot be cast to com.datos.entidades.qry.UsuarioAsig javax.el.ELException: asiginst.xhtml @51,103 listener="#{usuarioAsigController.onRowSelect}": java.lang.ClassCastException: java.util.HashMap cannot be cast to com.datos.entidades.qry.UsuarioAsig at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:111) at org.primefaces.behavior.ajax.AjaxBehaviorListenerImpl.processArgListener(AjaxBehaviorListenerImpl.java:69) at org.primefaces.behavior.ajax.AjaxBehaviorListenerImpl.processAjaxBehavior(AjaxBehaviorListenerImpl.java:56) at org.primefaces.event.SelectEvent.processListener(SelectEvent.java:40) at javax.faces.component.behavior.BehaviorBase.broadcast(BehaviorBase.java:102) at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:760) at javax.faces.component.UIData.broadcast(UIData.java:1071) at javax.faces.component.UIData.broadcast(UIData.java:1093) at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794) at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259) at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:409) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) Caused by: java.lang.ClassCastException: java.util.HashMap cannot be cast to com.datos.entidades.qry.UsuarioAsig at com.controller.UsuarioAsigController.onRowSelect(UsuarioAsigController.java:217) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.el.parser.AstValue.invoke(AstValue.java:264) at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278) at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105) ... 29 more

    Read the article

  • Java plugin in the browser doesn't work even though it is enabled

    - by Pratyush Nalam
    I installed the Java Development Kit (64-bit) recently and saw it includes the JRE plugin for 64-bit as well. But, since Firefox is 32-bit, I also installed JRE 32-bit version. This is what is shown in Programs and Features. Now, the problem is, the other day, I opened a site which required the Java plugin. The frame showed the regular Java loading animation and hung. Nothing happened after that. Like this: I checked Firefox's plugins section and it shows Java is enabled, so no issue there I tried other browsers - IE10 and Chrome but to no avail. It doesn't work anywhere. I saw another question which said that you have to install 64-bit then 32-bit. That's what I actually did as well. First, installed JDK 7 64-bit (which includes JRE 7 64-bit) and then installed JRE 7 32-bit. I even tried the Java website's Do I have Java? section and over there too, it just keeps spinning for ages (I have waited for more than 10-20 seconds). How do I go about now? This never happened to me in Windows 7. I am on Windows 8 Pro.

    Read the article

  • ARM TechCon 2013: Oracle, ARM expand collaboration on servers, Internet of Things

    - by terrencebarr
    Over the years, Oracle has been making big investments in Java for ARM-based devices. This week, Oracle and ARM announced further expanding their collaboration on a number of fronts, from additional hardware platforms, porting layers, and optimized communication protocols, to 64-bit ARMv8 support, and IoT architectures. Henrik Stahl, VP of Product Management in the Java Platform Group at Oracle, just posted an excellent summary: “ARM TechCon 2013: Oracle, ARM expand collaboration on servers, Internet of Things”. Highly recommended reading. Cheers, – TerrenceFiled under: Embedded Tagged: 6LoWPAN, ARM, CoAP, Freescale, Gemalto, iot, Java Embedded, Java ME Embedded, Java SE Embedded, Lego Mindstorms, OpenJDK, Qualcomm, Raspberry Pi, TechCon

    Read the article

  • SDL Fullscreen and Gnome-panel

    - by Daniel
    On Ubuntu 10.10, the following SDL code cause Gnome-panel to cease updating its drawing, however it does still function (ie windows on the panel open where they should be, but you just have to know where they 'would be' on instinct/memory). Gnome-panel also leaves a "Untitled window" box in the panel. #include <SDL.h> int main() { SDL_Surface* Screen; if(SDL_Init(SDL_INIT_VIDEO) < 0) { return 1; } Screen = SDL_SetVideoMode(1280, 1024, 32, SDL_OPENGL | SDL_FULLSCREEN); SDL_FreeSurface(Screen); SDL_Quit(); return 0; } Is this something wrong with SDL? Something wrong with the code? Something wrong with Gnome-panel? Hopefully we can find out :) Note: SDL tag request? Seeing as it is quite popular when searched: http://askubuntu.com/search?q=SDL

    Read the article

  • RPi and Java Embedded GPIO: Big Data and Java Technology

    - by hinkmond
    Java Embedded and Big Data go hand-in-hand, especially as demonstrated by prototyping on a Raspberry Pi to show how well the Java Embedded platform can perform on a small embedded device which then becomes the proof-of-concept for industrial controllers, medical equipment, networking gear or any type of sensor-connected device generating large amounts of data. The key is a fast and reliable way to access that data using Java technology. In the previous blog posts you've seen the integration of a static electricity sensor and the Raspberry Pi through the GPIO port, then accessing that data through Java Embedded code. It's important to point out how this works and why it works well with Java code. First, the version of Linux (Debian Wheezy/Raspian) that is found on the RPi has a very convenient way to access the GPIO ports through the use of Linux OS managed file handles. This is key in avoiding terrible and complex coding using register manipulation in C code, or having to program in a less elegant and clumsy procedural scripting language such as python. Instead, using Java Embedded, allows a fast way to access those GPIO ports through those same Linux file handles. Java already has a very easy to program way to access file handles with a high degree of performance that matches direct access of those file handles with the Linux OS. Using the Java API java.io.FileWriter lets us open the same file handles that the Linux OS has for accessing the GPIO ports. Then, by first resetting the ports using the unexport and export file handles, we can initialize them for easy use in a Java app. // Open file handles to GPIO port unexport and export controls FileWriter unexportFile = new FileWriter("/sys/class/gpio/unexport"); FileWriter exportFile = new FileWriter("/sys/class/gpio/export"); ... // Reset the port unexportFile.write(gpioChannel); unexportFile.flush(); // Set the port for use exportFile.write(gpioChannel); exportFile.flush(); Then, another set of file handles can be used by the Java app to control the direction of the GPIO port by writing either "in" or "out" to the direction file handle. // Open file handle to input/output direction control of port FileWriter directionFile = new FileWriter("/sys/class/gpio/gpio" + gpioChannel + "/direction"); // Set port for input directionFile.write("in"); // Or, use "out" for output directionFile.flush(); And, finally, a RandomAccessFile handle can be used with a high degree of performance on par with native C code (only milliseconds to read in data and write out data) with low overhead (unlike python) to manipulate the data going in and out on the GPIO port, while the object-oriented nature of Java programming allows for an easy way to construct complex analytic software around that data access functionality to the external world. RandomAccessFile[] raf = new RandomAccessFile[GpioChannels.length]; ... // Reset file seek pointer to read latest value of GPIO port raf[channum].seek(0); raf[channum].read(inBytes); inLine = new String(inBytes); It's Big Data from sensors and industrial/medical/networking equipment meeting complex analytical software on a small constraint device (like a Linux/ARM RPi) where Java Embedded allows you to shine as an Embedded Device Software Designer. Hinkmond

    Read the article

  • Display launcher over a GNOME panel (instead of under)

    - by Greg Treleaven
    I've set up my desktop so that I have a classic style gnome-panel at the bottom to show my active applications with a main menu button on the side. The problem is that the panel stretches across the whole width of the screen and over the launcher, making it difficult to access the icons at the bottom. I could untick the expand option in the panel's properties, but there's no way to resize it so it takes up the rest of the right part of the screen, which is what I want. And if enough applications are open it stretches all the way anyway. I don't want to auto-hide it either. What I'd like to do is make the launcher go over the top of the panel so I can fully access both the launcher and the panel at the same time. If it's possible, how do I do this?

    Read the article

  • Why a Swing app stops my Java servlet ?

    - by Frank
    I have a Swing runnable app which updates messages, then I have a Java servlet that gets messages from Paypal IPN (Instant Payment Notification), when the servlet starts up, in the init(), I starts the Swing runnable app which opens a desktop window, but 30 minutes later an error in the Swing caused the servlet to stop, how can that happen ? Because the runnable is running on it's own thread, servlet started that thread, why an error in that thread will cause the servlet to stop ? public class License_Manager extends JPanel implements Runnable { License_Manager() { Do_GUI(); ... start(); } public static void main(String[] args) { // Schedule a job for the event-dispatching thread : creating and showing this application's GUI. javax.swing.SwingUtilities.invokeLater(new Runnable() { public void run() { Create_And_Show_GUI(); } }); } } public class PayPal_Servlet extends HttpServlet { public void init(ServletConfig config) throws ServletException { super.init(config); License_Manager.main(null); } protected void processRequest(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException { } } And besides the error don't even have anything to do with my code, it looks like this : Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 17 = 0 at java.util.Vector.elementAt(Vector.java:427) at javax.swing.DefaultListModel.getElementAt(DefaultListModel.java:70) at javax.swing.plaf.basic.BasicListUI.paintCell(BasicListUI.java:191) at javax.swing.plaf.basic.BasicListUI.paintImpl(BasicListUI.java:304) at javax.swing.plaf.basic.BasicListUI.paint(BasicListUI.java:227) at javax.swing.plaf.ComponentUI.update(ComponentUI.java:143) at javax.swing.JComponent.paintComponent(JComponent.java:763) at javax.swing.JComponent.paint(JComponent.java:1029) at javax.swing.JComponent.paintChildren(JComponent.java:864) at javax.swing.JComponent.paint(JComponent.java:1038) at javax.swing.JViewport.paint(JViewport.java:747) at javax.swing.JComponent.paintChildren(JComponent.java:864) at javax.swing.JComponent.paint(JComponent.java:1038) at javax.swing.JComponent.paintToOffscreen(JComponent.java:5124) at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:278) at javax.swing.RepaintManager.paint(RepaintManager.java:1220) at javax.swing.JComponent._paintImmediately(JComponent.java:5072) at javax.swing.JComponent.paintImmediately(JComponent.java:4882) at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:803) at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:714) at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:694) at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

    Read the article

  • ValidationException class version mismatch

    - by suszterpatt
    I have a simple EJB application that I can deploy and test on a local WebLogic instance (v10.3.0.0) without problems. I need to deploy this on a remote WL server (v10.3.3.0), and test it from a local machine. Deployment is successful, but when I try to run any of the clients from JDeveloper, I get this error: <2010.06.02. 16:08:36 CEST> <Error> <RJVM> <BEA-000503> <Incoming message header or abbreviation processing failed java.io.InvalidClassException: org.eclipse.persistence.exceptions.ValidationException; local class incompatible: stream classdesc serialVersionUID = 3793659634176227230, local class serialVersionUID = -7605463488982202416 java.io.InvalidClassException: org.eclipse.persistence.exceptions.ValidationException; local class incompatible: stream classdesc serialVersionUID = 3793659634176227230, local class serialVersionUID = -7605463488982202416 at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:562) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1583) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1316) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) at weblogic.rjvm.ClassTableEntry.readExternal(ClassTableEntry.java:36) at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) at weblogic.rjvm.InboundMsgAbbrev.readObject(InboundMsgAbbrev.java:65) at weblogic.rjvm.InboundMsgAbbrev.read(InboundMsgAbbrev.java:37) at weblogic.rjvm.MsgAbbrevJVMConnection.readMsgAbbrevs(MsgAbbrevJVMConnection.java:227) at weblogic.rjvm.MsgAbbrevInputStream.init(MsgAbbrevInputStream.java:173) at weblogic.rjvm.MsgAbbrevJVMConnection.dispatch(MsgAbbrevJVMConnection.java:439) at weblogic.rjvm.t3.MuxableSocketT3.dispatch(MuxableSocketT3.java:322) at weblogic.socket.AbstractMuxableSocket.dispatch(AbstractMuxableSocket.java:394) at weblogic.socket.SocketMuxer.readReadySocketOnce(SocketMuxer.java:917) at weblogic.socket.SocketMuxer.readReadySocket(SocketMuxer.java:849) at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:283) at weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:29) at weblogic.work.ExecuteRequestAdapter.execute(ExecuteRequestAdapter.java:21) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117) Can anyone explain why I'm getting this error, and what I can do to resolve it?

    Read the article

  • Apple's Java Mac OS X 2012-006 Update

    - by Sharon Zakhour
    The recent Java Mac OS X 2012-006 update from Apple removes the Apple Java 6 plug-in from your Mac. The Mac OS X Install FAQ will be updated with the next 7u release, but you may find the following information useful in the meantime. Q: I have installed Java for OS X 2012-006 and Apple Java 6 can no longer be used for applets or Web Start. How do I get it back? A: The Java for OS X 2012-006 update from Apple uninstalls the Apple-provided Java applet plug-in from all web browsers. You can download the latest version of Java from Oracle, which has improved security, reliability and compatibility. If you prefer to continue using Apple's Java 6 plug-in, you can follow the steps provided in How to re-enable the Apple-provided Java SE 6 applet plug-in and Web Start functionality. Q: After installing Java for OS X 2012-006, can I continue to use Apple's Java 6 alongside the OS X JDK or JRE for Java 7? A: If you want to continue to develop with Java 6 in a Terminal window you can modify the startup script for your favorite command environment. For bash, use this: export JAVA_HOME=`/usr/libexec/java_home -v 1.6` Some applications use /usr/bin/java to invoke Java. After installing Java for OS X 2012-006, /usr/bin/java will find the newest JDK installed, and will use that for all of the Java related command line tools in /usr/bin. You may need to modify those applications to find Java 6, or contact the developer for a newer version of the application. Also, this update removes Apple provided Java Preferences app. For more information on how to determine the default version of Java on your system, see Determining the Installed Version of the JRE in the JRE 7 Installation for Mac OS X page.

    Read the article

  • embedded glassfish: java.lang.NoClassDefFoundError: java/util/ServiceLoader

    - by Xinus
    I am trying to embed glassfish inside my java program using embeded api, I am using maven2 and its pom.xml is as follows <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>orh.highmark</groupId> <artifactId>glassfish-test1</artifactId> <version>1.0-SNAPSHOT</version> <packaging>jar</packaging> <name>glassfish-test1</name> <url>http://maven.apache.org</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> <dependency> <groupId>org.glassfish.extras</groupId> <artifactId>glassfish-embedded-all</artifactId> <version>3.1-SNAPSHOT</version> </dependency> </dependencies> <repositories> <repository> <id>maven2-repository.dev.java.net</id> <name>Java.net Repository for Maven</name> <url>http://download.java.net/maven/2/</url> <layout>default</layout> </repository> <repository> <id>glassfish-repository</id> <name>GlassFish Nexus Repository</name> <url>http://maven.glassfish.org/content/groups/glassfish</url> </repository> </repositories> <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.1</version> <executions> <execution> <goals> <goal>java</goal> </goals> </execution> </executions> <configuration> <mainClass>orh.highmark.App</mainClass> <arguments> <argument>argument1</argument> </arguments> </configuration> </plugin> </plugins> </build> </project> Program: public class App { public static void main( String[] args ) { System.out.println( "Hello World!" ); Server.Builder builder = new Server.Builder("test"); builder.logger(true); Server server = builder.build(); } } But for some reason it always gives me error as java.lang.NoClassDefFoundError: java/util/ServiceLoader here is the output C:\Users\sunils\glassfish-tests\glassfish-test1>mvn -e exec:java + Error stacktraces are turned on. [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building glassfish-test1 [INFO] task-segment: [exec:java] [INFO] ------------------------------------------------------------------------ [INFO] Preparing exec:java [INFO] No goals needed for project - skipping [INFO] [exec:java {execution: default-cli}] Hello World! [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] An exception occured while executing the Java class. null java/util/ServiceLoader [INFO] ------------------------------------------------------------------------ [INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: An exception occured whi le executing the Java class. null at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:719) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone Goal(DefaultLifecycleExecutor.java:569) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau ltLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan dleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen ts(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi fecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:6 0) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.plugin.MojoExecutionException: An exception occured while executing the Java class. null at org.codehaus.mojo.exec.ExecJavaMojo.execute(ExecJavaMojo.java:345) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi nManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:694) ... 17 more Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:290) at java.lang.Thread.run(Thread.java:595) Caused by: java.lang.NoClassDefFoundError: java/util/ServiceLoader at org.glassfish.api.embedded.Server.getMain(Server.java:701) at org.glassfish.api.embedded.Server.<init>(Server.java:290) at org.glassfish.api.embedded.Server.<init>(Server.java:75) at org.glassfish.api.embedded.Server$Builder.build(Server.java:185) at org.glassfish.api.embedded.Server$Builder.build(Server.java:167) at orh.highmark.App.main(App.java:14) ... 6 more [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1 second [INFO] Finished at: Sat May 08 02:55:03 IST 2010 [INFO] Final Memory: 3M/6M [INFO] ------------------------------------------------------------------------ I couldn't guess its problem with my program or with the glassfish api. Can somebody please help me understand what is happening here and how to rectify it? thanks for any clue ..

    Read the article

  • Is there a recommended order to take the Oracle Java EE certification exams?

    - by Karl
    I recently passed the Oracle Certified Professional, Java SE 6 Programmer examination. Now, my boss would like me to take "the next step" to broaden my competence. I tried to explain that there is no equivalent Java EE 6 Programmer examination, but a number of different exams, such as Web Services, Web Components, and Enterprise JavaBeans. Is there a recommended path to follow for the various Oracle certifications in the Enterprise Edition of Java? Is it logical to take some exams prior to taking others because the content builds upon previous knowledge or are they all independent?

    Read the article

  • Java Spotlight Episode 87: Nandini Ramani on Java FX and Embedded Java

    - by Roger Brinkley
    Interview with Nandini Ramani on JavaFX and Embedded Java. Joining us this week on the Java All Star Developer Panel is Arun Gupta, Java EE Guy. Right-click or Control-click to download this MP3 file. You can also subscribe to the Java Spotlight Podcast Feed to get the latest podcast automatically. If you use iTunes you can open iTunes and subscribe with this link:  Java Spotlight Podcast in iTunes. Show Notes News JFXtras Project: There’s an app for that! JavaOne 2012 content catalog is online Native packaging for JavaFX in 2.2 EL 3.0 Public Review (JSR 341) el-spec.java.net Events June 18-20, QCon, New York City June 19, CJUG, Chicago June 20, 1871, Chicago June 26-28, Jazoon, Zurich, Switzerland Jun 27, Houston JUG July 5, Java Forum, Stuttgart, Germany Jul 13-14, IndicThreads, Delhi July 30-August 1, JVM Language Summit, Santa Clara Feature InterviewNandini Ramani is Vice President of Development at Oracle in the Fusion Middleware Group. She is responsible for the Java Client Platform and has a long history of creating innovation and futures at Sun Microsystems.Nandini launched the JavaFX Platform and tools and had been actively involved in JavaFX since its inception in May 2007. Prior to joining the client group, Nandini was in the Software CTO Office driving the emerging technologies group for incubation projects. She has a background in both hardware and software, having worked in hardware architecture and simulation team in the Accelerated Graphics group and the graphics and media team in the JavaME group. She was involved in the development of XML standards, as Co-Chair of the W3C Scalable Vector Graphics working group and as a member of the W3C Compound Document Formats working group. She was also a member of several graphics and UI related expert groups in the JCP. Mail Bag What’s Cool "OpenJDK is now the heart of a vital piece of technology that runs large parts of our entire civilization.” Java Magazine PetStore using Java EE 6 - Antonio Goncalves

    Read the article

  • Use Glassfish JMS from remote client

    - by James
    Hi, I have glassfish installed on a server with a JMS ConnectionFactory set up jms/MyConnectionFactory with a resource type or javax.jms.ConnectionFactory. I now want to access this from a client application on my local machine for this I have the following: public static void main(String[] args) { try{ Properties env = new Properties(); env.setProperty("java.naming.factory.initial", "com.sun.enterprise.naming.SerialInitContextFactory"); env.setProperty("java.naming.factory.url.pkgs", "com.sun.enterprise.naming"); env.setProperty("java.naming.factory.state", "com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl"); env.setProperty("org.omg.CORBA.ORBInitialHost", "10.97.3.74"); env.setProperty("org.omg.CORBA.ORBInitialPort", "3700"); InitialContext initialContext = new InitialContext(env); ConnectionFactory connectionFactory = null; try { connectionFactory = (ConnectionFactory) initialContext.lookup("jms/MyConnectionFactory"); } catch (Exception e) { System.out.println("JNDI API lookup failed: " + e.toString()); e.printStackTrace(); System.exit(1); } }catch(Exception e){ e.printStackTrace(System.err); } } When I run my client I get the following output: INFO: Using com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate as the delegate {org.omg.CORBA.ORBInitialPort=3700, java.naming.factory.initial=com.sun.enterprise.naming.SerialInitContextFactory, org.omg.CORBA.ORBInitialHost=10.97.3.74, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} 19-Mar-2010 16:09:13 org.hibernate.validator.util.Version <clinit> INFO: Hibernate Validator bean-validator-3.0-JBoss-4.0.2 19-Mar-2010 16:09:13 org.hibernate.validator.engine.resolver.DefaultTraversableResolver detectJPA INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver. 19-Mar-2010 16:09:13 com.sun.messaging.jms.ra.ResourceAdapter start INFO: MQJMSRA_RA1101: SJSMQ JMS Resource Adapter starting: REMOTE 19-Mar-2010 16:09:13 com.sun.messaging.jms.ra.ResourceAdapter start INFO: MQJMSRA_RA1101: SJSMQ JMSRA Started:REMOTE 19-Mar-2010 16:09:13 com.sun.enterprise.naming.impl.SerialContext lookup SEVERE: enterprise_naming.serialctx_communication_exception 19-Mar-2010 16:09:13 com.sun.enterprise.naming.impl.SerialContext lookup SEVERE: java.lang.RuntimeException: com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: This pool is not bound in JNDI : jms/MyConnectionFactory at com.sun.enterprise.resource.naming.ConnectorObjectFactory.getObjectInstance(ConnectorObjectFactory.java:159) at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304) at com.sun.enterprise.naming.impl.SerialContext.getObjectInstance(SerialContext.java:472) at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:437) at javax.naming.InitialContext.lookup(InitialContext.java:392) at simpleproducerclient.Main.main(Main.java:89) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.glassfish.appclient.client.acc.AppClientContainer.launch(AppClientContainer.java:424) at org.glassfish.appclient.client.AppClientFacade.main(AppClientFacade.java:134) Caused by: com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: This pool is not bound in JNDI : jms/MyConnectionFactory at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.obtainManagedConnectionFactory(ConnectorConnectionPoolAdminServiceImpl.java:1017) at com.sun.enterprise.connectors.ConnectorRuntime.obtainManagedConnectionFactory(ConnectorRuntime.java:375) at com.sun.enterprise.resource.naming.ConnectorObjectFactory.getObjectInstance(ConnectorObjectFactory.java:124) ... 11 more Caused by: javax.naming.NamingException: Lookup failed for '__SYSTEM/pools/jms/MyConnectionFactory' in SerialContext targetHost=localhost,targetPort=3700,orb'sInitialHost=ithfdv01,orb'sInitialPort=3700 [Root exception is javax.naming.NameNotFoundException: pools] at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:442) at javax.naming.InitialContext.lookup(InitialContext.java:392) at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getConnectorConnectionPool(ConnectorConnectionPoolAdminServiceImpl.java:804) at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.obtainManagedConnectionFactory(ConnectorConnectionPoolAdminServiceImpl.java:932) ... 13 more Caused by: javax.naming.NameNotFoundException: pools at com.sun.enterprise.naming.impl.TransientContext.resolveContext(TransientContext.java:252) at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:171) at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:172) at com.sun.enterprise.naming.impl.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:58) at com.sun.enterprise.naming.impl.RemoteSerialContextProviderImpl.lookup(RemoteSerialContextProviderImpl.java:89) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie.dispatchToMethod(ReflectiveTie.java:146) at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:176) at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:682) at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:216) at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1841) at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1695) at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:1078) at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:221) at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:797) at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:561) JNDI API lookup failed: javax.naming.CommunicationException: Communication exception for SerialContext targetHost=10.97.3.74,targetPort=3700,orb'sInitialHost=ithfdv01,orb'sInitialPort=3700 [Root exception is java.lang.RuntimeException: com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: This pool is not bound in JNDI : jms/MyConnectionFactory] at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2558) at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:492) at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:528) javax.naming.CommunicationException: Communication exception for SerialContext targetHost=10.97.3.74,targetPort=3700,orb'sInitialHost=ithfdv01,orb'sInitialPort=3700 [Root exception is java.lang.RuntimeException: com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: This pool is not bound in JNDI : jms/MyConnectionFactory] at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:461) at javax.naming.InitialContext.lookup(InitialContext.java:392) at simpleproducerclient.Main.main(Main.java:89) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.glassfish.appclient.client.acc.AppClientContainer.launch(AppClientContainer.java:424) at org.glassfish.appclient.client.AppClientFacade.main(AppClientFacade.java:134) Caused by: java.lang.RuntimeException: com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: This pool is not bound in JNDI : jms/MyConnectionFactory at com.sun.enterprise.resource.naming.ConnectorObjectFactory.getObjectInstance(ConnectorObjectFactory.java:159) at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304) at com.sun.enterprise.naming.impl.SerialContext.getObjectInstance(SerialContext.java:472) at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:437) ... 8 more Caused by: com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: This pool is not bound in JNDI : jms/MyConnectionFactory at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.obtainManagedConnectionFactory(ConnectorConnectionPoolAdminServiceImpl.java:1017) at com.sun.enterprise.connectors.ConnectorRuntime.obtainManagedConnectionFactory(ConnectorRuntime.java:375) at com.sun.enterprise.resource.naming.ConnectorObjectFactory.getObjectInstance(ConnectorObjectFactory.java:124) ... 11 more Caused by: javax.naming.NamingException: Lookup failed for '__SYSTEM/pools/jms/MyConnectionFactory' in SerialContext targetHost=localhost,targetPort=3700,orb'sInitialHost=ithfdv01,orb'sInitialPort=3700 [Root exception is javax.naming.NameNotFoundException: pools] at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:442) at javax.naming.InitialContext.lookup(InitialContext.java:392) at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getConnectorConnectionPool(ConnectorConnectionPoolAdminServiceImpl.java:804) at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.obtainManagedConnectionFactory(ConnectorConnectionPoolAdminServiceImpl.java:932) ... 13 more Caused by: javax.naming.NameNotFoundException: pools at com.sun.enterprise.naming.impl.TransientContext.resolveContext(TransientContext.java:252) at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:171) at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:172) at com.sun.enterprise.naming.impl.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:58) at com.sun.enterprise.naming.impl.RemoteSerialContextProviderImpl.lookup(RemoteSerialContextProviderImpl.java:89) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie.dispatchToMethod(ReflectiveTie.java:146) at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:176) at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:682) at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:216) at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1841) at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1695) at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:1078) at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:221) at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:797) at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:561) at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2558) at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:492) at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:528) I have looked at a number of posts and have tried a number of things with no success. I can run the following commands on my server: ./asadmin list-jndi-entries UserTransaction: com.sun.enterprise.transaction.TransactionNamingProxy$UserTransactionProxy java:global: com.sun.enterprise.naming.impl.TransientContext jdbc: com.sun.enterprise.naming.impl.TransientContext ejb: com.sun.enterprise.naming.impl.TransientContext com.sun.enterprise.container.common.spi.util.InjectionManager: com.sun.enterprise.container.common.impl.util.InjectionManagerImpl jms: com.sun.enterprise.naming.impl.TransientContext Command list-jndi-entries executed successfully. ./asadmin list-jndi-entries --context jms MyTopic: org.glassfish.javaee.services.ResourceProxy MyConnectionFactory: org.glassfish.javaee.services.ResourceProxy MyQueue: org.glassfish.javaee.services.ResourceProxy Command list-jndi-entries executed successfully. Any help is greatly appreciated. Cheers, James

    Read the article

  • JSON error Caused by: java.lang.NullPointerException

    - by user3821853
    im trying to make a register page on android using JSON. everytime i press register button on avd, i get an error "unfortunately database has stopped". i have a error on my logcat that i cannot understand. this my code. please someone help me. this my register.java import android.app.Activity; import android.app.ProgressDialog; import android.os.AsyncTask; import android.os.Bundle; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; import android.widget.Toast; import org.apache.http.NameValuePair; import org.apache.http.message.BasicNameValuePair; import org.json.JSONException; import org.json.JSONObject; import java.util.ArrayList; import java.util.List; public class Register extends Activity implements OnClickListener{ private EditText user, pass; private Button mRegister; // Progress Dialog private ProgressDialog pDialog; // JSON parser class JSONParser jsonParser = new JSONParser(); //php register script //localhost : //testing on your device //put your local ip instead, on windows, run CMD > ipconfig //or in mac's terminal type ifconfig and look for the ip under en0 or en1 // private static final String REGISTER_URL = "http://xxx.xxx.x.x:1234/webservice/register.php"; //testing on Emulator: private static final String REGISTER_URL = "http://10.0.2.2:1234/webservice/register.php"; //testing from a real server: //private static final String REGISTER_URL = "http://www.mybringback.com/webservice/register.php"; //ids private static final String TAG_SUCCESS = "success"; private static final String TAG_MESSAGE = "message"; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.register); user = (EditText)findViewById(R.id.username); pass = (EditText)findViewById(R.id.password); mRegister = (Button)findViewById(R.id.register); mRegister.setOnClickListener(this); } @Override public void onClick(View v) { // TODO Auto-generated method stub new CreateUser().execute(); } class CreateUser extends AsyncTask<String, String, String> { @Override protected void onPreExecute() { super.onPreExecute(); pDialog = new ProgressDialog(Register.this); pDialog.setMessage("Creating User..."); pDialog.setIndeterminate(false); pDialog.setCancelable(true); pDialog.show(); } @Override protected String doInBackground(String... args) { // TODO Auto-generated method stub // Check for success tag int success; String username = user.getText().toString(); String password = pass.getText().toString(); try { // Building Parameters List<NameValuePair> params = new ArrayList<NameValuePair>(); params.add(new BasicNameValuePair("username", username)); params.add(new BasicNameValuePair("password", password)); Log.d("request!", "starting"); //Posting user data to script JSONObject json = jsonParser.makeHttpRequest( REGISTER_URL, "POST", params); // full json response Log.d("Registering attempt", json.toString()); // json success element success = json.getInt(TAG_SUCCESS); if (success == 1) { Log.d("User Created!", json.toString()); finish(); return json.getString(TAG_MESSAGE); }else{ Log.d("Registering Failure!", json.getString(TAG_MESSAGE)); return json.getString(TAG_MESSAGE); } } catch (JSONException e) { e.printStackTrace(); } return null; } protected void onPostExecute(String file_url) { // dismiss the dialog once product deleted pDialog.dismiss(); if (file_url != null){ Toast.makeText(Register.this, file_url, Toast.LENGTH_LONG).show(); } } } } this is JSONparser.java import android.util.Log; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.NameValuePair; import org.apache.http.client.ClientProtocolException; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost; import org.apache.http.client.utils.URLEncodedUtils; import org.apache.http.impl.client.DefaultHttpClient; import org.json.JSONException; import org.json.JSONObject; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.UnsupportedEncodingException; import java.util.List; public class JSONParser { static InputStream is = null; static JSONObject jObj = null; static String json = ""; // constructor public JSONParser() { } public JSONObject getJSONFromUrl(final String url) { // Making HTTP request try { // Construct the client and the HTTP request. DefaultHttpClient httpClient = new DefaultHttpClient(); HttpPost httpPost = new HttpPost(url); // Execute the POST request and store the response locally. HttpResponse httpResponse = httpClient.execute(httpPost); // Extract data from the response. HttpEntity httpEntity = httpResponse.getEntity(); // Open an inputStream with the data content. is = httpEntity.getContent(); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } catch (ClientProtocolException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } try { // Create a BufferedReader to parse through the inputStream. BufferedReader reader = new BufferedReader(new InputStreamReader( is, "iso-8859-1"), 8); // Declare a string builder to help with the parsing. StringBuilder sb = new StringBuilder(); // Declare a string to store the JSON object data in string form. String line = null; // Build the string until null. while ((line = reader.readLine()) != null) { sb.append(line + "\n"); } // Close the input stream. is.close(); // Convert the string builder data to an actual string. json = sb.toString(); } catch (Exception e) { Log.e("Buffer Error", "Error converting result " + e.toString()); } // Try to parse the string to a JSON object try { jObj = new JSONObject(json); } catch (JSONException e) { Log.e("JSON Parser", "Error parsing data " + e.toString()); } // Return the JSON Object. return jObj; } // function get json from url // by making HTTP POST or GET mehtod public JSONObject makeHttpRequest(String url, String method, List<NameValuePair> params) { // Making HTTP request try { // check for request method if(method == "POST"){ // request method is POST // defaultHttpClient DefaultHttpClient httpClient = new DefaultHttpClient(); HttpPost httpPost = new HttpPost(url); httpPost.setEntity(new UrlEncodedFormEntity(params)); HttpResponse httpResponse = httpClient.execute(httpPost); HttpEntity httpEntity = httpResponse.getEntity(); is = httpEntity.getContent(); }else if(method == "GET"){ // request method is GET DefaultHttpClient httpClient = new DefaultHttpClient(); String paramString = URLEncodedUtils.format(params, "utf-8"); url += "?" + paramString; HttpGet httpGet = new HttpGet(url); HttpResponse httpResponse = httpClient.execute(httpGet); HttpEntity httpEntity = httpResponse.getEntity(); is = httpEntity.getContent(); } } catch (UnsupportedEncodingException e) { e.printStackTrace(); } catch (ClientProtocolException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } try { BufferedReader reader = new BufferedReader(new InputStreamReader( is, "iso-8859-1"), 8); StringBuilder sb = new StringBuilder(); String line = null; while ((line = reader.readLine()) != null) { sb.append(line + "\n"); } is.close(); json = sb.toString(); } catch (Exception e) { Log.e("Buffer Error", "Error converting result " + e.toString()); } // try parse the string to a JSON object try { jObj = new JSONObject(json); } catch (JSONException e) { Log.e("JSON Parser", "Error parsing data " + e.toString()); } // return JSON String return jObj; } } and this my error 08-18 23:40:02.381 2000-2018/com.example.blackcustomzier.database E/Buffer Error? Error converting result java.lang.NullPointerException: lock == null 08-18 23:40:02.381 2000-2018/com.example.blackcustomzier.database E/JSON Parser? Error parsing data org.json.JSONException: End of input at character 0 of 08-18 23:40:02.391 2000-2018/com.example.blackcustomzier.database W/dalvikvm? threadid=15: thread exiting with uncaught exception (group=0xb0f37648) 08-18 23:40:02.391 2000-2018/com.example.blackcustomzier.database E/AndroidRuntime? FATAL EXCEPTION: AsyncTask #4 java.lang.RuntimeException: An error occured while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:299) at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:352) at java.util.concurrent.FutureTask.setException(FutureTask.java:219) at java.util.concurrent.FutureTask.run(FutureTask.java:239) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573) at java.lang.Thread.run(Thread.java:841) Caused by: java.lang.NullPointerException at com.example.blackcustomzier.database.Register$CreateUser.doInBackground(Register.java:108) at com.example.blackcustomzier.database.Register$CreateUser.doInBackground(Register.java:74) at android.os.AsyncTask$2.call(AsyncTask.java:287) at java.util.concurrent.FutureTask.run(FutureTask.java:234)             at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)             at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)             at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)             at java.lang.Thread.run(Thread.java:841) 08-18 23:40:02.501 2000-2000/com.example.blackcustomzier.database W/EGL_emulation? eglSurfaceAttrib not implemented 08-18 23:40:02.591 2000-2000/com.example.blackcustomzier.database W/EGL_emulation? eglSurfaceAttrib not implemented 08-18 23:40:02.981 2000-2000/com.example.blackcustomzier.database E/WindowManager? Activity com.example.blackcustomzier.database.Register has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{b1294c60 V.E..... R......D 0,0-1026,288} that was originally added here android.view.WindowLeaked: Activity com.example.blackcustomzier.database.Register has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{b1294c60 V.E..... R......D 0,0-1026,288} that was originally added here at android.view.ViewRootImpl.<init>(ViewRootImpl.java:345) at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:239) at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69) at android.app.Dialog.show(Dialog.java:281) at com.example.blackcustomzier.database.Register$CreateUser.onPreExecute(Register.java:85) at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:586) at android.os.AsyncTask.execute(AsyncTask.java:534) at com.example.blackcustomzier.database.Register.onClick(Register.java:70) at android.view.View.performClick(View.java:4240) at android.view.View.onKeyUp(View.java:7928) at android.widget.TextView.onKeyUp(TextView.java:5606) at android.view.KeyEvent.dispatch(KeyEvent.java:2647) at android.view.View.dispatchKeyEvent(View.java:7343) at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1393) at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1393) at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1393) at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1393) at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchKeyEvent(PhoneWindow.java:1933) at com.android.internal.policy.impl.PhoneWindow.superDispatchKeyEvent(PhoneWindow.java:1408) at android.app.Activity.dispatchKeyEvent(Activity.java:2384) at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWindow.java:1860) at android.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent(ViewRootImpl.java:3791) at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:3774) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3379) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3429) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3398) at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3483) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3406) at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3540) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3379) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3429) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3398) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3406) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3379) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3429) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3398) at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3516) at android.view.ViewRootImpl$ImeInputStage.onFinishedInputEvent(ViewRootImpl.java:3666) at android.view.inputmethod.InputMethodManager$PendingEvent.run(InputMethodManager.java:1982) at android.view.inputmethod.InputMethodManager.invokeFinishedInputEventCallback(InputMethodManager.java:1698) at android.view.inputmethod.InputMethodManager.finishedInputEvent(InputMethodManager.java:1689) at android.view.inputmethod.InputMethodManager$ImeInputEventSender.onInputEventFinished(InputMethodManager.java:1959) at android.view.InputEventSender.dispatchInputEventFinished(InputEventSender.java:141) at android.os.MessageQueue.nativePollOnce(Native Method) at android.os.MessageQueue.next(MessageQueue.java:132) at android.os.Looper.loop(Looper.java:124) at android.app.ActivityThread.main(ActivityThread.java:5103) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:525) at com.android.internal.os.ZygoteInit$MethodAndArgsCal please help me to solve this thx

    Read the article

  • Test-Driven Development Problem

    - by Zeck
    Hi guys, I'm newbie to Java EE 6 and i'm trying to develop very simple JAX-RS application. RESTfull web service working fine. However when I ran my test application, I got the following. What have I done wrong? Or am i forget any configuration? Of course i'm create a JNDI and i'm using Netbeans 6.8 IDE. In finally, thank you for any advise. My Entity: @Entity @Table(name = "BOOK") @NamedQueries({ @NamedQuery(name = "Book.findAll", query = "SELECT b FROM Book b"), @NamedQuery(name = "Book.findById", query = "SELECT b FROM Book b WHERE b.id = :id"), @NamedQuery(name = "Book.findByTitle", query = "SELECT b FROM Book b WHERE b.title = :title"), @NamedQuery(name = "Book.findByDescription", query = "SELECT b FROM Book b WHERE b.description = :description"), @NamedQuery(name = "Book.findByPrice", query = "SELECT b FROM Book b WHERE b.price = :price"), @NamedQuery(name = "Book.findByNumberofpage", query = "SELECT b FROM Book b WHERE b.numberofpage = :numberofpage")}) public class Book implements Serializable { private static final long serialVersionUID = 1L; @Id @Basic(optional = false) @Column(name = "ID") private Integer id; @Basic(optional = false) @Column(name = "TITLE") private String title; @Basic(optional = false) @Column(name = "DESCRIPTION") private String description; @Basic(optional = false) @Column(name = "PRICE") private double price; @Basic(optional = false) @Column(name = "NUMBEROFPAGE") private int numberofpage; public Book() { } public Book(Integer id) { this.id = id; } public Book(Integer id, String title, String description, double price, int numberofpage) { this.id = id; this.title = title; this.description = description; this.price = price; this.numberofpage = numberofpage; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public double getPrice() { return price; } public void setPrice(double price) { this.price = price; } public int getNumberofpage() { return numberofpage; } public void setNumberofpage(int numberofpage) { this.numberofpage = numberofpage; } @Override public int hashCode() { int hash = 0; hash += (id != null ? id.hashCode() : 0); return hash; } @Override public boolean equals(Object object) { // TODO: Warning - this method won't work in the case the id fields are not set if (!(object instanceof Book)) { return false; } Book other = (Book) object; if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { return false; } return true; } @Override public String toString() { return "com.entity.Book[id=" + id + "]"; } } My Junit test class: public class BookTest { private static EntityManager em; private static EntityManagerFactory emf; public BookTest() { } @BeforeClass public static void setUpClass() throws Exception { emf = Persistence.createEntityManagerFactory("E01R01PU"); em = emf.createEntityManager(); } @AfterClass public static void tearDownClass() throws Exception { em.close(); emf.close(); } @Test public void createBook() { Book book = new Book(); book.setId(1); book.setDescription("Mastering the Behavior Driven Development with Ruby on Rails"); book.setTitle("Mastering the BDD"); book.setPrice(25.9f); book.setNumberofpage(1029); em.persist(book); assertNotNull("ID should not be null", book.getId()); } } My persistence.xml jta-data-sourceBookstoreJNDI And exception is: May 7, 2009 11:10:37 AM org.hibernate.validator.util.Version INFO: Hibernate Validator bean-validator-3.0-JBoss-4.0.2 May 7, 2009 11:10:37 AM org.hibernate.validator.engine.resolver.DefaultTraversableResolver detectJPA INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver. [EL Info]: 2009-05-07 11:10:37.531--ServerSession(13671123)--EclipseLink, version: Eclipse Persistence Services - 2.0.0.v20091127-r5931 May 7, 2009 11:10:40 AM com.sun.enterprise.transaction.JavaEETransactionManagerSimplified initDelegates INFO: Using com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate as the delegate May 7, 2009 11:10:43 AM com.sun.enterprise.connectors.ActiveRAFactory createActiveResourceAdapter SEVERE: rardeployment.class_not_found May 7, 2009 11:10:43 AM com.sun.enterprise.connectors.ActiveRAFactory createActiveResourceAdapter SEVERE: com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: Error in creating active RAR at com.sun.enterprise.connectors.ActiveRAFactory.createActiveResourceAdapter(ActiveRAFactory.java:104) at com.sun.enterprise.connectors.service.ResourceAdapterAdminServiceImpl.createActiveResourceAdapter(ResourceAdapterAdminServiceImpl.java:216) at com.sun.enterprise.connectors.ConnectorRuntime.createActiveResourceAdapter(ConnectorRuntime.java:352) at com.sun.enterprise.resource.naming.ConnectorObjectFactory.getObjectInstance(ConnectorObjectFactory.java:106) at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304) at com.sun.enterprise.naming.impl.SerialContext.getObjectInstance(SerialContext.java:472) at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:437) at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:569) at javax.naming.InitialContext.lookup(InitialContext.java:396) at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:110) at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:94) at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162) at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:584) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:228) at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:368) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:151) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:207) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:195) at com.entity.BookTest.setUpClass(BookTest.java:31) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at org.junit.runners.ParentRunner.run(ParentRunner.java:220) at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:515) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1031) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:888) Caused by: java.lang.ClassNotFoundException: com.sun.gjc.spi.ResourceAdapter at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at com.sun.enterprise.connectors.ActiveRAFactory.createActiveResourceAdapter(ActiveRAFactory.java:96) ... 32 more [EL Severe]: 2009-05-07 11:10:43.937--ServerSession(13671123)--Local Exception Stack: Exception [EclipseLink-7060] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.ValidationException Exception Description: Cannot acquire data source [BookstoreJNDI]. Internal Exception: javax.naming.NamingException: Lookup failed for 'BookstoreJNDI' in SerialContext ,orb'sInitialHost=localhost,orb'sInitialPort=3700 [Root exception is javax.naming.NamingException: Failed to look up ConnectorDescriptor from JNDI [Root exception is com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: Error in creating active RAR]] at org.eclipse.persistence.exceptions.ValidationException.cannotAcquireDataSource(ValidationException.java:451) at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:116) at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:94) at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162) at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:584) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:228) at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:368) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:151) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:207) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:195) at com.entity.BookTest.setUpClass(BookTest.java:31) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at org.junit.runners.ParentRunner.run(ParentRunner.java:220) at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:515) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1031) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:888) Caused by: javax.naming.NamingException: Lookup failed for 'BookstoreJNDI' in SerialContext ,orb'sInitialHost=localhost,orb'sInitialPort=3700 [Root exception is javax.naming.NamingException: Failed to look up ConnectorDescriptor from JNDI [Root exception is com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: Error in creating active RAR]] at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:442) at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:569) at javax.naming.InitialContext.lookup(InitialContext.java:396) at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:110) ... 23 more Caused by: javax.naming.NamingException: Failed to look up ConnectorDescriptor from JNDI [Root exception is com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: Error in creating active RAR] at com.sun.enterprise.resource.naming.ConnectorObjectFactory.getObjectInstance(ConnectorObjectFactory.java:109) at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304) at com.sun.enterprise.naming.impl.SerialContext.getObjectInstance(SerialContext.java:472) at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:437) ... 26 more Caused by: com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: Error in creating active RAR at com.sun.enterprise.connectors.ActiveRAFactory.createActiveResourceAdapter(ActiveRAFactory.java:104) at com.sun.enterprise.connectors.service.ResourceAdapterAdminServiceImpl.createActiveResourceAdapter(ResourceAdapterAdminServiceImpl.java:216) at com.sun.enterprise.connectors.ConnectorRuntime.createActiveResourceAdapter(ConnectorRuntime.java:352) at com.sun.enterprise.resource.naming.ConnectorObjectFactory.getObjectInstance(ConnectorObjectFactory.java:106) ... 29 more Caused by: java.lang.ClassNotFoundException: com.sun.gjc.spi.ResourceAdapter at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at com.sun.enterprise.connectors.ActiveRAFactory.createActiveResourceAdapter(ActiveRAFactory.java:96) ... 32 more Exception Description: Cannot acquire data source [BookstoreJNDI]. Internal Exception: javax.naming.NamingException: Lookup failed for 'BookstoreJNDI' in SerialContext ,orb'sInitialHost=localhost,orb'sInitialPort=3700 [Root exception is javax.naming.NamingException: Failed to look up ConnectorDescriptor from JNDI [Root exception is com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: Error in creating active RAR]])

    Read the article

  • Could you please suggest any good books for Java EE

    - by attal
    Hi people, I am comfortable with Java SE 6 and I wanted to go deeper into Java by learning Java EE 6. However, I am confused and I don't know which book(s) should I read to master Java EE 6 (I have never learned Java EE previously). Could you please suggest any appropriate book(s) to help me master Java EE completely? Thank you for reading

    Read the article

  • Programmatically updating one update panel elements from another update panel elements

    - by Jalpesh P. Vadgama
    While taking interviews for asp.net candidate I am often asking this question but most peoples are not able to give this answer. So I decided to write a blog post about this. Here is the scenario. There are two update panels in my html code in first update panel there is textbox hello world and another update panel there is a button called btnHelloWorld. Now I want to update textbox text in button click event without post back. But in normal scenario It will not update the textbox text as both are in different update panel. Here is the code for that. <form id="form1" runat="server"> <asp:ScriptManager ID="myScriptManager" runat="server" EnableCdn="true"></asp:ScriptManager> <asp:UpdatePanel ID="firstUpdatePanel" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:TextBox ID="txtHelloWorld" runat="server"></asp:TextBox> </ContentTemplate> </asp:UpdatePanel> <asp:UpdatePanel ID="secondUpdatePanel" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:Button ID="btnHelloWorld" runat="server" Text="Print Hello World" onclick="btnHelloWorld_Click" /> </ContentTemplate> </asp:UpdatePanel> </form> Here comes magic!!. Lots of people don’t know that update panel are providing the Update method from which we can programmatically update the update panel elements without post back. Below is code for that. protected void btnHelloWorld_Click(object sender, System.EventArgs e) { txtHelloWorld.Text = "Hello World!!!"; firstUpdatePanel.Update(); } That’s it here I have updated the firstUpdatePanel from the code!!!. Hope you liked it.. Stay tuned for more..Happy Programming.. Technorati Tags: UpdatePanel,ASP.NET

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >