• Post Reply Bookmark Topic Watch Topic
  • New Topic

Glassfish Changing from MAc to Linux developing environment  RSS feed

 
Peter Noordzij
Greenhorn
Posts: 28
Java jQuery Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On a Mac I developed and runned a Java EE application succesfully.
It is an EAR with a EJB module and a Web module.
Now continuing on a Linux device (Ubuntu) , I cant start exactly the same application anymore.

I tried running the application with:

The commandline:

the admin console in the browse rhttp://localhost:4848:
Applications/-> Deploy.. selecting Snapshot.jar

And with Netbeans with all the same result:
After building with dependecies and running.
It tells its succesfully running. But in services Servers/glassfish Server/applications/ nothing appears and the output is the server.log:


What could be the problem?The app did not change, its the environment.
Please help me out.
I would love to continue developping this app!
Thanks
 
K. Tsang
Bartender
Posts: 3648
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello

If you look at the log carefully you would notice

Invalid destination jms/NewMessage for MDB: JNDI name not found


So it's probably not your app but server configuration. Is the JNDI for JMS queue/topic there? What about DB connection pool or persistence unit.

I suggest you look at your Mac screen and compare that to Linux.
 
Peter Noordzij
Greenhorn
Posts: 28
Java jQuery Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well I've installed Ubuntu on my Mac and retrieved the code with git.
So unfortunately I can´t compare with my Mac (anymore).

The persistence unit created the DB automatically when not already available, the db was the default javadb. This is how it worked on my Mac, just out of the box.
The other WAR application besides the EJB container contains no persistence parts and shows a 404 error in the browser. So here the entity manager is not the problem, is my conclusion.

Where can I select the JNDI name?

After googling around I found the problem had to do with syntax.

For example on:
http://stackoverflow.com/questions/7110563/glassfish-v3-cant-deploy-messagedriven-bean-missing-destination-jndi-name
¨
I got the same error. The problem was:
@ActivationConfigProperty(propertyName = "destination", propertyValue = "jms/SampleTopic")
This need to be
@ActivationConfigProperty(propertyName = "destination", propertyValue = "SampleTopic")
¨
Whe´re can I set this property?
Whe´re is the Glassfish configuration file?

Meanwhile I guess I´ll be studying: https://glassfish.java.net/docs/4.0/reference-manual.pdf
To understand the bigger glassfish picture.
 
Peter Noordzij
Greenhorn
Posts: 28
Java jQuery Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the´re a quick overview (manual) available to understand how to setup glassfish?
The´re is probably an easy way to understand glassfish that I´m just missing.
Apache has just a couple of configuration files almost all in the same default folder.
 
Peter Noordzij
Greenhorn
Posts: 28
Java jQuery Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could someone please guide me through this?
 
Peter Noordzij
Greenhorn
Posts: 28
Java jQuery Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I found the domain.xml file. ~/glassfish4/glassfish/domains/domain1/config/domain.xml In that file I wasn't able to find anything about the com.sun.appserv.*. packages. The app used to work with this default file (on Mac). With the asadmin terminal I tried to add custom Resources. And they whe're Listed. After restarting glassfish no different result.

The application deployment guide https://glassfish.java.net/docs/4.0/application-deployment-guide.pdf mentionned about glassfish-ejb-jar.xml and about ejb-jar.xml. I was only able to find these files for version 3.1. http://docs.oracle.com/cd/E26576_01/doc.312/e24929/dd-files.htm#GSDPG00080 But the app was capable on running with the default settings, so without these files.

What can I check next?
 
Peter Noordzij
Greenhorn
Posts: 28
Java jQuery Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SOLVED:

After I read the Glassfish manual https://glassfish.java.net/docs/4.0/application-deployment-guide.pdf
And placed the glassfish-ejb-jar.xml into:
App/Other Sources/src/main/resources/META-INF.


This location wasn't in the manual but found it on:
https://blogs.oracle.com/JagadishPrasath/entry/application_scoped_resources_in_glassfish

This Solved the error, and I finally got to understand Glassfish a bit better.
Hope I can help someone in the future with this info.

But how did this App run on the Mac (Netbeans Glassfish installation) then?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!