Missing JNDI entry - java

I recently made a simple Java EE program in NetBeans 8.1 and pushed the code to a remote repository. Now, I've pulled that code down onto another computer and my application fails to run with the error javax.naming.NameNotFoundException: App-ejb.
Using asadmin on the computer on which my app is working, I can see the JNDI entry just fine by running asadmin list-jndi-entries --context java:global. However, I can't find the JNDI entry for App-ejb in any namespace on the computer on which my app is not working.
How should I debug from here?

To solve, I cleaned and re-built App-ejb and then deployed it again to Glassfish. (Clean and build and Deploy are options when right clicking on the module in NetBeans.)

Related

(Eclipse) Dynamic Web Project runs correctly on J2EE preview server but not on Tomcat server

I have a dynamic web project (along with a JAR "java standalone project"). within Eclipse, when I run the project on J2EE preview server and test one of the functionality of my project, everything works fine, but when I run it using Tomcat server and test the same functionality, an exception is caught:
Exception in thread "Thread-2" java.lang.NoClassDefFoundError: org/openqa/selenium/TimeoutException
it's pointing somewhere in the JAR project (the one that is set in Deployment Assembly section to be taken along with Dynamic web project).
I searched on the internet and tried different suggestions but got no result till now. How is this possible? I mean the same Project runs smoothly on one server and fails on another one considering that it's being deployed with no error on both servers?
Appreciate your time in advance and let me know if you need any further information.

Cannot see sources will debugging on local JBoss server

I have a project producing a .war file, I created a local JBoss 7.1 server in eclipse referencing my local JBoss installation. Then I start the local server in debug mode, copy my war file to {JBOSS_HOME}\standalone\deployments, and it deploys it correctly.
But when I add a breakpoint in eclipse, the code stops like it should, but showing me a "Source not found" white page.
How can I link or synchronize the source code to my local server?
Thank you.
Okay so I solved my problem and it seems pretty obvious now that I found it :
My project is generating a projectname.war, and a projectname-sources.jar, I just had to deploy also the projectname-sources.jar...

FAIL - Deployed application at context path /RxCircle but context failed to start

FAIL - Deployed application at context path /RxCircle but context failed to start
The module has not been deployed.
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:210)
at org.netbeans.modules.maven.j2ee.ExecutionChecker.performDeploy(ExecutionChecker.java:173)
at org.netbeans.modules.maven.j2ee.ExecutionChecker.executionResult(ExecutionChecker.java:125)
at org.netbeans.modules.maven.execute.MavenCommandLineExecutor.run(MavenCommandLineExecutor.java:202)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
i am using tomcat 6
netbeans 7.0
java 6
i am getting this error when i am running my application in netbeans..
I suspect that either (1) Your web.xml is missing, (2) your applicationContext is malformed or (3) your versions are not playing nicely together.
Since you are using Netbeans you can view the Server Log by doing this:
Open the Services window (if it is not open go to: Window > Services)
Right-click on the Tomcat Server and select View Server Log.
Now you can see the actual exception that is causing Tomcat not to deploy your war.
This is a very generic error message and can be due to any reason like wrong servlet filter defined or malformed application context file.
To understand fully you need to get more logging details from tomcat.
So set the logging level to debug in tomcat and then start the tomcat.
Below url you may refer for further details
http://tomcat.apache.org/tomcat-6.0-doc/logging.html
How to set level logging to DEBUG in Tomcat?
Hopefully you will get more details about the deployment error root cause.
Try stopping the Tomcat server so as to allow Netbeans to run it. If the server is already running when Netbeans tries to deploy an app Netbeans will display the delopy failed message.
I had the same issue. I was using Java 8, Tomcat 8, NetBeans 8.1.
What I did was, I manually replaced:
1. nbproject/build-impl.xml
2. web/WEB-INF/web.xml
with a previous version of the files. Please make sure to have backups.
I have faced same issue
I searched lot of solutions but not worked
If you are facing the same problem then the solution is
First you have backup your web.xml code file from your
project NetBeanss
Now delete web.xml from project
Now right click on web-inf file chose web after that chose deployment descriptor
After that
Now you can run your prj check your solution is solve as context will run on localhost server
Afte thaer will some error because we can't save our servlet file link so do it
Run it
Now you will see your problem solve
It's worked for.me

JDeveloper Cannot run application due to error deploying to IntegratedWebLogicServer

I have a simple Fusion Web Application program that I could run my simple application on the weblogic server before, but now when I try to run the JSF page I get these errors:
Deployment cancelled.
---- Deployment incomplete ----.
Remote deployment failed (oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer)
#### Cannot run application MyFirstApplication due to error deploying to IntegratedWebLogicServer.
How can I fix this problem?
The following worked for me:
Close Jdeveloper application.
Delete systemXX.x.x.x.x directory.
Restart Jdeveloper and integrated weblogic server.
I also faced the same issue but after deleting system directory, my server started successfully.
the steps of running an application on weblogic server (or any other java server) consists of the following 4 steps:
Compilation and building
Starting the server
Deploying the fusion web application
Running the application
Errors could happen in any of the steps, and would cause obstacles to move to the next steps.
Your problem seems to be in the deployment phase, so the next step which is the running of the application is stopped from being executed.
It is worth to mention that your savior is the logs.
So you need to look into the deployment logs where it would clearly show the fault and the exception from not being deployed.
I resolved it.
Please Follow These Steps :
Right Click On The Model ;
Project Properties...
Select In Left Page; "JAVA EE Application"
Insert In Java Web Application Name: XXXApplication-XXXModel-webapp (XXX is Name Of Project )
Insert Into Java EE Webcontent Root : XXXApplication-XXXModel-context-root
I'm on JDeveloper 11g Release 2.
The following worked for me:
At the application menu bar - click on Run option.
Click on Start Server Instance - IntegratedWebLogicServer (in my case)
Wait for Server to fully start.
Locate Projects box/section/tree structure, locate your project name. Right Click.
Select Deploy, (create a deployment profile if required), to open the deployment wizard.
In the deployment wizard, select Deploy to Application Server, click Next.
In my case, I saw the IntegratedWebLogicServer instance in the following list, I selected it, and continue/finish with the deployment.
I strongly believe this is related to permissions.
I was able to run and deploy my applications to the default Web Logic server until I had more restrictions in my Windows machine - for example I was no longer a local administrator.
Hope this helps.

Glassfish 4 deployment error

I added some libraries to my JavaEE project and then deploy the application works. I modified something and I got this error message in Eclipse:
Cannot Deploy ProjectName
deploy is failing=Error occurred during deployment: Keys cannot be duplicate.
Old value of this key property, nullwill be retained.
Please see server.log for more details.
java.lang.LinkageError: loader (instance of
org/glassfish/web/loader/WebappClassLoader):
attempted duplicate class definition for name:
"org/glassfish/web/loader/JdbcLeakPrevention"
loader (instance of org/glassfish/web/loader/WebappClassLoader): attempted duplicate
class definition for name: "org/glassfish/web/loader/JdbcLeakPrevention"
I made some research and I found out that it is not an Eclipse bug. I'm working with Kepler but I tested with Juno too. Got the same error message.
I downloaded Glassfish 3.1.2.2 and the message gone.
Why am I getting this message?
I Had the same error. I stopped the GLassfish server and then I cleaned the project (Project -> Clean... ). Started the server and worked
I also had this issue, and I was also using the SVNKit library plus its dependencies so it looks like there is some kind of conflict there. I can get around it by cleaning out the osgi-cache folder & restarting glassfish, but I have to do this every time I want to deploy, so not a great solution.
Try to remove all the files under osgi-cache and generated directories. It worked for me.
In my Glassfish log file it says:
Application with name ws is already registered. Either specify that redeployment must be forced, or redeploy the application. Or if this is a new deployment, pick a different name
Following my logs instructions I deployed the app with --force option:
asadmin deploy --force=true ws.war
and it worked. More info on deploy --force=true
Try to clean autodeploy directory, restart the server.
Also clean the project deployment directory.
following steps worked for me.
stop the glassfish server(if running)
kill all the java process (using terminal or activity monitor)
now try redeploy.
Was somehow related to a single #Singleton bean. Converted it to #Stateless and everything worked fine. Not quite sure why this happened...

Categories

Resources