Deployment Error Weld-001408 with WLS12c and OEPE - eclipse

I created the following projects in OEPE:
weld001408 (Java EE - Enterprise Application Project)
weld001408utility (Java EE - Uitility Project), belongs to the ear weld001408
weld001408web (Web - Dynamic Web Project), belongs to the ear weld001408
When I created the project, I didn't change the defaults (onley ear-membership) and the target-runtime is Oracle WebLogic Server 12.1.1. And the clean domain, created with the wizard, is added to the workspace.
The Code is the following:
utility-project
class 'weld001408utility/ValueProducer.java'
package weld001408utility;
import javax.enterprise.inject.Produces;
public class ValueProducer {
#Produces
public String stringValue() {
return "someStringValue";
}
}
META-INF/beans.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
</beans>
web-project
weld001408web/ValueConsumerServlet.java
package weld001408web;
import java.io.IOException;
import java.io.PrintWriter;
import javax.inject.Inject;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* Servlet implementation class ValueConsumerServlet
*/
#WebServlet("/ValueConsumerServlet")
public class ValueConsumerServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
#Inject
private String injectedValue;
/**
* #see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
PrintWriter pw = response.getWriter();
pw.write("injectedValue: " + injectedValue);
pw.flush();
}
}
WEB-INF/beans.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
</beans>
The issue
Now when I try to deploy the application in Eclipse, I get always a WELD-001408 error:
<01.03.2013 10:07 Uhr MEZ> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
weblogic.management.DeploymentException:
at weblogic.application.internal.BaseDeployment.throwAppException(BaseDeployment.java:123)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:239)
at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:61)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:158)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
Truncated. see log file for complete stacktrace
Caused By: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [String] with qualifiers [#Default] at injection point [[field] #Inject private weld001408web.ValueConsumerServlet.injectedValue]
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:258)
at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:105)
at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:125)
at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:324)
at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:309)
Truncated. see log file for complete stacktrace
>
But when I export the ear from eclipse and deploy that file over the weblogic administration console, then everything's working fine and the value is correctly injected to the servlet. No problems on deployment, nothing.
There are some patches for weblogic around and I have the latest installed (I checked a lot bugs which could belongs to my problem, and they should all included with 12.1.1.0.2):
WebLogic Server 12.1.1.0.2 PSU Patch for BUG14331523 Thu Oct 11 15:08:09 IST 2012
WebLogic Server 12.1.1.0 Wed Dec 7 08:40:57 PST 2011 1445491 >
I tried the same application on Windows Vista and on a Linux based System with the latest OEPE Versions (all-in-one package), no success...
The question
Has somone the exact same issue? Is it possible for someone to reproduce the problem? And when not, on which configuration with what patches is it working?
I don't know if it's a Oracle Enterprise Pack for Eclipse or an WebLogic-Issue.
Thanks for helping!

I solved the problem as stated below. Added pictures to make it easier.
Goto Eclipse Servers (View), right click on the weblogic server 12.1.3 and click on properties.
In Weblogic --> Publishing, select 'Publish as an exploded archive'

Related

Getting error while servlet program HTTP Status 404

I am new to Servlets. Anyhow, My Server runs just fine, I can access my index.html and everything is working but when I try to run my servlet on the server it gives me 404 error
I tried tp restart server, edit the web.xml file but no luck, there's also some older questions on SO for the same question, but all different from my case. Tried urlPatters{"/SimpleServlet"} also no luck..
Running on a Linux machine with Eclipse Luna and tomcat7.
Here's my servlet
package com.bgt.zaa;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* Servlet implementation class SimpleServlet
*/
#WebServlet("/SimpleServlet")
public class SimpleServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* #see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
System.out.println("Hello World");
}
}
and here's my xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>SinmpleServletProject</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
The error:
Seems a typo mistake in your URL.
try this
127.0.0.1:8080/SimpleServletProject/SimpleServlet
instead of
127.0.0.1:8080/SinmpleServletProject/SimpleServlet
your 404 URL has SinmPleServletProject. An extra n, I guess.
HTTP 404 means, requested resource is not found. So most probably the Servlet is not started properly (or) the project context root is different.

WebLogic 12.1.3 error WELD-001408 Unsatisfied dependencies

WebLogic 12.1.3 fails when deploying a web application with a simple CDI injection. The following exception is thrown:
weblogic.application.ModuleException: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [Interface2] with qualifiers [#Default] at injection point [[field] #Inject public pruebas1.Clase1.clase2]
at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:140)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:216)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:211)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
Truncated. see log file for complete stacktrace
Caused By: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [Interface2] with qualifiers [#Default] at injection point [[field] #Inject public pruebas1.Clase1.clase2]
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:315)
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:284)
at org.jboss.weld.bootstrap.Validator.validateInjectionTarget(Validator.java:342)
at org.jboss.weld.manager.InjectionTargetValidator.addInjectionTarget(InjectionTargetValidator.java:29)
at org.jboss.weld.manager.BeanManagerImpl.createInjectionTarget(BeanManagerImpl.java:943)
Truncated. see log file for complete stacktrace
>
When i deploy the war in WebLogic 12.1.3 (Zip Distribution and Installers for Developers) inside OEPE 12.1.3.2 i get the error described. But, whith WebLogic 12.1.1 (Zip Distribution and Installers for Developers) inside the same OEPE 12.1.3.2 there is no problem. Neither there isn't problem if i export thye war file and deploy with the web console without OEPE integration. Additionally, when i deploy the war in WebLogic 12.1.3. standalone ("full" release) there is no problem.
I encountered too, that the MANIFEST.MF file (inside wlserver/server/lib/api.jar) references "javax.inject_1.jar" that doesn't exist in wlserver/modules folder. Instead there is the file "javax.inject-1.jar". To make my project working (import the class javax.inject.Inject class) i copied a file named javax.inject_1.jar from the javax.inject-1.jar file in the same folder.
The war java source structure is:
src
pruebas1
Clase1.java
pruebas2
Clase2.java
Interface2.java
The war WebContent structure is:
WebContent
WEB-INF
beans.xml
weblogix.xml
Classes and interface:
#WebService
public class Clase1 {
#Inject
public Interface2 clase2;
#WebMethod
public String aMayusculas(#WebParam(name = "palabra") String palabra) {
long tm = System.currentTimeMillis();
System.out.println(tm + " - clase2: " + (clase2 == null ? "null" : clase2.toString()));
return palabra == null ? "null" : tm + " - " + palabra.toUpperCase();
}
}
public interface Interface2 {
void doIt(String a);
}
public class Clase2 implements Interface2 {
#Override
public void doIt(String a) {
System.out.println(a);
}
}
XML files:
beans.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
</beans>
weblogic.xml
<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-web-app xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.4/weblogic-web-app.xsd">
<wls:weblogic-version>12.1.3</wls:weblogic-version>
<wls:context-root>prueba05weblogic</wls:context-root>
</wls:weblogic-web-app>
Thanks in advance.
Efren V.
The problem was resolved.
I created a SR in Oracle support site. Oracle built an internal patch.
Efren.
After three days searching, we found that the project only worked if deployed through the weblogic console, if we deployed through oracle plugin in eclipse it wont work.
So, if you are using eclipse, in the "servers" view, right click weblogic server, click "Properties -> Weblogic -> Publishing", change the radio "Pubish as a virtual application" to "Publish as exploded archive"
you can replace #Inject annotation with #Produces as workaround

Separating Java EE components in different projects

i'm trying to learn how to separate java EE components.
i want to separate my jpa entities, ejbs, and web client into different projects
so i developed four different projects and compiled them in their own jars/wars
DomainEntities - contains my JPA entities
RemoteInterface - contains remote interfaces (i'm trying to separate the implementation)
RemoteEJB - implements the interface from RemoteInterface (project 2)
WebApp Client (i have a servlet that calls RemoteInterface to test if the ejb is working)
DomainEntities' jar structure is
DomainEntities
-META-INF
-MANIFEST.MF
-entities
-Student.class
RemoteEJB's jar structure is
RemoteEJB
-META-INF
-MANIFEST.MF
-persistence.xml
-sample
MyStatelessBean.class
The persistence.xml in RemoteEJB is (based on searching the web):
<?xml version="1.0" encoding="UTF-8"?> <persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="RemoteEJBPU" transaction-type="JTA"><provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<jta-data-source>jdbc/pwucdb</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<!--<jar-file>DomainEntities.jar</jar-file>-->
</persistence-unit>
</persistence>
the jta datasource is defined in my glassfish server.
the exclude-unlisted-classes and jar-file tags are based on my research on separating the jpa entities on a different jar. when i uncomment the jar-file tag, the ejb cannot be deployed to the server,so i comment it.
the servlet that calls uses the ejb is:
#WebServlet(name = "NewServlet", urlPatterns = {"/NewServlet"})
public class NewServlet extends HttpServlet {
#EJB
private MyRemoteInterface myRemoteInterface;
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
try (PrintWriter out = response.getWriter()) {
out.println(myRemoteInterface.getMessage());
out.println("Num of records retrived: " + myRemoteInterface.getStudents().size());
}
}
#Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}
#Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}
}
when i try to access the servlet i am having this warning/error
WARNING: The collection of metamodel types is empty. Model classes may not have been found during entity search for Java SE and some Java EE container managed persistence units. Please verify that your entity classes are referenced in persistence.xml using either <class> elements or a global <exclude-unlisted-classes>false</exclude-unlisted-classes> element
WARNING: A system exception occurred during an invocation on EJB MyStatelessBean method public java.util.List sample.MyStatelessBean.getStudents()
javax.ejb.EJBException
.....
Caused by: java.lang.IllegalArgumentException: An exception occurred while creating a query in EntityManager:
Exception Description: Error compiling the query [SELECT s FROM Student s]. Unknown entity type [Student].
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.createQuery(EntityManagerImpl.java:1477)
if i comment out exclude-unlisted-classes tag, uncomment the jar-file tag and deploy. i get this server warning:
a jar-file [DomainEntities.jar] specified in persistence.xml is not found
The server also looked for a file called [...\build\DomainEntities_jar].
I recommend to bundle that JAR's and WAR's into an EAR-Archive.
If you use maven you could add this plugin to the EAR's pom:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>2.8</version>
<configuration>
<version>6</version>
<encoding>${project.build.sourceEncoding}</encoding>
<defaultLibBundleDir>APP-INF/lib</defaultLibBundleDir>
<fileNameMapping>no-version</fileNameMapping>
<displayName>${project.artifactId}</displayName>
<modules>
<jarModule>
<groupId>${project.groupId}</groupId>
<artifactId>domain</artifactId>
</jarModule>
<ejbModule>
<groupId>${project.groupId}</groupId>
<artifactId>ejb</artifactId>
</ejbModule>
</modules>
</configuration>
</plugin>
Thus all libs of the EAR will be copied into /APP-INF/lib.
In this scope its now accessible from the EJB view. Just call it like this:
<jar-file>APP-INF/lib/domain.jar</jar-file>
Note the
<fileNameMapping>no-version</fileNameMapping>
thats really important if you want to change the version of your domain-archive frequently otherwise you have to edit the EJB's persistence.xml all the time ;)
Some additions:
If you bundle everything into an EAR-Archive its not neccessary to use Remote Interfaces anymore. You just need Local Interfaces for that. Thats a good thing because accessing an EJB over Remote Interfaces is much slower than accessing them with Local Interfaces. Thats because Java serializes all objects to send them over the network.

Simple Servlet with Eclipse Juno and J2EE Preview server

I'm trying to create my first HelloWorld servlet with Eclipse Juno and view it in the J2EE Preview Server.
This is my Servlet class:
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* Servlet implementation class HelloWorld
*/
public class HelloWorld extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* #see HttpServlet#HttpServlet()
*/
public HelloWorld() {
super();
// TODO Auto-generated constructor stub
}
/**
* #see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter pw = response.getWriter();
pw.println("<html>");
pw.println("<head><title>Hello World</title></title>");
pw.println("<body>");
pw.println("<h1>Hello World</h1>");
pw.println("</body></html>");
}
/**
* #see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
}
}
And this is my web.xml automatically generated by eclipse:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>HelloWorld</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<servlet>
<description></description>
<display-name>HelloWorld</display-name>
<servlet-name>HelloWorld</servlet-name>
<servlet-class>HelloWorld</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloWorld</servlet-name>
<url-pattern>/HelloWorld</url-pattern>
</servlet-mapping>
</web-app>
When I select "Run on Server" > "J2EE Preview" I get this:
Error 404 - Not Found
No context on this server matched or handled this request. Contexts
known to this server are:
HelloWorld(/HelloWorld)
Where am I doing wrong?
In "J2EE Preview" Server, context path is the name of the project. When you start the server, this list all contextpaths available.
For example, if your applications is named "app1", your URL will be "http://localhost:8080/app1/HelloWorld"
I had the same issue, and couldn't make it work.
I created a much simplier application, just a hello world JSP page.
This process is very basic, you create a web dynamic project and create a index.jsp file under the WebContent directory, this should be good enough to start your application by run as -> run in server -> J2EE preview but always get:
404 not found
No context on this server matched or handled this request.
Contexts known to this server are:
test(/test)
I have heard eclipse juno is not as stable as indigo, i just downloaded the indigo Java EE version did exacly the same and it worked properly no issues.
Edit:
I Forgot to mention that you can download another Application Server such as JBoss or Glassfish and try to run on your application on them, that should fix your problem.
You can try to fix this issue by deleting all the files and folders into your workspace, delete the .metadata folder and all the content of it, the start eclipse and try again this may works.
Hope this can help you.
Regards!

JPA createEntityManagerFactory "Unknown Source" error (non-J2EE)

I can't find what's wrong: many people seem to have issues with creating a EntityManagerFactory using the PU name. But I've checked all the suggestions, and none helped so far.
I'm trying to build my first JavaFX2 app. It is a small dictionary application, originally built on the Netbeans Application framework (by extending the default "Master-Detail" generated classes). It uses a SQLite db.
I'm now porting it over from there to another (JavaFX2-enabled) project. I first set out to rebuild the JPA persistence stuff in the new app. As far as I can see, I have everything in place: META-INF/persistence.xml with all the necessary entity classes declarated, using the same DB connection as the original application.
I added eclipselink-2.3.0.jar; eclipselink-javax.persistence-2.0.jar and eclipselink-jpa-modelgen-2.3.0.jar to the project.
Instead of the Application Context I use a simple Properties class to hold the data (such as queries) that previously went in the .properties files.
This is the test class:
package ithildinfx;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.Group;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
import javafx.scene.control.cell.PropertyValueFactory;
import javafx.stage.Stage;
import javafx.beans.property.StringProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
public class IthildinFX extends Application {
private void init(Stage primaryStage) {
entityManager = javax.persistence.Persistence.createEntityManagerFactory("IthildinFXPU").createEntityManager();
entryQuery = entityManager.createQuery(Properties.entryQuery).setParameter("gloss", "a%");
entryList = entryQuery.getResultList();
Group root = new Group();
primaryStage.setScene(new Scene(root));
(TableColumn definitions)
(TableView code)
root.getChildren().add(tableView);
}
#Override
public void start(Stage primaryStage) throws Exception {
init(primaryStage);
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
private javax.persistence.EntityManager entityManager;
private java.util.List<ithildinfx.Entry> entryList;
private javax.persistence.Query entryQuery;
}
And this is the contents of persistence.xml:
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="IthildinFXPU" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<class>ithildinfx.Dataclass</class>
<class>ithildinfx.Metadata</class>
<class>ithildinfx.Translation</class>
<class>ithildinfx.Entry</class>
<class>ithildinfx.TrMd</class>
<class>ithildinfx.Language</class>
<properties>
<property name="javax.persistence.jdbc.url" value="jdbc:sqlite:lib/db/ithildin-13-11-11.db"/>
<property name="javax.persistence.jdbc.password" value=""/>
<property name="javax.persistence.jdbc.driver" value="org.sqlite.JDBC"/>
<property name="javax.persistence.jdbc.user" value=""/>
</properties>
</persistence-unit>
</persistence>
One of the suggestions that I read here on StackOverflow was to add this line to manifest.mf:
Meta-Persistence: META-INF/persistence.xml
and, possibly:
JPA-PersistenceUnits: IthildinFXPU
But neither made any difference.
This is the output that I invariably get:
Building jar: /Users/luthien/NetBeansProjects/IthildinFX/dist/IthildinFX.jar
Copy libraries to /Users/luthien/NetBeansProjects/IthildinFX/dist/lib.
Building jar: /Users/luthien/NetBeansProjects/IthildinFX/dist/IthildinFX.jar
Detected JavaFX Ant API version 1.1
Deleting: /Users/luthien/NetBeansProjects/IthildinFX/dist/IthildinFX.jar
Deleting: /Users/luthien/NetBeansProjects/IthildinFX/dist/lib/IthildinFX.jar
Deleting: /Users/luthien/NetBeansProjects/IthildinFX/dist/README.TXT
Skip jar copy to itself: IthildinFX.jar
Skip jar copy to itself: lib/eclipselink-2.3.0.jar
Skip jar copy to itself: lib/eclipselink-javax.persistence-2.0.jar
Skip jar copy to itself: lib/eclipselink-jpa-modelgen-2.3.0.jar
Skip jar copy to itself: lib/sqlite-jdbc-3.7.2.jar
jfx-deployment:
jar:
run:
Exception in Application start method
java.lang.NullPointerException
at javax.persistence.spi.PersistenceProviderResolverHolder$DefaultPersistenceProviderResolver.getProviderNames(Unknown Source)
at javax.persistence.spi.PersistenceProviderResolverHolder$DefaultPersistenceProviderResolver.getPersistenceProviders(Unknown Source)
at javax.persistence.Persistence.createEntityManagerFactory(Unknown Source)
at javax.persistence.Persistence.createEntityManagerFactory(Unknown Source)
at ithildinfx.IthildinFX.init(IthildinFX.java:29)
at ithildinfx.IthildinFX.start(IthildinFX.java:109)
at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:298)
at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:136)
at com.sun.javafx.application.PlatformImpl$3.run(PlatformImpl.java:108)
JavaFX application launcher: calling System.exit
jfxsa-run:
BUILD SUCCESSFUL (total time: 5 seconds)
The libraries seem to all be in the right place - in any case, they are in the same place as they are in the first application. It might be that the Netbeans Application framework does some scary voodoo under the bonnet, but I really don't know how to figure that out.
Does anyone know of a reason why it can't seem to find the PU?
Thanks in advance!
Luthien
There error is coming from the JPA library itself, it seems that JPA is not configured correctly. The issue dos not seem to have anything to do with the persistence unit, the JPA library seems to have issues, looks like it can't find its services file resource.
Maybe remove eclipselink-javax.persistence-2.0.jar, if you server already has JPA on its classpath, there could be a conflict.