Search Results

Search found 4819 results on 193 pages for 'brian lang'.

Page 9/193 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • exception in thread "main" java.lang.NoclassDefFoundError: cal/class

    - by Gaurav
    enter import java.io.*; class eval { double add(double a,double b) { return (a+b); } double sub(double a,double b) { return (a-b); } double mul(double a,double b) { return (a*b); } double div(double a,double b) { return (a/b); } } class cal extends eval { public static void main(String args[])throws IOException { eval a1=new eval(); try{ System.out.println("1) Add"); System.out.println("2) Subtract"); System.out.println("3) Multiply"); System.out.println("4) Divide"); System.out.println("5) Enter your choice"); BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); int ch;ch=Integer.parseInt(br.readLine()); System.out.println("Enter two number"); double a;a=Integer.parseInt(br.readLine()); double b;b=Integer.parseInt(br.readLine()); switch(ch) { case 1: a1.add(a,b); break; case 2: a1.sub(a,b); break; case 3: a1.mul(a,b); break; case 4: a1.div(a,b); break; } } catch (IOException e) { System.out.println("Error occured, please restart application."); } } }

    Read the article

  • C lang. -- Error: Segmentaion fault

    - by user233542
    I don't understand why this would give me a seg fault. Any ideas? this is the function that returns the signal to stop the program: (below is the other function that is called within this) double bisect(double A0,double A1,double Sol[N],double tol,double c) { double Amid,shot; while (A1-A0 tol) { Amid = 0.5*(A0+A1); shot = shoot(Sol, Amid, c); if (shot==2.*Pi) { return Amid; } if (shot > 2.*Pi){ A1 = Amid; } else if (shot < 2.*Pi){ A0 = Amid; } } return 0.5*(A1+A0); } double shoot(double Sol[N],double A,double c) { int i,j; /Initial Conditions/ for (i=0;i for (i=buff+2;i return Sol[i-1]; } buff, l, N are defined using a #deine statement. l = 401, buff = 50, N = 2000 Thanks

    Read the article

  • ImageAdapter and ListView (java.lang.OutOfMemoryError: bitmap size exceeds VM budget)

    - by theDude
    Hi, I'm using ListView to display images which I provide through an ImageAdapter class. it works great on my device (and on many other devices which I tested it on), but somehow when I'm using the emulator and I'm long-pressing the up/down button - I'm getting an outOfMemory error after 10-15 seconds. I tried clearing cache, canceling cache, etc. - nothing helped. I know this crash is pretty rare (i couldn't reproduced it on any "real" device), but I can see on DDMS that "GC freed" are getting bigger during that long press and I can't find a way to clear them. Any help will be appreciated, Tnx.

    Read the article

  • JSP Upload File Java.lang.NullPointer

    - by newbie123
    I want to develope upload and download file from server. Upload.html <form action="/UploadFile/UploadFile" method="POST" enctype="multipart/form-data">Select a file: <input type="submit" name="button" /> <input type="file" name="first"></form> UploadFile.servlet protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String temp = request.getParameter("first"); System.out.println(temp); File origFile = new File(temp); FileOutputStream out = new FileOutputStream(request.getContextPath() + "pdtImages/" + "FirstFile"); InputStream ins = new FileInputStream(origFile); try { System.out.println(request.getContextPath()); byte[] buf = new byte[1024]; int len; while ((len = ins.read(buf)) > 0) { out.write(buf, 0, len); } out.close(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } When I submitted the file I got null pointer error message. I not very familiar with jsp can anybody help me? I want to store the file to the server directory.

    Read the article

  • C lang. -- Error: Segmentation fault

    - by user233542
    I don't understand why this would give me a seg fault. Any ideas? This is the function that returns the signal to stop the program (plus the other function that is called within this): double bisect(double A0,double A1,double Sol[N],double tol,double c) { double Amid,shot; while (A1-A0 > tol) { Amid = 0.5*(A0+A1); shot = shoot(Sol, Amid, c); if (shot==2.*Pi) { return Amid; } if (shot > 2.*Pi){ A1 = Amid; } else if (shot < 2.*Pi){ A0 = Amid; } } return 0.5*(A1+A0); } double shoot(double Sol[N],double A,double c) { int i,j; /*Initial Conditions*/ for (i=0;i<buff;i++) { Sol[i] = 0.; } for (i=buff+l;i<N;i++) { Sol[i] = 2.*Pi; } Sol[buff]= 0; Sol[buff+1]= A*exp(sqrt(1+3*c)*dx); for (i=buff+2;i<buff+l;i++) { Sol[i] = (dx*dx)*( sin(Sol[i-1]) + c*sin(3.*(Sol[i-1])) ) - Sol[i-2] + 2.*Sol[i-1]; } return Sol[i-1]; } The values buff, l, N are defined using a #define statement. l = 401, buff = 50, N = 2000

    Read the article

  • android java.lang.OutOfMemoryError

    - by xiangdream
    hi, all, when i download large data from website, i got this error information: I/global (20094): Default buffer size used in BufferedInputStream constructor. It would be better to be explicit if an 8k buffer is required. D/dalvikvm(20094): GC freed 6153 objects / 3650840 bytes in 335ms I/dalvikvm-heap(20094): Forcing collection of SoftReferences for 3599051-byte al location D/dalvikvm(20094): GC freed 320 objects / 11400 bytes in 144ms E/dalvikvm-heap(20094): Out of memory on a 3599051-byte allocation. I/dalvikvm(20094): "Thread-9" prio=5 tid=17 RUNNABLE I/dalvikvm(20094): | group="main" sCount=0 dsCount=0 s=0 obj=0x439b9480 I/dalvikvm(20094): | sysTid=25762 nice=0 sched=0/0 handle=4065496 anyone can help me?

    Read the article

  • Trying to write priority queue in Java but getting "Exception in thread "main" java.lang.ClassCastEx

    - by Dan
    For my data structure class, I am trying to write a program that simulates a car wash and I want to give fancy cars a higher priority than regular ones using a priority queue. The problem I am having has something to do with Java not being able to type cast "Object" as an "ArrayQueue" (a simple FIFO implementation). What am I doing wrong and how can I fix it? public class PriorityQueue<E> { private ArrayQueue<E>[] queues; private int highest=0; private int manyItems=0; public PriorityQueue(int h) { highest=h; queues = (ArrayQueue[]) new Object[highest+1]; <----problem is here } public void add(E item, int priority) { queues[priority].add(item); manyItems++; } public boolean isEmpty( ) { return (manyItems == 0); } public E remove() { E answer=null; int counter=0; do { if(!queues[highest-counter].isEmpty()) { answer = queues[highest-counter].remove(); counter=highest+1; } else counter++; }while(highest-counter>=0); return answer; } }

    Read the article

  • java.lang.OutOfMemoryError: Java heap space

    - by houlahan
    i get this error when calling a mysql Prepared Statement every 30 seconds this is the code which is been called: public static int getUserConnectedatId(Connection conn, int i) throws SQLException { pstmt = conn.prepareStatement("SELECT UserId from connection where ConnectionId ='" + i + "'"); ResultSet rs = pstmt.executeQuery(); int id = -1; if (rs.next()) { id = rs.getInt(1); } pstmt = null; rs = null; return id; } not sure what the problem is :s thanks in advanced.

    Read the article

  • error Caused by: java.lang.OutOfMemoryError Load Image

    - by user2493770
    This is my method to load images in background, the first and second load normally. But after these loading, a memory error appears. How can I fix this? public class MainArrayAdapterViewHolder extends ArrayAdapter<EmpresaListaPrincipal> { private final Context context; private ArrayList<EmpresaListaPrincipal> data_array; public DisplayImageOptions options; public ImageLoader imageLoader = ImageLoader.getInstance(); public MainArrayAdapterViewHolder(Context context, ArrayList<EmpresaListaPrincipal> list_of_ids) { super(context, R.layout.main_list_rowlayout, list_of_ids); this.context = context; this.data_array = list_of_ids; //------------- read more here https://github.com/nostra13/Android-Universal-Image-Loader options = new DisplayImageOptions.Builder().showImageForEmptyUri(R.drawable.ic_launcher).showImageOnFail(R.drawable.ic_launcher).resetViewBeforeLoading() .cacheOnDisc().imageScaleType(ImageScaleType.IN_SAMPLE_INT).bitmapConfig(Bitmap.Config.RGB_565).delayBeforeLoading(0).build(); File cacheDir = StorageUtils.getCacheDirectory(context); ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(context).memoryCacheExtraOptions(720, 1280) // default = device screen // dimensions .discCacheExtraOptions(720, 1280, CompressFormat.JPEG, 100).threadPoolSize(3) // default .threadPriority(Thread.NORM_PRIORITY - 1) // default .memoryCacheSize(2 * 1024 * 1024).discCache(new UnlimitedDiscCache(cacheDir)) // default .discCacheSize(50 * 1024 * 1024).discCacheFileCount(100).discCacheFileNameGenerator(new HashCodeFileNameGenerator()) // default .imageDownloader(new BaseImageDownloader(context)) // default .tasksProcessingOrder(QueueProcessingType.FIFO) // default .defaultDisplayImageOptions(options) // default .build(); imageLoader.init(config); } @Override public View getView(int position, View convertView, ViewGroup parent) { ViewHolder viewholder; View v = convertView; //Asociamos el layout de la lista que hemos creado e incrustamos el ViewHolder if(convertView == null){ LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); //View rowView = inflater.inflate(R.layout.main_list_rowlayout, parent, false); v = inflater.inflate(R.layout.main_list_rowlayout, parent, false); viewholder = new ViewHolder(); viewholder.textView_main_row_title = (TextView) v.findViewById(R.id.textView_main_row_title); viewholder.imageView_restaurant_icon = (ImageView) v.findViewById(R.id.imageView_restaurant_icon); viewholder.textView_main_row_direccion = (TextView) v.findViewById(R.id.textView_main_row_direccion); v.setTag(viewholder); } ImageLoadingListener mImageLoadingListenr = new ImageLoadingListener() { @Override public void onLoadingStarted(String arg0, View arg1) { // Log.e("* started *", String.valueOf("complete")); } @Override public void onLoadingComplete(String arg0, View arg1, Bitmap arg2) { // Log.e("* complete *", String.valueOf("complete")); } @Override public void onLoadingCancelled(String arg0, View arg1) { } @Override public void onLoadingFailed(String arg0, View arg1, FailReason arg2) { // TODO Auto-generated method stub } }; try { viewholder = (ViewHolder) v.getTag(); viewholder.textView_main_row_title.setText(data_array.get(position).getNOMBRE()); viewholder.textView_main_row_direccion.setText(data_array.get(position).getDIRECCION()); String image = data_array.get(position).getURL(); // ------- image --------- try { if (image.length() > 4) imageLoader.displayImage(image, viewholder.imageView_restaurant_icon, options, mImageLoadingListenr); } catch (Exception ex) { } //textView_main_row_title.setText(name); //textView_main_row_address.setText(address); } catch (Exception e) { // TODO: handle exception } return v; } public class ViewHolder { public TextView textView_main_row_title; public TextView textView_main_row_direccion; //public TextView cargo; public ImageView imageView_restaurant_icon; } }

    Read the article

  • Implementation of java.lang.Random in PHP and C

    - by justinhj
    I'm looking for a random number generator that I can run in PHP, C and Java that will always return the same sequence of numbers for a given seed. Here's the Java implementation I would use: java.util.random source Whilst this would be fairly straightforward to port to C and PHP, there is potentially a lot of work to get all the edge cases correct and handle differences in number representation. I'd be extremely happy to just copy and paste a fully tested version should it exist.

    Read the article

  • java.lang.classcastExcption

    - by Tara Singh
    Hi, I have an array list of objects in my application. private static ArrayList<Player> userList=new ArrayList<Player>(); In my application, I am converting this list to byte array and then sending it to other clients. At client When I am trying to cast it back to the ArrayList, its giving me casting error. I am doing this in client side after receiving this list as byte array: ArrayList<Player> pl = (ArrayList<Player>) toObject(receivedByteArray); where toObject is my function to convert the byte array to object; Any Suggestions please !!! Thanks.

    Read the article

  • java.lang.NumberFormatException: unable to parse '' as integer one more time

    - by Quzziy
    I will take two numbers from user, but this number from EditText must be converted to int. I think it should be working, but I still have problem with compilation code in Android Studio. CatLog show error in line with: int wiek = Integer.parseInt(wiekEditText.getText().toString()); Below is my full Android code: public class MyActivity extends ActionBarActivity { int Wynik; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_my); int Tmax, RT; EditText wiekEditText = (EditText) findViewById(R.id.inWiek); EditText tspoczEditText = (EditText) findViewById(R.id.inTspocz); int wiek = Integer.parseInt(wiekEditText.getText().toString()); int tspocz = Integer.parseInt(tspoczEditText.getText().toString()); Tmax = 220 - wiek; RT = Tmax - tspocz; Wynik = 70*RT/100 + tspocz; final EditText tempWiekEdit = wiekEditText; TabHost tabHost = (TabHost) findViewById(R.id.tabHost); //Do TabHost'a z layoutu tabHost.setup(); TabHost.TabSpec tabSpec = tabHost.newTabSpec("Calc"); tabSpec.setContent(R.id.Calc); tabSpec.setIndicator("Calc"); tabHost.addTab(tabSpec); tabSpec = tabHost.newTabSpec("Hints"); tabSpec.setContent(R.id.Hints); tabSpec.setIndicator("Hints"); tabHost.addTab(tabSpec); final Button Btn = (Button) findViewById(R.id.Btn); Btn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Toast.makeText(getApplicationContext(),"blablabla"+ "Wynik",Toast.LENGTH_SHORT).show(); } }); wiekEditText.addTextChangedListener(new TextWatcher() { @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { } @Override public void onTextChanged(CharSequence s, int start, int before, int count) { Btn.setEnabled(!(tempWiekEdit.getText().toString().trim().isEmpty())); } @Override public void afterTextChanged(Editable s) { } }); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.my, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); } }

    Read the article

  • Java lang object

    - by Neeraj
    why java Object class has two methods hashcode() and equals()? One of them looks redundant and its percolated to the bottom most derived class?

    Read the article

  • JRE not working on firefox

    - by user1488595
    I am attempting to get JRE 7 run in firefox in ubuntu 12.04, 32 bit. I've tried to follow this article: www.liberiangeek.net/2012/04/install-oracle-java-runtime-jre-7-in-ubuntu-12-04-precise-pangolin/ . I've also tried this repository: www.webupd8.org/2012/06/how-to-install-oracle-java-7-in-debian.html As well as installing JDK, which contains JRE, by following this article: www.liberiangeek.net/2012/04/install-oracle-java-jdk-7-in-ubuntu-12-04-precise-pangolin/ With all above method of installation, I get the following error in firefox console when I run applet with firefox: java.io.IOException: Cannot run program "/usr/lib/jvm/jre1.7.0/bin/java": error=13, Permission denied at java.lang.ProcessBuilder.start(Unknown Source) at sun.plugin2.jvm.JVMLauncher.start(Unknown Source) at sun.plugin2.main.server.JVMInstance.startImpl(Unknown Source) at sun.plugin2.main.server.JVMInstance.start(Unknown Source) at sun.plugin2.main.server.JVMManager.getOrCreateBestJVMInstance(Unknown Source) at sun.plugin2.main.server.JVMManager.startAppletImpl(Unknown Source) at sun.plugin2.main.server.JVMManager.startApplet(Unknown Source) at sun.plugin2.main.server.JVMManager.startApplet(Unknown Source) at sun.plugin2.main.server.MozillaPlugin.maybeStartApplet(Unknown Source) at sun.plugin2.main.server.MozillaPlugin.setWindow(Unknown Source) Caused by: java.io.IOException: error=13, Permission denied at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.(Unknown Source) at java.lang.ProcessImpl.start(Unknown Source) ... 10 more java.io.IOException at sun.plugin2.main.server.JVMInstance.startImpl(Unknown Source) at sun.plugin2.main.server.JVMInstance.start(Unknown Source) at sun.plugin2.main.server.JVMManager.getOrCreateBestJVMInstance(Unknown Source) at sun.plugin2.main.server.JVMManager.startAppletImpl(Unknown Source) at sun.plugin2.main.server.JVMManager.startApplet(Unknown Source) at sun.plugin2.main.server.JVMManager.startApplet(Unknown Source) at sun.plugin2.main.server.MozillaPlugin.maybeStartApplet(Unknown Source) at sun.plugin2.main.server.MozillaPlugin.setWindow(Unknown Source) Caused by: java.io.IOException: Cannot run program "/usr/lib/jvm/jre1.7.0/bin/java": error=13, Permission denied at java.lang.ProcessBuilder.start(Unknown Source) at sun.plugin2.jvm.JVMLauncher.start(Unknown Source) ... 8 more Caused by: java.io.IOException: error=13, Permission denied at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.(Unknown Source) at java.lang.ProcessImpl.start(Unknown Source) ... 10 more Exception in thread "main" java.lang.RuntimeException: java.io.IOException at sun.plugin2.main.server.JVMManager.getOrCreateBestJVMInstance(Unknown Source) at sun.plugin2.main.server.JVMManager.startAppletImpl(Unknown Source) at sun.plugin2.main.server.JVMManager.startApplet(Unknown Source) at sun.plugin2.main.server.JVMManager.startApplet(Unknown Source) at sun.plugin2.main.server.MozillaPlugin.maybeStartApplet(Unknown Source) at sun.plugin2.main.server.MozillaPlugin.setWindow(Unknown Source) Caused by: java.io.IOException at sun.plugin2.main.server.JVMInstance.startImpl(Unknown Source) at sun.plugin2.main.server.JVMInstance.start(Unknown Source) ... 6 more Caused by: java.io.IOException: Cannot run program "/usr/lib/jvm/jre1.7.0/bin/java": error=13, Permission denied at java.lang.ProcessBuilder.start(Unknown Source) at sun.plugin2.jvm.JVMLauncher.start(Unknown Source) ... 8 more Caused by: java.io.IOException: error=13, Permission denied at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.(Unknown Source) at java.lang.ProcessImpl.start(Unknown Source) ... 10 more I've tried to type: sudo chmod 777 /usr/lib/jvm/jre1.7.0/bin/java It did not work. I also tried to run Eclipse, which requires JRE to run. It did not work originally(it works now), returning the following error: java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: no swt-gtk-3740 in java.library.path no swt-gtk in java.library.path Can't load library: /home/username/.swt/lib/linux/x86/libswt-gtk-3740.so Can't load library: /home/usename/.swt/lib/linux/x86/libswt-gtk.so at org.eclipse.swt.internal.Library.loadLibrary(Library.java:285) By running "ln -s /usr/lib/jni/libswt-* ~/.swt/lib/linux/x86/" (Thanks, stackoverflow.com/questions/10970754/cant-open-eclipse-in-ubuntu-12-04-java-lang-unsatisfiedlinkerror-could-not-l), Eclipse works again. I have been googling this for days, without luck. Any response would be appreciated.

    Read the article

  • Wrong number of args passed to: repl$repl

    - by grm
    Hi, I have a trouble with a compojure "Getting started" example that I do not seem to understand. When I run the example from http://weavejester.github.com/compojure/docs/getting-started.html ...I get the following error at the lein repl step: ~/hello-www> lein repl src/hello_www/core.clj Exception in thread "main" java.lang.IllegalArgumentException: Wrong number of args passed to: repl$repl (NO_SOURCE_FILE:0) at clojure.lang.Compiler.eval(Compiler.java:5359) at clojure.lang.Compiler.eval(Compiler.java:5311) at clojure.core$eval__4350.invoke(core.clj:2364) at clojure.main$eval_opt__6502.invoke(main.clj:228) at clojure.main$initialize__6506.invoke(main.clj:247) at clojure.main$script_opt__6526.invoke(main.clj:263) at clojure.main$main__6544.doInvoke(main.clj:347) at clojure.lang.RestFn.invoke(RestFn.java:483) at clojure.lang.Var.invoke(Var.java:381) at clojure.lang.AFn.applyToHelper(AFn.java:180) at clojure.lang.Var.applyTo(Var.java:482) at clojure.main.main(main.java:37) Caused by: java.lang.IllegalArgumentException: Wrong number of args passed to: repl$repl at clojure.lang.AFn.throwArity(AFn.java:439) at clojure.lang.AFn.invoke(AFn.java:43) at clojure.lang.Var.invoke(Var.java:369) at clojure.lang.AFn.applyToHelper(AFn.java:165) at clojure.lang.Var.applyTo(Var.java:482) at clojure.core$apply__3776.invoke(core.clj:535) at leiningen.core$_main__59$fn__61.invoke(core.clj:94) at leiningen.core$_main__59.doInvoke(core.clj:91) at clojure.lang.RestFn.applyTo(RestFn.java:138) at clojure.core$apply__3776.invoke(core.clj:535) at leiningen.core$_main__59.invoke(core.clj:97) at user$eval__67.invoke(NO_SOURCE_FILE:1) at clojure.lang.Compiler.eval(Compiler.java:5343) ... 11 more I have tried both the stable and the developer version of lein without any success. Any ideas on what I could look for next? I get the same result both on linux and cygwin. When I run it manually, it seems to work fine on linux: java -cp "lib/*" clojure.main src/hello_www/core.clj 2010-05-17 19:34:17.280::INFO: Logging to STDERR via org.mortbay.log.StdErrLog 2010-05-17 19:34:17.281::INFO: jetty-6.1.14 2010-05-17 19:34:17.382::INFO: Started [email protected]:8080

    Read the article

  • Why would Java classloading fail on Linux, but succeed on Windows?

    - by arnsholt
    I've got a Java web application (using Spring), deployed with Jetty. If I try to run it on a Windows machine everything works as expected, but if I try to run the same code on my Linux machine, it fails like this: [normal startup output] 11:16:39.657 INFO [main] org.mortbay.jetty.servlet.ServletHandler$Context.log(ServletHandler.java:1145) 16 Set web app root system property: 'webapp.root' = [/path/to/working/dir] java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.mortbay.start.Main.invokeMain(Main.java:151) at org.mortbay.start.Main.start(Main.java:476) at org.mortbay.start.Main.main(Main.java:94) Caused by: java.lang.ExceptionInInitializerError at org.springframework.web.util.Log4jWebConfigurer.initLogging(Log4jWebConfigurer.java:129) at org.springframework.web.util.Log4jConfigListener.contextInitialized(Log4jConfigListener.java:51) at org.mortbay.jetty.servlet.WebApplicationContext.doStart(WebApplicationContext.java:495) at org.mortbay.util.Container.start(Container.java:72) at org.mortbay.http.HttpServer.doStart(HttpServer.java:708) at org.mortbay.util.Container.start(Container.java:72) at org.mortbay.jetty.Server.main(Server.java:460) ... 7 more Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@15311bd for org.apache.commons.logging.impl.Log4JLogger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Category) (Caused by org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@15311bd for org.apache.commons.logging.impl.Log4JLogger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Category)) at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351) at org.springframework.util.SystemPropertyUtils.(SystemPropertyUtils.java:42) ... 14 more Caused by: org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@15311bd for org.apache.commons.logging.impl.Log4JLogger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Category) at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:413) at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529) ... 18 more Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Category at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) at java.lang.Class.getConstructor0(Class.java:2699) at java.lang.Class.getConstructor(Class.java:1657) at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:410) ... 19 more Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Category 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 java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) ... 24 more [shutdown output] I've run the app with java -verbose:class, and according to that output, org.apache.log4j.Category is loaded from the log4j JAR in my /WEB-INF/lib, just before the first exception is thrown. Now, the Java versions on the two machines are slightly different. Both the machines have Sun's java, the Linux machine has 1.6.0_10, while the Windows machine has 1.6.0_08, or maybe 07 or 06, I can't remember the exact number right now, and don't have the machine at hand. But even though the minor versions of the Javas are slightly different, the code shouldn't break like this. Does anyone understand what's wrong here?

    Read the article

  • I need a regular expression to substitute pseudo html in .NET

    - by netadictos
    I have texts like this one: this is a text in [lang lang="en" ]english[/lang] or a text in [lang lang="en" ]spanish[/lang] I need to substitute them for: this is a text in <span lang="en">english </span> or a text in <span lang="es">spanish</span> I need a regular expression, not a simple replace. The languages in the lang tag can be whatever.

    Read the article

  • soa_infra is not coming up due to Failed to invoke startup class "JRF Startup Class", java.lang.ClassNotFoundException

    - by Anirudh Pucha
    Problem: soa_infra is not coming up and below is the error observed: BEA-000286 Failed to invoke startup class "JRF Startup Class", java.lang.ClassNotFoundException: oracle.jrf.wls.JRFStartup java.lang.ClassNotFoundException: oracle.jrf.wls.JRFStartup at java.net.URLClassLoader$1.run(URLClassLoader.java:202) Solution: 1. Open BEA_HOME\wlserver_10.3\common\nodemanager\nodemanager.properties on the managed server machine. 2. Set StartScriptEnabled=true. 3. Restart the node manager. 4. Stop the managed server. 5. Start the managed server from Admin console. StartScriptEnabled=true makes sure that the node manager uses the startManagedWebLogic.cmd file from managed server bin directory. 6. Try starting the soa_infra application again.

    Read the article

  • Simplifier le code de vos beans Java à l'aide de Commons Lang, Guava et Lombok, par Thierry Leriche-Dessirier

    Bonjour à tous, Je vous propose un article intitulé "Simplifier le code de vos beans Java à l'aide de Commons Lang, Guava et Lombok". Synopsis : Un bean classique, représentant un chien par exemple, peut vite peser des centaines de lignes quand on l'équipe avec les méthodes classiques et indispensables (constructeurs, getters, setters, equals, hashCode, toString, compareTo), même s'il possède peu d'attributs. Dans cet article, nous verrons comment mettre un tel cabot au régime et lui faire une beauté à l'aide de Commons Lang, Guava et Lombok. Nous en profiterons pour comparer ces bibliothèques entre elles et avec le code Java habituel, sans oublier celui qu'Eclipse génère. L'article est disponible ici :

    Read the article

  • Standard Oracle Fusion Middleware Installation fails on SOA ManagedServer start due to classpath pro

    - by Neuquino
    Hi, Trying to install Oracle Fusion Middleware 11gR2 on windows (same thing happens on Linux). I have followed the guidelines provided in the http://download.oracle.com/docs/cd/E12839_01/install.1111/e14318/toc.htm Installing the weblogic (11g) Oracle 11g databse installation Running the RCU utility to create schema Installed and copied relevant files for Java Bridge Configure the Fusion Middleware But i found that the SOA server is not getting up in the enterprise manager its showing as down. When i checked the logs iam getting the following error: oracle.jrf.wls.JRFStartup java.lang.ClassNotFoundException: oracle.jrf.wls.JRFStartup at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at weblogic.management.deploy.classdeployment.ClassDeploymentManager.invokeClass(ClassDeploymentManager.java:253) at weblogic.management.deploy.classdeployment.ClassDeploymentManager.access$000(ClassDeploymentManager.java:54) at weblogic.management.deploy.classdeployment.ClassDeploymentManager$1.run(ClassDeploymentManager.java:205) Truncated. see log file for complete stacktrace <Jul 7, 2009 4:18:48 PM CEST> <Critical> <WebLogicServer> <BEA-000286> <Failed to invoke startup class "SOAStartupClass", java.lang.ClassNotFoundException: oracle.bpel.services.common.util.GenerateBPMCryptoKey java.lang.ClassNotFoundException: oracle.bpel.services.common.util.GenerateBPMCryptoKey at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at weblogic.management.deploy.classdeployment.ClassDeploymentManager.invokeClass(ClassDeploymentManager.java:253) at weblogic.management.deploy.classdeployment.ClassDeploymentManager.access$000(ClassDeploymentManager.java:54) at weblogic.management.deploy.classdeployment.ClassDeploymentManager$1.run(ClassDeploymentManager.java:205) Truncated. see log file for complete stacktrace <Jul 7, 2009 4:19:27 PM CEST> <Error> <Deployer> <BEA-149205> <Failed to initialize the application 'SocketAdapter' due to error weblogic.application.ModuleException: The ra.xml <connectionfactory-impl-class> class 'oracle.tip.adapter.socket.SocketConnectionFactory' could not be loaded from the resource adapter archive/application because of the following error: java.lang.NoClassDefFoundError: oracle/tip/adapter/api/OracleConnectionFactory.weblogic.application.ModuleException: The ra.xml <connectionfactory-impl-class> class 'oracle.tip.adapter.socket.SocketConnectionFactory' could not be loaded from the resource adapter archive/application because of the following error: java.lang.NoClassDefFoundError: oracle/tip/adapter/api/OracleConnectionFactory at weblogic.connector.deploy.ConnectorModule.prepare(ConnectorModule.java:228) at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93) at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:387) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:58) Truncated. see log file for complete stacktrace <Jul 7, 2009 4:19:27 PM CEST> <Error> <Deployer> <BEA-149205> <Failed to initialize the application 'MQSeriesAdapter' due to error weblogic.application.ModuleException: The ra.xml <connectionfactory-impl-class> class 'oracle.tip.adapter.mq.ConnectionFactoryImpl' could not be loaded from the resource adapter archive/application because of the following error: java.lang.NoClassDefFoundError: oracle/tip/adapter/api/OracleConnectionFactory.weblogic.application.ModuleException: The ra.xml <connectionfactory-impl-class> class 'oracle.tip.adapter.mq.ConnectionFactoryImpl' could not be loaded from the resource adapter archive/application because of the following error: java.lang.NoClassDefFoundError: oracle/tip/adapter/api/OracleConnectionFactory at weblogic.connector.deploy.ConnectorModule.prepare(ConnectorModule.java:228) at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93) at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:387) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:58) Truncated. see log file for complete stacktrace <Jul 7, 2009 4:19:27 PM CEST> <Error> <Deployer> <BEA-149205> <Failed to initialize the application 'OracleAppsAdapter' due to error weblogic.application.ModuleException: java.lang.NoClassDefFoundError: oracle/tip/adapter/api/exception/PCResourceException.weblogic.application.ModuleException: java.lang.NoClassDefFoundError: oracle/tip/adapter/api/exception/PCResourceException at weblogic.connector.deploy.ConnectorModule.prepare(ConnectorModule.java:238) at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93) at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:387) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:58) Truncated. see log file for complete stacktrace java.lang.NoClassDefFoundError: oracle/tip/adapter/api/exception/PCResourceException at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) at java.lang.Class.privateGetPublicMethods(Class.java:2547) at java.lang.Class.getMethods(Class.java:1410) at weblogic.connector.external.impl.RAComplianceChecker.checkOverrides(RAComplianceChecker.java:972) Truncated. see log file for complete stacktrace Can any one please tell me if i have missed any steps? thanks and regards, Naveen

    Read the article

  • Standard Oracle Fusion Middleware Installation fails on SOA ManagedServer start

    - by Neuquino
    Hi, Trying to install Oracle Fusion Middleware 11gR2 on windows (same thing happens on Linux). I have followed the guidelines provided in the http://download.oracle.com/docs/cd/E12839_01/install.1111/e14318/toc.htm Installing the weblogic (11g) Oracle 11g databse installation Running the RCU utility to create schema Installed and copied relevant files for Java Bridge Configure the Fusion Middleware But i found that the SOA server is not getting up in the enterprise manager its showing as down. When i checked the logs iam getting the following error: oracle.jrf.wls.JRFStartup java.lang.ClassNotFoundException: oracle.jrf.wls.JRFStartup at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at weblogic.management.deploy.classdeployment.ClassDeploymentManager.invokeClass(ClassDeploymentManager.java:253) at weblogic.management.deploy.classdeployment.ClassDeploymentManager.access$000(ClassDeploymentManager.java:54) at weblogic.management.deploy.classdeployment.ClassDeploymentManager$1.run(ClassDeploymentManager.java:205) Truncated. see log file for complete stacktrace <Jul 7, 2009 4:18:48 PM CEST> <Critical> <WebLogicServer> <BEA-000286> <Failed to invoke startup class "SOAStartupClass", java.lang.ClassNotFoundException: oracle.bpel.services.common.util.GenerateBPMCryptoKey java.lang.ClassNotFoundException: oracle.bpel.services.common.util.GenerateBPMCryptoKey at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at weblogic.management.deploy.classdeployment.ClassDeploymentManager.invokeClass(ClassDeploymentManager.java:253) at weblogic.management.deploy.classdeployment.ClassDeploymentManager.access$000(ClassDeploymentManager.java:54) at weblogic.management.deploy.classdeployment.ClassDeploymentManager$1.run(ClassDeploymentManager.java:205) Truncated. see log file for complete stacktrace <Jul 7, 2009 4:19:27 PM CEST> <Error> <Deployer> <BEA-149205> <Failed to initialize the application 'SocketAdapter' due to error weblogic.application.ModuleException: The ra.xml <connectionfactory-impl-class> class 'oracle.tip.adapter.socket.SocketConnectionFactory' could not be loaded from the resource adapter archive/application because of the following error: java.lang.NoClassDefFoundError: oracle/tip/adapter/api/OracleConnectionFactory.weblogic.application.ModuleException: The ra.xml <connectionfactory-impl-class> class 'oracle.tip.adapter.socket.SocketConnectionFactory' could not be loaded from the resource adapter archive/application because of the following error: java.lang.NoClassDefFoundError: oracle/tip/adapter/api/OracleConnectionFactory at weblogic.connector.deploy.ConnectorModule.prepare(ConnectorModule.java:228) at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93) at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:387) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:58) Truncated. see log file for complete stacktrace <Jul 7, 2009 4:19:27 PM CEST> <Error> <Deployer> <BEA-149205> <Failed to initialize the application 'MQSeriesAdapter' due to error weblogic.application.ModuleException: The ra.xml <connectionfactory-impl-class> class 'oracle.tip.adapter.mq.ConnectionFactoryImpl' could not be loaded from the resource adapter archive/application because of the following error: java.lang.NoClassDefFoundError: oracle/tip/adapter/api/OracleConnectionFactory.weblogic.application.ModuleException: The ra.xml <connectionfactory-impl-class> class 'oracle.tip.adapter.mq.ConnectionFactoryImpl' could not be loaded from the resource adapter archive/application because of the following error: java.lang.NoClassDefFoundError: oracle/tip/adapter/api/OracleConnectionFactory at weblogic.connector.deploy.ConnectorModule.prepare(ConnectorModule.java:228) at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93) at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:387) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:58) Truncated. see log file for complete stacktrace <Jul 7, 2009 4:19:27 PM CEST> <Error> <Deployer> <BEA-149205> <Failed to initialize the application 'OracleAppsAdapter' due to error weblogic.application.ModuleException: java.lang.NoClassDefFoundError: oracle/tip/adapter/api/exception/PCResourceException.weblogic.application.ModuleException: java.lang.NoClassDefFoundError: oracle/tip/adapter/api/exception/PCResourceException at weblogic.connector.deploy.ConnectorModule.prepare(ConnectorModule.java:238) at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93) at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:387) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:58) Truncated. see log file for complete stacktrace java.lang.NoClassDefFoundError: oracle/tip/adapter/api/exception/PCResourceException at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) at java.lang.Class.privateGetPublicMethods(Class.java:2547) at java.lang.Class.getMethods(Class.java:1410) at weblogic.connector.external.impl.RAComplianceChecker.checkOverrides(RAComplianceChecker.java:972) Truncated. see log file for complete stacktrace Can any one please tell me if i have missed any steps? thanks and regards, Naveen

    Read the article

  • Can't update scala on Gentoo

    - by xhochy
    As I wanted to test Scala 2.9.2 on my gentoo system I tried updated the package but ended up with this error. I can't figure out where the problem may be: Calculating dependencies ...... done! >>> Verifying ebuild manifests >>> Jobs: 0 of 1 complete, 1 running Load avg: 0.23, 0.16, 0.20 >>> Emerging (1 of 1) dev-lang/scala-2.9.2 >>> Jobs: 0 of 1 complete, 1 running Load avg: 0.23, 0.16, 0.20 >>> Failed to emerge dev-lang/scala-2.9.2, Log file: >>> Jobs: 0 of 1 complete, 1 running Load avg: 0.23, 0.16, 0.20 >>> '/var/tmp/portage/dev-lang/scala-2.9.2/temp/build.log' >>> Jobs: 0 of 1 complete, 1 running Load avg: 0.23, 0.16, 0.20 >>> Jobs: 0 of 1 complete, 1 running, 1 failed Load avg: 0.23, 0.16, 0.20 >>> Jobs: 0 of 1 complete, 1 failed Load avg: 0.23, 0.16, 0.20 * Package: dev-lang/scala-2.9.2 * Repository: gentoo * Maintainer: [email protected] * USE: amd64 elibc_glibc kernel_linux multilib userland_GNU * FEATURES: sandbox [01m[31;06m!!! ERROR: Couldn't find suitable VM. Possible invalid dependency string. Due to jdk-with-com-sun requiring a target of 1.7 but the virtual machines constrained by virtual/jdk-1.6 and/or this package requiring virtual(s) jdk-with-com-sun[0m * Unable to determine VM for building from dependencies: NV_DEPEND: virtual/jdk:1.6 java-virtuals/jdk-with-com-sun !binary? ( dev-java/ant-contrib:0 ) app-arch/xz-utils >=dev-java/java-config-2.1.9-r1 source? ( app-arch/zip ) >=dev-java/ant-core-1.7.0 dev-java/ant-nodeps >=dev-java/javatoolkit-0.3.0-r2 >=dev-lang/python-2.4 * ERROR: dev-lang/scala-2.9.2 failed (setup phase): * Failed to determine VM for building. * * Call stack: * ebuild.sh, line 93: Called pkg_setup * scala-2.9.2.ebuild, line 43: Called java-pkg-2_pkg_setup * java-pkg-2.eclass, line 53: Called java-pkg_init * java-utils-2.eclass, line 2187: Called java-pkg_switch-vm * java-utils-2.eclass, line 2674: Called die * The specific snippet of code: * die "Failed to determine VM for building." * * If you need support, post the output of `emerge --info '=dev-lang/scala-2.9.2'`, * the complete build log and the output of `emerge -pqv '=dev-lang/scala-2.9.2'`. !!! When you file a bug report, please include the following information: GENTOO_VM= CLASSPATH="" JAVA_HOME="" JAVACFLAGS="" COMPILER="" and of course, the output of emerge --info * The complete build log is located at '/var/tmp/portage/dev-lang/scala-2.9.2/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-lang/scala-2.9.2/temp/die.env'. * Working directory: '/var/tmp/portage/dev-lang/scala-2.9.2' * S: '/var/tmp/portage/dev-lang/scala-2.9.2/work/scala-2.9.2-sources' * Messages for package dev-lang/scala-2.9.2: * Unable to determine VM for building from dependencies: * ERROR: dev-lang/scala-2.9.2 failed (setup phase): * Failed to determine VM for building. * * Call stack: * ebuild.sh, line 93: Called pkg_setup * scala-2.9.2.ebuild, line 43: Called java-pkg-2_pkg_setup * java-pkg-2.eclass, line 53: Called java-pkg_init * java-utils-2.eclass, line 2187: Called java-pkg_switch-vm * java-utils-2.eclass, line 2674: Called die * The specific snippet of code: * die "Failed to determine VM for building." * * If you need support, post the output of `emerge --info '=dev-lang/scala-2.9.2'`, * the complete build log and the output of `emerge -pqv '=dev-lang/scala-2.9.2'`. * The complete build log is located at '/var/tmp/portage/dev-lang/scala-2.9.2/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-lang/scala-2.9.2/temp/die.env'. * Working directory: '/var/tmp/portage/dev-lang/scala-2.9.2' * S: '/var/tmp/portage/dev-lang/scala-2.9.2/work/scala-2.9.2-sources' The following eix output may help: % eix java-virtuals/jdk-with-com-sun [I] java-virtuals/jdk-with-com-sun Available versions: 20111111 {{ELIBC="FreeBSD"}} Installed versions: 20111111(16:08:51 18/04/12)(ELIBC="-FreeBSD") Homepage: http://www.gentoo.org Description: Virtual ebuilds that require internal com.sun classes from a JDK Both virtual jdks 1.6 and 1.7 are installed: % eix virtual/jdk [I] virtual/jdk Available versions: (1.4) ~1.4.2-r1[1] (1.5) 1.5.0 ~1.5.0-r3[1] (1.6) 1.6.0 1.6.0-r1 (1.7) (~)1.7.0 Installed versions: 1.6.0-r1(1.6)(23:22:48 10/11/12) 1.7.0(1.7)(23:21:09 10/11/12) Description: Virtual for JDK [1] "java-overlay" /var/lib/layman/java-overlay

    Read the article

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