Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to handle conflicting dependencies in Java (EE)
    primarykey
    data
    text
    <p>I'm developing an enterprise application on Java EE 6 platform. The IDE is NetBeans 7.2 and the application server is GlassFish 3.1.2.2.</p> <p>The business logic has to use a library (HBase-RDF to be specific) to handle some tasks in its core. The original HBase-RDF code depends on many packages of which I believe their newer versions are already used by Glassfish. For instance, I can see javax.xml, javax.activation, com.sun.jersey and similar packages already included in the jar files.</p> <p>Although I had previously developed not-so-trivial Java EE applications in the past, I have faced countless headaches developing the application which may or may not be related to this. From what I had read on the web, including dozens of stackoverflow questions and bug tracking systems, I guess I may be able to get rid of some of those headaches if I can package the original library (HBase-RDF) with all its dependencies as a whole jar file and prevent them being included directly in the project.</p> <p>My first question is, am I right about the cause of the problems? Can this be the source of my problems? I guess the answer would be yes, because I have already solved one of my problems by removing JAXB and Xerces jars from the classpath and fortunately those portions of the Hbase-RDF I have to work with does not engage them.</p> <p>And the second question is, in case that I'm right about the previous question, how can I do this? How can I restrict these libraries to be used only by one library (Hbase-RDF)?</p> <hr> <p>NOTE: It may be useful to say that the build process finishes without any problems, but I face two major problems deploying and running the project. First, the application deploys successfully on my local Glassfish instance which is installed alongside netbeans, but the same .ear package fails to deploy on another same-version instance and the server.log file does not contain anything helpful for finding the cause of the problem. The error is very similar to <a href="https://stackoverflow.com/questions/7195243/exception-while-loading-the-app-without-a-stack-trace">this</a> but the proposed solutions don't work. The second problem is very similar to <a href="https://stackoverflow.com/questions/1617191/deploy-war-through-netbeans-onto-glassfish-v3-beta">this</a> and again, I have tried every single proposed solution with no luck. It's interesting to see that the web service inside the web module calls the EJB successfully, but the JSF facelet index.html fails to run.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload