Discussion:
NetBeans Platform CRUD Application Tutorial (with Maven) build issues
halis
2012-10-23 13:43:46 UTC
Permalink
Hi,

I am working my way through the NB Platform CRUD Tutorials. First I completed the one with Maven (http://platform.netbeans.org/tutorials/nbm-maven-crud.html) and now almost at the end of Platform CRUD Application (http://platform.netbeans.org/tutorials/nbm-crud.html)

The trouble is that when I try to build after completing "Enable the Undo/Redo Actions for the Editor" I get the following error:


Code:

Private classes referenced in module: [javax.persistence.Persistence, javax.persistence.Query, javax.persistence.EntityManager, javax.persistence.EntityTransaction, javax.persistence.EntityManagerFactory]
Project depends on packages not accessible at runtime in module com.mycompany:MavenPlatformCRUDApp-dbaccess:jar:1.0-SNAPSHOT




This refers to the EntityManager related code in the handleSave() method of the:
Code:
private class MySavable extends AbstractSavable implements Icon.



I have exhausted google search but couldn't find a solution for it. Any help would be much appreciated. I am using NB 7.2.1:


Product Version: NetBeans IDE 7.2.1 (Build 201210100934)
Java: 1.6.0_30; Java HotSpot(TM) Client VM 20.5-b03
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
User directory: C:\Documents and Settings\User\Application Data\NetBeans\7.2.1
Cache directory: C:\Documents and Settings\User\Local Settings\Application Data\NetBeans\Cache\7.2.1


Thanks
H.
Geertjan Wielenga
2012-10-23 21:26:27 UTC
Permalink
The project depends on packages not accessible at runtime.

Gj
Post by halis
Hi,
I am working my way through the NB Platform CRUD Tutorials. First I completed the one with Maven (http://platform.netbeans.org/tutorials/nbm-maven-crud.html) and now almost at the end of Platform CRUD Application (http://platform.netbeans.org/tutorials/nbm-crud.html)
Private classes referenced in module: [javax.persistence.Persistence, javax.persistence.Query, javax.persistence.EntityManager, javax.persistence.EntityTransaction, javax.persistence.EntityManagerFactory]
Project depends on packages not accessible at runtime in module com.mycompany:MavenPlatformCRUDApp-dbaccess:jar:1.0-SNAPSHOT
private class MySavable extends AbstractSavable implements Icon.
Product Version: NetBeans IDE 7.2.1 (Build 201210100934)
Java: 1.6.0_30; Java HotSpot(TM) Client VM 20.5-b03
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
User directory: C:\Documents and Settings\User\Application Data\NetBeans\7.2.1
Cache directory: C:\Documents and Settings\User\Local Settings\Application Data\NetBeans\Cache\7.2.1
Thanks
H.
halis
2012-10-23 21:49:21 UTC
Permalink
Thanks for your reply Gj.

You are bang on. I am aware of the problem but don't know how to tell Netbeans to add the required dependencies via Maven. The other module for the "Viewer" has the JPA dependencies already, can access the DB fine and is added as a dependency to the "Editor" module that I am unable to build.

How can I add the necessary dependencies so that the Editor module builds properly and the whole application can run?

Cheers
H.
Post by Geertjan Wielenga
The project depends on packages not accessible at runtime.
Gj
Frédéric Deniger
2012-10-25 06:24:40 UTC
Permalink
In the Projects view, it's possible to right click on the folder
"Dependencies" and use the action "Add Dependency..."
Post by halis
Thanks for your reply Gj.
You are bang on. I am aware of the problem but don't know how to tell Netbeans to add the required dependencies via Maven. The other module for the "Viewer" has the JPA dependencies already, can access the DB fine and is added as a dependency to the "Editor" module that I am unable to build.
How can I add the necessary dependencies so that the Editor module builds properly and the whole application can run?
Cheers
H.
Post by Geertjan Wielenga
The project depends on packages not accessible at runtime.
Gj
halis
2012-10-25 15:28:50 UTC
Permalink
Post by Frédéric Deniger
In the Projects view, it's possible to right click on the folder
"Dependencies" and use the action "Add Dependency..."
Le 23/10/2012 23:49, halis a
I have tried that and added javax.persistence-2.0.3.jar and eclipselink-2.3.2.jar as direct dependencies but I get the following errors:


Code:
-------------------------------------------------------------------------------
Post by Frédéric Deniger
Log Session: Wednesday, October 24, 2012 1:40:23 PM EDT
Product Version = MavenPlatformCRUDApp 201207171143
Operating System = Windows XP version 5.1 running on x86
Java; VM; Vendor = 1.6.0_30; Java HotSpot(TM) Server VM 20.5-b03; Sun Microsystems Inc.
Runtime = Java(TM) SE Runtime Environment 1.6.0_30-b12
Java Home = C:\Program Files\Java\jdk1.6.0_30\jre
System Locale; Encoding = en_US (mavenplatformcrudapp); Cp1252
Home Directory = C:\Documents and Settings\User
Current Directory = G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp
User Directory = G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\userdir
Cache Directory = G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\userdir\var\cache
Installation = G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\bin
G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\etc
G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\mavenplatformcrudapp
G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform
G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform
Boot & Ext. Classpath = C:\Program Files\Java\jdk1.6.0_30\jre\lib\resources.jar;C:\Program Files\Java\jdk1.6.0_30\jre\lib\rt.jar;C:\Program Files\Java\jdk1.6.0_30\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.6.0_30\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.6.0_30\jre\lib\jce.jar;C:\Program Files\Java\jdk1.6.0_30\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.6.0_30\jre\lib\modules\jdk.boot.jar;C:\Program Files\Java\jdk1.6.0_30\jre\classes;C:\Program Files\Java\jdk1.6.0_30\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.6.0_30\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.6.0_30\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.6.0_30\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.6.0_30\jre\lib\ext\sunpkcs11.jar
Application Classpath = G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\lib\boot.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\lib\org-openide-modules.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\lib\org-openide-util-lookup.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\lib\org-openide-util.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\lib\locale\boot_ja.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\lib\locale\boot_pt_BR.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\applicati
on\target\mavenplatformcrudapp\platform\lib\locale\boot_ru.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\lib\locale\boot_zh_CN.jar;G:\gi!
t.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\lib\locale\org-openide-modules_ja.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\lib\locale\org-openide-modules_pt_BR.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\lib\locale\org-openide-modules_ru.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\lib\locale\org-openide-modules_zh_CN.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\lib\locale\org-openide-util-lookup_ja.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\lib\locale\org-openide-util-lookup
_pt_BR.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\lib\locale\org-openide-util-lookup_ru.jar;G:\git.clone\NB-examples\MavenPlatformCRU!
DApp\application\target\mavenplatformcrudapp\platform\lib\loca!
le\org-o
penide-util-lookup_zh_CN.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\lib\locale\org-openide-util_ja.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\lib\locale\org-openide-util_pt_BR.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\lib\locale\org-openide-util_ru.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\lib\locale\org-openide-util_zh_CN.jar;C:\Program Files\Java\jdk1.6.0_30\lib\dt.jar;C:\Program Files\Java\jdk1.6.0_30\lib\tools.jar
Startup Classpath = G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\core\core.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\core\org-openide-filesystems.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\core\locale\core_ja.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\core\locale\core_pt_BR.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\core\locale\core_ru.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\core\locale\core_zh_CN.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\applica
tion\target\mavenplatformcrudapp\platform\core\locale\org-openide-filesystems_ja.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\core\loca!
le\org-openide-filesystems_pt_BR.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\core\locale\org-openide-filesystems_ru.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\core\locale\org-openide-filesystems_zh_CN.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\mavenplatformcrudapp\core\locale\core_mavenplatformcrudapp.jar
-------------------------------------------------------------------------------
WARNING [org.netbeans.core.startup.NbEvents]: The extension G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\mavenplatformcrudapp\modules\ext\org.eclipse.persistence\javax.persistence-2.0.3.jar may be multiply loaded by modules: [G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\mavenplatformcrudapp\modules\com-mycompany-MavenPlatformCRUDApp-dbaccess.jar, G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\mavenplatformcrudapp\modules\com-mycompany-MavenPlatformCRUDApp-editor.jar]; see: http://www.netbeans.org/download/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/classpath.html#class-path
WARNING [org.netbeans.core.startup.NbEvents]: The extension G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\mavenplatformcrudapp\modules\ext\org.eclipse.persistence\eclipselink-2.3.2.jar may be multiply loaded by modules: [G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\mavenplatformcrudapp\modules\com-mycompany-MavenPlatformCRUDApp-dbaccess.jar, G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\mavenplatformcrudapp\modules\com-mycompany-MavenPlatformCRUDApp-editor.jar]; see: http://www.netbeans.org/download/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/classpath.html#class-path
INFO [org.netbeans.core.startup.NbEvents]: Turning on modules:
org.openide.util.lookup [8.15.1 201207171143]
org.openide.util [8.25.1 201207171143]
org.openide.modules [7.32.1 201207171143]
org.openide.filesystems [7.62.1 201207171143]
org.netbeans.api.annotations.common/1 [1.14.1 201207171143]
org.openide.awt [7.46.1 201207171143]
org.netbeans.api.progress/1 [1.28.1 201207171143]
org.openide.dialogs [7.25.1 201207171143]
org.openide.nodes [7.28.1 201207171143]
org.openide.windows [6.55.1 201207171143]
org.netbeans.modules.editor.mimelookup/1 [1.26.1 201207171143]
org.openide.text [6.49.1 201207171143]
org.netbeans.swing.tabcontrol [1.36.1 201207171143]
org.netbeans.swing.outline [1.20.1 201207171143]
org.openide.explorer [6.45.1 201207171143]
org.openide.actions [6.26.1 201207171143]
org.netbeans.modules.queries/1 [1.28.1 201207171143]
org.openide.loaders [7.37.1 201207171143]
org.openide.io [1.31.1 201207171143]
org.netbeans.swing.plaf [1.25.1 201207171143]
org.netbeans.spi.quicksearch [1.14.1 201207171143]
org.netbeans.bootstrap/1 [2.52.1 201207171143]
org.netbeans.core.startup/1 [1.40.1 201207171143]
org.netbeans.modules.settings/1 [1.35.1 201207171143]
org.netbeans.modules.sampler [1.1.1 201207171143]
org.netbeans.modules.progress.ui [1.20.1 201207171143]
org.netbeans.modules.print [7.13.1 201207171143]
org.netbeans.modules.keyring [1.11.1 201207171143]
org.netbeans.core/2 [3.33.1 201207171143]
org.netbeans.modules.options.api/1 [1.26.1 201207171143]
org.netbeans.modules.options.keymap [1.19.1 201207171143]
org.netbeans.modules.masterfs/2 [2.38.1 201207171143]
org.netbeans.libs.jna/1 [1.21.1 201207171143]
org.netbeans.modules.masterfs.windows [1.1.1 201207171143]
org.netbeans.modules.keyring.impl [1.7.1 201207171143]
org.netbeans.modules.favorites/1 [1.29.1 201207171143]
org.netbeans.modules.editor.mimelookup.impl/1 [1.18.1 201207171143]
org.netbeans.modules.autoupdate.services [1.33.1 201207171143]
org.netbeans.core.ui/1 [1.31.1 201207171143]
org.netbeans.modules.autoupdate.ui [1.27.1 201207171143]
org.netbeans.libs.osgi [1.9.1 201207171143]
org.netbeans.libs.felix [2.3.1 201207171143]
org.netbeans.core.windows/2 [2.49.1 201207171143]
org.netbeans.modules.core.kit [1.16.1 201207171143]
org.netbeans.core.output2/1 [1.26.1 201207171143]
org.netbeans.core.netigso [1.16.1 201207171143]
org.netbeans.core.nativeaccess/1 [1.16.1 201207171143]
org.netbeans.core.io.ui/1 [1.16.1 201207171143]
com.mycompany.MavenPlatformCRUDApp.dbaccess [1.0 1.0-20121024 201210241604]
com.mycompany.MavenPlatformCRUDApp.editor [1.0 1.0-20121024 201210241604]
com.mycompany.MavenPlatformCRUDApp.branding [1.0 1.0-20121024 201210241604]
WARNING [org.openide.filesystems.Ordering]: Not all children in Windows2/Modes/explorer/ marked with the position attribute: [ViewerTopComponent.wstcref], but some are: [favorites.wstcref]
WARNING [org.netbeans.ProxyClassLoader]: Will not load class org.eclipse.persistence.jpa.PersistenceProvider arbitrarily from one of ***@873723[com.mycompany.MavenPlatformCRUDApp.dbaccess] and ***@1e2afb2[com.mycompany.MavenPlatformCRUDApp.editor] starting from SystemClassLoader[51 modules]; see http://wiki.netbeans.org/DevFaqModuleCCE
WARNING [javax.persistence.spi]: javax.persistence.spi::No valid providers found using:
WARNING [javax.persistence.spi]: javax.persistence.spi::org.eclipse.persistence.jpa.PersistenceProvider - jar:file:/G:/git.clone/NB-examples/MavenPlatformCRUDApp/application/target/mavenplatformcrudapp/mavenplatformcrudapp/modules/ext/org.eclipse.persistence/eclipselink-2.3.2.jar!/META-INF/services/javax.persistence.spi.PersistenceProvider
WARNING [javax.persistence.spi]: javax.persistence.spi::org.eclipse.persistence.jpa.PersistenceProvider - jar:file:/G:/git.clone/NB-examples/MavenPlatformCRUDApp/application/target/mavenplatformcrudapp/mavenplatformcrudapp/modules/ext/org.eclipse.persistence/eclipselink-2.3.2.jar!/META-INF/services/javax.persistence.spi.PersistenceProvider
INFO [org.netbeans.core.windows.persistence]: [PersistenceManager.getTopComponentForID] Problem when deserializing TopComponent for tcID:'ViewerTopComponent'. Reason: null
Content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE settings PUBLIC "-//NetBeans//DTD Session settings 1.0//EN" "http://www.netbeans.org/dtds/sessionsettings-1_0.dtd">
<settings version="1.0">
<instance class="com.mycompany.mavenplatformcrudappdbaccess.ViewerTopComponent"/>
</settings>
Class: class com.mycompany.mavenplatformcrudappdbaccess.ViewerTopComponent
Source: ***@e90097[Windows2Local/Components/ViewerTopComponent.settings]
Content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE settings PUBLIC "-//NetBeans//DTD Session settings 1.0//EN" "http://www.netbeans.org/dtds/sessionsettings-1_0.dtd">
<settings version="1.0">
<instance class="com.mycompany.mavenplatformcrudappdbaccess.ViewerTopComponent"/>
</settings>
Class: class com.mycompany.mavenplatformcrudappdbaccess.ViewerTopComponent
Source: ***@e90097[Windows2Local/Components/ViewerTopComponent.settings]
Caused: javax.persistence.PersistenceException: No Persistence provider for EntityManager named com.mycompany_MavenPlatformCRUDApp-dbaccess_nbm_1.0-SNAPSHOTPU
at javax.persistence.Persistence.createEntityManagerFactory(Unknown Source)
at javax.persistence.Persistence.createEntityManagerFactory(Unknown Source)
at com.mycompany.mavenplatformcrudappdbaccess.ViewerTopComponent.<init>(ViewerTopComponent.java:65)
Caused: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.netbeans.modules.settings.convertors.XMLSettingsSupport$SettingsRecognizer.instanceCreate(XMLSettingsSupport.java:608)
Caused: java.io.IOException
at org.netbeans.modules.settings.convertors.XMLSettingsSupport$SettingsRecognizer.instanceCreate(XMLSettingsSupport.java:610)
at org.netbeans.modules.settings.convertors.SerialDataConvertor$SettingsInstance.instanceCreate(SerialDataConvertor.java:424)
[catch] at org.netbeans.core.windows.persistence.PersistenceManager.getTopComponentPersistentForID(PersistenceManager.java:571)
at org.netbeans.core.windows.persistence.PersistenceManager.getTopComponentForID(PersistenceManager.java:681)
at org.netbeans.core.windows.PersistenceHandler.getTopComponentForID(PersistenceHandler.java:489)
at org.netbeans.core.windows.PersistenceHandler.load(PersistenceHandler.java:171)
at org.netbeans.core.windows.WindowSystemImpl.load(WindowSystemImpl.java:81)
at org.netbeans.core.GuiRunLevel$InitWinSys.run(GuiRunLevel.java:234)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:646)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:607)
at java.awt.EventQueue$1.run(EventQueue.java:605)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:616)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:158)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE settings PUBLIC "-//NetBeans//DTD Session settings 1.0//EN" "http://www.netbeans.org/dtds/sessionsettings-1_0.dtd">
<settings version="1.0">
<instance class="com.mycompany.mavenplatformcrudappdbaccess.ViewerTopComponent"/>
</settings>
ALL [null]: Class: class com.mycompany.mavenplatformcrudappdbaccess.ViewerTopComponent
ALL [null]: Source: ***@e90097[Windows2Local/Components/ViewerTopComponent.settings]
WARNING [org.openide.windows.WindowManager]: [Winsys] TopComponent com.mycompany.mavenplatformcrudappeditor.EditorTopComponent throws exception/error from its componentOpened() method.
Please repair it!
java.lang.NullPointerException
at com.mycompany.mavenplatformcrudappeditor.EditorTopComponent.componentOpened(EditorTopComponent.java:163)
[catch] at org.openide.windows.WindowManager.componentOpenNotify(WindowManager.java:307)
at org.netbeans.core.windows.WindowManagerImpl.notifyTopComponentOpened(WindowManagerImpl.java:1112)
at org.netbeans.core.windows.Central.addModeOpenedTopComponent(Central.java:784)
at org.netbeans.core.windows.ModeImpl.addOpenedTopComponent(ModeImpl.java:354)
at org.netbeans.core.windows.PersistenceHandler.initModeFromConfig(PersistenceHandler.java:451)
at org.netbeans.core.windows.PersistenceHandler.load(PersistenceHandler.java:214)
at org.netbeans.core.windows.WindowSystemImpl.load(WindowSystemImpl.java:81)
at org.netbeans.core.GuiRunLevel$InitWinSys.run(GuiRunLevel.java:234)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:646)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:607)
at java.awt.EventQueue$1.run(EventQueue.java:605)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:616)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:158)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Diagnostic information
Input arguments:
-Xms24m
-Xmx64m
-Dnetbeans.logger.console=true
-ea
-Dnetbeans.user.dir=G:\git.clone\NB-examples\MavenPlatformCRUDApp\application
-Djdk.home=C:\Program
Files\Java\jdk1.6.0_30
-Dnetbeans.home=G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform
-Dnetbeans.user=G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\userdir
-Dnetbeans.default_userdir_root=
-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\userdir\var\log\heapdump.hprof
-Dnetbeans.system_http_proxy=DIRECT
-Dsun.awt.keepWorkingSetOnMinimize=true
-Dnetbeans.dirs=G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\bin;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\etc;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\mavenplatformcrudapp;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform
Compiler: HotSpot Tiered Compilers
Heap memory usage: initial 24.0MB maximum 56.9MB
Non heap memory usage: initial 18.2MB maximum 112.0MB
Garbage collector: PS Scavenge (Collections=11 Total time spent=0s)
Garbage collector: PS MarkSweep (Collections=0 Total time spent=0s)
Classes: loaded=4081 total loaded=4081 unloaded 0
INFO [org.netbeans.core.ui.warmup.DiagnosticTask]: Total memory 2,090,377,216
INFO [null]: Total physical memory 2,090,377,216
WARNING [org.openide.filesystems.Ordering]: Not all children in Menu/Window/ marked with the position attribute: [com-mycompany-mavenplatformcrudapp-ViewerTopComponent.shadow, com-mycompany-mavenplatformcrudappeditor-EditorTopComponent.shadow], but some are: [org-netbeans-modules-favorites-View.shadow, org-netbeans-core-windows-actions-GlobalPropertiesAction.shadow, Output, SwitchToRecentDocumentAction.shadow, ProgressListAction.shadow, Separator3.instance, ConfigureWindow, org-netbeans-core-windows-actions-ResetWindowsAction.shadow, Separator4.instance, CloseWindowAction.shadow, CloseAllDocumentsAction.shadow, CloseAllButThisAction.shadow, DocumentsAction.shadow]
Benno Markiewicz
2012-10-26 05:07:54 UTC
Permalink
The error must be in your code as you can see in the following
*stracktrace*entry.

WARNING [org.openide.windows.WindowManager]: [Winsys] TopComponent
com.mycompany.mavenplatformcrudappeditor.EditorTopComponent throws
exception/error from its componentOpened() method.
Please repair it!
java.lang.NullPointerException
at
com.mycompany.mavenplatformcrudappeditor.EditorTopComponent.componentOpened(EditorTopComponent.java:163)

Greetings, markiewb
Post by halis
Post by Frédéric Deniger
In the Projects view, it's possible to right click on the folder
"Dependencies" and use the action "Add Dependency..."
Le 23/10/2012 23:49, halis a
I have tried that and added javax.persistence-2.0.3.jar and
-------------------------------------------------------------------------------
Post by Frédéric Deniger
Log Session: Wednesday, October 24, 2012 1:40:23 PM EDT
Product Version = MavenPlatformCRUDApp 201207171143
Operating System = Windows XP version 5.1 running on x86
Java; VM; Vendor = 1.6.0_30; Java HotSpot(TM) Server VM 20.5-b03;
Sun Microsystems Inc.
Runtime = Java(TM) SE Runtime Environment 1.6.0_30-b12
Java Home = C:\Program Files\Java\jdk1.6.0_30\jre
System Locale; Encoding = en_US (mavenplatformcrudapp); Cp1252
Home Directory = C:\Documents and Settings\User
Current Directory =
G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp
User Directory =
G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\userdir
Cache Directory =
G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\userdir\var\cache
Installation =
G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\bin
G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\etc
G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\mavenplatformcrudapp
G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform
G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform
Boot & Ext. Classpath = C:\Program
Files\Java\jdk1.6.0_30\jre\lib\resources.jar;C:\Program
Files\Java\jdk1.6.0_30\jre\lib\rt.jar;C:\Program
Files\Java\jdk1.6.0_30\jre\lib\sunrsasign.jar;C:\Program
Files\Java\jdk1.6.0_30\jre\lib\jsse.jar;C:\Program
Files\Java\jdk1.6.0_30\jre\lib\jce.jar;C:\Program
Files\Java\jdk1.6.0_30\jre\lib\charsets.jar;C:\Program
Files\Java\jdk1.6.0_30\jre\lib\modules\jdk.boot.jar;C:\Program
Files\Java\jdk1.6.0_30\jre\classes;C:\Program
Files\Java\jdk1.6.0_30\jre\lib\ext\dnsns.jar;C:\Program
Files\Java\jdk1.6.0_30\jre\lib\ext\localedata.jar;C:\Program
Files\Java\jdk1.6.0_30\jre\lib\ext\sunjce_provider.jar;C:\Program
Files\Java\jdk1.6.0_30\jre\lib\ext\sunmscapi.jar;C:\Program
Files\Java\jdk1.6.0_30\jre\lib\ext\sunpkcs11.jar
Application Classpath =
G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\lib\boot.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\lib\org-openide-modules.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\lib\org-openide-util-lookup.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\lib\org-openide-util.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\lib\locale\boot_ja.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\lib\locale\boot_pt_BR.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\lib\locale\boot_ru.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\lib\locale\boot_zh_CN.jar;G:\gi!
t.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\lib\locale\org-openide-modules_ja.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\lib\locale\org-openide-modules_pt_BR.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\lib\locale\org-openide-modules_ru.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\lib\locale\org-openide-modules_zh_CN.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\lib\locale\org-openide-util-lookup_ja.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\lib\locale\org-openide-util-lookup_pt_BR.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\lib\locale\org-openide-util-lookup_ru.jar;G:\git.clone\NB-examples\MavenPlatformCRU!
DApp\application\target\mavenplatformcrudapp\platform\lib\loca!
le\org-o
penide-util-lookup_zh_CN.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\lib\locale\org-openide-util_ja.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\lib\locale\org-openide-util_pt_BR.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\lib\locale\org-openide-util_ru.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\lib\locale\org-openide-util_zh_CN.jar;C:\Program
Files\Java\jdk1.6.0_30\lib\dt.jar;C:\Program
Files\Java\jdk1.6.0_30\lib\tools.jar
Startup Classpath =
G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\core\core.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\core\org-openide-filesystems.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\core\locale\core_ja.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\core\locale\core_pt_BR.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\core\locale\core_ru.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\core\locale\core_zh_CN.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\core\locale\org-openide-filesystems_ja.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\core\loca!
le\org-openide-filesystems_pt_BR.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\core\locale\org-openide-filesystems_ru.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform\core\locale\org-openide-filesystems_zh_CN.jar;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\mavenplatformcrudapp\core\locale\core_mavenplatformcrudapp.jar
-------------------------------------------------------------------------------
WARNING [org.netbeans.core.startup.NbEvents]: The extension
G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\mavenplatformcrudapp\modules\ext\org.eclipse.persistence\javax.persistence-2.0.3.jar
[G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\mavenplatformcrudapp\modules\com-mycompany-MavenPlatformCRUDApp-dbaccess.jar,
G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\mavenplatformcrudapp\modules\com-mycompany-MavenPlatformCRUDApp-editor.jar];
http://www.netbeans.org/download/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/classpath.html#class-path
WARNING [org.netbeans.core.startup.NbEvents]: The extension
G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\mavenplatformcrudapp\modules\ext\org.eclipse.persistence\eclipselink-2.3.2.jar
[G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\mavenplatformcrudapp\modules\com-mycompany-MavenPlatformCRUDApp-dbaccess.jar,
G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\mavenplatformcrudapp\modules\com-mycompany-MavenPlatformCRUDApp-editor.jar];
http://www.netbeans.org/download/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/classpath.html#class-path
org.openide.util.lookup [8.15.1 201207171143]
org.openide.util [8.25.1 201207171143]
org.openide.modules [7.32.1 201207171143]
org.openide.filesystems [7.62.1 201207171143]
org.netbeans.api.annotations.common/1 [1.14.1 201207171143]
org.openide.awt [7.46.1 201207171143]
org.netbeans.api.progress/1 [1.28.1 201207171143]
org.openide.dialogs [7.25.1 201207171143]
org.openide.nodes [7.28.1 201207171143]
org.openide.windows [6.55.1 201207171143]
org.netbeans.modules.editor.mimelookup/1 [1.26.1 201207171143]
org.openide.text [6.49.1 201207171143]
org.netbeans.swing.tabcontrol [1.36.1 201207171143]
org.netbeans.swing.outline [1.20.1 201207171143]
org.openide.explorer [6.45.1 201207171143]
org.openide.actions [6.26.1 201207171143]
org.netbeans.modules.queries/1 [1.28.1 201207171143]
org.openide.loaders [7.37.1 201207171143]
org.openide.io [1.31.1 201207171143]
org.netbeans.swing.plaf [1.25.1 201207171143]
org.netbeans.spi.quicksearch [1.14.1 201207171143]
org.netbeans.bootstrap/1 [2.52.1 201207171143]
org.netbeans.core.startup/1 [1.40.1 201207171143]
org.netbeans.modules.settings/1 [1.35.1 201207171143]
org.netbeans.modules.sampler [1.1.1 201207171143]
org.netbeans.modules.progress.ui [1.20.1 201207171143]
org.netbeans.modules.print [7.13.1 201207171143]
org.netbeans.modules.keyring [1.11.1 201207171143]
org.netbeans.core/2 [3.33.1 201207171143]
org.netbeans.modules.options.api/1 [1.26.1 201207171143]
org.netbeans.modules.options.keymap [1.19.1 201207171143]
org.netbeans.modules.masterfs/2 [2.38.1 201207171143]
org.netbeans.libs.jna/1 [1.21.1 201207171143]
org.netbeans.modules.masterfs.windows [1.1.1 201207171143]
org.netbeans.modules.keyring.impl [1.7.1 201207171143]
org.netbeans.modules.favorites/1 [1.29.1 201207171143]
org.netbeans.modules.editor.mimelookup.impl/1 [1.18.1 201207171143]
org.netbeans.modules.autoupdate.services [1.33.1 201207171143]
org.netbeans.core.ui/1 [1.31.1 201207171143]
org.netbeans.modules.autoupdate.ui [1.27.1 201207171143]
org.netbeans.libs.osgi [1.9.1 201207171143]
org.netbeans.libs.felix [2.3.1 201207171143]
org.netbeans.core.windows/2 [2.49.1 201207171143]
org.netbeans.modules.core.kit [1.16.1 201207171143]
org.netbeans.core.output2/1 [1.26.1 201207171143]
org.netbeans.core.netigso [1.16.1 201207171143]
org.netbeans.core.nativeaccess/1 [1.16.1 201207171143]
org.netbeans.core.io.ui/1 [1.16.1 201207171143]
com.mycompany.MavenPlatformCRUDApp.dbaccess [1.0 1.0-20121024 201210241604]
com.mycompany.MavenPlatformCRUDApp.editor [1.0 1.0-20121024 201210241604]
com.mycompany.MavenPlatformCRUDApp.branding [1.0 1.0-20121024 201210241604]
WARNING [org.openide.filesystems.Ordering]: Not all children in
[ViewerTopComponent.wstcref], but some are: [favorites.wstcref]
WARNING [org.netbeans.ProxyClassLoader]: Will not load class
org.eclipse.persistence.jpa.PersistenceProvider arbitrarily from one of
SystemClassLoader[51 modules]; see
http://wiki.netbeans.org/DevFaqModuleCCE
javax.persistence.spi::org.eclipse.persistence.jpa.PersistenceProvider -
jar:file:/G:/git.clone/NB-examples/MavenPlatformCRUDApp/application/target/mavenplatformcrudapp/mavenplatformcrudapp/modules/ext/org.eclipse.persistence/eclipselink-2.3.2.jar!/META-INF/services/javax.persistence.spi.PersistenceProvider
javax.persistence.spi::org.eclipse.persistence.jpa.PersistenceProvider -
jar:file:/G:/git.clone/NB-examples/MavenPlatformCRUDApp/application/target/mavenplatformcrudapp/mavenplatformcrudapp/modules/ext/org.eclipse.persistence/eclipselink-2.3.2.jar!/META-INF/services/javax.persistence.spi.PersistenceProvider
[PersistenceManager.getTopComponentForID] Problem when deserializing
TopComponent for tcID:'ViewerTopComponent'. Reason: null
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE settings PUBLIC "-//NetBeans//DTD Session settings 1.0//EN" "
http://www.netbeans.org/dtds/sessionsettings-1_0.dtd">
<settings version="1.0">
<instance
class="com.mycompany.mavenplatformcrudappdbaccess.ViewerTopComponent"/>
</settings>
Class: class com.mycompany.mavenplatformcrudappdbaccess.ViewerTopComponent
[Windows2Local/Components/ViewerTopComponent.settings]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE settings PUBLIC "-//NetBeans//DTD Session settings 1.0//EN" "
http://www.netbeans.org/dtds/sessionsettings-1_0.dtd">
<settings version="1.0">
<instance
class="com.mycompany.mavenplatformcrudappdbaccess.ViewerTopComponent"/>
</settings>
Class: class com.mycompany.mavenplatformcrudappdbaccess.ViewerTopComponent
[Windows2Local/Components/ViewerTopComponent.settings]
Caused: javax.persistence.PersistenceException: No Persistence provider
for EntityManager named
com.mycompany_MavenPlatformCRUDApp-dbaccess_nbm_1.0-SNAPSHOTPU
at
javax.persistence.Persistence.createEntityManagerFactory(Unknown Source)
at
javax.persistence.Persistence.createEntityManagerFactory(Unknown Source)
at
com.mycompany.mavenplatformcrudappdbaccess.ViewerTopComponent.<init>(ViewerTopComponent.java:65)
Caused: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at
org.netbeans.modules.settings.convertors.XMLSettingsSupport$SettingsRecognizer.instanceCreate(XMLSettingsSupport.java:608)
Caused: java.io.IOException
at
org.netbeans.modules.settings.convertors.XMLSettingsSupport$SettingsRecognizer.instanceCreate(XMLSettingsSupport.java:610)
at
org.netbeans.modules.settings.convertors.SerialDataConvertor$SettingsInstance.instanceCreate(SerialDataConvertor.java:424)
[catch] at
org.netbeans.core.windows.persistence.PersistenceManager.getTopComponentPersistentForID(PersistenceManager.java:571)
at
org.netbeans.core.windows.persistence.PersistenceManager.getTopComponentForID(PersistenceManager.java:681)
at
org.netbeans.core.windows.PersistenceHandler.getTopComponentForID(PersistenceHandler.java:489)
at
org.netbeans.core.windows.PersistenceHandler.load(PersistenceHandler.java:171)
at
org.netbeans.core.windows.WindowSystemImpl.load(WindowSystemImpl.java:81)
at
org.netbeans.core.GuiRunLevel$InitWinSys.run(GuiRunLevel.java:234)
at
java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:646)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:607)
at java.awt.EventQueue$1.run(EventQueue.java:605)
at java.security.AccessController.doPrivileged(Native Method)
at
java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:616)
at
org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:158)
at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE settings PUBLIC "-//NetBeans//DTD Session settings 1.0//EN" "
http://www.netbeans.org/dtds/sessionsettings-1_0.dtd">
<settings version="1.0">
<instance
class="com.mycompany.mavenplatformcrudappdbaccess.ViewerTopComponent"/>
</settings>
ALL [null]: Class: class
com.mycompany.mavenplatformcrudappdbaccess.ViewerTopComponent
[Windows2Local/Components/ViewerTopComponent.settings]
WARNING [org.openide.windows.WindowManager]: [Winsys] TopComponent
com.mycompany.mavenplatformcrudappeditor.EditorTopComponent throws
exception/error from its componentOpened() method.
Please repair it!
java.lang.NullPointerException
at
com.mycompany.mavenplatformcrudappeditor.EditorTopComponent.componentOpened(EditorTopComponent.java:163)
[catch] at
org.openide.windows.WindowManager.componentOpenNotify(WindowManager.java:307)
at
org.netbeans.core.windows.WindowManagerImpl.notifyTopComponentOpened(WindowManagerImpl.java:1112)
at
org.netbeans.core.windows.Central.addModeOpenedTopComponent(Central.java:784)
at
org.netbeans.core.windows.ModeImpl.addOpenedTopComponent(ModeImpl.java:354)
at
org.netbeans.core.windows.PersistenceHandler.initModeFromConfig(PersistenceHandler.java:451)
at
org.netbeans.core.windows.PersistenceHandler.load(PersistenceHandler.java:214)
at
org.netbeans.core.windows.WindowSystemImpl.load(WindowSystemImpl.java:81)
at
org.netbeans.core.GuiRunLevel$InitWinSys.run(GuiRunLevel.java:234)
at
java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:646)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:607)
at java.awt.EventQueue$1.run(EventQueue.java:605)
at java.security.AccessController.doPrivileged(Native Method)
at
java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:616)
at
org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:158)
at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Diagnostic information
-Xms24m
-Xmx64m
-Dnetbeans.logger.console=true
-ea
-Dnetbeans.user.dir=G:\git.clone\NB-examples\MavenPlatformCRUDApp\application
-Djdk.home=C:\Program
Files\Java\jdk1.6.0_30
-Dnetbeans.home=G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform
-Dnetbeans.user=G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\userdir
-Dnetbeans.default_userdir_root=
-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\userdir\var\log\heapdump.hprof
-Dnetbeans.system_http_proxy=DIRECT
-Dsun.awt.keepWorkingSetOnMinimize=true
-Dnetbeans.dirs=G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\bin;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\etc;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\mavenplatformcrudapp;G:\git.clone\NB-examples\MavenPlatformCRUDApp\application\target\mavenplatformcrudapp\platform
Compiler: HotSpot Tiered Compilers
Heap memory usage: initial 24.0MB maximum 56.9MB
Non heap memory usage: initial 18.2MB maximum 112.0MB
Garbage collector: PS Scavenge (Collections=11 Total time spent=0s)
Garbage collector: PS MarkSweep (Collections=0 Total time spent=0s)
Classes: loaded=4081 total loaded=4081 unloaded 0
INFO [org.netbeans.core.ui.warmup.DiagnosticTask]: Total memory 2,090,377,216
INFO [null]: Total physical memory 2,090,377,216
WARNING [org.openide.filesystems.Ordering]: Not all children in
[com-mycompany-mavenplatformcrudapp-ViewerTopComponent.shadow,
com-mycompany-mavenplatformcrudappeditor-EditorTopComponent.shadow], but
some are: [org-netbeans-modules-favorites-View.shadow,
org-netbeans-core-windows-actions-GlobalPropertiesAction.shadow, Output,
SwitchToRecentDocumentAction.shadow, ProgressListAction.shadow,
Separator3.instance, ConfigureWindow,
org-netbeans-core-windows-actions-ResetWindowsAction.shadow,
Separator4.instance, CloseWindowAction.shadow,
CloseAllDocumentsAction.shadow, CloseAllButThisAction.shadow,
DocumentsAction.shadow]
halis
2012-10-29 00:59:33 UTC
Permalink
The error must be in your code as you can see in the following stracktrace entry.
WARNING [org.openide.windows.WindowManager]: [Winsys] TopComponent com.mycompany.mavenplatformcrudappeditor.EditorTopComponent throws exception/error from its componentOpened() method.
Please repair it!
java.lang.NullPointerException
Naaah, that is a side-effect of an error that was caused earlier in the log:


Code:
Class: class com.mycompany.mavenplatformcrudappdbaccess.ViewerTopComponent
Source: ***@e90097[Windows2Local/Components/ViewerTopComponent.settings]
Caused: javax.persistence.PersistenceException: No Persistence provider for EntityManager named com.mycompany_MavenPlatformCRUDApp-dbaccess_nbm_1.0-SNAPSHOTPU



I am trying to reference the JPA Persistence jars along with javax.persistence jar in two netbeans modules (Viewer "dbaccess" and Editor) and Maven in not handling the dependencies properly printing WARNINGs complaining about same jars being loaded multiple times and not finding the persistence provider for the "dbaccess" module (The Viewer). This is the __only__ problem that I am trying to resolve here. The complete project is attached with my earlier post that can be run along with the sample derby database that comes with Netbeans install to reproduce the problem.

At this point I am thinking it might be a bug in the maven netbeans plugin that generates the various build related artifacts but not sure how to resolve it.

Thanks for your help and appreciate any help or pointers to resolve it.
Geertjan Wielenga
2012-10-29 19:45:53 UTC
Permalink
Post by halis
The error must be in your code as you can see in the following stracktrace entry.
WARNING [org.openide.windows.WindowManager]: [Winsys] TopComponent com.mycompany.mavenplatformcrudappeditor.EditorTopComponent throws exception/error from its componentOpened() method.
Please repair it!
java.lang.NullPointerException
Class: class com.mycompany.mavenplatformcrudappdbaccess.ViewerTopComponent
Caused: javax.persistence.PersistenceException: No Persistence provider for EntityManager named com.mycompany_MavenPlatformCRUDApp-dbaccess_nbm_1.0-SNAPSHOTPU
I am trying to reference the JPA Persistence jars along with javax.persistence jar in two netbeans modules (Viewer "dbaccess" and Editor)
That's what the parent POM is for. If you need a dep in multiple Maven
modules, the place to put the dep is in the parent POM.

Gj
Post by halis
and Maven in not handling the dependencies properly printing WARNINGs complaining about same jars being loaded multiple times and not finding the persistence provider for the "dbaccess" module (The Viewer). This is the __only__ problem that I am trying to resolve here. The complete project is attached with my earlier post that can be run along with the sample derby database that comes with Netbeans install to reproduce the problem.
At this point I am thinking it might be a bug in the maven netbeans plugin that generates the various build related artifacts but not sure how to resolve it.
Thanks for your help and appreciate any help or pointers to resolve it.
halis
2012-10-31 20:36:06 UTC
Permalink
Post by Geertjan Wielenga
Post by halis
I am trying to reference the JPA Persistence jars along with javax.persistence jar in two netbeans modules (Viewer "dbaccess" and Editor)
That's what the parent POM is for. If you need a dep in multiple Maven
modules, the place to put the dep is in the parent POM.
Gj
I have tried the parent POM approach but it isn't working either. Netbeans won't load any modules that try to load the same classes resulting in causing a CCE or ClassNotFoundException at runtime. See References below:

http://wiki.netbeans.org/DevFaqModuleCCE
http://bits.netbeans.org/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/classpath.html

So, I am stuck in a situation where the Persistence Provider is not getting loaded either way (Parent POM vs referenced jars in Viewer and Editor modules) resulting in exceptions at runtime while trying to save any data in the Editor module. :(

I would strongly suggest someone to work with the project zip I have uploaded in this thread and try to resolve this module dependency issue at hand. Thanks for all your help and support!
Geertjan Wielenga
2012-10-31 20:50:21 UTC
Permalink
No project zip has so far been uploaded by you.

Gj
Post by halis
Post by Geertjan Wielenga
Post by halis
I am trying to reference the JPA Persistence jars along with javax.persistence jar in two netbeans modules (Viewer "dbaccess" and Editor)
That's what the parent POM is for. If you need a dep in multiple Maven
modules, the place to put the dep is in the parent POM.
Gj
http://wiki.netbeans.org/DevFaqModuleCCE
http://bits.netbeans.org/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/classpath.html
So, I am stuck in a situation where the Persistence Provider is not getting loaded either way (Parent POM vs referenced jars in Viewer and Editor modules) resulting in exceptions at runtime while trying to save any data in the Editor module. :(
I would strongly suggest someone to work with the project zip I have uploaded in this thread and try to resolve this module dependency issue at hand. Thanks for all your help and support!
halis
2012-10-31 20:58:53 UTC
Permalink
Post by Geertjan Wielenga
No project zip has so far been uploaded by you.
Gj
The zip is attached to my earlier post timestamped Thu Oct 25, 2012 10:28 am. A direct link is as follows:

http://forums.netbeans.org/download.php?id=3382
halis
2012-11-06 19:05:17 UTC
Permalink
bump...
Post by halis
Post by Geertjan Wielenga
No project zip has so far been uploaded by you.
Gj
http://forums.netbeans.org/download.php?id=3382
Geertjan Wielenga
2012-11-07 01:32:02 UTC
Permalink
Did you follow this tutorial and is there a step you want to tell us
about where problems occurred?

http://platform.netbeans.org/tutorials/nbm-maven-crud.html

Gj
Post by halis
bump...
Post by halis
Post by Geertjan Wielenga
No project zip has so far been uploaded by you.
Gj
http://forums.netbeans.org/download.php?id=3382
Geertjan Wielenga
2012-11-01 10:52:23 UTC
Permalink
So, what you're saying is that you followed the tutorial below and the tutorial doesn't work?

http://platform.netbeans.org/tutorials/nbm-maven-crud.html

Gj


----- Original Message -----
From: ***@hotmail.com
To: ***@platform.netbeans.org
Sent: Thursday, November 1, 2012 11:38:27 AM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna
Subject: [platform-dev] NetBeans Platform CRUD Application Tutorial (with Maven) build issues
Post by Geertjan Wielenga
No project zip has so far been uploaded by you.
Gj
The zip is attached to my earlier post timestamped Thu Oct 25, 2012 10:28 am. A direct link is as follows:

http://forums.netbeans.org/download.php?id=3382
halis
2012-11-08 18:06:47 UTC
Permalink
See my first post on this thread please. I made it through the "Maven CRUD Tutotrial" and then followed the "CRUD with Ant" as suggested towards the end of the "Maven CRUD Tutorial" to the point "Enable the Undo/Redo Actions for the Editor" and ran into these class loading issues.

H.
Post by Geertjan Wielenga
Did you follow this tutorial and is there a step you want to tell us
about where problems occurred?
http://platform.netbeans.org/tutorials/nbm-maven-crud.html
Gj
Loading...