• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hello, I am new to Java (I use C#), and simply can not run an easy Web App  RSS feed

 
Super Tigre
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Girls and Boys from this forum

I have to learn Java, I am already good on C# ... I thought there would be no problem ...

Then I met GlassFish and NetBeans ... and a long sort of errors started to occur when I tried to run a just created Web App Project ... such as :

"Verify that NetBeans can make outbound to localhost : 4848" (even if I deselect [] Use IDE's proxy settings)

"The Java DB location is not set correctly"

Another thing I didn`t find is the Design view to create the Web Form, I suposed it should exist, as it does on .NET

Could you help me?

Thanks

PS I'm from Bs As Argentina

 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

The errors that you mention are a bit vague, so it is hard to give you exact instructions on how to solve them.

It looks like NetBeans wants to use port 4848. You have to make sure that your firewall software isn't blocking access to that port. I don't know about "the Java DB location is not set correctly". Without more details about exactly what you're doing, it's hard to say anything more about that.

Super Tigre wrote:Another thing I didn`t find is the Design view to create the Web Form, I suposed it should exist, as it does on .NET

Just because something exists on .NET doesn't mean it exists in exactly the same way in Java.
 
Super Tigre
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I disabled the Firewall, but it wasn´t that the problem ...

I can´t even start GlassFish, and that generates a very long error message

What should I do? Or where should I go to solve this? Is there any part of the ranch where there is a guide for this Java problems?

Or can you tell me all things that could solve this, then I supose someone of them will work?

Thanks
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Super Tigre wrote:What should I do? Or where should I go to solve this? Is there any part of the ranch where there is a guide for this Java problems?

Or can you tell me all things that could solve this, then I supose someone of them will work?

Explain in detail what you did, if you are following a book or tutorial tell us where we can find it and at which step you are, post the exact error message - TellTheDetails

With only "there is some long error message" it's very hard to help you. Imagine that your car is broken, and you go onto some forum and ask "My car is broken, can you please tell me how to fix it?", without explaining any more details. Or you ask "My car is broken, can you please give me a list of all possible things that can be wrong with it and how to fix them?". That's not a very effective way to solve problems...
 
Super Tigre
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Boys, thank you for your advise

This is the error message the compiler throws to my just created and not edited web application

ant -f "C:\\Documents and Settings\\xp\\Mis documentos\\NetBeansProjects\\Mi Web App" -DforceRedeploy=false dist
init:
deps-module-jar:
deps-ear-jar:
deps-jar:
Created dir: C:\Documents and Settings\xp\Mis documentos\NetBeansProjects\Mi Web App\build\web\WEB-INF\classes
Created dir: C:\Documents and Settings\xp\Mis documentos\NetBeansProjects\Mi Web App\build\web\META-INF
Copying 1 file to C:\Documents and Settings\xp\Mis documentos\NetBeansProjects\Mi Web App\build\web\META-INF
Copying 2 files to C:\Documents and Settings\xp\Mis documentos\NetBeansProjects\Mi Web App\build\web
library-inclusion-in-archive:
library-inclusion-in-manifest:
Created dir: C:\Documents and Settings\xp\Mis documentos\NetBeansProjects\Mi Web App\build\empty
Created dir: C:\Documents and Settings\xp\Mis documentos\NetBeansProjects\Mi Web App\build\generated-sources\ap-source-output
C:\Documents and Settings\xp\Mis documentos\NetBeansProjects\Mi Web App\nbproject\build-impl.xml:851: The following error occurred while executing this line:
C:\Documents and Settings\xp\Mis documentos\NetBeansProjects\Mi Web App\nbproject\build-impl.xml:284: Class not found: javac1.8
BUILD FAILED (total time: 0 seconds)

****************************************************************************************************************************
And when trying to start GlassFish, this. If I'm not wrong, this means that even if my web app had compiled fine, it wouldn't have run


Launching GlassFish on Felix platform
ERROR: Bundle jaxb-api [2]: Error starting file:/C:/Archivos%20de%20programa/glassfish-3.1.1/glassfish/modules/endorsed/jaxb-api-osgi.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle jaxb-api [2]: Unable to resolve 2.0: missing requirement [2.0] package; (package=javax.activation))
org.osgi.framework.BundleException: Unresolved constraint in bundle jaxb-api [2]: Unable to resolve 2.0: missing requirement [2.0] package; (package=javax.activation)
ERROR: Bundle org.glassfish.metro.webservices-api-osgi [3]: Error starting file:/C:/Archivos%20de%20programa/glassfish-3.1.1/glassfish/modules/endorsed/webservices-api-osgi.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle org.glassfish.metro.webservices-api-osgi [3]: Unable to resolve 3.0: missing requirement [3.0] package; (&(package=javax.xml.bind)(version>=2.2.0)) [caused by: Unable to resolve 2.0: missing requirement [2.0] package; (package=javax.activation)])
ERROR: Bundle org.glassfish.core.glassfish [149]: Error starting file:/C:/Archivos%20de%20programa/glassfish-3.1.1/glassfish/modules/glassfish.jar (org.osgi.framework.BundleException: Activator start error in bundle org.glassfish.core.glassfish [149].)
ERROR: Bundle com.sun.enterprise.osgi-adapter [256]: Error starting file:/C:/Archivos%20de%20programa/glassfish-3.1.1/glassfish/modules/osgi-adapter.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle com.sun.enterprise.osgi-adapter [256]: Unable to resolve 256.0: missing requirement [256.0] package; (&(package=com.sun.enterprise.module)(version>=1.1.0)) [caused by: Unable to resolve 170.0: missing requirement [170.0] package; (&(package=org.jvnet.hk2.config)(version>=1.1.0)) [caused by: Unable to resolve 55.0: missing requirement [55.0] package; (package=javax.management)]])
at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3443)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1727)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1156)
at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
at java.lang.Thread.run(Thread.java:722)
org.osgi.framework.BundleException: Unresolved constraint in bundle org.glassfish.metro.webservices-api-osgi [3]: Unable to resolve 3.0: missing requirement [3.0] package; (&(package=javax.xml.bind)(version>=2.2.0)) [caused by: Unable to resolve 2.0: missing requirement [2.0] package; (package=javax.activation)]
at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3443)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1727)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1156)
at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
at java.lang.Thread.run(Thread.java:722)
java.lang.NoClassDefFoundError: com/sun/enterprise/module/bootstrap/BootException
at com.sun.enterprise.glassfish.bootstrap.osgi.GlassFishMainActivator.start(GlassFishMainActivator.java:103)
at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:629)
at org.apache.felix.framework.Felix.activateBundle(Felix.java:1835)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1752)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1156)
at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ClassNotFoundException: com.sun.enterprise.module.bootstrap.BootException not found by org.glassfish.core.glassfish [149]
at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:787)
at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 7 more
org.osgi.framework.BundleException: Unresolved constraint in bundle com.sun.enterprise.osgi-adapter [256]: Unable to resolve 256.0: missing requirement [256.0] package; (&(package=com.sun.enterprise.module)(version>=1.1.0)) [caused by: Unable to resolve 170.0: missing requirement [170.0] package; (&(package=org.jvnet.hk2.config)(version>=1.1.0)) [caused by: Unable to resolve 55.0: missing requirement [55.0] package; (package=javax.management)]]
at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3443)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1727)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1156)
at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
at java.lang.Thread.run(Thread.java:722)
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:55)
Caused by: org.glassfish.embeddable.GlassFishException: org.glassfish.embeddable.GlassFishException: No GlassFishRuntime available
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntimeBuilder.build(OSGiGlassFishRuntimeBuilder.java:164)
at org.glassfish.embeddable.GlassFishRuntime._bootstrap(GlassFishRuntime.java:157)
at org.glassfish.embeddable.GlassFishRuntime.bootstrap(GlassFishRuntime.java:110)
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:112)
... 6 more
Caused by: org.glassfish.embeddable.GlassFishException: No GlassFishRuntime available
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntimeBuilder.getGlassFishRuntime(OSGiGlassFishRuntimeBuilder.java:202)
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntimeBuilder.build(OSGiGlassFishRuntimeBuilder.java:162)
... 9 more
Error stopping framework: java.lang.NullPointerException
java.lang.NullPointerException
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher$1.run(GlassFishMain.java:203)
Java HotSpot(TM) Client VM warning: ignoring option MaxPermSize=192m; support was removed in 8.0

********************************************************************************************************************************
Actually, I found out that I don't know what files I need to make a web app, neither which the project main file is, neither how to draw the controls nor where
(But, I was able to do some win forms, and its code, then I supose I'll learn this)
Thanks for your help

I'm not following a tutorial neither reading a book
I saw by there it said "No GlassFish Runtime available" ... I'll check out my GlassFish installation
The link to Bear's mooseage is broken, the other one I read it

Pablo


 
E Armitage
Rancher
Posts: 989
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Super Tigre wrote:
I'm not following a tutorial neither reading a book


You will need to follow a tutorial and read a book. Download the Java EE tutorial from the oracle website (it's free) and go through sections you think you will need to accomplish your task. The link to the EE7 version is http://docs.oracle.com/javaee/7/tutorial/doc/
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!