I have a Java project using Groovy and Java mixed. Now I want to publish it to my tomcat, but it says
Could not publish to the server. java.lang.IndexOutOfBoundsException
Platform : OS X / Eclipse Kepler Service Release 1 / Java 1.6 / Tomcat 7.0.39
How can I deal with this issue ? I can deploy a new create Dynamic Web Project, but not my exist project.
My server configuration :
My Jar files are way too old, I just deploy my project into Tomcat manually and found a lot of error log.
Just update them into newer version.
Related
When I try to create an Enterprise application using the wizard (Ant project) I get the following error
java.lang.NullPointerException: Cannot invoke "org.netbeans.modules.j2ee.dd.api.application.Application.setDisplayName(String)" because "this.application" is null
at org.netbeans.modules.j2ee.earproject.ProjectEar.setupDDFromVirtual(ProjectEar.java:290)
at org.netbeans.modules.j2ee.earproject.ProjectEar.getApplication(ProjectEar.java:255)
at org.netbeans.modules.j2ee.earproject.ui.wizards.NewEarProjectWizardIterator.testableInstantiate(NewEarProjectWizardIterator.java:160)
at org.netbeans.modules.j2ee.earproject.ui.wizards.NewEarProjectWizardIterator.instantiate(NewEarProjectWizardIterator.java:139)
at org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.instantiate(TemplateWizard.java:1048)
at org.openide.loaders.TemplateWizard.handleInstantiate(TemplateWizard.java:602)
at org.netbeans.modules.project.ui.NewProjectWizard.handleInstantiate(NewProjectWizard.java:51)
at org.openide.loaders.TemplateWizard.instantiateNewObjects(TemplateWizard.java:436)
at org.openide.loaders.TemplateWizardIterImpl.instantiate(TemplateWizardIterImpl.java:228)
at org.openide.loaders.TemplateWizardIteratorWrapper$ProgressInstantiatingIterator.instantiate(TemplateWizardIteratorWrapper.java:155)
at org.openide.WizardDescriptor.callInstantiateOpen(WizardDescriptor.java:1602)
at org.openide.WizardDescriptor.callInstantiate(WizardDescriptor.java:1546)
at org.openide.WizardDescriptor.access$2300(WizardDescriptor.java:67)
[catch] at org.openide.WizardDescriptor$Listener$2$1.run(WizardDescriptor.java:2233)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
Of course, all the fields in the wizard are filled. However, there are no errors when creating WAR and EJB separately. The error occurs only when an EAR is created, even if it is empty.
use
NetBeans 12.6
Windows 10 OS
GlassFish Server 6.2.1
Java 17
All paths are spelled out correctly, read / write permissions to directories are set
Screen
I can reproduce your problem, and NetBeans Bug Report 5953 "Creating a new Enterprise Application (Java with Ant) impossible (only when selecting JakartaEE9) - NPEs thrown" has already been raised.
The bug report is unresolved, but the problem only occurs when creating a Jakarta EE 9 Enterprise Application. I successfully created a Jakarta EE 8 Enterprise Application simply by selecting Jakarta EE8 from the Java EE Version drop list within the wizard.
You have several options available to resolve this, but none of them are good:
Wait for NetBeans to fix the problem. Definitely not recommended!
Create a Jakarta EE8 Enterprise Application with the Ant wizard instead, if you don't require EE 9 functionality.
Create a Jakarta EE8 Enterprise Application with the Ant wizard, then "hack" the generated projects to use EE 9.
Use another IDE which properly supports this functionality.
Create the EE 9 Enterprise Application in another IDE, then import the projects into NetBeans.
Using Maven or Gradle isnstead of Ant as the build tool doesn't help either:
I couldn't create a Maven Enterprise Application when using Jakarta EE8 or Jakarta EE9, though I didn't research why.
The project wizard doesn't even offer "Enterprise Application" as an option when using Gradle.
Notes:
NetBeans 13 will be released next month, but I don't think this issue will be fixed.
Also see the (ominous) bug report "NETBEANS-2871 Resolve Enterprise Application support" from 2019 which remains unresolved:
Need to figure out whether maybe Web Applications (in Ant, Maven, and
Gradle) might not be enough in terms of Java EE support, i.e., do we
need Enterprise Applications and EJB-specific project types, if not,
let's remove them.
It works with jakarta EE9 provided you do the following:
Plugin versions in all pom.xml files:
maven-compiler-plugin 3.9.0
maven-war-plugin 3.3.2
maven-dependency-plugin 3.2.0
In the pom.xml file of -ejb- change packaging war to jar.
Then:
Clean and build in the following order:
top, ejb, web and ear.
That's all.
I have installed the Weblogic 12c server and I want to add it to a project in Netbeans 11. When I select "add server" from server instance, the Weblogic server option is not displayed
I expected to see the option as shown in the following link https://www.oracle.com/webfolder/technetwork/tutorials/obe/java/wls_12c_netbeans_install/wls_12c_netbeans_install.html
I was able to connect the plugin for weblogic from netbeans version 8.2.
You must copy the plug-in files from the netbeans 8.2 directory to the netbeans 11 directory.
Files of a plug-in:
...\plugins\servers\enterprise\modules\org-netbeans-modules-j2ee-weblogic9.jar
...\plugins\servers\enterprise\config\Modules\org-netbeans-modules-j2ee-weblogic9.xml
...\plugins\servers\enterprise\update_tracking\org-netbeans-modules-j2ee-weblogic9.xml
...\plugins\servers\enterprise\update_tracking\org-netbeans-modules-weblogic-common.xml
Checked on versions 11, 11.1, 11.2.
Update.
Second method
The plugin can be compiled from sources.
Plugin sources here:
https://github.com/apache/netbeans/tree/master/contrib/j2ee.weblogic9
But you need to build all netbeans project. Build command:
ant all
The resulting .nbm file can then be imported in NetBeans (Tools -> Plugins -> Downloaded -> Add Plugin)
Discussion of the problem here:
https://issues.apache.org/jira/browse/NETBEANS-2476
Compiled nbm plugin file:
https://issues.apache.org/jira/secure/attachment/12991973/org-netbeans-modules-j2ee-weblogic9.nbm
Checked on versions 12.x
From what i can tell only Netbeans versions 7.2, 7.3, 7.4, 8.0 can work with weblogic as of now. Also the guide you are following is using a pre Apache Netbeans version. I would recommend switching to one of the following Netbeans versions. Download the All bundle or EE.
Netbeans 8.0
Netbeans 7.4
https://netbeans.apache.org/kb/docs/web/jsf-jpa-weblogic.html
Unfortunately Apache NetBeans 11.0 does not currently support the addition or use of a WebLogic server. See open Apache NetBeans Bug Report 2476: Netbeans 11 EE Support Weblogic Server
I don't know for sure, but I suspect that this is a legal problem is related to licensing issues rather than any technical obstacles. The absence of licensing on Apache NetBeans 11.0 also impacts other important products such as Hibernate (NETBEANS-2719 Resolve Hibernate Support), and Wildfly (NETBEANS-2415
Bring back support for WildFly server).
There are licensing issues because Apache assumed ownership of NetBeans releases from Oracle last year.
Also, because WebLogic was supported "out of the box" in NetBeans 8.2 there is no old WebLogic plugin available for use on Apache NetBeans 11.0.
Your options are:
Regress NetBeans to use the most recent NetBeans release which does support WebLogic: Oracle NetBeans 8.2. Note that this means you cannot develop using Java EE 8, nor use any JDK version > 8.
Stick with Apache NetBeans 11.0, and instead of WebLogic use one of the four application servers which it formally supports "out of the box": Payara, Glassfish, Apache Tomcat and Apache TomEE.
Install your WebLogic server outside of Apache NetBeans 11.0, and deploy your NetBeans web applications to that external server.
The client has upgraded the worklight server 6.2 to Mobile First 6.3, and deployed the updated war file. Now when we open the console to deploy the adapter, "It shows no runtime can be found"
But the same project works fine in the local development environment, where we installed the mobilefirst studio plugin in eclipse. We are able to build the project and run the app.
Java - 1.7
Eclipse - Juno SR2
MobileFirst studio 6.3
Cannot access the remote server for now, will attach the logs shortly.
Kindly let us know if there are any known issues on upgrading to 6.3(mobile first) from 6.2(worklight)
Thanks
Hi we are able to fix it. The reason is the client has not built the war file in 6.3, they have updated the old war, when we tried building the war file from the 6.3 and deployed. it worked.
I am new to weblogic 12c server. previously i was using tomcat 6, jdk6 eclipse luna, and my project type is tomcat project.now in our company they migrated to weblogic 12c.
the problem is i used to start/stop tomcat like this by using sysdeo plugin.
After start i used to right click on project ->upload context->click.
it used to deploy automatically to tomcat than in browser i can access that.
now how to achieve this in weblogic 12c.i googled and find out that if my project is dynamic web project than i can add server instance of weblogic and can achieve the above by selecting runas server option.
but my project type is tomcat project structure.
so can any one help me with this.
Update
i found this plugin but it works from weblogic 6 to weblogic 8.1 but not for weblogic 12c.
you need to install the enterprise pack
http://www.oracle.com/technetwork/developer-tools/eclipse/overview/weblogicservertools-161590.html
I would recommend also, to try netbeans 8
It has better integration with maven, weblogic etc
this post is little old but I wanna share that I found just and I guess it is related to this post, there is no config combination exists between Jdk 1.6 + Eclipse luna + Oracle Service pack(12c) for Eclipse! You will have to upgrade or downgrade at least one of them...
When I try to publish a Vaadin 6.8.4 project on the "J2EE Preview" server in Eclipse Juno, I get the following error message:
Error 404 - Not Found
No context on this server matched or handled this request.
Contexts known to this server are:
- myproject(/myproject)
When I look into my workspace's folder .metdata.plugins/org.eclipse.wst.server.core/there is only a publish0.dat file in the folder publish but the project is in the folder tmp0, is that normal? If not, what can I do to resolve this?
I use a freshly installed Java EE Version of Eclipse Juno with the Vaadin 6.8.4 plugin from the Eclipse Marketplace.
I was getting the same error for a simple dynamic website and cleaning and republishing the project didn't changed any thing so I installed tomcat and project started working.
It seems like a bug or problem with the deployment structure as default folder structure for jetty is different.
*I was using the latest eclipse Juno and also tried to update it to latest repo but nothing changed