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 161619 - [67cat] [j2ee] Tomcat server configuration not imported from 6.5
Summary: [67cat] [j2ee] Tomcat server configuration not imported from 6.5
Status: RESOLVED WORKSFORME
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Tomcat (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: Jiri Skrivanek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-31 18:01 UTC by giorgio42
Modified: 2009-05-04 11:35 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
List of servers in 6.5.1 (16.00 KB, image/png)
2009-04-06 21:39 UTC, giorgio42
Details
List of servers in 6.7 (17.42 KB, image/png)
2009-04-06 21:39 UTC, giorgio42
Details
Screenshot of Tomcat configuration in 6.5.1 (42.73 KB, image/png)
2009-04-06 21:45 UTC, giorgio42
Details
6.5 config/J2EE/InstalledServers vs. 6.7 after initial import (60.37 KB, image/png)
2009-04-17 20:40 UTC, giorgio42
Details

Note You need to log in before you can comment on or make changes to this bug.
Description giorgio42 2009-03-31 18:01:55 UTC
[ BUILD # : 090330 ]
[ JDK VERSION : 1.6.* ]


090330 does not import my Tomcat server configuration (Tomcat 6.0.18)
from 6.5, at least not in my case. All web applications are tagged as
having unresolved references (the Tomcat haters once again ;-)).
Comment 2 giorgio42 2009-04-05 21:27:03 UTC
After this issue has been worked all my projects would compile out of the box on first start of NB 6.7.
How cool would this be? (And also a first after 9 years...)
Comment 3 Petr Hejl 2009-04-06 14:20:50 UTC
Can you specify the steps to reproduce?

I tried following
1) install 6.5.1
2) register tomcat, create web app
3) start dev version
4) allow to import settings from 6.5 on startup
5) everything ok
Comment 4 giorgio42 2009-04-06 21:38:02 UTC
I found the following in messages.log after first startup (zapped the userdir once again):
org.netbeans.modules.j2ee.deployment.devmodules.api.InstanceRemovedException:
tomcat60:home=C:\apps\tomcat6:base=apache-tomcat-6.0.18_base
        at
org.netbeans.modules.j2ee.deployment.devmodules.api.ServerInstance.getInstanceFromRegistry(ServerInstance.java:207)
        at org.netbeans.modules.j2ee.deployment.devmodules.api.ServerInstance.getJ2eePlatform(ServerInstance.java:139)
[catch] at org.netbeans.modules.websvc.core.WSStackUtils.getJ2eePlatform(WSStackUtils.java:88)
        at org.netbeans.modules.websvc.core.WSStackUtils.<init>(WSStackUtils.java:79)
        at
org.netbeans.modules.websvc.core.jaxws.projects.JavaEEJAXWSVersionProvider.getJAXWSVersion(JavaEEJAXWSVersionProvider.java:79)
        at org.netbeans.modules.websvc.jaxwsmodel.project.TransformerUtils.isJAXWS21(TransformerUtils.java:187)
        at org.netbeans.modules.websvc.jaxwsmodel.project.TransformerUtils.transformClients(TransformerUtils.java:133)
        at
org.netbeans.modules.websvc.jaxwsmodel.project.WebJaxWsLookupProvider$1.projectOpened(WebJaxWsLookupProvider.java:202)
        at org.netbeans.spi.project.ui.ProjectOpenedHook$1.projectOpened(ProjectOpenedHook.java:81)
        at
org.netbeans.spi.project.ui.support.UILookupMergerSupport$OpenHookImpl.projectOpened(UILookupMergerSupport.java:198)
        at org.netbeans.spi.project.ui.ProjectOpenedHook$1.projectOpened(ProjectOpenedHook.java:81)
        at org.netbeans.modules.project.ui.OpenProjectList.notifyOpened(OpenProjectList.java:1059)
        at org.netbeans.modules.project.ui.OpenProjectList.access$800(OpenProjectList.java:122)
        at org.netbeans.modules.project.ui.OpenProjectList$LoadOpenProjects.loadOnBackground(OpenProjectList.java:401)
        at org.netbeans.modules.project.ui.OpenProjectList$LoadOpenProjects.run(OpenProjectList.java:309)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:573)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1005)

But Tomcat 6.0.18 definitely exists at c:\apps\tomcat6.

Comment 5 giorgio42 2009-04-06 21:39:09 UTC
Created attachment 79566 [details]
List of servers in 6.5.1
Comment 6 giorgio42 2009-04-06 21:39:36 UTC
Created attachment 79567 [details]
List of servers in 6.7
Comment 7 giorgio42 2009-04-06 21:45:37 UTC
Created attachment 79568 [details]
Screenshot of Tomcat configuration in 6.5.1
Comment 8 giorgio42 2009-04-06 21:46:45 UTC
Added stack trace from messages.log, attached screenshots and removed the INCOMPLETE keyword.
Comment 9 giorgio42 2009-04-06 21:48:22 UTC
Added stack trace from messages.log, attached screenshots and removed the INCOMPLETE keyword.
Comment 10 giorgio42 2009-04-06 21:51:44 UTC
Mid air collision with myself. I am in Stanislaw Lem story, passing by a neutron star in a space ship, watching myself
shaving through the open bathroom door...
Comment 11 Petr Hejl 2009-04-10 16:32:54 UTC
I still can't reproduce this. I created web project in 6.5.1. It contains webservice and is running on tomcat 6. While
starting the daily build settings are imported and everything is ok...

Can you try the daily build for your use case? Tomcat settings should be properly imported by this fragment in j2eeserver:

    <folder name="OptionsExport">
        <folder name="Advanced">
            <file name="J2EE">
                <attr name="include" stringvalue="config/(J2EE|GlassFish)/.*"/>
                <attr name="displayName"
bundlevalue="org.netbeans.modules.j2ee.deployment.impl.Bundle#J2EE.Options.Export.displayName"/>
            </file>
        </folder>
    </folder>

Can you provide some comparison (diff for example) of old and imported config/J2EE folder in userdir?

Thanks,
P.
Comment 12 giorgio42 2009-04-10 23:01:31 UTC
The difference between both .nbattrs is simply the missing Tomcat configuration in the imported settings:
C:\tmp\nb67daily\config\J2EE\InstalledServers>diff -w .nbattrs "c:\Documents and
Settings\a0796942\.netbeans\6.5\config\J2EE\InstalledServers\.nbattrs"
87a88,102
>     <fileobject name="tomcat_autoregistered_instance">
>         <attr name="admin_port" stringvalue="8025"/>
>         <attr name="autoregistered" stringvalue="true"/>
>         <attr name="debug_type" stringvalue="SEL_debuggingType_shared"/>
>         <attr name="displayName" stringvalue="Apache Tomcat 6.0.18"/>
>         <attr name="httpportnumber" stringvalue="8084"/>
>         <attr name="instance_id" stringvalue="tomcat60"/>
>         <attr name="is_it_bundled_tomcat" stringvalue="true"/>
>         <attr name="monitor_enabled" stringvalue="true"/>
>         <attr name="password" stringvalue="b1NcE6ho"/>
>         <attr name="registeredWithoutUI" stringvalue="false"/>
>         <attr name="timestamp" stringvalue="1229383624016"/>
>         <attr name="url" stringvalue="tomcat60:home=C:\apps\tomcat6:base=apache-tomcat-6.0.18_base"/>
>         <attr name="username" stringvalue="ide"/>
>     </fileobject>

I will try the latest daily build just now...
Comment 13 giorgio42 2009-04-10 23:30:05 UTC
Testing with 090410, same result. Only the InstanceRemovedException is missing from the log file.
Comment 14 Petr Hejl 2009-04-16 13:03:22 UTC
I have no idea how this could happen - pattern is registered, yet the file is not copied... I can't even reproduce it.
Jirko, any ideas?
Comment 15 giorgio42 2009-04-16 20:48:35 UTC
Is there any logging option or similar I could pass on the command line to collect more information about what is going on?
Comment 16 Jiri Skrivanek 2009-04-17 11:04:18 UTC
Maybe a problem in tomcat_autoregistered_instance. Is there config\J2EE\InstalledServers\tomcat_autoregistered_instance?
Or how is it treated?
Comment 17 giorgio42 2009-04-17 20:37:13 UTC
Yes, there is a tomcat_autoregistered_instance (see new attachment).
Comment 18 giorgio42 2009-04-17 20:40:42 UTC
Created attachment 80388 [details]
6.5 config/J2EE/InstalledServers vs. 6.7 after initial import
Comment 19 giorgio42 2009-04-17 20:43:54 UTC
FWIW, I tried this yesterday with the three JDKs below, every time with the same, known outcome:
C:\Documents and Settings\a0796942>java -version
java version "1.7.0-ea"
Java(TM) SE Runtime Environment (build 1.7.0-ea-b54)
Java HotSpot(TM) Client VM (build 15.0-b05, mixed mode, sharing)

C:\Documents and Settings\a0796942>c:\jdk1.5.0\bin\java -version
java version "1.5.0_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b02)
Java HotSpot(TM) Client VM (build 1.5.0_16-b02, mixed mode, sharing)

C:\Documents and Settings\a0796942>c:\jdk1.6.0\bin\java -version
java version "1.6.0_14-ea"
Java(TM) SE Runtime Environment (build 1.6.0_14-ea-b02)
Java HotSpot(TM) Client VM (build 14.0-b11, mixed mode, sharing)
Comment 20 Jiri Skrivanek 2009-04-27 13:17:44 UTC
I cannot reproduce it. For me it works as expected. I tried:

- installed NetBeans Java 6.5.1 with Tomcat
Product Version: NetBeans IDE 6.5.1 (Build 200903060201)
Java: 1.6.0_13; Java HotSpot(TM) Client VM 11.3-b02
System: Windows Vista version 6.0 running on x86; Cp1250; cs_CZ (nb)
Userdir: C:\Users\js\.netbeans\6.5
- created Web project with Tomcat
- shutdown 6.5.1
- installed NetBeans 6.7 dev
Product Version: NetBeans IDE Dev (Build 200904270201)
Java: 1.6.0_13; Java HotSpot(TM) Client VM 11.3-b02
System: Windows Vista version 6.0 running on x86; Cp1250; cs_CZ (nb)
Userdir: C:\Users\js\.netbeans\dev
- start 6.7 and confirm import from 6.5.1
- web project is successfully opened and dev\config\J2EE\InstalledServers contains the same files as 6.5\config

I don't know what is different on your setup. JDK, type of installer, version of IDE, ...?
Comment 21 Jiri Skrivanek 2009-05-04 11:35:20 UTC
Works for me.