Search Results

Search found 46178 results on 1848 pages for 'java home'.

Page 81/1848 | < Previous Page | 77 78 79 80 81 82 83 84 85 86 87 88  | Next Page >

  • JPA/Hibernate query with class name?

    - by Petteri Hietavirta
    In this example com.test.Cat extends com.test.Animal and there is no field DB in CAT table of com.test.Cat explicitly defining its type (it wasn't me). When I query my animals from DB I get a collection of Animals. It is possible to sort them by class name: order by r.class but is there a way to use class name as a criteria? For example I would like to get all animals expect dogs. But no luck - even this does not work: where r.class = ? (String "ccc.test.Cat") as I get an exception: Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer at org.hibernate.type.IntegerType.set(IntegerType.java:64) at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:154) at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:136) at org.hibernate.param.PositionalParameterSpecification.bind(PositionalParameterSpecification.java:62) at org.hibernate.loader.hql.QueryLoader.bindParameterValues(QueryLoader.java:514) at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1589) at org.hibernate.loader.Loader.doQuery(Loader.java:696) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259) at org.hibernate.loader.Loader.doList(Loader.java:2228) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125) at org.hibernate.loader.Loader.list(Loader.java:2120) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401) at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:361) at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1148) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102) at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:67)

    Read the article

  • problem in loading class from 'me.prettyprint.hector.api.Serializer'

    - by dhananjay patil
    I have created executable jar but having some problem with Class not found Exception. When I type command: java -jar JarFileName.jar arguments.. I get error message, Exception in thread "main" java.lang.NoClassDefFoundError: me/prettyprint/hector/api/Serializer at com.ensarm.niidle.web.scraper.NiidleScrapeManager.main(NiidleScrapeManager.java:21) Caused by: java.lang.ClassNotFoundException: me.prettyprint.hector.api.Serializer 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:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) ... 1 more please tell me solution for this,class is not getting loaded from the external jar

    Read the article

  • Trouble installing Rhodes framework

    - by user94154
    When I run rake run:android, I get the error (I'm using Ubuntu): Your java bin folder does not appear to be on your path. This is required to use rhodes. Here is the relevant part of my bash.bashrc file: export PATH="$PATH:$HOME/ruby/gems/bin" export GEM_HOME="$HOME/ruby/gems" export GEM_PATH="$GEM_HOME:/usr/lib/ruby/gems/1.8" export GEM_CACHE="$GEM_HOME/cache" export RUBYOPT=rubygems export ANDROID_HOME="/home/username/ruby_files/android-sdk-linux_86" PATH="$PATH:$ANDROID_HOME/tools" export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0_21 export JAVA_HOME PATH=$PATH:$JAVA_HOME/bin export PATH

    Read the article

  • JBoss deployment throws 'java.util.zip.ZipException: error in opening zip file' on Linux?

    - by Kaushalya
    I thought of posting both the question and the answer for others' knowledge. I deployed a large EAR (contained more than ~1024 jars/wars) on JBoss running with Java 6 on Linux, and the deployment process cried throwing the following exception: java.lang.RuntimeException: java.util.zip.ZipException: error in opening zip file) at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:53) at org.jboss.deployment.MainDeployer.init(MainDeployer.java:901) at org.jboss.deployment.MainDeployer.init(MainDeployer.java:895) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:809) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782) .... Caused by: java.lang.RuntimeException: java.util.zip.ZipException: error in opening zip file at org.jboss.util.file.JarArchiveBrowser.<init>(JarArchiveBrowser.java:74) at org.jboss.util.file.FileProtocolArchiveBrowserFactory.create(FileProtocolArchiveBrowserFactory.java:48) at org.jboss.util.file.ArchiveBrowser.getBrowser(ArchiveBrowser.java:57) at org.jboss.ejb3.EJB3Deployer.hasEjbAnnotation(EJB3Deployer.java:213) .... This was caused by the 'limit of number of open file descriptors' of Linux/Unix operating systems. The default is 1024. You can check the default value using: ulimit -n To increase the number of open file descriptors (say to 2048): ulimit -n 2048 Check the man page of ulimit for more details.

    Read the article

  • Error in executing

    - by Saranya.R
    Hi........ I am interested in sending tweets using Java program.I wrote the following prgram.It doen't show any error in compiling.But while executing it shows "Exception in thread "main" java.lang.NoClassDefFoundError: hi Caused by: java.lang.ClassNotFoundException: hi 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:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) Could not find the main class: hi. Program will exit." This is my code.. package twitter; //import java.lang.object; import net.unto.twitter.*; import net.unto.twitter.TwitterProtos.Status; public class hi { public static void main(String args[]) { Api api = Api.builder().username("usename").password("password").build(); api.updateStatus("This is a test message.").build().post(); } } Can anybody help me ..Pls

    Read the article

  • Java applet wont run

    - by Courtney
    I am trying to get a Java applet to run properly when linked to an HTML page in Dreamweaver CC. I'm new to all this so please bear with me here. First I saved this code to a .java file //Triangle.java import java.awt.*; import java.applet.Applet; public class Triangle extends Applet { public void paint (Graphics g){ int bottomX=80; int bottomY=200; int base=100; int height=100; g.drawLine(bottomX,bottomY,bottomX+base,bottomY); g.drawLine(bottomX+base,bottomY,bottomX+base/2,bottomY-height); g.drawLine(bottomX+base/2,bottomY-height, bottomX,bottomY); } } I then compiled it entering javac Triangle.java After that, I inserted it into a Dreamwever page using: <html> <applet code=Triangle.class width=400 height=400 > </applet> </html> Now when I try and open the page in Chrome I get an error reading: UnsupportedClassVersionError Triangle: Unsupported major.minor version 52.0 This, as I have read, is an issue with using two incompatible Java versions? In my Java Control Panel it says I am using version 1.8.0_20 and my JDK is jdk1.8.0_20. Does anyone see anything super obvious that I am doing wrong here?

    Read the article

  • How to delete Drawn Line in java?

    - by Jeyjey
    Hello Folks, well this is my code: import javax.swing.; import javax.; import java.awt.; import java.awt.Color; import java.awt.Graphics.; import java.awt.event.*; import javax.swing.UIManager; public class SimpleGUI extends JFrame{ public SimpleGUI(){ this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE) ; } public void go(){ Drawpanel = new Mypanel(); JFrame frame = new JFrame("Chasing Line"); frame.getContentPane().add(BorderLayout.CENTER, Drawpanel); frame.setSize(300,300); frame.setVisible(true); Drawpanel.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() { public void mouseMoved(java.awt.event.MouseEvent evt) { DrawpanelMouseMoved(evt); } }); } public void DrawpanelMouseMoved(java.awt.event.MouseEvent evt) { xpos=evt.getX(); ypos=evt.getY(); System.out.println("Coordinates : X :"+ xpos+"Y: "+ypos); Drawpanel.paintImage(xpos,ypos); } class Mypanel extends JPanel{ public void paintImage(int xpost,int ypost){ Graphics d = getGraphics(); d.setColor(Color.black); d.drawLine(xpost, 0, xpost, this.getHeight()); d.setColor(Color.red); d.drawLine(0, ypost, this.getWidth(),ypost); this.validate(); } } // end the inner class public static void main(String[] args){ try { UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); } catch(Exception e) { System.err.println("Look and feel not set"); } SimpleGUI win = new SimpleGUI(); win.go(); } Mypanel Drawpanel; private int xpos=0; private int ypos=0; } // close SimpleGUI class The problem is how can i delete the old lines?, i mea,make only the current x and y lines appear on the screen, make the intersection between both lines "follow" the mouse pointer. thanks for any reply.

    Read the article

  • Clearing Java certificates cache (force reload certificates)

    - by AlbertoFEM
    A simple question here. One application gave me this exception when trying to access a website with a expired certificate: java.security.cert.CertificateExpiredException So, I renewed the certificated from the website machine and restarted it. When I try to access it from Firefox or Chrome it will load the new certificate (which it's expiration date is set somewhere near 2040). The problem is, Java applications doesn't seems to renew this certificate, it seems to be stuck in some kind of internal cache. I already tried to add it to the keystore and set options in the application properties like -Dcom.sun.net.ssl.checkRevocation=false. No matter what I do, it always throw me a java.security.cert.CertificateExpiredException Any ideas?

    Read the article

  • Performance problems when running Java desktop applications on Citrix Metaframe

    - by demetriusnunes
    We have a desktop Java application running within a Citrix Metaframe server farm and the performance, specially while starting up the app, is very unreliable. Sometimes it takes 15 seconds and sometimes it takes over a minute. It's really unpredicatable. Is there any way to optimize running Java desktop applications within Citrix Metaframe Terminal server sessions to a more reliable performance level? Are there any optimization directed specifically toward Java, such as pre-load JVMs or something like that? Any help would be greatly appreciated.

    Read the article

  • Java Problem when i upgraded from IE 7 to IE 8

    - by user38210
    I face problem with upgrading IE8 related to JAVA. The problem only with IE8, IE7 is OK and I have the latest Java version. After I upgrade the IE8, the graphics which has dynamics reading from the server is not updating and it shows NaN. I tried the following : - upgrade the server win2003 with latest Java version(JRE and JDT) , but the problem still exist in cliend PC(XP). -I upgraded the server IE8, then all user lost the connection even from inside the server. then I recall the prev version IE7.

    Read the article

  • Java sound doesn't work under Linux

    - by Cliff
    Help! I'm getting frustrated by the individual hoops I have to go through to eek sound out of my speakers when running Java apps on Linux platforms! I just installed Fedora 12 and after downloading and running the Java Sound Demo I get exceptions. If I run just a vanilla Java program that plays a wav file it runs silently with no sound and no exceptions. Every other app seems to play sound. I also took some advice from this thread in the Ubuntu forums which almost seemed to work. (Installing aoss got rid of the initial exceptions in the sound demo but I still hear nothing when I play.) can somebody help me figure out what's wrong?

    Read the article

  • Issues running java in Solaris 9 container

    - by Matthew Watson
    Hi, I have a solaris 9 container built from a physical server using flarcreate. Everything seems fine, except when trying to trying to run any "java -server" process it fails with the following error This is on a Sunfire T1000 machine running Solaris 10 10/09 s10s_u8wos_08a SPARC Running jdk1.5.0_15 Exception java.lang.OutOfMemoryError: requested -4 bytes for size_t in /BUILD_AREA/jdk1.5.0_15/hotspot/src/os/solaris/vm/os_solaris.cpp. Out of swap space? As far as I can tell I'm not actually out of swap space. Running java in client mode works without a problem. Googles only suggestion is related to x86. Any suggestions? Thanks.

    Read the article

  • Eclipse Juno failing to start with Java returning 1 error report

    - by Richard Lewin
    I have been using Eclipse Juno on windows 8 without any issues until yesterday when, upon starting Eclipse it shows the initial splash screen and then shows the following message: Eclipse Java was started but returned exit code=1 C:\Windows\system32\javaw.exe -Dosgi.requiredJavaVersion=1.5 -Dhelp.lucene.tokenizer=standard -Xms40m -Xmx384m -XX:MaxPermSize=256m -jar C:\Program Files\eclipse\plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar -os win32 -ws win32 -arch x86_64 -showsplash C:\Program Files\eclipse\plugins\org.eclipse.platform_4.2.0.v201206081400\splash.bmp -launcher C:\Program Files\eclipse\eclipse.exe -name Eclipse --launcher.library C:\Program Files\eclipse\plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20120522-1813\eclipse_1503.dll -startup C:\Program Files\eclipse\plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar --launcher.overrideVmargs -exitdata 13f4_5c -product org.eclipse.epp.package.java.product -vm C:\Windows\system32\javaw.exe -vmargs -Dosgi.requiredJavaVersion=1.5 -Dhelp.lucene.tokenizer=standard -Xms40m -Xmx384m -XX:MaxPermSize=256m -jar C:\Program Files\eclipse\plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar OK At this point Eclipse does not load any further. I have attempted to re-install the Java JDK and JRE without having any effect. I have also re-downloaded Eclipse Juno and run it as a 'fresh' startup which has until now worked initially yesterday

    Read the article

  • Problems to connect Java visualVM to a EC2-instance

    - by kasten
    I'm trying to profile a AWS EC2 instance via visualVM. The instance is in a securitygroup which allows all connections and i'm runing jstatd with a grant codebase "file:${java.home}/../lib/tools.jar" { permission java.security.AllPermission; }; policy on it. When i try to connect from my local machine with visulVM nothing happens. When i use jps i get the following response $ jps -l -m -v rmi://ec2-xxx-xxx-xxx-xxx.compute-1.amazonaws.com Error communicating with remote host: Connection refused to host: xxx.xxx.xxx.xxx; nested exception is: java.net.ConnectException: Connection timed out But i can ssh into the instance and use jps locally. Has anyone a pointer in which direction i can debug further?

    Read the article

  • Java application server behind IIS 7.5 on Windows Server 2008

    - by perissf
    I have a Java application server (GlassFish, indeed, but the problem is the same for any other application server, I guess), running on port 8080. And I have IIS 7.5 listening on port 80 as by default configuration. I want to avoid people typing the port because it's unprofessional. So I want that when somebody types http://myserver the traffic is directed to IIS. And this is how it already works now. But I also want that when somebody types http://myserver/java the traffic is directed to port 8080 and consequently my GlassFish splash screen is displayed. If I have deployed an application on GlassFish under context root app1, typing http://myserver/java/app1 should access the application. How can I do this? I have tried with adding some rules with the URL Rewrite utility from IIS7.5 UI, but this shows the port after the rule has rewritten the url, and I want to avoid it.

    Read the article

  • Java application crashes on startup in citrix session

    - by Brimstedt
    Hello We have a java application published through citrix. When application is launched for a new user, it crashes immediately on startup. If we login using RDP, then log out (not starting the app), it starts to work. We've published another smaller java app, and it works for new users, without the need to first log on using RDP. Steps: - Publish java app - create new user - run published app in citrix -> crash - log on user using rdp, log out - run published app in citrix -> works fine Its becoming real tiresom to log on each new user to each citrix server :-P

    Read the article

  • Linux kernel with grsec + Java / Apache Tomcat

    - by NoozNooz42
    I've got a Debian Linux 64 bit dedicated server. The kernel has the grsec patch applied. I'm mainly using this server to run Apache Tomcat (6.0.26, Java 6) and everything seems fine. The only issue, is that when I start Tomcat, I get a few of these: grsec: From xxx.xxx.xxx.xxx: Segmentation fault occurred at 00007fefe04e4000 in /home/t/jre1.6.0_20/bin/java[java:22403] uid/euid:1001/1001 gid/egid:1001/1001, parent /sbin/init[init:1] uid/euid:0/0 gid/egid:0/0 grsec: more alerts, logging disabled for 10 seconds Then no error logs anymore. Everything is fine. The kernel is: Linux 2.6.32.2-xxxx-grs-ipv4-64 #1 SMP Tue Dec 29 14:41:12 UTC 2009 x86_64 GNU/Linux And the webapp works fine. So there are segmentation fault when Tomcat starts, but everything seems to works fine. Is this concerning? Should I move to a non-grsec kernel?

    Read the article

  • java -version doesn't write to stdout?

    - by Zárate
    Hi there, Either I'm doing something silly or Sun is. How come something like: java -version > version.txt Still prints out to stdout and leaves version.txt empty? I'm checking out the exit code, and it's still 0, so is not that's writing to stderr. I need this because I'm building a test-environment tool and want to check if the version of Java is adequate, I was planning to catch that version output, but now I'm stuck. I'm on OS X Leopard, Java version 1.6.0_20. Any ideas? Cheers, Juan

    Read the article

  • Java sound doesn't work under Linux

    - by Cliff
    I just installed Fedora 12 and after downloading and running the Java Sound Demo I get exceptions. If I run just a vanilla Java program that plays a .wav file it runs silently with no sound and no exceptions. Every other app seems to play sound. I also took some advice from this thread in the Ubuntu forums which almost seemed to work. (Installing aoss got rid of the initial exceptions in the sound demo but I still hear nothing when I play.) I'm getting frustrated by the individual hoops I have to go through to eek sound out of my speakers when running Java apps on Linux platforms! Can somebody help me figure out what's wrong?

    Read the article

  • Staggering java linux process startup to prevent OOM

    - by ctennis
    I am running a number of java processes on a single Linux machine. From a memory and computing standpoint, everything is fine when things are static. However, periodically we use a configuration management package up upgrade the jar or war files, and restart the java process. The problem is, that is restarts them all relatively quickly, and so we get 10 or so java VMs restarting all at the same time (we use daemontools for the service stops/starts), which wreaks havoc on the machine, in terms of OOMs or just really slow. This is because it's spawning the JVM 10x at the same time. Other than trying to stagger the startups, is there a smarter way of handling this? Maybe a sysctl tuning performance parameters, or a JVM parameter?

    Read the article

  • powershell run java process problem

    - by Limited Atonement
    Dear Sirs, I'm trying to run a java process via Powershell in Windows XP. Here's the command: java.exe -cp .;./common.jar -Dcontext=atest1 -Dresourcepath=. DW_Install So, the classpath is . and .\common.jar (I think java takes the wrong slashes, right?) There are two environment variables, one "atest1" the other "." and the class to execute main on is DW_Install (in the default package). This command works in cmd.exe, but doesn't is PS. What's going on? What is PS doing while parsing this command that CMD doesn't do (or vice versa)? Aaron

    Read the article

  • Java JRE: Setting default heap size

    - by AndiDog
    I'm having trouble with Java on a virtual server, it always gives me the following error: # java Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine. I first solved this by using the CACAO virtual machine (of OpenJDK, by putting it first in jvm.cfg), but then I run into problems with my web application (Play! framework based, gives me nasty LinkageErrors). So I cannot use that VM. Instead I'd like to just use the normal server VM and set -Xmx128M by default. How can I do that? Related: this question

    Read the article

  • Firefox hangs with java in Linux

    - by Xolve
    I am using Firefox 3.6 on Linux and I haveJava 6 update 15. Obviously I am using the newer plugin type. Whenever I open a page with Java applet it just becoms unresponsive and hangs. I tried with Chrome. I think it detects the Java plugin from mozilla's plugins folder. Due to multiprocess architecture it doesn't hang and shows the initial applet loading window but then it reports that the plugin has crashed. The only way I can run Java applets is to download the class file and make an html file and run the applet using applet viewer.

    Read the article

  • Java login through LDAP

    - by Salda
    I am starting to write an application for our office and the first step is authentication through LDAP where all users already exist. Everything I need is a code in Java to check if the pair <nick,password> is right. Google found me many links, but I think that I will find here the most sofisticate, short and up to date solution (I don't want to read all articles like 2 whole days to do something so simple). I have written many dkBs of code in C++, but in Java I am total noob and I haven't coded anything with LDAP yet so try to be simple if speaking in Java and LDAP terms if possible.

    Read the article

  • Java and Sendmail HELO requires domain address

    - by ealgestorm
    I am trying to set up emailing from a java web application hosted on a linux server (Cent OS) in apache. Sendmail is working fine from the command line as root on localhost but when trying to send emails from the java web app (also on the same server from localhost) the following java exception is thrown. 501 5.0.0 HELO requires domain address EDIT: I have read that some people have found this is due to an incorrect hosts entry currently the hosts file contains 127.0.0.1 Centos-VPS localhost.localdomain localhost and i'm not sure what the Centos-VPS bit at the start is for but this is a clients hosted server so don't really want to break stuff EDIT see the RFC is helpful ... 501 Syntax error in parameters or arguments Now I know what the problem is! (note the sarcasm people.)

    Read the article

< Previous Page | 77 78 79 80 81 82 83 84 85 86 87 88  | Next Page >