Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 186877 - persistence datasource problem
persistence datasource problem
Status: VERIFIED FIXED
Product: javaee
Classification: Unclassified
Component: Persistence
6.x
PC Linux
: P2 (vote)
: 7.0
Assigned To: Sergey Petrov
issues@javaee
69patch1-verified
:
: 187142 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-28 10:05 UTC by chip2
Modified: 2010-07-09 23:50 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
open office document screen shot (1.07 MB, application/octet-stream)
2010-06-04 06:59 UTC, chip2
Details
bug sample project (12.66 KB, application/octet-stream)
2010-06-04 07:01 UTC, chip2
Details

Note You need to log in before you can comment on or make changes to this bug.
Description chip2 2010-05-28 10:05:18 UTC
sorry for english

create web application (jsf 2.0 enable)
add persistence unit (mysql db)
persistence wizard ask for create new data source
after creation of new jndi datasource the new datasource non set into combobox

the saim problem when create entity classes from database 

no exception simply non work 

6.8 work well

my pc is
ubunto 10.04 (fresh install + last patch)
and
last stable opensuse
Comment 1 Sergey Petrov 2010-05-28 10:08:44 UTC
have you used 6.9rc1?
what server you you used?
Comment 2 Sergey Petrov 2010-05-28 10:09:19 UTC
can you attach message.log also?
Comment 3 chip2 2010-05-28 13:05:58 UTC
use 6.9beta and 6.9rc1
Comment 4 chip2 2010-05-28 13:08:16 UTC
(In reply to comment #1)
> have you used 6.9rc1?
> what server you you used?

yes 6.9rc1

the same problem in 6.9beta
Comment 5 Sergey Petrov 2010-05-31 13:31:13 UTC
And what server have you used?
and message.log
it may be some localization and server dependent issue.
Comment 6 Sergey Petrov 2010-06-01 13:41:34 UTC
mark as incomplete for now before additional details are provided.

one more question if password/login/database name etc contain some local or special characters (i.e. except latin symbols and numbers)
Comment 7 chip2 2010-06-03 06:40:00 UTC
(In reply to comment #6)
> mark as incomplete for now before additional details are provided.
> 
> one more question if password/login/database name etc contain some local or
> special characters (i.e. except latin symbols and numbers)


sorry for the late response

i open persistent.xm 
change datasource
send log


INFO [glassfish-javaee]: org.xml.sax.SAXParseException: Premature end of file.
org.xml.sax.SAXParseException: Premature end of file.
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)
        at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1414)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1059)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
        at org.netbeans.modules.glassfish.spi.TreeParser.readXml(TreeParser.java:91)
Caused: java.lang.IllegalStateException
        at org.netbeans.modules.glassfish.spi.TreeParser.readXml(TreeParser.java:96)
        at org.netbeans.modules.glassfish.javaee.db.Hk2DatasourceManager.readDatasources(Hk2DatasourceManager.java:208)
        at org.netbeans.modules.glassfish.javaee.db.Hk2DatasourceManager.getDatasources(Hk2DatasourceManager.java:147)
        at org.netbeans.modules.glassfish.javaee.Hk2Configuration.getDatasources(Hk2Configuration.java:87)
        at org.netbeans.modules.glassfish.javaee.ModuleConfigurationImpl.getDatasources(ModuleConfigurationImpl.java:135)
        at org.netbeans.modules.j2ee.deployment.config.ConfigSupportImpl.getDatasources(ConfigSupportImpl.java:347)
        at org.netbeans.modules.j2ee.deployment.devmodules.spi.J2eeModuleProvider.getModuleDatasources(J2eeModuleProvider.java:219)
        at org.netbeans.modules.j2ee.common.DatasourceUIHelper.getDatasources(DatasourceUIHelper.java:585)
        at org.netbeans.modules.j2ee.common.DatasourceUIHelper.access$200(DatasourceUIHelper.java:96)
        at org.netbeans.modules.j2ee.common.DatasourceUIHelper$2.run(DatasourceUIHelper.java:448)
        at org.netbeans.modules.j2ee.core.api.support.progress.ProgressSupport$ActionInvoker.invokeNextActionsOfSameKind(ProgressSupport.java:270)
        at org.netbeans.modules.j2ee.core.api.support.progress.ProgressSupport$ActionInvoker.access$100(ProgressSupport.java:118)
[catch] at org.netbeans.modules.j2ee.core.api.support.progress.ProgressSupport$ActionInvoker$1.run(ProgressSupport.java:159)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1957)
INFO [glassfish-javaee]: org.xml.sax.SAXParseException: Premature end of file.
org.xml.sax.SAXParseException: Premature end of file.
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)
        at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1414)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1059)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
        at org.netbeans.modules.glassfish.spi.TreeParser.readXml(TreeParser.java:91)
Caused: java.lang.IllegalStateException
        at org.netbeans.modules.glassfish.spi.TreeParser.readXml(TreeParser.java:96)
        at org.netbeans.modules.glassfish.javaee.db.Hk2DatasourceManager.createDataSource(Hk2DatasourceManager.java:402)
        at org.netbeans.modules.glassfish.javaee.Hk2Configuration.createDatasource(Hk2Configuration.java:108)
        at org.netbeans.modules.glassfish.javaee.ModuleConfigurationImpl.createDatasource(ModuleConfigurationImpl.java:143)
        at org.netbeans.modules.j2ee.deployment.config.ConfigSupportImpl.createDatasource(ConfigSupportImpl.java:379)
        at org.netbeans.modules.j2ee.deployment.devmodules.spi.J2eeModuleProvider.createDatasource(J2eeModuleProvider.java:266)
        at org.netbeans.modules.j2ee.common.DatasourceUIHelper$5.run(DatasourceUIHelper.java:526)
        at org.netbeans.modules.j2ee.core.api.support.progress.ProgressSupport$ActionInvoker.invokeNextActionsOfSameKind(ProgressSupport.java:270)
        at org.netbeans.modules.j2ee.core.api.support.progress.ProgressSupport$ActionInvoker.access$100(ProgressSupport.java:118)
[catch] at org.netbeans.modules.j2ee.core.api.support.progress.ProgressSupport$ActionInvoker$1.run(ProgressSupport.java:159)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1957)
INFO [global]
org.xml.sax.SAXParseException: Premature end of file.
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)
        at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1414)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1059)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
        at org.netbeans.modules.glassfish.spi.TreeParser.readXml(TreeParser.java:91)
Caused: java.lang.IllegalStateException
        at org.netbeans.modules.glassfish.spi.TreeParser.readXml(TreeParser.java:96)
        at org.netbeans.modules.glassfish.javaee.db.Hk2DatasourceManager.createDataSource(Hk2DatasourceManager.java:402)
Caused: org.netbeans.modules.j2ee.deployment.common.api.ConfigurationException: org.xml.sax.SAXParseException: Premature end of file.
        at org.netbeans.modules.glassfish.javaee.db.Hk2DatasourceManager.createDataSource(Hk2DatasourceManager.java:409)
        at org.netbeans.modules.glassfish.javaee.Hk2Configuration.createDatasource(Hk2Configuration.java:108)
        at org.netbeans.modules.glassfish.javaee.ModuleConfigurationImpl.createDatasource(ModuleConfigurationImpl.java:143)
        at org.netbeans.modules.j2ee.deployment.config.ConfigSupportImpl.createDatasource(ConfigSupportImpl.java:379)
        at org.netbeans.modules.j2ee.deployment.devmodules.spi.J2eeModuleProvider.createDatasource(J2eeModuleProvider.java:266)
        at org.netbeans.modules.j2ee.common.DatasourceUIHelper$5.run(DatasourceUIHelper.java:526)
        at org.netbeans.modules.j2ee.core.api.support.progress.ProgressSupport$ActionInvoker.invokeNextActionsOfSameKind(ProgressSupport.java:270)
        at org.netbeans.modules.j2ee.core.api.support.progress.ProgressSupport$ActionInvoker.access$100(ProgressSupport.java:118)
[catch] at org.netbeans.modules.j2ee.core.api.support.progress.ProgressSupport$ActionInvoker$1.run(ProgressSupport.java:159)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1957)
Comment 8 Sergey Petrov 2010-06-03 09:28:30 UTC
thanks, exception says about corrupted/malformed config xml, can you attach your sun-resources.xml?
As there are a lot of comments now, can you provide all steps in on comment?

ps. addition of datasources shouldn't be related to persistence.xml, persistence.xml use already created on server side or on application side datasources.
Comment 9 chip2 2010-06-03 15:31:23 UTC
(In reply to comment #8)
> thanks, exception says about corrupted/malformed config xml, can you attach
> your sun-resources.xml?

> As there are a lot of comments now, can you provide all steps in on comment?
> 
> ps. addition of datasources shouldn't be related to persistence.xml,
> persistence.xml use already created on server side or on application side
> datasources.

Tomorrow morning I will try to send you what you have asked me
Comment 10 chip2 2010-06-04 06:59:21 UTC
Created attachment 99804 [details]
open office document screen shot

screen shot (open office odt file)
Comment 11 chip2 2010-06-04 07:01:15 UTC
Created attachment 99805 [details]
bug sample project

netbeans project
Comment 12 chip2 2010-06-04 07:04:03 UTC
hi i send my sample project and a open office doc (log , screen shot )

thanks
Comment 13 Sergey Petrov 2010-06-04 12:23:57 UTC
Vince, can you look also as it's from glassfish-javaee but may be related to changes I made to fix another 'datasouse can't be created issue" but may not..
?
Comment 14 Sergey Petrov 2010-06-04 12:34:12 UTC
seems to be reproducible if work offline, i.e. if www.sun.com can't be resolved.
Comment 15 Sergey Petrov 2010-06-04 13:41:08 UTC
root reason in INFO [glassfish-javaee]: www.sun.com
java.net.UnknownHostException: www.sun.com
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)

later as resource xml is broken(empty) there area a lot of premature end of file exeptions.

will add entity resolver, good to push fix to 6.9.1
Comment 16 Sergey Petrov 2010-06-04 14:26:26 UTC
http://hg.netbeans.org/web-main/rev/8c7e55dadece fixed in web-main
Comment 17 Sergey Petrov 2010-06-05 16:46:35 UTC
*** Bug 187142 has been marked as a duplicate of this bug. ***
Comment 18 Quality Engineering 2010-06-08 06:07:45 UTC
Integrated into 'main-golden', will be available in build *201006080001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/8c7e55dadece
User: Sergey B. Petrov <sj-nb@netbeans.org>
Log: fix #186877 add resolver to resolve dtd locally, dtd is already in sun-dd... api module
Comment 19 rbalada 2010-06-16 08:54:28 UTC
Please verify bugfix for this bug, so it can be included in release691 repository.

Thanks,
-R
Comment 20 Martin Schovanek 2010-06-16 10:59:44 UTC
Verified in the trunk by QE.
Comment 21 rbalada 2010-06-18 08:09:44 UTC
main #8c7e55dadece transplanted to release691 #3b568df2a953


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo