This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 57342 - bad generation of server resource name
Summary: bad generation of server resource name
Status: CLOSED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 8 (show other bugs)
Version: 4.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: _ ludo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-01 15:43 UTC by Daria Titova
Modified: 2005-07-19 09:42 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daria Titova 2005-04-01 15:43:01 UTC
When creating CMP Entity Bean from JDBC Connection server resources are created:
connection pool and datasource nodes under EJBModule > Server Resources node.
But names generated for server resources may be incorrect and then they can not
be registered on Application Server.
E.g., database URL for DB2 looks like
'jdbc:sun:db2://kam-db-db2:50000;databaseName=SAMPLE'. Generated server
resources names would be:
'connection-pool-jdbc_sun_kam-db-db2_50000;databaseName=SAMPLE' and
'datasource-jdbc_sun_kam-db-db2_50000;databaseName=SAMPLE'.

When trying to register resource error message appears: "Failed while
registering resource : Operation 'createJdbcConnectionPool' failed in
'resources' Config Mbean.
Target exception message:
[Attribute(name=connection-pool-jdbc_sun_kam-db-db2_50000;databaseName=SAMPLE) :
Invalid String - Should match regular expression:
[\p{L}\p{N}_][\p{L}\p{N}\-_./;]* (consult documentation for
"java.util.regexp.Pattern" for details.]".
Comment 1 Petr Jiricka 2005-04-01 16:17:02 UTC
Daria, which build of NetBeans are you using?
Comment 2 _ ludo 2005-04-01 17:05:54 UTC
Nitya, pleas fix this bug...
I guess we need to generate an acceptable name there otherwise the backend does
not accept it (with the ";" char)

Should not be hard, but let me know,
Ludo
Comment 3 Nitya Doraisamy 2005-04-01 18:44:13 UTC
The error is not caused by the name of the datasource. It is being caused by
invalid additional properties that are defined for this resource. The connection
pool for sun DB2 resource takes a name value pair 
url = connection-pool-jdbc_sun_kam-db-db2_50000;databaseName=SAMPLE
and not 
name = connection-pool-jdbc_sun_kam-db-db2_50000;databaseName=SAMPLE

That is the reason for the error message. Rajeshwar had a similar bug for oracle
server. will follow up with hime to get this resolved.
Comment 4 Nitya Doraisamy 2005-04-01 19:10:44 UTC
Can you please attach the resource xml's generated in this project. They will be
under the setup directory within the project.
Comment 5 _ ludo 2005-04-02 20:09:25 UTC
Working on it with Nitya.
We might need validation from the studio engineers.
Comment 6 _ ludo 2005-04-03 06:31:47 UTC
 a potential fix has been integrated.
Before closing the bug, we need validation on a real case, as we do not have
these  drivers...
Let us know asap if the fix is OK.
Comment 7 _ ludo 2005-04-05 16:27:52 UTC
I mark this bug as fixed. (both trunk and 41 branch).

I need a verification ASAP (i.e in the next 48 hours) to make sure we fulfill
the Studio needs there...Otherwise we'll not have th time to accomodate if there
is still an issue there.

Please, verify with the drivers in Studio.
Comment 8 Daria Titova 2005-04-06 15:29:35 UTC
Verified with Build 200504031800.
Comment 9 _ ludo 2005-04-06 15:45:50 UTC
thks
Comment 10 Daria Titova 2005-04-06 15:59:46 UTC
I have verified the bug with 1 database (DB2) but was not able to test it with
other databases because of locked drivers.  Will do more checks in next build
and close the bug then.