Search Results

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

Page 25/193 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • No output from exception

    - by Grasper
    Why does this code not print an exception stack trace? import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; public class Playground { /** * @param args */ public static void main(String[] args) { startThread(); } private static void startThread() { ScheduledExecutorService timer = Executors .newSingleThreadScheduledExecutor(); Runnable r = new Runnable() { int dummyInt = 0; boolean dummyBoolean = false; @Override public void run() { dummyInt = Integer.parseInt("AAAA"); if (dummyBoolean) { dummyBoolean= false; } else { dummyBoolean= true; } } }; timer.scheduleAtFixedRate(r, 0, 100, TimeUnit.MILLISECONDS); } } How can I get it to? I would expect to see this: java.lang.NumberFormatException: For input string: "AAAA" at java.lang.NumberFormatException.forInputString(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at Playground$1.run(Playground.java:25) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown Source) at java.util.concurrent.FutureTask.runAndReset(Unknown Source) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Unknown Source) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Unknown Source) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)

    Read the article

  • NoSuchMethodError: com/sun/istack/logging/Logger.getLogger

    - by pandi-sus
    I developed a webservice and deployed it to websphere 7.0 and developed a dynamic dispatch client using JAX-WS APIs which also runs on same application server. I get error at the following line: Dispatch dispatch = service.createDispatch(portName, SOAPMessage.class, Service.Mode.MESSAGE); Error: Caused by: java.lang.NoSuchMethodError: com/sun/istack/logging/Logger.getLogger(Ljava/lang/Class;)Lcom/sun/istack/logging/Logger; at com.sun.xml.ws.api.config.management.policy.ManagementAssertion.(ManagementAssertion.java:87) at java.lang.J9VMInternals.initializeImpl(Native Method) at java.lang.J9VMInternals.initialize(J9VMInternals.java:200) at java.lang.J9VMInternals.initialize(J9VMInternals.java:167) at com.sun.xml.ws.server.MonitorBase.createManagedObjectManager(MonitorBase.java:177) at com.sun.xml.ws.client.Stub.(Stub.java:196) at com.sun.xml.ws.client.Stub.(Stub.java:174) at com.sun.xml.ws.client.dispatch.DispatchImpl.(DispatchImpl.java:129) at com.sun.xml.ws.client.dispatch.SOAPMessageDispatch.(SOAPMessageDispatch.java:77) at com.sun.xml.ws.api.pipe.Stubs.createSAAJDispatch(Stubs.java:143) at com.sun.xml.ws.api.pipe.Stubs.createDispatch(Stubs.java:264) at com.sun.xml.ws.client.WSServiceDelegate.createDispatch(WSServiceDelegate.java:390) at com.sun.xml.ws.client.WSServiceDelegate.createDispatch(WSServiceDelegate.java:401) at com.sun.xml.ws.client.WSServiceDelegate.createDispatch(WSServiceDelegate.java:383) at javax.xml.ws.Service.createDispatch(Service.java:336) I included the following dependency. javax.xml.ws jaxws-api 2.1 I also tried adding policy dependency (versions - 2.2 and 2.2.1) com.sun.xml.ws policy 2.2.1 Any ideas on what more dependencies I need to add?

    Read the article

  • Twitter4J throws exception in TwitterFactory

    - by Philipp Andre
    Hello Guys, i'm trying to access twitter via oauth. Therefore, i registered my app, downloaded Twitter4j, added the jars in my Eclipse-Project, and then tried to execute the following code: Twitter twitter = new TwitterFactory().getOAuthAuthorizedInstance("[key]","[secretKey]); RequestToken requestToken = twitter.getOAuthRequestToken(); System.out.println(requestToken.getAuthorizationURL()); But it raises the following exception: [Sat May 29 11:19:11 CEST 2010]Using class twitter4j.internal.logging.StdOutLoggerFactory as logging factory. [Sat May 29 11:19:11 CEST 2010]Use twitter4j.internal.http.alternative.HttpClientImpl as HttpClient implementation. Exception in thread "main" java.lang.AssertionError: java.lang.reflect.InvocationTargetException at twitter4j.internal.http.HttpClientFactory.getInstance(HttpClientFactory.java:71) at twitter4j.internal.http.HttpClientWrapper.<init>(HttpClientWrapper.java:59) at twitter4j.http.OAuthAuthorization.init(OAuthAuthorization.java:83) at twitter4j.http.OAuthAuthorization.<init>(OAuthAuthorization.java:74) at twitter4j.TwitterFactory.getOAuthAuthorizedInstance(TwitterFactory.java:112) at MainProgram.main(MainProgram.java:18) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at twitter4j.internal.http.HttpClientFactory.getInstance(HttpClientFactory.java:65) ... 5 more Caused by: java.lang.NoClassDefFoundError: org/apache/http/impl/client/DefaultHttpClient at twitter4j.internal.http.alternative.HttpClientImpl.<init>(HttpClientImpl.java:63) ... 10 more I currently can't figure out why ... can you please give me some suggestions? Best regards Philipp

    Read the article

  • Strange exception of Httpcore nio in java

    - by bruce dou
    Exception in thread "Thread-0" java.lang.NullPointerException at org.apache.http.impl.nio.reactor.AbstractIOReactor.closeActiveChannels(AbstractIOReactor.java:532) at org.apache.http.impl.nio.reactor.AbstractIOReactor.hardShutdown(AbstractIOReactor.java:564) at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.doShutdown(AbstractMultiworkerIOReactor.java:411) at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:340) at com.***.clawer.Clawer$1.run(Clawer.java:81) at java.lang.Thread.run(Unknown Source) Exception in thread "Thread-1" java.lang.IllegalStateException: I/O reactor has been shut down at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.connect(DefaultConnectingIOReactor.java:190) at com.***.clawer.Run.run(Run.java:29)

    Read the article

  • LinkageError thrown when attempting to pass instance of class between 2 eclipse plugins

    - by Ed
    I have found many people with simliar issues but no soultions...basically I have two eclipse plug-ins that both in ther class path rely on the same jar. The UI plug-in replies on the Driver plug-in (implementing a custom ODA driver and UI for it). Both rely on a jar containing some other classes of mine and is called plugin-dto.jar When the UI plug-in calls a method on one of the classes in the Driver plug-in that returns an object whose class is found in the plugin-dto jar I get the error: java.lang.LinkageError: Class com/test/reporting/NrDsDriverProvider violates loader constraints at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:183) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:576) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:546) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:477) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:465) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:445) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:211) at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:381) at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:457) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:398) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) Any ideas how I get around this issue? Thanks in advance.

    Read the article

  • More issues with IntelliJ 9.0.1 "Hello World" in Scala - Predef version 5.0 vs 4.1

    - by Alex R
    Any ideas what could cause this? Scala signature Predef has wrong version Expected 5.0 found: 4.1 in .... scala-library.jar I tried both versions 2.7.6 and 2.8 RC1 of scala-*.jar, the result was the same. JDK is 1.6.u20. UPDATE Today uninstalled IntelliJ 9.0.1, and installed 9.0.2 Early Availability, with the 4/14 stable version of the Scala plug-in. Then I setup a project from scratch through the wizards: new project from scratch JDK is 1.6.u20 accept the default (project) instead of global / module accept the download of Scala 2.8.0beta1 into project's lib folder Created a new class: object hello { def main(args: Array[String]) { println("hello: " + args); } } For my efforts, I now have a brand-new error :) Here it is: Scalac internal error: class java.lang.ClassNotFoundException [java.net.URLClassLoader$1.run(URLClassLoader.java:202), java.security.AccessController.doPrivileged(Native Method), java.net.URLClassLoader.findClass(URLClassLoader.java:190), java.lang.ClassLoader.loadClass(ClassLoader.java:307), sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301), java.lang.ClassLoader.loadClass(ClassLoader.java:248), java.lang.Class.forName0(Native Method), java.lang.Class.forName(Class.java:169), org.jetbrains.plugins.scala.compiler.rt.ScalacRunner.main(ScalacRunner.java:72)] Thanks

    Read the article

  • Detecting cause of RuntimeException: Unable to stop activity

    - by Pentium10
    I have a really weird error, and I don't know what is causing this. It happens when I leave the Activity. 05-16 12:26:20.360: ERROR/AndroidRuntime(11648): Uncaught handler: thread main exiting due to uncaught exception 05-16 12:26:20.400: ERROR/AndroidRuntime(11648): java.lang.RuntimeException: Unable to stop activity {com.myapk/com.myapk.modules.viewPairing}: java.lang.NullPointerException 05-16 12:26:20.400: ERROR/AndroidRuntime(11648): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3596) 05-16 12:26:20.400: ERROR/AndroidRuntime(11648): at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3674) 05-16 12:26:20.400: ERROR/AndroidRuntime(11648): at android.app.ActivityThread.access$2800(ActivityThread.java:126) 05-16 12:26:20.400: ERROR/AndroidRuntime(11648): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1965) 05-16 12:26:20.400: ERROR/AndroidRuntime(11648): at android.os.Handler.dispatchMessage(Handler.java:99) 05-16 12:26:20.400: ERROR/AndroidRuntime(11648): at android.os.Looper.loop(Looper.java:123) 05-16 12:26:20.400: ERROR/AndroidRuntime(11648): at android.app.ActivityThread.main(ActivityThread.java:4595) 05-16 12:26:20.400: ERROR/AndroidRuntime(11648): at java.lang.reflect.Method.invokeNative(Native Method) 05-16 12:26:20.400: ERROR/AndroidRuntime(11648): at java.lang.reflect.Method.invoke(Method.java:521) 05-16 12:26:20.400: ERROR/AndroidRuntime(11648): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860) 05-16 12:26:20.400: ERROR/AndroidRuntime(11648): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 05-16 12:26:20.400: ERROR/AndroidRuntime(11648): at dalvik.system.NativeStart.main(Native Method) 05-16 12:26:20.400: ERROR/AndroidRuntime(11648): Caused by: java.lang.NullPointerException 05-16 12:26:20.400: ERROR/AndroidRuntime(11648): at android.app.Activity.performStop(Activity.java:3848) 05-16 12:26:20.400: ERROR/AndroidRuntime(11648): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3591) 05-16 12:26:20.400: ERROR/AndroidRuntime(11648): ... 11 more

    Read the article

  • jQuery.each for lists and non-lists

    - by Brian M. Hunt
    I've a jQuery.each(data, foo), where data is either a string or a list of strings. I'd like to know if there's an existing utility function to convert the string to a list, or otherwise perform foo on just the string. So instead of the easy route: if (!$.isArray(data)) { foo(0, data); // can't rely on `this` variable } else { $.each(data,foo); } I was just wondering if there was already a builtin function of jQuery or Javascript that would convert data to a list automatically, like this: function convert_to_list(data) { return $.isArray(data) ? data : [data]; } $.each(convert_to_list(data), foo); Just curious! Thanks for reading. Brian

    Read the article

  • My android app crash before load main.xml

    - by Saverio Puccia
    my android app crash before load main.xml. This is the exception thrown java.lang.RuntimeException: Unable to resume activity...: java.lang.NullPointerException What happens? For completeness I enclose my manifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="saverio.puccia.nfcauth" android:versionCode="1" android:versionName="1.0" > //permission <uses-sdk android:minSdkVersion="10" /> <uses-permission android:name="android.permission.NFC"></uses-permission> <uses-permission android:name="android.permission.READ_PHONE_STATE"></uses-permission> //main declaration <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" > <activity android:name=".NFCAuthActivity" android:label="@string/app_name" > //intent filter declaration <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.NDEF_DISCOVER" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity> </application> </manifest> LOGCAT 06-25 11:03:23.670: E/AndroidRuntime(4323): FATAL EXCEPTION: main 06-25 11:03:23.670: E/AndroidRuntime(4323): java.lang.RuntimeException: Unable to resume activity {saverio.puccia.nfcauth/saverio.puccia.nfcauth.NFCAuthActivity}: java.lang.NullPointerException 06-25 11:03:23.670: E/AndroidRuntime(4323): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2456) 06-25 11:03:23.670: E/AndroidRuntime(4323): at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2484) 06-25 11:03:23.670: E/AndroidRuntime(4323): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1998) 06-25 11:03:23.670: E/AndroidRuntime(4323): at android.app.ActivityThread.access$600(ActivityThread.java:127) 06-25 11:03:23.670: E/AndroidRuntime(4323): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1159) 06-25 11:03:23.670: E/AndroidRuntime(4323): at android.os.Handler.dispatchMessage(Handler.java:99) 06-25 11:03:23.670: E/AndroidRuntime(4323): at android.os.Looper.loop(Looper.java:137) 06-25 11:03:23.670: E/AndroidRuntime(4323): at android.app.ActivityThread.main(ActivityThread.java:4507) 06-25 11:03:23.670: E/AndroidRuntime(4323): at java.lang.reflect.Method.invokeNative(Native Method) 06-25 11:03:23.670: E/AndroidRuntime(4323): at java.lang.reflect.Method.invoke(Method.java:511) 06-25 11:03:23.670: E/AndroidRuntime(4323): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790) 06-25 11:03:23.670: E/AndroidRuntime(4323): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557) 06-25 11:03:23.670: E/AndroidRuntime(4323): at dalvik.system.NativeStart.main(Native Method) 06-25 11:03:23.670: E/AndroidRuntime(4323): Caused by: java.lang.NullPointerException 06-25 11:03:23.670: E/AndroidRuntime(4323): at saverio.puccia.nfcauth.NFCAuthActivity.onResume(NFCAuthActivity.java:103) 06-25 11:03:23.670: E/AndroidRuntime(4323): at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1157) 06-25 11:03:23.670: E/AndroidRuntime(4323): at android.app.Activity.performResume(Activity.java:4539) 06-25 11:03:23.670: E/AndroidRuntime(4323): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2446) 06-25 11:03:23.670: E/AndroidRuntime(4323): ... 12 more 06-25 11:03:23.670: W/ActivityManager(1998): Force finishing activity r.intent.getComponent().flattenToShortString()

    Read the article

  • NullPointerException when trying to connect to web service using kSoap method Android

    - by benjamin schultz
    My web service should be returning an integer, but every time i run the code i get the NullPointerException error. Any ideas or help would be very appreciated Here's my code: public class CGCountTest extends Activity { TextView testTV; private static final String NAMESPACE = "http://passport-america.com/webservices/"; private static final String URL = "http://localhost:11746/Service1.asmx"; private static final String SOAP_ACTION = "http://www.passport-america.com/webservices/getCGCount"; private static final String METHOD_NAME = "getCGCount"; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.soap_test); SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.dotNet = true; envelope.setOutputSoapObject(request); HttpTransportSE androidHttpTransport = new HttpTransportSE(URL); try { androidHttpTransport.call(SOAP_ACTION, envelope); java.lang.Integer result = (Integer)envelope.getResponse(); TextView testTV = (TextView)findViewById(R.id.testTV); result.toString(); testTV.setText(result); } catch(Exception e) { testTV.setText(e.getMessage()); } } here's the logcat 06-02 15:13:36.557: WARN/dalvikvm(326): threadid=3: thread exiting with uncaught exception (group=0x4001aa28) 06-02 15:13:36.557: ERROR/AndroidRuntime(326): Uncaught handler: thread main exiting due to uncaught exception 06-02 15:13:36.876: ERROR/AndroidRuntime(326): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.pa.passammain/com.pa.passammain.CGCountTest}: java.lang.NullPointerException 06-02 15:13:36.876: ERROR/AndroidRuntime(326): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2401) 06-02 15:13:36.876: ERROR/AndroidRuntime(326): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417) 06-02 15:13:36.876: ERROR/AndroidRuntime(326): at android.app.ActivityThread.access$2100(ActivityThread.java:116) 06-02 15:13:36.876: ERROR/AndroidRuntime(326): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794) 06-02 15:13:36.876: ERROR/AndroidRuntime(326): at android.os.Handler.dispatchMessage(Handler.java:99) 06-02 15:13:36.876: ERROR/AndroidRuntime(326): at android.os.Looper.loop(Looper.java:123) 06-02 15:13:36.876: ERROR/AndroidRuntime(326): at android.app.ActivityThread.main(ActivityThread.java:4203) 06-02 15:13:36.876: ERROR/AndroidRuntime(326): at java.lang.reflect.Method.invokeNative(Native Method) 06-02 15:13:36.876: ERROR/AndroidRuntime(326): at java.lang.reflect.Method.invoke(Method.java:521) 06-02 15:13:36.876: ERROR/AndroidRuntime(326): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791) 06-02 15:13:36.876: ERROR/AndroidRuntime(326): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549) 06-02 15:13:36.876: ERROR/AndroidRuntime(326): at dalvik.system.NativeStart.main(Native Method) 06-02 15:13:36.876: ERROR/AndroidRuntime(326): Caused by: java.lang.NullPointerException 06-02 15:13:36.876: ERROR/AndroidRuntime(326): at com.pa.passammain.CGCountTest.onCreate(CGCountTest.java:46) 06-02 15:13:36.876: ERROR/AndroidRuntime(326): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123) 06-02 15:13:36.876: ERROR/AndroidRuntime(326): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2364) 06-02 15:13:36.876: ERROR/AndroidRuntime(326): ... 11 more i think my url string may be the problem, but i've tried using my ip with no luck

    Read the article

  • Run a JGNAT program?

    - by anta40
    I just installed JGNAT on Windows (gnat-gpl-2010-jvm-bin.exe) This is a sample code hello.adb from the included manual: with Ada.Text_IO; use Ada.Text_IO; procedure Hello is begin Put_Line ("Hello GNAT for the JVM."); end Hello; First, compile it: jvm-gnatmake hello.adb jvm-gnatcompile -c hello.adb jvm-gnatbind -x hello.ali jvm-gnatlink hello.ali Looks fine. So let's run it: java hello Exception in thread "main" java.lang.NoClassDefFoundError: jgnat/adalib/GNAT_libc at hello.main(hello.adb) Caused by: java.lang.ClassNotFoundException: jgnat.adalib.GNAT_libc at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 1 more Any idea why?

    Read the article

  • Eclipse + Android + JUnit test references android.os class = NoClassDefFoundError WTF

    - by Peter Pascale
    I have a custom timer that extends android.os.CountDownTimer. I have a test in the test project (standard Android/Eclipse project config) that tests the custom Timer. When I try to run this test, I get a java.lang.NoClassDefFoundError: android/os/CountDownTimer at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:698) You get the idea. Can I not run code that references android code code in junit test?

    Read the article

  • ClassNotFoundException when connecting to Mysql with JDBC

    - by Jacob Lyles
    I'm getting the following error when I try to run a simple Java JDBC program at the command line: Exception in thread "main" java.lang.NoClassDefFoundError: LoadDriver/java Caused by: java.lang.ClassNotFoundException: LoadDriver.java 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:315) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:330) at java.lang.ClassLoader.loadClass(ClassLoader.java:250) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:398) Here's the simple Java program, copied right out of the JDBC docs: import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; // Notice, do not import com.mysql.jdbc.* // or you will have problems! public class LoadDriver { public static void main(String[] args) { try { // The newInstance() call is a work around for some // broken Java implementations Class.forName("com.mysql.jdbc.Driver").newInstance(); } catch (Exception ex) { throw ex; // handle the error } } } Problem is, I'm bloody sure my bash shell $ClASSPATH variable is pointed at the correct .jar file. To be sure, I copied the JDBC .jar to the same directory as my program and ran it as follows: java -classpath ./mysql-connector-java-5.1.12-bin.jar LoadDriver.java I still get the same error. I'm running under Mac OSX, if it matters.

    Read the article

  • Why do I have a dependency to gwt?

    - by stacker
    In a seam-gen generated application the following exception is thrown during deployment: ERROR [LoadMgr3] Not resheduling failed loading task, loadTask=org.jboss.mx.loading.ClassLoadingTask@8c5c9c{classname: org.jboss.seam.remoting.gwt.GWT14Service, requestingThread: Thread[ScannerThread,5,jboss], requestingClassLoader: org.jboss.mx.loading.UnifiedClassLoader3@3e4532{ url=f ile:/C:/dev/jboss-4.3.0.GA/server/default/deploy/myapp.ear/ ,addedOrder=50}, loadedClass: nullnull, loadOrder: 2147483647, loadException: java.lang.NoClassDefFoundError: com/google/gwt/user/server/rpc/SerializationPolicyProvider, threadTaskCount: 0, state: 1, #CCE: 1} java.lang.NoClassDefFoundError: com/google/gwt/user/server/rpc/SerializationPolicyProvider at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:621) ... at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421) at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610) at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263) at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274) at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225) The problem (and workaround) is described here. Since I don't use gwt, my question is why do I have this dependency when I'm not using gwt at all? Seam version 2.1.2

    Read the article

  • Java: Print and access List <String[]>

    - by battousai622
    Im reading in a file and storing it in t1. How do i access the elements in t1? When i try to print it i get addresses instead of values. Also whats the dif between string and string[]? CSVReader reader = new CSVReader(new FileReader("src/new_acquisitions.csv")); List <String[]> t1 = reader.readAll(); int i = 0 while(i < t1.size()) { System.out.println(t1.get(i)); i++; } output: [Ljava.lang.String;@9304b1 [Ljava.lang.String;@190d11 [Ljava.lang.String;@a90653 [Ljava.lang.String;@de6ced

    Read the article

  • Accessing children with a given name via jdom

    - by Christian
    I want to access the children with skos:Concept. getChildren("skos:Concept") and getChildren("Concept") both give me an empty list what should I use instead?. My example Data: <owl:AnnotationProperty rdf:about="&dc;identifier"/> <owl:ObjectProperty rdf:about="&skos;narrower"/> <skos:Concept rdf:about="#concept:0_acetylpantolactone:4253501"> <skos:prefLabel xml:lang="" >0-acetylpantolactone</skos:prefLabel> <skos:hiddenLabel xml:lang="" >2(3H)-Furanone, 3-(acetyloxy)dihydro-4,4-dimethyl-, (R)-</skos:hiddenLabel> <dc:identifier rdf:resource="urn:CHID:028227363"/> <dc:identifier rdf:resource="urn:MESH:C014305"/> </skos:Concept> <skos:Concept rdf:about="#concept:1012S:4202655"> <skos:prefLabel xml:lang="">1012S</skos:prefLabel> <skos:hiddenLabel xml:lang="" >C19-H16-Cl2-N6-O</skos:hiddenLabel> <skos:hiddenLabel xml:lang="">Compound 1012S</skos:hiddenLabel> <dc:identifier rdf:resource="urn:CAS:95211_91_9"/> <dc:identifier rdf:resource="urn:CHID:095211919"/> </skos:Concept>

    Read the article

  • jQuery - change a list of elements to an associative array

    - by Brian M. Hunt
    Given an associative array (of the sort returned by jQuery.serializeArray()) like this: [ { 'name': 'abc', 'value': 'aaa', '__proto__': [Object] }, { 'name': 'def', 'value': 'bbb', '__proto__': [Object] }, { 'name': 'abc', 'value': 'ccc', '__proto__': [Object] } ] How can one convert this, using either jQuery or just javascript, to an associative array of name: [values] like this: { 'abc': ['aaa', 'ccc'], 'def': ['bbb'] } This seems to essentially be the inverse of this question: Build associative array based on values of another associative array... but in Javascript (not PHP). I wasn't able to find this question on Stackoverflow, though I thought it would have been asked. Thank you for reading. Brian

    Read the article

  • How to use apache beanutils in a NetBeans platform project? (Error with commons-logging)

    - by I82Much
    For starters, this question is not so much about programming in the NetBeans IDE as developing a NetBeans project (e.g. using the NetBeans Platform framework). I am attempting to use the BeanUtils library to introspect my domain models and provide the properties to display in a property sheet. Sample code: public class MyNode extends AbstractNode implements PropertyChangeListener { private static final PropertyUtilsBean bean = new PropertyUtilsBean(); // snip protected Sheet createSheet() { Sheet sheet = Sheet.createDefault(); Sheet.Set set = Sheet.createPropertiesSet(); APIObject obj = getLookup().lookup (APIObject.class); PropertyDescriptor[] descriptors = bean.getPropertyDescriptors(obj); for (PropertyDescriptor d : descriptors) { Method readMethod = d.getReadMethod(); Method writeMethod = d.getWriteMethod(); Class valueType = d.getClass(); Property p = new PropertySupport.Reflection(obj, valueType, readMethod, writeMethod); set.put(p); } sheet.put(set); return sheet; } I have created a wrapper module around commons-beanutils-1.8.3.jar, and added a dependency on the module in my module containing the above code. Everything compiles fine. When I attempt to run the program and open the property sheet view (i.e.. the above code actually gets run), I get the following error: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory 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:319) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:330) at java.lang.ClassLoader.loadClass(ClassLoader.java:254) at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:259) Caused: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory starting from ModuleCL@64e48e45[org.apache.commons.beanutils] with possible defining loaders [ModuleCL@75da931b[org.netbeans.libs.commons_logging]] and declared parents [] at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:261) at java.lang.ClassLoader.loadClass(ClassLoader.java:254) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:399) Caused: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.apache.commons.beanutils.PropertyUtilsBean.<init>(PropertyUtilsBean.java:132) at org.myorg.myeditor.MyNode.<clinit>(MyNode.java:35) at org.myorg.myeditor.MyEditor.<init>(MyEditor.java:33) at org.myorg.myeditor.OpenEditorAction.actionPerformed(OpenEditorAction.java:13) at org.openide.awt.AlwaysEnabledAction$1.run(AlwaysEnabledAction.java:139) at org.netbeans.modules.openide.util.ActionsBridge.implPerformAction(ActionsBridge.java:83) at org.netbeans.modules.openide.util.ActionsBridge.doPerformAction(ActionsBridge.java:67) at org.openide.awt.AlwaysEnabledAction.actionPerformed(AlwaysEnabledAction.java:142) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.AbstractButton.doClick(AbstractButton.java:389) at com.apple.laf.ScreenMenuItem.actionPerformed(ScreenMenuItem.java:95) at java.awt.MenuItem.processActionEvent(MenuItem.java:627) at java.awt.MenuItem.processEvent(MenuItem.java:586) at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:317) at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:305) [catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:638) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:125) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) I understand that beanutils is using the commons-logging component (wish it mentioned that in the javadoc, but that's OK). I have tried adding the commons-logging component in two different ways (creating a wrapper library around the commons-logging library, and putting a dependency on the Commons Logging Integration library). Neither solves the problem. Has anyone successfully used BeanUtils in a NetBeans Platform project?

    Read the article

  • On IE cursor is comming always at start in textarea

    - by pravin
    I am dealing with textarea, and on click of this I am calling one replace function which will remove some specified string in textarea, this is the basic operation. Expected behavior after clicking on textarea 1) At first click : It should remove specified string from textarea Cursor should come at end of string 2) more than one click : - Cursor should come at where ever user clicks in text area Below is my replace function.... function replace(id,transFromDb) { newStr = $("#"+id).val(); var len = null; if(transFromDb == '') { newStr = newStr.replace(Lang.Message27,''); newStr = newStr.replace(Lang.Message28,''); } else { newStr = newStr.replace(Lang.Message28,''); newStr = newStr.replace(Lang.Message27,''); } /* change font weight as bold. */ $("#"+id).css({"fontWeight":"bold"}); $("#"+id).val(newStr); } Assume that Lang.Message is specified string. It's working above behavior with FF. Facing issue on IE, it always keep cursor position at first. Please provide any solution.... Thanks in Adavance Pravin

    Read the article

  • Quering XElements for children with children attributes.

    - by Arnej65
    Here is the XML outline: <Root> <Thing att="11"> <Child lang="e"> <record></record> <record></record> <record></record> </Child > <Child lang="f"> <record></record> <record></record> <record></record> </Child > </Thing> </Root> I have the following: TextReader reader = new StreamReader(Assembly.GetExecutingAssembly() .GetManifestResourceStream(FileName)); var data = XElement.Load(reader); foreach (XElement single in Data.Elements()) { // english records var EnglishSet = (from e in single.Elements("Child") where e.Attribute("lang").Equals("e") select e.Value).FirstOrDefault(); } But I'm getting back nothing. I want to be able to for Each "Thing" select the "Child" where the attribute "lang" equals a value. I have also tried this, which has not worked. var FrenchSet = single.Elements("Child") .Where(y => y.Attribute("lang").Equals("f")) .Select(x => x.Value).FirstOrDefault();

    Read the article

  • one page over 9 different urls

    - by Ali Demirtas
    Hi I am using prestashop as the cart for my website. I have a problem; the website used to be in dynamic urls. I enabled friendly url writing. The problem is that one page has more than one url. You can access a same page from the dynamic url and static url. In fact a single page has 9 different urls. This obviously creates problems for seo as search engines penalize my website for this. Here are examples of a page with more than 2 urls (http://www.turkishfootballstore.com/lang-nl/product.php?id_product=515) (http://www.turkishfootballstore.com/fenerbahce/515-fenerbahce-thuisshirt-20092010.html) (http://www.turkishfootballstore.com/lang-nl/fenerbahce/515-fenerbahce-thuisshirt-20092010.html) you can see even the static url's have 2 one with language defined and the other without. out fo the three urls above the correct one is the one at the bottom. What can I do to solve this problem? I have no knowledge of programming. Here is the htaccess for the website. Any sample code or help is really appreciated. There is 550 pages and every page is published in 17 different languages I want to use a 301 auto redirect. What is the simplest way to do it? I have no idea of coding. # URL rewriting module activation RewriteEngine on # URL rewriting rules RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /img/p/$1-$2$3.jpg [L,E] RewriteRule ^([0-9]+)\-([0-9]+)/([_a-zA-Z0-9-]*)\.jpg$ /img/p/$1-$2.jpg [L,E] RewriteRule ^([0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /img/c/$1$2.jpg [L,E] RewriteRule ^lang-([a-z]{2})/([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$3&isolang=$1$5 [L,E] RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$2&isolang=$1$4 [L,E] RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /category.php?id_category=$2&isolang=$1 [QSA,L,E] RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$2$4 [L,E] RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$1$3 [L,E] RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /category.php?id_category=$1 [QSA,L,E] RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /cms.php?id_cms=$1 [QSA,L,E] RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*)(.*)$ /supplier.php?id_supplier=$1$3 [QSA,L,E] RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*)(.*)$ /manufacturer.php?id_manufacturer=$1$3 [QSA,L,E] RewriteRule ^lang-([a-z]{2})/(.*)$ /$2?isolang=$1 [QSA,L,E] # Catch 404 errors ErrorDocument 404 /404.php Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^***.com [NC] RewriteRule ^(.*)$ http://www.***.com/$1 [L,R=301] Options +FollowSymLinks RewriteEngine on # index.php to / RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php\ HTTP/ RewriteRule ^(.*)index\.php$ /$1 [R=301,L] Header set Cache-Control: "no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0"

    Read the article

  • Mapping a boolean[] PostgreSql column with Hibernate

    - by teabot
    I have a column in a PostgreSql database that is defined with type boolean[]. I wish to map this to a Java entity property using Hibernate 3.3.x. However, I cannot find a suitable Java type that Hibernate is happy to map to. I thought that the java.lang.Boolean[] would be the obvious choice, but Hibernate complains: Caused by: org.hibernate.HibernateException: Wrong column type in schema.table for column mycolumn. Found: _bool, expected: bytea at org.hibernate.mapping.Table.validateColumns(Table.java:284) at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:1130) I have also tried the following property types without success: java.lang.String java.lang.boolean[] java.lang.Byte[] How can I map this column?

    Read the article

  • Django doctests in views.py

    - by Brian M. Hunt
    The Django documentation on tests states: For a given Django application, the test runner looks for doctests in two places: The models.py file. You can define module-level doctests and/or a doctest for individual models. It's common practice to put application-level doctests in the module docstring and model-level doctests in the model docstrings. A file called tests.py in the application directory -- i.e., the directory that holds models.py. This file is a hook for any and all doctests you want to write that aren't necessarily related to models. Out of curiosity I'd like to know why Django's testrunner is limited to the doctests in models.py, but more practically I'd like to know how one could expand the testrunner's doctests to include (for example) views.py and other modules when running manage.py test. I'd be grateful for any input. Thank you. Brian

    Read the article

  • Problems with HMAC when switching to Java 6

    - by Pablo Fernandez
    We have recently switched to java6 and it's mandatory in the project. One of our apps that used to work is failing, with this stacktrace (relevant part) java.lang.NoClassDefFoundError: Could not initialize class com.apple.crypto.provider.HmacSHA1 sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) java.lang.reflect.Constructor.newInstance(Constructor.java:513) java.lang.Class.newInstance0(Class.java:355) java.lang.Class.newInstance(Class.java:308) java.security.Provider$Service.newInstance(Provider.java:1221) javax.crypto.Mac.a(DashoA13*..) javax.crypto.Mac.init(DashoA13*..) Has anyone had this problem before? Thanks a lot

    Read the article

  • HTTP Content-type header for cached files

    - by Brian
    Hello, Using Apache with mod_rewrite, when I load a .css or .js file and view the HTTP headers, the Content-type is only set correctly the first time I load it - subsequent refreshes are missing Content-type altogether and it's creating some problems for me. I can get around this by appending a random query string value to the end of each filename, eg. http://www.site.com/script.js?12345 However, I don't want to have to do that, since caching is good and all I want is for the Content-type to be present. I've tried using a RewriteRule to force the type but still didn't solve the problem. Any ideas? Thanks, Brian

    Read the article

< Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >