Solved

upgrading

Posted on 2011-03-23
20
682 Views
Last Modified: 2012-06-21
I am attempting to upgrade from jasper 3.7 to jasper 4.0
I have everything working accept the appservertype recognition

It appears that we have tomcat 5.5.20 installed however when i do the upgrade script it kicks it back as unrecognizable.

suggestions - what additional info do i need to supply to better help
0
Comment
Question by:tagomtech
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 13
  • 7
20 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 35200010
I'm not claiming to be able to help with this one, but it will help everyone if you say

a. how you're doing this
b. what the *verbatim* error messages are
0
 

Author Comment

by:tagomtech
ID: 35200097
lol! okay here goes
JasperServer has an autoupgrade script. To use this you work with the command line.
The steps are:
1. backup jasperserver and db - done
2. delete your webapp/jasperserver directory - done
3. run upgrade script - here is the hitch
I have altered the master.properties file so that the upgrade should be smooth. There are several criteria listed in the xml:
appServerType=tomcat6 (or tomcat5, jboss, glassfish)
appServerDir=c:\\apache-tomcat-6.0.26 (for example)
dbUsername=root
dbPassword=password
dbHost=localhost
(# application server type (default is tomcat6)
# appServerType = tomcat6
# appServerType = tomcat 5.5.20
# appServerType = jboss
# appServerType = glassfish2
# (beta) appServerType = weblogic
# (beta) appServerType = websphere
 appServerType = skipAppServerCheck)

 The only way I can get the script to run is to use the skipAppServerCheck - which then will not deploy the web app - so I am left with an updated database but no webserver app....
I have tried using tomcat 5, tomcat 5,5 tomcat 5.5.20 (which seems to be the actual version) but all give me the following error:
Check that appServerType is properly set in your default_master.properties file


0
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
ID: 35200160
>>run upgrade script - here is the hitch

Can you please attach this?
0
Turn your laptop into a mobile console!

The CV211 Laptop USB Console Adapter provides a direct Laptop-to-Computer connection for fast and easy remote desktop access with no software to install.

 

Author Comment

by:tagomtech
ID: 35200169
the script or the default properties file
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 35200324
Well you might as well attach both files
0
 

Author Comment

by:tagomtech
ID: 35200404
I am going to attach several files that seem to be related to upgrading this software -
The issue is I can't seem to get the war file to extract creating the directory for the webapp
 build.xml
setup.xml
0
 

Author Comment

by:tagomtech
ID: 35200421
these are the files that actually I change and execute

default-master.txt
0
 

Author Comment

by:tagomtech
ID: 35200453
I keep forgetting that hitting enter actually posts the message instead of uploading - sorry
The batch file - which it the autoupgrade file can not be uploaded - not sure how to change extensions on it.
0
 

Author Comment

by:tagomtech
ID: 35200482
This is what is coded inside of batch file
@ECHO OFF

rem ///
rem /// JasperReports Server CE script that performs upgrade by updating existing database.
rem ///
rem /// Usage: js-upgrade-samedb-ce.bat {option:(<EMPTY>|with-samples|regen-config|test)}
rem ///

CALL "bin/do-js-upgrade.bat" ce inDatabase %*

This is the code inside of the bin/do-js-upgrade.bat

@ECHO OFF

rem ///
rem /// JasperReports Server common upgrade script.
rem ///
rem /// Usage: do-js-upgrade.bat {edition:(ce|pro)} {strategy:(standard|inDatabase)} {option:(<EMPTY>|with-samples|regen-config|test)} {option(for standard upgrade only):import file(<path-to-file-and-filename>)}
rem ///        If <path-to-file-and-filename> contains spaces then need to enclose <path-to-file-and-filename> to double quotes.
rem ///

rem -----------------------------------------------------------------------------

rem
rem Determining argument count.
rem
SET ARGUMENT_COUNT=0
FOR %%X IN (%*) DO SET /A ARGUMENT_COUNT+=1

rem
rem Validating and setting edition.
rem
SET JS_EDITION=%1
IF NOT "%JS_EDITION%"=="ce" IF NOT "%JS_EDITION%"=="pro" (
  CALL :fail "JasperReports Server edition expected as input"
  EXIT /b 1
)

rem
rem Validating and setting upgrade strategy.
rem
SET JS_UPGRADE_STRATEGY=%2
IF NOT "%JS_UPGRADE_STRATEGY%"=="standard" IF NOT "%JS_UPGRADE_STRATEGY%"=="inDatabase" (
  CALL :fail "JasperReports Server upgrade strategy expected as input"
  EXIT /b 1
)

rem
rem Validating argument count.
rem
IF "%JS_UPGRADE_STRATEGY%"=="standard" (
  IF %ARGUMENT_COUNT% GTR 5 (
    CALL :fail "Too many arguments"
    EXIT /b 1
  )
  IF %ARGUMENT_COUNT% LSS 3 (
    CALL :fail "Invalid argument count"
    EXIT /b 1
  )
)
IF "%JS_UPGRADE_STRATEGY%"=="inDatabase" IF %ARGUMENT_COUNT% GTR 3 (
  CALL :fail "Too many arguments"
  EXIT /b 1
)

SET JS_OPTION=%~3
SET IMPORT_FILE=%~4
SET IS_INCLUDE_ACCESS_EVENTS=FALSE
IF ""%JS_UPGRADE_STRATEGY%""==""standard"" (
  IF ""%3""==""include-access-events"" (
    SET IS_INCLUDE_ACCESS_EVENTS=TRUE
    SET JS_OPTION=%~4
    SET IMPORT_FILE=%~5
  )
  IF ""%4""==""include-access-events"" (
    SET IS_INCLUDE_ACCESS_EVENTS=TRUE
    SET JS_OPTION=%~3
    SET IMPORT_FILE=%~5
  )
  IF ""%5""==""include-access-events"" (
    SET IS_INCLUDE_ACCESS_EVENTS=TRUE
    SET JS_OPTION=%~3
    SET IMPORT_FILE=%~4
  )
)

SET IS_INVALID_JS_OPTION_VALUE=FALSE
IF NOT ""%JS_OPTION%""==""with-samples"" IF NOT ""%JS_OPTION%""==""regen-config"" IF NOT ""%JS_OPTION%""==""test"" IF NOT ""%JS_OPTION%""==""help"" (
  SET IS_INVALID_JS_OPTION_VALUE=TRUE
)

SET IS_INVALID_PARAM_VALUE=FALSE
IF NOT ""%IMPORT_FILE%""==""with-samples"" IF NOT ""%IMPORT_FILE%""==""regen-config"" IF NOT ""%IMPORT_FILE%""==""test"" IF NOT ""%IMPORT_FILE%""==""help"" (
  SET IS_INVALID_PARAM_VALUE=TRUE
)

SET IMPORT_FILE2=%IMPORT_FILE%
IF "%JS_UPGRADE_STRATEGY%"=="standard" (
  IF ""%IMPORT_FILE%""=="""" (
    IF "%IS_INVALID_JS_OPTION_VALUE%"=="TRUE" (
      SET IMPORT_FILE=%JS_OPTION%
      SET JS_OPTION=
    ) ELSE (
      IF NOT ""%JS_OPTION%""==""regen-config"" IF NOT ""%JS_OPTION%""==""test"" IF NOT ""%JS_OPTION%""==""help"" (
        CALL :fail "JasperReports Server import file[path-to-file-and-filename] expected as input"
        EXIT /b 1
      )
    )
  ) ELSE (
    IF "%IS_INVALID_JS_OPTION_VALUE%"=="TRUE" (
      IF "%IS_INVALID_PARAM_VALUE%"=="TRUE" (
        CALL :fail "Invalid option specified"
        EXIT /b 1
      ) ELSE (
        SET IMPORT_FILE=%JS_OPTION%
        SET JS_OPTION=%IMPORT_FILE2%
      )
    )
  )
)

IF ""%JS_UPGRADE_STRATEGY%""==""standard"" IF NOT ""%JS_OPTION%""==""regen-config"" IF NOT ""%JS_OPTION%""==""test"" IF NOT ""%JS_OPTION%""==""help"" IF "%IMPORT_FILE%"=="" (
  CALL :fail "JasperReports Server import file[path-to-file-and-filename] expected as input"
  EXIT /b 1
)

IF ""%JS_OPTION%""=="""" ( GOTO :default )
IF ""%JS_OPTION%""==""with-samples"" ( GOTO :withSamples )
IF ""%JS_OPTION%""==""regen-config"" ( GOTO :regenConfig )
IF ""%JS_OPTION%""==""test"" ( GOTO :test )
IF ""%JS_OPTION%""==""help"" ( GOTO :help )
CALL :fail "Invalid option specified"
EXIT /b 1

:default
SET JS_ANT_TARGET=upgrade-minimal-%JS_EDITION%
SET JS_OPTION=default
GOTO :proceedToSetup

:withSamples
SET JS_ANT_TARGET=upgrade-normal-%JS_EDITION%
GOTO :proceedToSetup

:regenConfig
SET JS_ANT_TARGET=refresh-config
GOTO :proceedToSetup

:test
SET JS_ANT_TARGET=pre-upgrade-test-%JS_EDITION%
GOTO :proceedToSetup

:help
IF "%JS_UPGRADE_STRATEGY%"=="standard" ( TYPE bin\upgrade-newdb.help )
IF "%JS_UPGRADE_STRATEGY%"=="inDatabase" ( TYPE bin\upgrade-samedb.help )
GOTO :end

rem
rem Calling core setup script with determined parameters.
rem
:proceedToSetup
IF "%IMPORT_FILE%"=="" (
  SET JS_ANT_OPTIONS=%JS_UPGRADE_STRATEGY%
) ELSE (
  SET JS_ANT_OPTIONS=%JS_UPGRADE_STRATEGY% "%IMPORT_FILE%"
)
IF "%JS_UPGRADE_STRATEGY%"=="standard" (
IF "%IS_INCLUDE_ACCESS_EVENTS%"=="TRUE" (
  SET JS_ANT_OPTIONS=%JS_ANT_OPTIONS% include-access-events
)
)
CALL "%~dp0"do-js-setup.bat upgrade %JS_EDITION% %JS_OPTION% %JS_ANT_TARGET% %JS_ANT_OPTIONS%
GOTO :end

rem -----------------------------------------------------------------------------

:showUsage
ECHO Please enter one of the following options: 'EMPTY', with-samples, regen-config, test
IF "%JS_UPGRADE_STRATEGY%"=="standard" (
  ECHO "Also enter import file option(<path-to-file-and-filename>). If <path-to-file-and-filename> contains spaces then need to enclose <path-to-file-and-filename> to double quotes."
)
GOTO:EOF

:fail
IF NOT "%~1" == "" ( ECHO %~1 )
CALL :showUsage
EXIT /b 1

:end
EXIT /b 0
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 35201043
In your case it should probably be
appServerType = tomcat5

Open in new window

0
 

Author Comment

by:tagomtech
ID: 35201050
I tried that - it gives me an error....that is what is so confusing about this.
0
 

Author Comment

by:tagomtech
ID: 35201054
I believe I may have found the issue - we install jasperServer on port 8082- default is 8080. We have glassfish installed on 8080.
0
 

Author Comment

by:tagomtech
ID: 35201058
rying to do a work around now :(
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 35201096
>>I have tried using tomcat 5, tomcat 5,5 tomcat 5.5.20

None of those is 'tomcat5' ;)
0
 

Author Comment

by:tagomtech
ID: 35201115
right without the spaces....promise I really did try...trying again now....
0
 

Author Comment

by:tagomtech
ID: 35201161
woohoo I think I have it - changed it back to ;) let me think ''tomcat5' - however also changed the direction of the \ to / in the directory and when through EACH and every file and changed any ref. to port 8080 to 8082
testing now - cross fingers
0
 

Author Comment

by:tagomtech
ID: 35201238
OKAY! one step closer - this did deploy the webapp but to the wrong directory - here is the results....
deploy-webapp:
     [echo]
     [echo] Property values (in install.xml: deploy-webapp):
     [echo]  jsEdition = ce
     [echo]  warFileDistSourceDir = D:\Java\jasperreports-server-cp-4.0.0-bin\jasperreports-server-cp-4.0.0-bin\buildomatic/../jasperserver.war
     [echo]  warTargetDir = D:/Java/jasperserver-ce-3.7.0/webapps/jasperserver
     [echo]  webAppName = jasperserver
     [echo]  webAppNameCE = jasperserver
     [echo]  webAppNamePro = jasperserver-pro
     [echo]  webAppNameSrc = jasperserver
     [echo]  webAppNameDel = jasperserver
     [echo]  warTargetDirDel = D:/Java/jasperserver-ce-3.7.0/webapps/jasperserver
     [echo]
     [copy] Copying 1059 resources to D:\Java\jasperserver-ce-3.7.0\webapps\jasperserver
     [copy] Copying 4 files to D:\Java\jasperserver-ce-3.7.0\webapps\jasperserver

What I need to happen is for the jasperserver to deploy to the D:\Java\jasperserver-ce-3.7.0\apache-tomcat\webapps  directory
any ideas?
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 35201331
Try

appServerDir = D:\Java\jasperserver-ce-3.7.0\apache-tomcat
0
 

Author Closing Comment

by:tagomtech
ID: 35201621
YOU ROCK!
Again thanks for talking through this with me.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 35201722
:)
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

687 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question