guava and bonecp in webstart giving security exception - guava

I have an APP that is run via java webstart. It is using the BoneCP library which is dependent on the Google guava library. When it starts to down load it fails on the guava jar file. Antiviruses blocks the download giving me the following.Security Exception
Anyone else have this issue?
Thanks for any help!

Related

Accessing values in HttpServlet in Google Web Toolkit

I am getting the following error:
java.lang.NoSuchMethodError: org.apache.commons.fileupload.servlet.ServletFileUpload.getItemIterator(Ljavax/servlet/http/HttpServletRequest;)Lorg/apache/commons/fileupload/FileItemIterator
though I have added commons-io 1.2 jar and commons-Fileupload 1.2.1 jar in my buildpath.
Please help me out.
There is probably an incompatibility between the file-upload version you're using and the servlet.jar you have on your server.
I can't tell you if it is between the "commons" jars or between the server jars and "commons".
Anyway, I suggest you use a maven (or gradle even better) project at least to get your jars in a consistent way. If your project is not ready, you can still pack your application as a war and get the correct jars from the zipped output fil of your maven compiling.

Configuring JDeveloper to use PostgreSQL

I have a Java project which uses Struts and Hibernate. I am using PostgreSQL as the database for the project.
I have imported the .jws file in JDeveloper. All the java and jsp files are imported to the project.
When I tried to run the project multiple errors came out. I think it's due to a database connection failure.
Do I need to configure pgsql with the project?
Thanks in advance.
You have to provide more info on what the errors are.
But some common problem in JDeveloper when using the bundled server to test is that (if you are using datasources) you have to place the driver jars in the server lib folder or declare it as a Library by going to Tools->Manage Libraries.
If you post what errors are you receiving and how are you connecting to the database we might be able to help you a little more.
You'll need to add the postgreSQL jdbc jar files to your project and to the embedded WebLogic instance.
Tell us the specific error you are getting and we'll help you more.

ClassNotFoundException: org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider

I try to start an Google appengine application in my eclipse.
I have the Google plugin and I set the sdk for my application.
But, when I start this one, I get the following error:
java.lang.ClassNotFoundException: org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider
However, this class is present in the sdk which is present in my classpath.
Why Appengine doesn't find this class ?
Thanks.
https://developers.google.com/appengine/docs/java/datastore/jpa/overview-dn2
Please try to follow the steps to add JPA and datastore JARs in the app's war/WEB-INF/lib/ directory.
All the jars in the appengine-java-sdk/lib/opt/user/datanucleus/v2/ directory.
I met the same problem and followed the steps on that webpage. Now my code works well.
I believe that problems happens because we are using JPA 2.0 instead of JPA 1.0 now.
Also, please make sure you are using org.datanucleus.api.jpa.PersistenceProviderImpl as the provider instead of org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider. At least I used the new provider because I am developing GAE projects using the newest GAE plug-in
Good luck.

I want to use javax jms

I want to use javax.jms in netbeans project , but netbeans tell my that there is no package like this , what should I do ?
this error occurs when I try from terminal
Exception in thread "main" java.lang.NoClassDefFoundError: javax/jms/MessageListener
You have to have the jms-api.jar in your classpath. I got mine from HornetQ.
Edit
I just saw that you said you were using NetBeans. In that case, you need to have downloaded the version of NetBeans that includes Java EE. Go here and download that. This site seems to have a nice tutorial on how to set it up from there.

Deploy vaadin to JBoss 7.0 gives me a ClassNotFoundException

I've created a new Vaadin (6.6.5) project in eclipse and I've tried to deploy it on JBoss 7.0 but it gives me a GWT ClassNotFoundException
Caused by: java.lang.ClassNotFoundException: com.google.gwt.user.client.ui.HasWidgets from [Module "deployment.test.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:358)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:330)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:330)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:307)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:101)
... 64 more
Do I need to do something extra to deploy the gwt libraries?
Seems that some GWT classes in gwt-user.jar required for compiling the Vaadin client side widgetset are loaded by the JBoss7 unnecessarily.
vaadin.jar contains references to gwt-user.jar but it's not required during runtime, only during widgetset compilation time. Still JBoss wants to load these classes causing the problem.
There's a bug report in JBoss for this: http://community.jboss.org/thread/169575?tstart=0
As mentioned there, workaround is to include gwt-user.jar to the deployment package in WEB-INF/lib folder with the vaadin.jar, seems to work.
Vaadin Eclipse plugin creates library dependencies to gwt jar files and generally Eclipse should take care of the runtime classpath when deploying.
As the package name com.google.gwt.user.client suggest this should be in gwt-user.jar.
The gwt-dev.jar should only be needed when compiling client-side code with GWT.
Are you using add-ons? Add-ons (and their dependencies) should be always added to WEB-INF/lib to make the server-side classes available to the application and client-side code available to the GWT compiler.
On possible cause of the problem is (unnecessary) dependency to client-side class which is not available in the server at runtime. So, you might also check your code for unnecessary server-side dependencies to client-side GWT classes (like HasWidgets).
Check your code to ensure that you do not accidentally access this com.google.gwt.** class from your code. As said above, there is no need to deploy gwt libraries in the server.
Vaadin has now published an add-on to fix this, see https://vaadin.com/directory#!addon/vaadin-application-server-class-loader-workaround