You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Kai Grabfelder <no...@kinokai.de> on 2008/12/14 17:26:25 UTC

Ibator: error after upgrading from abator: The file ... does not exist in this workspace

Hi Jeff,

I've just updated to ibator 1.2.0. After doing all necessary changes to the config.xml I'm getting the
following error when trying to generate the artefacts (using the "Generate iBATIS artifacts" action):

Generation Warnings Occured
  The file D:\Projekte\svn\myproject-trunk\myproject-service\src\main\java\de\myproject\domain\User.java does
not exist in this workspace
... (continued for all java models)

The files of course do exist.

After running ibator the DAOs and JavaModels are not beeing updated. The funny thing (besides that it worked
with Abator) is that generating the sqlmaps still works. The targetProject attribute for the
javaModelGenerator and the sqlMapGenerator is exactly the same. Here is the relevant snippet:

<javaModelGenerator targetPackage="de.myproject.domain" targetProject="myproject-service/src/main/java" />
<sqlMapGenerator targetPackage="ibatis" targetProject="myproject-service/src/main/resources" />

Any Idea what could be causing this issue?

Regards

Kai


Array List of Java beans to Stored Procedure

Posted by "Naveen Mansur (nmansur)" <nm...@cisco.com>.
Hi 

        I require to pass array list of java beans to stored proc 

If I send ArrayList with primitive data type it works but fails when
send objects in arrayList.

Error : java.sql.SQLException: Fail to convert to internal
representation

Any Help pointers appreciated 

Type Handler Implementation :

public void setParameter(ParameterSetter setter, Object parameter)

                        throws SQLException {

                if (parameter instanceof ArrayList) {

                        ArrayList arr = (ArrayList) parameter;

                        Statement stmt = setter.getPreparedStatement();

                        Connection conn = stmt.getConnection();

                        ArrayDescriptor desc =
ArrayDescriptor.createDescriptor("PROPERTYVALUE_COL",

                                        conn); // The STRARRAY is the
name of the oracle type

                                                        // created as
the instance of table.

                        parameter = new ARRAY(desc, conn,
arr.toArray());

                }

                setter.setObject(parameter);

        }

XML MAPPING

<parameterMap id="parameters4ab" class="map">

    <parameter property="i_array" jdbcType="PROPERTYVALUE_COL"
javaType="ArrayList"  mode="IN" 

              typeHandler=" StringArrayTypeHandler"/>

              

 <parameter property="employees" javaType="object"
typeName="EMPLOYEE_TBL"

               jdbcType="ARRAY" mode="OUT"

               typeHandler="EmployeeTableTypeHandlerCallback"/>

  </parameterMap>

  

  <procedure id="findEmployeesTbl_1" parameterMap="parameters4ab">

    <![CDATA[

     { call 

         declare 

           l_tbl employee_tbl; 

         begin 

           l_tbl := find_employees_1(?); 

           ? := l_tbl; 

         end 

     }

    ]]>

  </procedure>


Array List of Java beans to Stored Procedure

Posted by "Naveen Mansur (nmansur)" <nm...@cisco.com>.
Hi 
	I require to pass array list of java beans to stored proc 

If I send ArrayList with primitive data type it works but fails when
send objects in arrayList.

Error : java.sql.SQLException: Fail to convert to internal
representation

Any Help pointers appreciated 



Type Handler Implementation :

public void setParameter(ParameterSetter setter, Object parameter)
			throws SQLException {

		if (parameter instanceof ArrayList) {
			ArrayList arr = (ArrayList) parameter;
			Statement stmt = setter.getPreparedStatement();
			Connection conn = stmt.getConnection();
			ArrayDescriptor desc =
ArrayDescriptor.createDescriptor("PROPERTYVALUE_COL",
					conn); // The STRARRAY is the
name of the oracle type
							// created as
the instance of table.
			parameter = new ARRAY(desc, conn,
arr.toArray());
		}
		setter.setObject(parameter);
	}

XML MAPPING


<parameterMap id="parameters4ab" class="map">
    <parameter property="i_array" jdbcType="PROPERTYVALUE_COL"
javaType="ArrayList"  mode="IN" 
              typeHandler=" StringArrayTypeHandler"/>
              
 <parameter property="employees" javaType="object"
typeName="EMPLOYEE_TBL"
               jdbcType="ARRAY" mode="OUT"
               typeHandler="EmployeeTableTypeHandlerCallback"/>
  </parameterMap>
  
  <procedure id="findEmployeesTbl_1" parameterMap="parameters4ab">
    <![CDATA[
     { call 
         declare 
           l_tbl employee_tbl; 
         begin 
           l_tbl := find_employees_1(?); 
           ? := l_tbl; 
         end 
     }
    ]]>
  </procedure>

Re: Ibator: error after upgrading from abator: The file ... does not exist in this workspace

Posted by Jeff Butler <je...@gmail.com>.
I can make this happen if a file doesn't exist at the start of the
Ibator run, but that same file is generated more than one time in the
same Ibator run (i.e. same table in different contexts, or the same
table listed more than one time in a context).  Does this sound
familiar?

It seems like a wierd use case, but I think I can code around it easily enough.

Jeff

On Sun, Dec 14, 2008 at 2:11 PM, Jeff Butler <je...@gmail.com> wrote:
> I have a comment in the code that generates this error stating "This
> should never happen".  Ha - guess I was wrong about that. :)
>
> By any chance, do you have multiple contexts that are writing into the
> same source tree?  If one context generated the file, then another
> context attempted to generate the same file, then I suppose this error
> might happen.  I'll see if I can figure out a reliable way to make it
> happen.
>
> Jeff
>
>
> On Sun, Dec 14, 2008 at 2:05 PM, Kai Grabfelder <no...@kinokai.de> wrote:
>> Hi Jeff,
>>
>> it exists physically. It's the normal maven folder structure. Just thought you could say something about when
>> this error occurs. I'v switched back to 1.1 for now. I'll try to strip down my project and come back to you
>> once I've done it...
>>
>> Regards
>>
>> Kai
>>
>> --- Original Nachricht ---
>> Absender: Jeff Butler
>> Datum: 14.12.2008 20:46
>>> Hi Kai,
>>>
>>> I'm unable to duplcate this.  Can you tell me - is the folder
>>> "src/main/java" a linked folder external to the workspace, or does the
>>> folder physically exist in the workspace?
>>>
>>> Jeff
>>>
>>>
>>> On Sun, Dec 14, 2008 at 10:26 AM, Kai Grabfelder <no...@kinokai.de> wrote:
>>>> Hi Jeff,
>>>>
>>>> I've just updated to ibator 1.2.0. After doing all necessary changes to the config.xml I'm getting the
>>>> following error when trying to generate the artefacts (using the "Generate iBATIS artifacts" action):
>>>>
>>>> Generation Warnings Occured
>>>>  The file D:\Projekte\svn\myproject-trunk\myproject-service\src\main\java\de\myproject\domain\User.java does
>>>> not exist in this workspace
>>>> ... (continued for all java models)
>>>>
>>>> The files of course do exist.
>>>>
>>>> After running ibator the DAOs and JavaModels are not beeing updated. The funny thing (besides that it worked
>>>> with Abator) is that generating the sqlmaps still works. The targetProject attribute for the
>>>> javaModelGenerator and the sqlMapGenerator is exactly the same. Here is the relevant snippet:
>>>>
>>>> <javaModelGenerator targetPackage="de.myproject.domain" targetProject="myproject-service/src/main/java" />
>>>> <sqlMapGenerator targetPackage="ibatis" targetProject="myproject-service/src/main/resources" />
>>>>
>>>> Any Idea what could be causing this issue?
>>>>
>>>> Regards
>>>>
>>>> Kai
>>>>
>>>>
>>>
>>
>>
>

Re: Ibator: error after upgrading from abator: The file ... does not exist in this workspace

Posted by Jeff Butler <je...@gmail.com>.
I have a comment in the code that generates this error stating "This
should never happen".  Ha - guess I was wrong about that. :)

By any chance, do you have multiple contexts that are writing into the
same source tree?  If one context generated the file, then another
context attempted to generate the same file, then I suppose this error
might happen.  I'll see if I can figure out a reliable way to make it
happen.

Jeff


On Sun, Dec 14, 2008 at 2:05 PM, Kai Grabfelder <no...@kinokai.de> wrote:
> Hi Jeff,
>
> it exists physically. It's the normal maven folder structure. Just thought you could say something about when
> this error occurs. I'v switched back to 1.1 for now. I'll try to strip down my project and come back to you
> once I've done it...
>
> Regards
>
> Kai
>
> --- Original Nachricht ---
> Absender: Jeff Butler
> Datum: 14.12.2008 20:46
>> Hi Kai,
>>
>> I'm unable to duplcate this.  Can you tell me - is the folder
>> "src/main/java" a linked folder external to the workspace, or does the
>> folder physically exist in the workspace?
>>
>> Jeff
>>
>>
>> On Sun, Dec 14, 2008 at 10:26 AM, Kai Grabfelder <no...@kinokai.de> wrote:
>>> Hi Jeff,
>>>
>>> I've just updated to ibator 1.2.0. After doing all necessary changes to the config.xml I'm getting the
>>> following error when trying to generate the artefacts (using the "Generate iBATIS artifacts" action):
>>>
>>> Generation Warnings Occured
>>>  The file D:\Projekte\svn\myproject-trunk\myproject-service\src\main\java\de\myproject\domain\User.java does
>>> not exist in this workspace
>>> ... (continued for all java models)
>>>
>>> The files of course do exist.
>>>
>>> After running ibator the DAOs and JavaModels are not beeing updated. The funny thing (besides that it worked
>>> with Abator) is that generating the sqlmaps still works. The targetProject attribute for the
>>> javaModelGenerator and the sqlMapGenerator is exactly the same. Here is the relevant snippet:
>>>
>>> <javaModelGenerator targetPackage="de.myproject.domain" targetProject="myproject-service/src/main/java" />
>>> <sqlMapGenerator targetPackage="ibatis" targetProject="myproject-service/src/main/resources" />
>>>
>>> Any Idea what could be causing this issue?
>>>
>>> Regards
>>>
>>> Kai
>>>
>>>
>>
>
>

Re: Ibator: error after upgrading from abator: The file ... does not exist in this workspace

Posted by Kai Grabfelder <no...@kinokai.de>.
Hi Jeff,

it exists physically. It's the normal maven folder structure. Just thought you could say something about when
this error occurs. I'v switched back to 1.1 for now. I'll try to strip down my project and come back to you
once I've done it...

Regards

Kai

--- Original Nachricht ---
Absender: Jeff Butler
Datum: 14.12.2008 20:46
> Hi Kai,
> 
> I'm unable to duplcate this.  Can you tell me - is the folder
> "src/main/java" a linked folder external to the workspace, or does the
> folder physically exist in the workspace?
> 
> Jeff
> 
> 
> On Sun, Dec 14, 2008 at 10:26 AM, Kai Grabfelder <no...@kinokai.de> wrote:
>> Hi Jeff,
>>
>> I've just updated to ibator 1.2.0. After doing all necessary changes to the config.xml I'm getting the
>> following error when trying to generate the artefacts (using the "Generate iBATIS artifacts" action):
>>
>> Generation Warnings Occured
>>  The file D:\Projekte\svn\myproject-trunk\myproject-service\src\main\java\de\myproject\domain\User.java does
>> not exist in this workspace
>> ... (continued for all java models)
>>
>> The files of course do exist.
>>
>> After running ibator the DAOs and JavaModels are not beeing updated. The funny thing (besides that it worked
>> with Abator) is that generating the sqlmaps still works. The targetProject attribute for the
>> javaModelGenerator and the sqlMapGenerator is exactly the same. Here is the relevant snippet:
>>
>> <javaModelGenerator targetPackage="de.myproject.domain" targetProject="myproject-service/src/main/java" />
>> <sqlMapGenerator targetPackage="ibatis" targetProject="myproject-service/src/main/resources" />
>>
>> Any Idea what could be causing this issue?
>>
>> Regards
>>
>> Kai
>>
>>
> 


Re: Ibator: error after upgrading from abator: The file ... does not exist in this workspace

Posted by Jeff Butler <je...@gmail.com>.
Hi Kai,

I'm unable to duplcate this.  Can you tell me - is the folder
"src/main/java" a linked folder external to the workspace, or does the
folder physically exist in the workspace?

Jeff


On Sun, Dec 14, 2008 at 10:26 AM, Kai Grabfelder <no...@kinokai.de> wrote:
> Hi Jeff,
>
> I've just updated to ibator 1.2.0. After doing all necessary changes to the config.xml I'm getting the
> following error when trying to generate the artefacts (using the "Generate iBATIS artifacts" action):
>
> Generation Warnings Occured
>  The file D:\Projekte\svn\myproject-trunk\myproject-service\src\main\java\de\myproject\domain\User.java does
> not exist in this workspace
> ... (continued for all java models)
>
> The files of course do exist.
>
> After running ibator the DAOs and JavaModels are not beeing updated. The funny thing (besides that it worked
> with Abator) is that generating the sqlmaps still works. The targetProject attribute for the
> javaModelGenerator and the sqlMapGenerator is exactly the same. Here is the relevant snippet:
>
> <javaModelGenerator targetPackage="de.myproject.domain" targetProject="myproject-service/src/main/java" />
> <sqlMapGenerator targetPackage="ibatis" targetProject="myproject-service/src/main/resources" />
>
> Any Idea what could be causing this issue?
>
> Regards
>
> Kai
>
>

Re: Ibator: error after upgrading from abator: The file ... does not exist in this workspace

Posted by Iwao AVE! <ha...@gmail.com>.
Kai,

Shouldn't the 'targetPackage' be 'de.domain.myproj' not
'de.myproj.domain' ?

Please ignore this post if it's just wrong.
I sometimes do this ;)

Regards,
Iwao

on 08.12.15 1:26 AM Kai Grabfelder said the following:
> Hi Jeff,
> 
> I've just updated to ibator 1.2.0. After doing all necessary changes to the config.xml I'm getting the
> following error when trying to generate the artefacts (using the "Generate iBATIS artifacts" action):
> 
> Generation Warnings Occured
>   The file D:\Projekte\svn\myproject-trunk\myproject-service\src\main\java\de\myproject\domain\User.java does
> not exist in this workspace
> ... (continued for all java models)
> 
> The files of course do exist.
> 
> After running ibator the DAOs and JavaModels are not beeing updated. The funny thing (besides that it worked
> with Abator) is that generating the sqlmaps still works. The targetProject attribute for the
> javaModelGenerator and the sqlMapGenerator is exactly the same. Here is the relevant snippet:
> 
> <javaModelGenerator targetPackage="de.myproject.domain" targetProject="myproject-service/src/main/java" />
> <sqlMapGenerator targetPackage="ibatis" targetProject="myproject-service/src/main/resources" />
> 
> Any Idea what could be causing this issue?
> 
> Regards
> 
> Kai