Getting runtime exception when building with Maven - java

I am relatively new to Java/Maven and am attempting to build an existing Java app downloaded from SVN on my machine. The issue is when attempting to compile/package via Maven I get the following error...
org.apache.cxf.tools.common.ToolException: java.lang.RuntimeException: Resource http://testserver:8080/imp-inbound-services-1.0/common.xsd can not be read
I have built this in both NetBeans and Eclipse using JDK 1.7 on a Windows 7 machine and get the error via both. I would assume it is an issue reaching the "testserver" but other developers within the organization have no issue. I see no differences in their configurations and mine.
Am I missing some Eclipse/Maven configuration that could be causing this? Any ideas where to look or best way to troubleshoot?

You have to ask the developers where does testserver run and what starts it. It seems like a local process, so there may be a Maven goal that starts the server.

Related

BambooBSC (Balanced Score Card) setup on Netbeans 8.2

I am new to Java EE. Recently I had to implement an opensource balanced score card system for one of my clients. I stumbled upon BambooBSC. I successfully configured the project on a VM with the help of a VDI file (available on their github page).
Now I want to setup this project on my local machine. Since this project is based on J2EE platform, I already installed Apache Tomcat and Netbeans IDE on my local machine.
I cloned their repository on my system. And tried importing the project in my Netbeans IDE. Now the IDE shows me something like this.
I don't know what to do next. Seems like some external dependencies need to be provided to the project. But I am unable to figure it out. Please help me setup and run this project on my local machine. Will be deeply appreciated.
Thanks.
Do you absolutely need/want to work with Netbeans IDE?
Otherwise, you may consider using Eclipse IDE.
And follow this dedicated official documentation.
Anyway, you can notice the information about core-web, core-base and gsbsc-standard projects.
Let me know if you need further help.

Error when running Tomcat Server in my Dynamic Web Project

the problem below is fixed and the server runs now. However it keeps printing red messages but then it deletes them and runs... is that normal? Is there any need for fixing it - if so, what?
When I created a Dynamic Web Project in Eclipse and tried to run my Apache Tomcat v9.0 Server in which I made all the .sh files executable, it still gave me this error:
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
-Djava.endorsed.dirs=/Users/my_name/Desktop/tomcat/apache-tomcat-
9.0.10/endorsed is not supported. Endorsed standards and standalone APIs
in modular form will be supported via the concept of upgradeable modules.
In all the tutorials and forums I have looked, none of the proposed solutions have helped me. How can I fix this problem and make my server run properly?
Thanks!
What JRE are you using? The error you're getting seems to indicate that there is an incompatibility between the JRE versions. As mentioned in Tomcat's docs https://tomcat.apache.org/tomcat-9.0-doc/class-loader-howto.html the 'endorsed' feature is not support in Java hence it means that something keeps adding this up to your configuration.
This seems to be an issue with eclipse (or at the least the way it's setup at your system). Try having a look at this eclipse bug link as it may provide so more information about the problem you're dealing:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=507338

Java: How do you debug a module/jar that works as a plugin for another application

I know this sounds like a pathetic question and I'm sure it will get ridiculed but thats the only way I know how to describe the situation.
Scenerio : I'm creating a plugin for another java application. This application that uses the compile jar (my plugin) gets placed in the applications plugin directory. Is there anyway I can go about debugging this jar (which I have to source to) in execution of an application I do not have the source to?
I'm using Eclispe Juno as my IDE.
I would say yes, if you can start the application that you plugin plugs in into :).
java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=4000,suspend=n myapp
to start then in eclipse setup a remote-debugging session setting it up to connect to your app running in the java debug mode to the localhost on the port 4000
This linky will probably solve all your eclipse problems
http://javarevisited.blogspot.com/2011/02/how-to-setup-remote-debugging-in.html

maven deploy fails on jre1.7

This is more for reference than anything but i kept hitting my head against the wall for the last few nights.
I kept getting the CONNECTION RESET error back from maven when trying to use FTP to deploy files to an external repo.
All the maven settings were set up correctly.
I eventually decided to try the POM file on my other dev computer and it worked.
This then caused me to look through the setup of the systems, and i realised that my laptop was using JDK1.7 whereas my main computer was using JDK1.6.0r31
If you encounter the same issue trying to deploy your files through FTP (might occur on anything really) then make sure you try JDK1.6.
If you are running Windows 7, could this bug have something to do with it?
Try using the -Djava.net.preferIPv4Stack=true option when running Java with Windows 7 and see if this fixes the problem.

eclipse workspace is closed problem

How to get access to eclipse workspace from java program.
When I use IWorkspace workspace = ResourcesPlugin.getWorkspace().getRoot() it gives me exception like this
java.lang.IllegalStateException: Workspace is closed.
at org.eclipse.core.resources.ResourcesPlugin.getWorkspace(ResourcesPlugin.java:329)
at amdocs.amsp.test.EMFCodeGen.load(EMFCodeGen.java:37)
at amdocs.amsp.test.EMFCodeGen.main(EMFCodeGen.java:26)
can you tell me how to get access to workspace from a standalone java program out side of eclipse. (of ourse there is a classpath with all the jar required for that)
Are you trying to do it in OSGi based application (eqinox for example)? Because workspace is created upon start of org.eclipse.core.resources bundle that should be managed by framework, exception of yours means that bundle probably didn't start yet.
As far as I understand this, the workspace retrieved with ResourcesPlugin.getWorkspace() is the workspace the running Platform is using, if Platform.isRunning(). So if you are running a plain Java application, not an Eclipse application, there is no such thing as the workspace.
If you want to run your application like this it must be headless. Following you can see how to create a headless project:
Going Headless

Categories