Issue exporting war with eclipse for weblogic 10.3.6 - eclipse

I am using eclipse to build a web app to be deployed on weblogic 10.3.6.Performing a export as war and depolying the war on weblogic fails at a point where I am performing a file move opertation using java.nio.file.Files.move method.
The error I receive is following :-
java.nio.file.NoSuchFileException: /export/home/tppp3/asdsslon/infiles/Wert_Frameon_20160514.csv
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
at sun.nio.fs.UnixCopyFile.move(UnixCopyFile.java:403)
However this is not reported when I perform a deployment to weblogic using eclipse available option Run as-> Run on Server .
I am noticing Using above method, generates a _wl_cls_gen.jar with source code files compiled and package as class.
Any help will be appreciated.
I am looking for option to either generate _wl_cls_gen.jar for war export or find a option to make the move operation work. The same war works flawlessly on Tomcat.
Thanks

Related

Deploy helloworld to wildfly using eclipse

I want to deploy my helloworld project to my wildfly (former jboss) application server.
I can use maven mvn install wildfly:deploy and it will deploy the app.
But when I want to use eclipse to run on Server it does nothing.
I don't get a console output or anything which looks like building and deploying.
I added the server runtime to the project and also added the wildfly server.
Why is Eclipse not deploying?
This works for me: do a mvn install in order to build the war and have it at the target folder. Then right-click on wildfly-server. You will see an add-remove option. Click on it, select your project from the list and then add your project to the server. Click finish. If the server is running the project should be deployed.
Another approach would be to simply copy the war from your target directory and place it in the standalone/deployments folder of your wildfly installation.
Make sure that you have stopped the server before copying the war. After you have copied the war to the deployments folder, start he server.
Your application should be deployed successfully.

JBOSS NoClassDefFoundError: org/ejbca/util/InterfaceCache

I got the error NoClassDefFoundError when trying to deploy the EJBCA API in my JSF project. When I deploy it in a simple java project, all goes fine with simple classes and JARs imported in the Java Build Path, but in the JSF that not happens.
I tried to copy the jars that I want from EJBCA folder and put in MyProject\WebContent\WEB-INF\lib and nothing happened.
What must I do?

NoClassDefFoundError on Java EE server in eclipse with tomcat

I'm trying to build a hello world application utilising GCM for Android notifications. When developing the server part, I'm not entirely sure how to get the gcm-server.jar file into the project. I've added it to the build path and Eclipse finds it perfectly fine, but when I build and deploy the project to a tomcat server (from within eclipse) it's throwing the following error at runtime:
java.lang.NoClassDefFoundError: com/google/android/gcm/server/Sender
I'm assuming I'm doing something wrong when importing the jar. What exactly is the procedure for getting a jar into a dynamic web project using Eclipse?
Going to answer my own question because I just got it working.
Turns out adding the .jar's to the Java build path is not enough. Tomcat has a seperate classpath for each project, and won't see the classes in the jar unless you dump the jar files into the WEB-INF/lib folder (which Eclipse does not do automatically).
You need to include the jar file for json. This question seems to have been repeated a few times.
http://code.google.com/p/json-simple/downloads/detail?name=json-simple-1.1.1.jar

Import and run WAR on eclipse

I have a subproject in a Virtual Machine with Ubuntu which I compile with Maven and then run with mvn jetty:run.
Maven also packages it as a war.
All of this works fine and does what is expected.
I am trying to import this WAR from another eclipse in Windows so I have done it by Import -> WAR, thus creating a Web application.
I now want to run it from Eclipse so I have created a new Jetty Server and run my application as Run on Server but I am getting Could not find the main class.
What is the proper way of doing this?
Besides, I have tried deploying the application by putting it in the webapps Tomcat directory . I can see it in the Tomcat GUI and launches the index.html but when I tried to access some of the services it throws No service was found
When deploying, in the Tomcat console I can see runtime NoClassDefFoundErrors.
Is there anything that mvn jetty:run does that the tomcat regular deployment does not? How is it possible that this didn't happen in my Virtual Machine? Shouldn't those classes be all in the WAR?
EDIT:
Here is another hint. When I run the project imported from the WAR in the Ubuntu VM, either with Jetty from eclipse or adding it to the webapps folder it works fine.
It is only hen running it on Windows Host Environment when it fails.
The specific NoClassdefFoundErrors thrown on cmd is the following:
Caused by: java.lang.NoClassDefFoundError: org/ow2/frascati/explorer/
api/FraSCAtiExplorer
That is one of the modules fo the main project.
If you try to deploy your war in tomcat's webapps folder, and if you miss a class, then you probably miss a jar in your lib folder. It is probably a jar that is supposed to be provided by the web server.
We need to know which class is missing.
Finally all errors have been solved by doing the following:
First I recompiled the WAR which did work this time under Jetty in Windows cmd. I apologize as this must be due to some error I still don't know, probably sharing the wrong WAR with Windows HOST OS from the beginning.
On the other hand, the Eclipse was solved by moving the Jetty folder out of the "Program Files" directory. It seems the old Jetty 6 adapter Eclipse comes with does not recognize spaces in its route to the server.

WebLogic throws java.lang.ClassNotFoundException when I compile and deploy a change in my eclipse maven project

I just started using Maven with eclipse and deployed my application to WebLogic.
When I do a clean install for the first time, my Maven project builds and deploys successfully.
After that, when I make any change to the source code or jsps, I do a pre-clean install to update the project. Now, everytime I do pre-clean install and restart WebLogic I get the following exception:
java.lang.ClassNotFoundException:
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:283)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:256)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:54)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
I did some researches and for some reasons, No one complained about that error before.
Any suggestion what can be the problem ?
This only occurs after I make a change and run "pre-clean install" from within eclipse.
When I do a clean install for the first time, my maven project builds and deploy successfully.
How is it deployed exactly? Do you use WTP and the Weblogic adapter? Do you use m2eclipse?
after that, when I make any change to the source code or jsps.. I do a pre-clean install to update the project.
Why do you run pre-clean? Do you have anything special bound to pre-clean (there is nothing bound to this phase by default). What is the expected result?
Now, everytime I do pre-clean install and restart weblogic I get the following exception:
What is FeatureForm, it it yours? Could this be something you removed that is still referenced by a temporary file generated by WebLogic (e.g. a Servlet generated for a JSP). Does the problem happen with this class only? Did you try to remove the work dir of WebLogic?
Any suggestion what can be the problem?
I'm not sure I'll be able to answer this question but you need to provide more details about your context and the way you use tools.